/* ============================================
   Product Detail Page — premium / theme-token
   ============================================ */

.page-product {
  background: var(--color-surface, var(--white));
}

.page-product .mobile-bar {
  /* sticky CTA uses bottom space on mobile */
}

.pdp {
  padding: 1.25rem 0 5rem;
}

.pdp .breadcrumb {
  margin-bottom: 1.35rem;
}

.pdp__top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3.75rem);
  align-items: start;
}

/* ---------- Gallery ---------- */
.pdp__gallery {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  position: sticky;
  top: calc(var(--header-h) + 0.85rem);
}

.pdp__thumbs--vert {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(78vh, 720px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.pdp__thumbs--mob {
  display: none;
  gap: 0.45rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.pdp__thumbs--mob::-webkit-scrollbar { display: none; }

.pdp__thumb {
  flex: 0 0 auto;
  width: 88px;
  height: 110px;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--powder);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pdp__thumbs--mob .pdp__thumb {
  width: 68px;
  height: 85px;
}

.pdp__thumb.is-active,
.pdp__thumb:hover,
.pdp__thumb:focus-visible {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px rgba(255, 77, 141, 0.12);
  outline: none;
}

.pdp__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp__stage { min-width: 0; }

.pdp__main {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(165deg, #fff, var(--blush));
  border: 1px solid var(--line);
}

.pdp__zoom-hit {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.pdp__zoom-hit picture,
.pdp__main picture {
  display: block;
  width: 100%;
  height: 100%;
}

.pdp__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

@media (hover: hover) {
  .pdp__main:hover img {
    transform: scale(1.035);
  }
}

.pdp__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
}

.pdp__badges {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  pointer-events: none;
}

.pdp__badge {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.pdp__badge--sale,
.pdp__badge--manual {
  color: var(--deep);
  background: #fce8f1;
}

.pdp__badge--new {
  color: var(--pink);
}

.pdp__badge--limited {
  color: #8a5a00;
  background: #fff6e5;
}

.pdp__counter {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 3;
  background: rgba(26, 18, 22, 0.62);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* ---------- Info ---------- */
.pdp__info {
  padding: 0.15rem 0 0;
}

.pdp__info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.pdp__brand {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink);
}

.pdp__info-actions {
  display: flex;
  gap: 0.4rem;
}

.pdp__share,
.pdp__wish {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.pdp__share:hover,
.pdp__wish:hover,
.pdp__share:focus-visible,
.pdp__wish:focus-visible {
  color: var(--pink);
  border-color: var(--pink);
  outline: none;
}

.pdp__wish.is-active {
  color: var(--pink);
  border-color: var(--pink);
  transform: scale(1.05);
}

.pdp__wish.is-active svg {
  fill: var(--pink);
  stroke: var(--pink);
}

.pdp__title {
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 0.85rem;
}

.pdp__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.pdp__sku {
  font-size: 0.8rem;
  color: var(--muted);
}

.pdp__cat-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pdp__cat-link:hover { color: var(--pink); }

.pdp__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.55rem;
}

.pdp__price .current {
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.pdp__price .old {
  font-size: 1.05rem;
  color: var(--muted);
  text-decoration: line-through;
}

.pdp__price .off {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--deep);
  background: #fce8f1;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}

.pdp__installment {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.pdp__short {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.35rem;
  max-width: 36rem;
}

.pdp__specs,
.pdp__options {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  margin-bottom: 1.15rem;
}

.pdp-attr__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.pdp-attr__selected {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.pdp-attr__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pdp-attr__chip {
  min-height: 42px;
  min-width: 42px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.pdp-attr__chip.is-static { cursor: default; }

.pdp-attr__chip:not(.is-static):hover,
.pdp-attr__chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.pdp-attr__chip.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.pdp-attr__swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pdp-attr__swatch.is-static { cursor: default; }

.pdp-attr__swatch i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: block;
}

.pdp-attr__swatch:not(.is-static):hover,
.pdp-attr__swatch.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(26, 18, 22, 0.08);
}

.pdp-attr__swatch.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.pdp__stock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.15rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.pdp__stock.is-in { color: #1f7a45; background: #eaf7ef; }
.pdp__stock.is-low { color: #9a6700; background: #fff6e5; }
.pdp__stock.is-out { color: #a12828; background: #fdecec; }

.pdp__buy {
  display: grid;
  gap: 0.95rem;
  margin-bottom: 1.25rem;
}

.pdp__qty-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.qty-control button {
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--ink);
}

.qty-control button:hover { color: var(--pink); }

.qty-control input {
  width: 52px;
  border: 0;
  text-align: center;
  font-weight: 700;
  background: transparent;
}

.pdp__actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.65rem;
}

.pdp__actions .btn--lg {
  min-height: 52px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.pdp__actions .btn.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.pdp__actions .btn.is-added {
  background: var(--deep);
}

.pdp__trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pdp__trust li {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--powder);
}

.pdp__trust li::before {
  content: "✓ ";
  color: var(--pink);
  font-weight: 800;
}

.pdp__muted { color: var(--muted); }

/* ---------- Tabs / Accordion ---------- */
.pdp__panels {
  margin-top: 3.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.pdp-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.35rem;
  scrollbar-width: none;
}

.pdp-tabs::-webkit-scrollbar { display: none; }

.pdp-tabs__btn {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  border: 0;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.pdp-tabs__btn.is-active,
.pdp-tabs__btn:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.pdp-tabpanel[hidden] { display: none; }

.pdp__desc-body {
  max-width: 46rem;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text);
}

.pdp-dl {
  display: grid;
  gap: 0.65rem;
  max-width: 40rem;
}

.pdp-dl__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.pdp-dl__row dt { color: var(--muted); font-weight: 600; }
.pdp-dl__row dd { color: var(--ink); font-weight: 650; }

.pdp-acc { display: none; }

.pdp-acc__item {
  border-bottom: 1px solid var(--line);
}

.pdp-acc__item summary {
  list-style: none;
  cursor: pointer;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.pdp-acc__item summary::-webkit-details-marker { display: none; }

.pdp-acc__item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--muted);
}

.pdp-acc__item[open] summary::after { content: "−"; }

.pdp-acc__body {
  padding: 0 0 1.15rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ---------- Rails ---------- */
.pdp-rail {
  margin-top: 3.5rem;
}

.pdp-rail__head {
  margin-bottom: 1.25rem;
}

.pdp-rail__head h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.pdp-rail__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.pdp-recent__card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.pdp-recent__card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  background: var(--blush);
  margin-bottom: 0.65rem;
}

.pdp-recent__card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pdp-recent__card p {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--deep);
}

/* ---------- Sticky CTA ---------- */
.pdp-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--bar-h, 64px) + env(safe-area-inset-bottom));
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  padding: 0.7rem 1rem;
  transform: translateY(calc(100% + var(--bar-h, 64px) + 1rem));
  transition: transform 0.3s var(--ease);
}

.pdp-sticky.is-show {
  transform: translateY(0);
}

.pdp-sticky__inner {
  width: min(100%, var(--container));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pdp-sticky__price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  flex: 1;
}

.pdp-sticky .btn {
  min-width: 150px;
  min-height: 46px;
}

/* ---------- Lightbox ---------- */
.pdp-lb {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}

.pdp-lb.is-open {
  visibility: visible;
  pointer-events: auto;
}

.pdp-lb__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 18, 22, 0.72);
  opacity: 0;
  transition: opacity 0.25s;
}

.pdp-lb.is-open .pdp-lb__overlay { opacity: 1; }

.pdp-lb__dialog {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 920px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-lb__dialog img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  background: #111;
}

.pdp-lb__close,
.pdp-lb__nav {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.5rem;
  display: grid;
  place-items: center;
}

.pdp-lb__close { top: -0.25rem; right: -0.25rem; }
.pdp-lb__prev { left: 0.5rem; }
.pdp-lb__next { right: 0.5rem; }

.pdp-lb__count {
  position: absolute;
  left: 50%;
  bottom: -2rem;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pdp-rail__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .pdp__top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pdp__gallery {
    position: static;
    grid-template-columns: 1fr;
  }

  .pdp__thumbs--vert { display: none; }
  .pdp__thumbs--mob { display: flex; }

  .pdp__main:hover img { transform: none; }

  .pdp-tabs { display: none; }
  .pdp-tabpanels { display: none; }
  .pdp-acc { display: block; }

  .pdp__trust { grid-template-columns: 1fr; }

  .page-product {
    padding-bottom: calc(var(--bar-h, 64px) + 4.5rem);
  }
}

@media (max-width: 700px) {
  .pdp-rail__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .pdp__actions {
    grid-template-columns: 1fr;
  }

  .pdp__title {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
  }

  .pdp-dl__row {
    grid-template-columns: 100px 1fr;
  }
}

@media (min-width: 981px) {
  .pdp-sticky { display: none !important; }
}
