/* ─────────────────────────────────────────
   PRODUCT DETAIL — Al-Waliy Sejahtera
   Layout: foto sticky kiri, info scroll kanan
───────────────────────────────────────── */
:root {
  --green-dark: #1b4332;
  --green-mid: #2d6a4f;
  --green-light: #d8f3dc;
  --green-border: #b7e4c7;
  --gold: #d4af6a;
  --text-main: #1a1a1a;
  --text-muted: #6b7280;
  --text-sub: #9ca3af;
  --bg-soft: #f5f5f0;
  --radius: 10px;
}

.pd-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.4rem 1rem 6rem;
}

.pd-breadcrumb {
  font-size: 0.73rem;
  margin-bottom: 1rem;
}
.pd-breadcrumb a {
  color: var(--green-dark);
  text-decoration: none;
}
.pd-breadcrumb span {
  color: var(--text-sub);
}

.pd-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Kolom foto sticky */
.pd-photo-col {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-photo-main {
  aspect-ratio: 1/1;
  background: var(--bg-soft);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
}
.pd-photo-main a.glightbox {
  display: block;
  width: 100%;
  height: 100%;
}
.pd-photo-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: opacity 0.15s;
}
.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pd-thumb {
  aspect-ratio: 1/1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-soft);
}
.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  transition: opacity 0.2s;
}
.pd-thumb:not(.active) img {
  opacity: 0.4;
}
.pd-thumb:hover img,
.pd-thumb.active img {
  opacity: 1;
}
.pd-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0e0e0;
  font-size: 1.1rem;
}

/* Kolom info */
.pd-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 5px;
}
.pd-name {
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
}
.pd-price {
  font-family: "Inter", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-dark);
  transition: opacity 0.2s;
}
.pd-weight-inline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}
.pd-divider {
  border: none;
  border-top: 1px solid #e8e8e4;
  margin: 0 0 12px;
}
.pd-weight-row {
  display: none;
}

/* ── Varian ── */
.pd-variant-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 7px;
}
.pd-variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}
.pd-variant-btn {
  padding: 6px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1;
}
.pd-variant-btn:hover {
  border-color: var(--green-dark);
  background: #f0fdf4;
}
.pd-variant-btn.active {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}
.pd-variant-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Sertifikasi */
.pd-cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.pd-cert-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 0.72rem;
  line-height: 1.4;
}
.pd-cert-pill.halal {
  color: #166534;
}
.pd-cert-pill.bpom {
  color: #854d0e;
}
.pd-cert-pill-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.7;
}
.pd-cert-pill-num {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Manfaat */
.pd-benefits {
  margin-bottom: 16px;
}
.pd-benefits-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.pd-benefits-text {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.75;
  white-space: pre-line;
}

/* Ongkir */
.ongkir-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 7px 12px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 0.76rem;
  color: var(--text-muted);
  transition:
    border-color 0.15s,
    color 0.15s;
  background: none;
}
.ongkir-bar > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ongkir-bar:hover {
  border-color: var(--green-dark);
  color: var(--green-dark);
}
.ongkir-bar .ongkir-icon {
  color: var(--green-dark);
}

/* Share */
.pd-share {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.pd-share-label {
  font-size: 0.7rem;
  color: var(--text-sub);
}
.btn-share {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-share.wa {
  border-color: #25d366;
  color: #25d366;
}
.btn-share.wa:hover {
  background: #f0fdf4;
}
.btn-share.copy:hover {
  background: var(--bg-soft);
  color: var(--text-main);
}

/* Qty */
.pd-qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  overflow: hidden;
}
.qty-ctrl button {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.qty-ctrl button:hover {
  background: var(--bg-soft);
  color: var(--text-main);
}
.qty-ctrl input {
  width: 38px;
  border: none;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
}
#stockWarning {
  display: none;
  font-size: 0.73rem;
  color: #dc2626;
  margin-top: 2px;
}

/* CTA */
.pd-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.btn-cart-outline {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--green-dark);
  border-radius: 30px;
  background: #fff;
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-cart-outline:hover {
  background: var(--green-light);
}
.btn-buy {
  width: 100%;
  padding: 12px;
  background: var(--green-dark);
  border: none;
  border-radius: 30px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-buy:hover {
  background: var(--green-mid);
}

/* Info section */
.pd-info-section {
  margin-top: 2rem;
  border-top: 1px solid #e8e8e4;
  position: relative;
}
.pd-info-inner {
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.pd-info-inner.clamped {
  max-height: 100px;
}
.pd-info-inner.expanded {
  max-height: 9999px;
}
.pd-info-fade {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #fff);
  pointer-events: none;
  transition: opacity 0.3s;
}
.pd-info-fade.hidden {
  opacity: 0;
}
.pd-info-block {
  padding: 0.65rem 0;
  border-bottom: 1px solid #e8e8e4;
}
.pd-info-block:last-child {
  border-bottom: none;
}
.pd-info-heading {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.pd-info-text {
  font-size: 0.8rem;
  color: #374151;
  line-height: 1.55;
  white-space: pre-line;
}
.btn-readmore {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 9px 0;
  background: none;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-dark);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.02em;
}
.btn-readmore:hover {
  color: var(--green-mid);
  text-decoration: underline;
}

/* Related */
.related-wrap {
  margin-top: 3rem;
}
.related-head {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.related-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #e8e8e4;
  border: 1px solid #e8e8e4;
  border-radius: var(--radius);
  overflow: hidden;
}
.rel-card {
  background: #fff;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
}
.rel-card:hover {
  background: var(--bg-soft);
}
.rel-card-img {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--bg-soft);
}
.rel-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
.rel-card-img .no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 1.4rem;
}
.rel-card-body {
  padding: 10px 12px 14px;
}
.rel-name {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 3px;
}
.rel-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-dark);
}

/* Mobile */
@media (max-width: 768px) {
  .pd-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .pd-photo-col {
    position: static;
  }
  #mobileBottomNav {
    display: none !important;
  }
  .pd-cta-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    z-index: 100;
  }
  .pd-cta {
    display: none;
  }
  .related-scroll {
    grid-template-columns: repeat(2, 1fr);
  }
  .pd-name {
    font-size: 1.3rem;
  }
  .pd-qty-row {
    justify-content: space-between;
  }
  .pd-info-block {
    padding: 0.55rem 0;
  }
  .pd-info-text {
    font-size: 0.78rem;
  }
  .pd-info-inner.clamped {
    max-height: 85px;
  }
  .footer-reveal-outer,
  .footer-reveal-outer footer.sf {
    display: none !important;
  }
}
@media (min-width: 769px) {
  .pd-cta-sticky {
    display: none;
  }
}

/* Modal Ongkir */
.ongkir-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1060;
  align-items: center;
  justify-content: center;
}
.ongkir-modal-backdrop.show {
  display: flex;
}
.ongkir-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  margin: 1rem;
  overflow: hidden;
  font-size: 0.84rem;
}
.om-head {
  padding: 11px 14px;
  background: var(--green-dark);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.om-head-title {
  flex: 1;
  font-size: 0.86rem;
  font-weight: 700;
  color: #e8f5e9;
  display: flex;
  align-items: center;
  gap: 6px;
}
.om-head-close {
  background: none;
  border: none;
  color: #e8f5e9;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
}
.om-back {
  background: none;
  border: none;
  color: #e8f5e9;
  font-size: 0.78rem;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.om-back.show {
  display: flex;
}
.om-body {
  padding: 12px 14px;
}
.om-field {
  margin-bottom: 9px;
}
.om-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}
.om-field select {
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
  background: #fff;
  font-family: inherit;
}
.om-field select:focus {
  border-color: var(--green-dark);
}
.om-field select:disabled {
  background: #f9fafb;
  color: #9ca3af;
}
.btn-cek {
  width: 100%;
  margin-top: 4px;
  padding: 9px;
  background: var(--green-dark);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.btn-cek:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.om-result {
  display: none;
}
.om-result-meta {
  background: #f0fdf4;
  border-radius: 6px;
  padding: 7px 10px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--green-dark);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.om-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.79rem;
}
.om-table thead tr {
  background: #f8fafc;
  border-bottom: 1.5px solid #e5e7eb;
}
.om-table thead th {
  padding: 6px 8px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.om-table thead th:last-child {
  text-align: right;
}
.om-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
}
.om-table tbody td {
  padding: 7px 8px;
  color: var(--text-main);
  vertical-align: middle;
}
.om-table tbody td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--green-dark);
  white-space: nowrap;
}
.om-svc-name {
  font-weight: 600;
}
.om-svc-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.om-etd {
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.om-empty {
  text-align: center;
  padding: 18px 0;
  color: var(--text-muted);
  font-size: 0.79rem;
}
.om-empty svg {
  display: block;
  margin: 0 auto 5px;
}
@keyframes shake {
  0% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-6px);
  }
  30% {
    transform: translateX(6px);
  }
  45% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
  90% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(0);
  }
}

#variantOptions.shake {
  animation: shake 0.45s ease;
}

/* Highlight border tombol varian saat shake */
#variantOptions.shake .pd-variant-btn:not(:disabled) {
  border-color: #dc2626;
  background: #fff5f5;
}
.pd-review-wrap {
  max-width: 860px;
  margin: 2.5rem auto 0;
  padding: 0 1.25rem 3rem;
}
.pd-review-head {
  margin-bottom: 1.5rem;
}
.pd-review-title {
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 1rem;
}
.pd-rating-summary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: #faf8f5;
  border-radius: 10px;
  flex-wrap: wrap;
}
.pd-rating-big {
  font-size: 2.8rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}
.pd-rating-dist {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 160px;
}
.pd-dist-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pd-dist-bar {
  flex: 1;
  height: 5px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}
.pd-dist-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 99px;
  transition: width 0.4s;
}
.pd-review-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pd-review-item {
  padding: 1rem 0;
  border-bottom: 1px solid #f0ece4;
}
.pd-review-item:last-child {
  border-bottom: none;
}
.pd-rv-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.pd-rv-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1b4332;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pd-rv-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: #1a1a1a;
}
.pd-rv-date {
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 0.1rem;
}
.pd-rv-comment {
  font-size: 0.83rem;
  color: #444;
  line-height: 1.55;
  padding-left: calc(34px + 0.75rem);
}
