/* assets/css/detail.css */

.detail-page {
  padding-bottom: 60px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumb a {
  color: var(--wine);
  text-decoration: none;
}
.breadcrumb span {
  margin: 0 8px;
}

/* --- Layout Grid --- */
.detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr 300px;
  gap: 32px;
}
.middle-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  margin-top: 32px;
}
.gallery-wrapper, .info-wrapper {
  align-self: start;
}

/* --- Kolom Kiri: Galeri --- */
.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  background: #f9f9f9;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.gallery-main img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.thumb-item {
  aspect-ratio: 1;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #f9f9f9;
  cursor: pointer;
  padding: 8px;
}
.thumb-item.active {
  border-color: var(--wine-dark);
}
.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Kolom Tengah: Info Produk --- */
.info-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.badge-blue { background: #eff6ff; color: #1d4ed8; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.badge-yellow { background: #fef3c7; color: #b45309; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.badge-blue svg, .badge-yellow svg { width: 12px; height: 12px; }

.product-title { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 12px; line-height: 1.3; }
.product-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.product-meta strong { color: var(--ink); }
.product-rating { display: flex; align-items: center; gap: 4px; color: #f59e0b; font-weight: 700; }

.price-box { margin-bottom: 24px; display: flex; align-items: center; flex-wrap: wrap; }
.price-current { font-size: 28px; font-weight: 800; color: var(--wine-dark); margin-right: 12px; }
.price-old { font-size: 14px; color: var(--muted); text-decoration: line-through; margin-right: 8px; }
.price-discount { font-size: 11px; background: #fee2e2; color: #b91c1c; padding: 2px 6px; border-radius: 4px; font-weight: 700; }

.match-box { background: #ecfdf5; border: 1.5px solid #a7f3d0; border-radius: 12px; padding: 16px; margin-bottom: 24px; display: flex; align-items: flex-start; gap: 12px; }
.match-icon { color: #059669; margin-top: 2px; }
.match-text h4 { margin: 0 0 4px; font-size: 13px; color: #065f46; font-weight: 600; }
.match-text p { margin: 0 0 8px; font-size: 12px; color: #047857; font-weight: 600; }
.match-text a { font-size: 12px; color: #059669; font-weight: 600; text-decoration: underline; cursor: pointer; }

.features-list { list-style: none; padding: 0; margin: 0 0 32px; }
.features-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 8px; line-height: 1.4; }
.features-list li svg { width: 16px; height: 16px; color: #059669; flex-shrink: 0; margin-top: 1px; }

/* Kompatibilitas Bawah */
.compat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--line); padding-bottom: 32px; }
.compat-item { display: flex; align-items: flex-start; gap: 12px; }
.compat-item-icon { width: 24px; height: 24px; color: var(--ink); flex-shrink: 0; }
.compat-item-text h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.compat-item-text p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.compat-motor-list { list-style: none; padding: 0; margin: 12px 0 0; }
.compat-motor-list li { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }

/* Tabs */
.tabs-header { display: flex; border-bottom: 1px solid var(--line); gap: 32px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs-header::-webkit-scrollbar { display: none; }
.tab-btn { background: none; border: none; padding: 12px 0; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-btn.active { color: var(--wine-dark); border-bottom-color: var(--wine-dark); }
.tab-content { display: none; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.tab-content.active { display: block; }
.tab-content ul { padding-left: 20px; margin-top: 12px; }
.tab-content li { margin-bottom: 8px; }

/* --- Kolom Kanan: Beli & Layanan --- */
.action-box { border: 1.5px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 20px; position: sticky; top: 24px; background: #fff; }
.action-box h3 { font-size: 15px; margin: 0 0 16px; }
.stock-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #059669; font-weight: 600; margin-bottom: 16px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.qty-row span { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.qty-selector { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty-btn { background: #f9f9f9; border: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); font-size: 16px; }
.qty-btn:hover { background: #f1f1f1; }
.qty-input { width: 40px; height: 32px; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-size: 13px; font-weight: 600; outline: none; }
.btn-block { width: 100%; padding: 12px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 12px; }
.btn-red { background: var(--wine-dark); color: #fff; border: 1px solid var(--wine-dark); transition: opacity 0.2s; }
.btn-red:hover { opacity: 0.9; }
.btn-outline { background: #fff; color: var(--wine-dark); border: 1.5px solid var(--wine-dark); transition: background 0.2s; }
.btn-outline:hover { background: #fff5f5; }
.action-features { list-style: none; padding: 0; margin: 20px 0 0; }
.action-features li { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.action-features svg { width: 16px; height: 16px; color: #b91c1c; }

.services-box { border: 1.5px solid var(--line); border-radius: 12px; padding: 20px; position: relative; margin-bottom: 20px; }
.services-box::before { content: "BARU"; position: absolute; top: -10px; right: 20px; background: #b91c1c; color: #fff; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; }
.services-box h4 { font-size: 13px; margin: 0 0 16px; color: var(--ink); }
.service-item { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; cursor: pointer; }
.service-item:hover .service-item-text h5 { color: var(--wine); }
.service-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.service-item-icon { width: 24px; height: 24px; color: var(--ink); flex-shrink: 0; }
.service-item-text { flex: 1; }
.service-item-text h5 { margin: 0 0 4px; font-size: 12px; color: var(--ink); display: flex; align-items: center; justify-content: space-between; transition: color 0.2s; }
.service-item-text p { margin: 0; font-size: 11px; color: var(--muted); }

.help-box { text-align: center; padding: 20px; }
.help-box h4 { font-size: 13px; margin: 0 0 6px; color: var(--ink); }
.help-box p { font-size: 11.5px; color: var(--muted); margin: 0 0 16px; line-height: 1.4; }
.btn-wa { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid #dc2626; color: #dc2626; background: #fff; padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; transition: background 0.2s; }
.btn-wa:hover { background: #fef2f2; }

/* --- Review Summary --- */
.review-section { margin-top: 40px; padding-top: 20px; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.review-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.review-summary { display: flex; gap: 40px; align-items: flex-start; margin-bottom: 32px; }
.review-score { text-align: center; }
.review-score h1 { font-size: 48px; font-weight: 800; color: var(--ink); margin: 0; line-height: 1; }
.review-score .stars { color: #f59e0b; margin: 8px 0 4px; }
.review-score p { margin: 0; font-size: 12px; color: var(--muted); }
.review-bars { flex: 1; max-width: 320px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.bar-row span:first-child { width: 14px; text-align: right; }
.bar-row span:last-child { width: 24px; }
.bar-track { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: #f59e0b; border-radius: 3px; }

/* Review Item Placeholder */
.review-item { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 20px; }
.review-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.review-item-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.review-item-head .stars { color: #f59e0b; }
.review-item-head .date { font-size: 11px; color: var(--muted); }
.review-user { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.review-text { font-size: 13px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.review-meta-item { font-size: 11px; color: var(--muted); display: block; }

/* --- Bundle (Sering Dibeli) --- */
.bundle-section { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 40px; margin-bottom: 40px; }
.bundle-section h3 { margin: 0 0 24px; font-size: 16px; font-weight: 700; color: var(--ink); }
.bundle-row { display: flex; align-items: center; gap: 24px; overflow-x: auto; padding-bottom: 12px; }
.bundle-item { display: flex; align-items: center; gap: 16px; width: 260px; flex-shrink: 0; }
.bundle-item img { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.bundle-info h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.bundle-info p { margin: 0; font-size: 14px; font-weight: 800; color: var(--wine-dark); }
.bundle-plus { font-size: 24px; color: var(--muted); font-weight: 300; }
.bundle-total { margin-left: 12px; padding-left: 36px; border-left: 1px solid var(--line); flex-shrink: 0; }
.bundle-total p { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.bundle-total h3 { margin: 0 0 16px; font-size: 20px; font-weight: 800; color: var(--wine-dark); }
.bundle-total .btn-red { width: auto; padding: 10px 24px; }

/* Responsive */
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; gap: 40px; }
  .gallery-wrapper { max-width: 480px; margin: 0 auto; }
  .middle-grid { grid-template-columns: 1fr; }
  .action-box { position: static; }
}

