/* =========================================================
   CreatinePro — product detail page (approved reference: desktop + phone)
   ========================================================= */
.pd-top { padding-top: clamp(16px, 2vw, 28px); }
.pd-crumbs ol { flex-wrap: wrap; }
.pd { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(32px, 4.4vw, 88px); align-items: start; padding-top: clamp(18px, 2.4vw, 36px); padding-bottom: clamp(40px, 4vw, 64px); }

/* ---------- Gallery ---------- */
.pd-gallery { position: sticky; top: calc(var(--header-h) + 20px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pd-gallery.has-thumbs { grid-template-columns: 84px minmax(0, 1fr); gap: clamp(16px, 2vw, 32px); }
.pd-thumbs { display: flex; flex-direction: column; gap: 12px; }
.pd-thumbs button { position: relative; width: 84px; height: 92px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: #0D0F13; overflow: hidden;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
.pd-thumbs button img { max-height: 76px; max-width: 70px; width: auto; height: auto; transition: transform var(--t) var(--ease-out); }
.pd-thumbs button:hover { border-color: rgba(255, 255, 255, .32); }
.pd-thumbs button:hover img { transform: scale(1.05); }
.pd-thumbs button[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px -12px rgba(20, 169, 242, .6); }
.pd-thumbs button:active { transform: scale(.96); }

.pd-stage { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; max-height: 72vh; overflow: hidden; cursor: zoom-in; border-radius: 14px;
  background: radial-gradient(55% 45% at 50% 46%, rgba(40, 90, 180, .16), transparent 70%), radial-gradient(60% 18% at 50% 92%, rgba(255, 255, 255, .05), transparent 70%); }
/* soft floor under the product */
.pd-stage::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: 7%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .75), transparent); filter: blur(6px); z-index: 0; pointer-events: none; }
.pd-stage img { position: relative; z-index: 1; max-height: 82%; max-width: 74%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 30px 34px rgba(0, 0, 0, .6)); transition: transform .32s var(--ease-out); }
@keyframes pdSwap { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
.pd-stage img.pd-swap { animation: pdSwap .36s var(--ease-out); }
.pd-stage .zoom-lens { position: absolute; inset: 0; z-index: 2; background-repeat: no-repeat; background-color: #0A0B0E; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.pd-stage.zooming .zoom-lens { opacity: 1; }
.pd-zoom { position: absolute; z-index: 3; right: 14px; bottom: 14px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  border: 1px solid rgba(255, 255, 255, .5); background: rgba(7, 8, 10, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
.pd-zoom .ic { width: 20px; height: 20px; }
.pd-zoom:hover { background: #fff; color: var(--bg); }
.pd-zoom:active { transform: scale(.92); }
.pd-pager { display: none; }

/* ---------- Info column ---------- */
.pd-info { min-width: 0; padding-top: clamp(0px, 1vw, 12px); }
.pd-brand { font-size: 12.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--text-2); }
.pd-title { margin-top: 10px; font-family: var(--display); font-weight: 800; font-size: clamp(32px, 3.1vw, 52px); line-height: 1.08; letter-spacing: -.02em; }
.pd-summary { margin-top: 14px; max-width: 560px; font-size: clamp(15px, 1.05vw, 17px); line-height: 1.6; color: var(--text-2); }
.pd-specs { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 56px); margin-top: 26px; }
.pd-specs li { display: flex; align-items: center; gap: 12px; }
.pd-specs .ic { width: 34px; height: 34px; color: var(--text-2); flex-shrink: 0; }
.pd-specs span { display: flex; flex-direction: column; line-height: 1.25; }
.pd-specs b { font-size: 17px; font-weight: 700; }
.pd-specs small { font-size: 14px; color: var(--muted); }

.pd-variants { border: 0; margin-top: 26px; padding: 0; }
.pd-variants legend { font-size: 14.5px; color: var(--muted); margin-bottom: 12px; padding: 0; }
.pd-variants legend b { color: #fff; font-weight: 600; }
.pd-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-sw { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 14px 0 10px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 14px; color: var(--text-2); background: transparent; }
.pd-sw i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.pd-sw:hover { border-color: rgba(255, 255, 255, .35); color: #fff; }
.pd-sw.on { border-color: var(--accent); color: #fff; background: rgba(20, 169, 242, .1); box-shadow: inset 0 0 0 1px var(--accent); }
.pd-sw.is-out span { text-decoration: line-through; opacity: .6; }
.pd-sw:active { transform: scale(.96); }

.pd-price-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.pd-price .price { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 2.8vw, 46px); letter-spacing: -.02em; line-height: 1; }
.pd-price .price-na, .pd-price .price:not(:has(*)):empty { font-size: 18px; }
.pd-stock { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: #34D27A; white-space: nowrap; }
.pd-stock i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(52, 210, 122, .14); }
.pd-stock.out { color: #F2685E; }
.pd-stock.out i { box-shadow: 0 0 0 4px rgba(242, 104, 94, .14); }

.pd-buy { display: flex; gap: 14px; margin-top: 22px; }
.pd-qty { height: 56px; flex-shrink: 0; padding: 0 6px; border-radius: 99px; }
.pd-qty button { width: 44px; height: 44px; border-radius: 50%; color: var(--text); transition: background-color var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
.pd-qty button:hover:not(:disabled) { background: rgba(255, 255, 255, .07); }
.pd-qty button:active:not(:disabled) { transform: scale(.88); }
.pd-qty button:disabled { opacity: .3; cursor: not-allowed; }
.pd-qty .ic { width: 16px; height: 16px; }
.pd-qty span { min-width: 30px; font-size: 16px; font-weight: 600; }
.pd-add { position: relative; flex: 1; height: 56px; border-radius: 12px; font-size: 16px; overflow: hidden; }
.pd-add-in, .pd-add-done { display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .3s var(--ease-out), opacity .2s ease; }
.pd-add-done { position: absolute; inset: 0; opacity: 0; transform: translateY(100%); }
.pd-add.is-done .pd-add-in { opacity: 0; transform: translateY(-100%); }
.pd-add.is-done .pd-add-done { opacity: 1; transform: none; }
.pd-add .ic { width: 20px; height: 20px; transition: transform .25s var(--ease-out); }
.pd-add:hover:not(:disabled) .pd-add-in .ic { transform: translateX(-2px) rotate(-8deg); }
.pd .qty-note { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

.pd-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; margin-top: 28px; }
.pd-table div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.pd-table dt { color: var(--muted); }
.pd-table dd { text-align: right; font-weight: 500; }
.pd-acc { margin-top: 18px; }
.pd-acc:empty { display: none; }
.pd-acc-item { border-bottom: 1px solid var(--line-2); }
.pd-acc-item.only-mobile { display: none; }
.pd-acc h2 { font: inherit; }
.pd-acc button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0 4px; font-size: 16.5px; font-weight: 600; color: var(--text); text-align: left; }
.pd-acc button .ic { width: 20px; height: 20px; color: var(--text-2); transition: transform .3s var(--ease-out); }
.pd-acc button[aria-expanded="true"] .ic { transform: rotate(180deg); color: var(--accent); }
.pd-acc-panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .32s var(--ease-out), opacity .22s ease; }
.pd-acc-panel.is-open { grid-template-rows: 1fr; opacity: 1; }
.pd-acc-in { min-height: 0; overflow: hidden; padding: 0 4px; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.pd-acc-panel.is-open .pd-acc-in { padding-bottom: 18px; }
.pd-acc-in p + p { margin-top: 10px; }
.pd-acc-in .pd-table { margin-top: 0; grid-template-columns: minmax(0, 1fr); }

/* ---------- Trust row ---------- */
.pd-trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent); }
.pd-trust-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 30px; padding-bottom: 30px; }
.pd-trust li { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 4px 20px; }
.pd-trust li + li { border-left: 1px solid var(--line-2); }
.pd-trust .ic { width: 34px; height: 34px; flex-shrink: 0; color: var(--accent); }
.pd-trust span { display: flex; flex-direction: column; line-height: 1.35; }
.pd-trust b { font-size: 15.5px; font-weight: 600; }
.pd-trust small { font-size: 14px; color: var(--muted); }

/* ---------- Related products ---------- */
.pd-related { padding-top: clamp(40px, 4vw, 64px); padding-bottom: clamp(56px, 6vw, 96px); }
.pd-rel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.pd-rel-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 2.2vw, 36px); letter-spacing: -.01em; }
.pd-rel-all { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 15px; font-weight: 500; white-space: nowrap; }
.pd-rel-all .ic { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease-out); }
.pd-rel-all:hover .ic { transform: translateX(4px); }
.pd-rel-track { position: relative; }
.pd-rel-list { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth; padding-bottom: 2px; }
.pd-rel-list::-webkit-scrollbar { display: none; }
.pd-rel-list > .card { scroll-snap-align: start; }
.pd-rel-list .card-media { aspect-ratio: auto; height: clamp(170px, 14vw, 230px); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pd-rel-list .card-media img { max-height: 82%; max-width: 70%; width: auto; height: auto; }
.pd-rel-list .swatches { display: none; }
.pd-rel-nav { position: absolute; top: 40%; z-index: 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: rgba(10, 11, 14, .85); border: 1px solid var(--line-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, opacity var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
.pd-rel-nav.prev { left: -22px; } .pd-rel-nav.next { right: -22px; }
.pd-rel-nav.prev .ic { transform: rotate(180deg); }
.pd-rel-nav .ic { width: 18px; height: 18px; }
.pd-rel-nav:hover:not(:disabled) { background: #fff; color: var(--bg); }
.pd-rel-nav:active:not(:disabled) { transform: scale(.92); }
.pd-rel-nav:disabled { opacity: 0; pointer-events: none; }
.pd-related .dots { display: none; }

/* lightbox: soft fade + scale */
.lightbox { opacity: 0; transition: opacity .2s ease; }
.lightbox.is-open { opacity: 1; }
.lightbox .lb-img { transform: scale(.96); transition: transform .32s var(--ease-out); }
.lightbox.is-open .lb-img { transform: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .pd { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pd-gallery { position: static; }
  .pd-stage { max-height: 520px; }
  .pd-rel-list { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
  .pd-rel-nav.prev { left: -8px; } .pd-rel-nav.next { right: -8px; }
}

/* ---------- Phones (reference: single column, swipe gallery, accordions, swipe row) ---------- */
@media (max-width: 760px) {
  .pd-top { padding-top: 14px; }
  .pd-crumbs { font-size: 13px; }
  .pd-crumb-shop { display: none; }
  .pd { gap: 18px; padding-top: 8px; padding-bottom: 28px; }
  .pd-gallery.has-thumbs { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pd-thumbs { display: none; }
  .pd-stage { aspect-ratio: 1 / .86; max-height: none; border-radius: 12px; touch-action: pan-y; }
  .pd-stage img { max-height: 84%; max-width: 62%; }
  .pd-zoom { width: 44px; height: 44px; right: 10px; bottom: 10px; }
  .pd-pager { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
  .pd-arrow { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); border-radius: 50%; transition: background-color var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
  .pd-arrow .ic { width: 22px; height: 22px; }
  .pd-arrow.prev .ic { transform: rotate(90deg); } .pd-arrow.next .ic { transform: rotate(-90deg); }
  .pd-arrow:active { transform: scale(.88); background: rgba(255, 255, 255, .06); }
  .pd-dots { display: flex; gap: 8px; }
  .pd-dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .28); transition: width var(--t) var(--ease-out), background-color var(--t) ease; }
  .pd-dots i.on { width: 20px; background: var(--accent); }

  .pd-brand { font-size: 11.5px; letter-spacing: .22em; }
  .pd-title { margin-top: 8px; font-size: clamp(26px, 8vw, 32px); }
  .pd-summary { margin-top: 10px; font-size: 15px; }
  .pd-specs { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; margin-top: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
  .pd-specs li { flex-direction: column; gap: 6px; text-align: center; }
  .pd-specs span { align-items: center; }
  .pd-specs .ic { width: 28px; height: 28px; }
  .pd-specs b { font-size: 16px; }
  .pd-specs small { font-size: 13.5px; }
  .pd-variants { margin-top: 18px; }
  .pd-swatches { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding: 2px var(--gut); }
  .pd-swatches::-webkit-scrollbar { display: none; }
  .pd-sw { flex-shrink: 0; }
  .pd-price-row { margin-top: 18px; padding-top: 0; border-top: 0; }
  .pd-specs + .pd-price-row { margin-top: 18px; }
  .pd-price .price { font-size: 34px; }
  .pd-buy { flex-direction: column; gap: 14px; margin-top: 16px; }
  .pd-qty { align-self: flex-start; height: 50px; }
  .pd-qty button { width: 42px; height: 42px; }
  .pd-add { flex: none; width: 100%; height: 52px; border-radius: 14px; }
  .pd-table-inline { display: none; }
  .pd-acc { margin-top: 22px; border-top: 1px solid var(--line-2); }
  .pd-acc-item.only-mobile { display: block; }
  .pd-acc button { min-height: 52px; font-size: 16px; }

  .pd-trust-in { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .pd-trust li { justify-content: flex-start; padding: 14px 0; }
  .pd-trust li + li { border-left: 0; border-top: 1px solid var(--line); }
  .pd-trust .ic { width: 28px; height: 28px; }

  .pd-related { padding-top: 34px; padding-bottom: 48px; }
  .pd-rel-head { margin-bottom: 18px; }
  .pd-rel-head h2 { font-size: 24px; }
  .pd-rel-all { font-size: 14px; }
  .pd-rel-list { grid-auto-columns: 46%; gap: 12px; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) 4px; scroll-padding-inline: var(--gut); }
  .pd-rel-nav { display: none; }
  .pd-rel-list .card-media { height: 150px; }
  .pd-rel-list .card-body { padding: 12px; }
  .pd-rel-list .card-title { font-size: 14.5px; }
  .pd-rel-list .card-details { font-size: 12.5px; }
  .pd-related .dots { display: flex; }
}
@media (max-width: 374px) {
  .pd-rel-list { grid-auto-columns: 58%; }
  .pd-specs b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-stage img.pd-swap { animation: none; }
  .pd-add-in, .pd-add-done, .pd-acc-panel, .lightbox, .lightbox .lb-img { transition: none; }
}

/* proportions closer to the reference: product sits in the stage with breathing room */
.pd-stage img { max-height: 70%; max-width: 60%; }
.pd-table-inline { grid-auto-flow: column; grid-template-rows: repeat(2, auto); }
@media (max-width: 760px) { .pd-stage img { max-height: 80%; max-width: 58%; } }
.pd-variants { min-width: 0; max-width: 100%; }
@media (min-width: 761px) and (max-width: 1080px) {
  .pd-trust li { justify-content: flex-start; gap: 12px; padding: 4px 16px; }
  .pd-trust .ic { width: 28px; height: 28px; }
  .pd-trust b { font-size: 14.5px; }
  .pd-trust small { font-size: 13px; }
  .pd-trust li:first-child small { display: none; }
}
