/* Product detail page styles */

.pdp { padding: 22px 0 32px; background: var(--bg-soft); }
.pdp-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 1.1fr;
  gap: 22px;
}
.pdp-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Gallery */
.pdp-gallery { padding: 26px; display: grid; gap: 16px; }
.pdp-main {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--bg-soft);
  border-radius: var(--radius);
  display: grid; place-items: center;
  overflow: hidden;
}
.pdp-main .slot {
  width: 56%; height: 56%;
  border-radius: 14px;
  border: 1.5px dashed var(--line-2);
  background:
    repeating-linear-gradient(135deg,
      rgba(3,42,159,.05) 0 10px,
      transparent 10px 20px);
  display: grid; place-items: center;
  color: var(--brand); opacity: .55;
}
.pdp-main--zoom { cursor: zoom-in; }
.pdp-main-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.pdp-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}
.pdp-main-img.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.pdp-gallery-nav-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.pdp-gallery-nav-wrap .pdp-gallery-nav {
  pointer-events: auto;
}
.pdp-video-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  z-index: 2;
}
.pdp-video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--brand);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  cursor: pointer;
  z-index: 2;
}
.pdp-video-play:hover { transform: scale(1.04); }
.pdp-thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.28);
  color: #fff;
  pointer-events: none;
}
.pdp-zoom {
  position: absolute; left: 14px; bottom: 14px;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--brand);
  border: 0;
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
  z-index: 4;
}
.pdp-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.14);
  cursor: pointer;
  z-index: 2;
  transition: background .15s, color .15s;
}
.pdp-gallery-nav:hover { background: #fff; color: var(--brand); }
.pdp-gallery-prev { left: 12px; }
.pdp-gallery-next { right: 12px; }
.pdp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pdp-thumb {
  background: var(--bg-soft);
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
  color: var(--brand); opacity: .55;
}
.pdp-thumb.on { border-color: var(--brand); opacity: 1; }
.pdp-thumb-label {
  position: absolute; bottom: 5px; left: 6px;
  font: 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--brand); opacity: .55;
}

/* Image lightbox */
.pdp-lightbox { z-index: 110; }
.pdp-lightbox-card {
  position: relative;
  max-width: min(96vw, 1100px);
  width: 100%;
  max-height: 92vh;
  display: grid;
  place-items: center;
}
.pdp-lightbox-stage {
  position: relative;
  width: min(92vw, 900px);
  height: min(82vh, 900px);
  display: grid;
  place-items: center;
}
.pdp-lightbox-img {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(20,33,61,.35);
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}
.pdp-lightbox-img.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.pdp-lightbox-video {
  position: relative;
  z-index: 2;
  width: min(92vw, 900px);
  max-width: 100%;
  aspect-ratio: 16/9;
  min-height: 240px;
  border: 0;
  border-radius: var(--radius);
  background: #000;
}
.pdp-lightbox .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  z-index: 5;
}
.pdp-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.14);
  cursor: pointer;
  z-index: 2;
}
.pdp-lightbox-nav:hover { background: #fff; color: var(--brand); }
.pdp-lightbox-prev { left: 12px; }
.pdp-lightbox-next { right: 12px; }
.pdp-lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20,33,61,.72);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}
@media (min-width: 768px) {
  .pdp-lightbox-prev { left: -58px; }
  .pdp-lightbox-next { right: -58px; }
  .pdp-lightbox .modal-close { top: -6px; right: -6px; }
  .pdp-lightbox-counter { bottom: -40px; background: transparent; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
}

/* Right side info */
.pdp-info { padding: 28px 32px 32px; }
.pdp-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs .sep { opacity: .5; }
.crumbs .here { color: var(--ink); font-weight: 600; }
.pdp-nav { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.pdp-nav a,
.pdp-nav button {
  width: 28px; height: 28px;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.pdp-nav a:hover,
.pdp-nav button:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); background: var(--bg-soft); }
.pdp-nav button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.pdp-title {
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.pdp-price-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.pdp-price {
  color: var(--brand);
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 28px; font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 0;
}
.pdp-price-old {
  font-size: 18px;
  margin-left: 0;
}
.pdp-short {
  color: var(--muted);
  font-size: 14px; line-height: 1.6;
  margin: 0 0 22px;
  text-wrap: pretty;
  max-width: 60ch;
}
.pdp-out-of-stock {
  margin: 0 0 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(185, 28, 28, .08);
  border: 1px solid rgba(185, 28, 28, .18);
  color: #b91c1c;
  font-size: 15px;
  font-weight: 600;
}

.pdp-field {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.pdp-field-label {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  min-width: 86px;
}
.pdp-field-label::after { content: ":"; }
.pdp-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.pdp-size {
  min-width: 46px; height: 46px;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 0 14px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.pdp-size:hover { border-color: var(--brand); color: var(--brand); }
.pdp-size.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.pdp-buy {
  display: flex; align-items: center; gap: 14px;
  margin: 8px 0 22px;
  flex-wrap: wrap;
}
.qty-stepper {
  display: inline-flex; align-items: stretch;
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}
.qty-stepper button {
  width: 38px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 18px;
  font-weight: 600;
}
.qty-stepper button:hover { background: var(--bg-soft); }
.qty-stepper input {
  width: 44px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-inner-spin-button,
.qty-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.add-to-cart {
  border: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background .15s, transform .12s;
}
.add-to-cart:hover { background: var(--brand-ink); transform: translateY(-1px); }
.add-to-cart.is-disabled {
  background: #e5e7eb;
  color: #6b7280;
  cursor: default;
  pointer-events: none;
  transform: none;
}

.pdp-quick {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.pdp-quick-item {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 500;
}
.pdp-quick-item .pdp-quick-ic {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--bg-soft);
  display: grid; place-items: center;
}
.pdp-quick-item:hover { color: var(--brand-ink); }

.pdp-pay {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.pdp-pay-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 0 0 10px; }
.pdp-pay-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pay-card {
  height: 32px; min-width: 50px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .04em;
}

.pdp-meta {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid; gap: 10px;
  font-size: 13.5px;
}
.pdp-meta b { font-weight: 600; color: var(--ink); }
.pdp-meta a { color: var(--brand); }
.pdp-meta a:hover { text-decoration: underline; }

/* Tabs section */
.pdp-tabs-wrap { padding: 36px 0 8px; background: #fff; }
.pdp-tabs-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 8px 28px;
}
.pdp-tabs-bar {
  position: relative;
  display: flex; justify-content: center; gap: 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.pdp-tab {
  background: transparent;
  border: 0;
  padding: 14px 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
}
.pdp-tab.on { color: var(--brand); }
.pdp-tab.on::after {
  content: "";
  position: absolute;
  left: 30%; right: 30%; bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.pdp-tab-body {
  padding: 0 32px;
}
.pdp-prose {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  text-wrap: pretty;
}
.pdp-prose > *:first-child { margin-top: 0; }
.pdp-prose > *:last-child { margin-bottom: 0; }
.pdp-prose p {
  margin: 0 0 0.55em;
}
.pdp-prose h2,
.pdp-prose h3,
.pdp-prose h4 {
  color: var(--ink);
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 650;
  line-height: 1.3;
  margin: 1.05em 0 0.4em;
  letter-spacing: .03em;
}
.pdp-prose h2 { font-size: 1.05em; }
.pdp-prose h3 {
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink);
}
.pdp-prose h4 { font-size: 0.92em; }
.pdp-prose ul,
.pdp-prose ol {
  margin: 0.2em 0 0.7em;
  padding-left: 1.15em;
}
.pdp-prose li {
  margin: 0.18em 0;
  padding-left: 0.2em;
}
.pdp-prose li::marker { color: var(--brand); }
.pdp-prose strong,
.pdp-prose b {
  color: var(--ink);
  font-weight: 600;
}
.pdp-prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pdp-prose a:hover { opacity: .85; }
.pdp-prose-facts {
  display: grid;
  gap: 0.35em 1.25em;
  margin: 0.15em 0 0.75em;
  padding: 0;
}
.pdp-prose-fact {
  display: grid;
  grid-template-columns: minmax(7.5rem, 34%) 1fr;
  gap: 0.35em 1em;
  align-items: baseline;
  padding: 0.35em 0;
  border-bottom: 1px solid var(--line);
}
.pdp-prose-fact:last-child { border-bottom: 0; }
.pdp-prose-facts dt {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92em;
}
.pdp-prose-facts dd {
  margin: 0;
  color: var(--muted);
}
.pdp-info-table { width: 100%; border-collapse: collapse; }
.pdp-info-table th, .pdp-info-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pdp-info-table th { color: var(--ink); font-weight: 600; width: 32%; }
.pdp-info-table td { color: var(--muted); }

/* Similar products */
.pdp-similar { padding: 24px 0 48px; }
.pdp-similar-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px 32px;
}
.pdp-similar-title {
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 22px; font-weight: 600; color: var(--ink);
  margin: 0 0 20px;
}
.pdp-similar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Sticky bottom buy bar */
.sticky-buy {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 20;
  box-shadow: 0 -4px 20px rgba(20,33,61,.08);
  transform: translateY(100%);
  transition: transform .25s ease;
}
.sticky-buy.on { transform: translateY(0); }
.sticky-buy-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
}
.sticky-thumb {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--bg-soft);
  display: grid; place-items: center;
  color: var(--brand); opacity: .6;
  overflow: hidden;
  flex-shrink: 0;
}
.sticky-thumb:has(img) {
  opacity: 1;
  background: transparent;
}
.sticky-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.sticky-price { color: var(--brand); font-weight: 700; font-size: 16px; }
.sticky-heart {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  display: grid; place-items: center;
  color: var(--ink);
}
.sticky-buy .add-to-cart { padding: 11px 22px; }

@media (max-width: 980px) {
  .pdp-grid { grid-template-columns: 1fr; }
  .pdp-similar-grid { grid-template-columns: repeat(2, 1fr); }
  .pdp-tab-body { padding: 0 18px; }
  .pdp-prose { font-size: 14px; line-height: 1.52; }
  .pdp-prose-fact { grid-template-columns: 1fr; gap: 0.1em; padding: 0.4em 0; }
}
@media (max-width: 560px) {
  .pdp-gallery, .pdp-info { padding: 18px; }
  .pdp-thumb { width: 56px; height: 56px; }
  .pdp-gallery-nav { width: 40px; height: 40px; }
  .pdp-gallery-prev { left: 8px; }
  .pdp-gallery-next { right: 8px; }
  .pdp-quick { gap: 14px; }
  .pdp-tabs-card { padding: 6px 6px 22px; }
  .pdp-tabs-bar { gap: 22px; margin-bottom: 16px; }
  .pdp-tab { padding: 12px 2px; font-size: 12px; letter-spacing: .1em; }
  .pdp-prose h3 { font-size: 0.76em; margin: 0.95em 0 0.35em; }
  .pdp-prose p { margin: 0 0 0.5em; }
  .sticky-buy-inner { grid-template-columns: auto 1fr auto; }
  .sticky-name, .sticky-heart, .sticky-buy .add-to-cart > span { display: none; }
}
