/* ==========================================================================
   PRODUCT DETAILS
   ========================================================================== */
.pd-section { background: var(--paper); padding: calc(var(--top-h, var(--header-h)) + 40px) 0 clamp(3rem, 6vw, 5rem); }
.pd-section .breadcrumb { margin-bottom: 1.8rem; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.pd-notfound { padding-block: 5rem; }

/* gallery */
.pd-gallery { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: .9rem; }
.pd-main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--bone); }
.pd-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 5; scroll-behavior: smooth; }
.pd-track::-webkit-scrollbar { display: none; }
.pd-slide { flex: 0 0 100%; scroll-snap-align: center; position: relative; overflow: hidden; cursor: zoom-in; }
.pd-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease-out); transform-origin: var(--zx, 50%) var(--zy, 50%); }
.pd-slide.is-zoom img { transform: scale(1.9); transition: transform .2s ease-out; }
.pd-badges { position: absolute; top: 1rem; left: 1rem; z-index: 2; display: flex; gap: .4rem; }
.pd-expand { position: absolute; right: 1rem; top: 1rem; z-index: 2; width: 44px; height: 44px; border-radius: 50%; background: rgba(250,248,243,.9); display: grid; place-items: center; box-shadow: var(--sh-1); transition: transform .3s var(--ease-out); }
.pd-expand:hover { transform: scale(1.08); }
.pd-expand .icon { width: 18px; height: 18px; }
.pd-dots { position: absolute; left: 0; right: 0; bottom: 1rem; display: none; justify-content: center; gap: .45rem; z-index: 2; }
.pd-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); transition: background .3s, transform .3s; }
.pd-dots span.is-active { background: #fff; transform: scale(1.3); }
.pd-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; }
.pd-thumbs button { aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; border: 2px solid transparent; opacity: .65; transition: opacity .3s, border-color .3s; background: var(--bone); }
.pd-thumbs button:hover { opacity: 1; }
.pd-thumbs button.is-active { opacity: 1; border-color: var(--blaze); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* info */
.pd-info { display: flex; flex-direction: column; gap: 0; padding-top: .3rem; }
.pd-cat { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--olive); align-self: flex-start; }
.pd-cat:hover { color: var(--blaze); }
.pd-name { font-size: clamp(2.3rem, 4.4vw, 3.9rem); margin-top: .6rem; line-height: .95; }
.pd-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; margin-top: 1rem; font-size: .85rem; color: var(--text-muted); }
.pd-short { margin-top: 1.2rem; font-size: 1.08rem; color: var(--text-muted); }
.pd-price-box { margin-top: 1.8rem; padding: 1.4rem 1.5rem; background: #fff; border: 1px solid var(--line-dark); border-radius: var(--r-lg); }
.pd-price-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pd-price-head .label { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.pd-price { margin-top: 1rem; font-family: var(--f-display); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3.2rem); line-height: 1; color: var(--ink); display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.pd-price .alt { font-family: var(--f-body); font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.pd-price .alt s { opacity: .7; }
.pd-price-note { font-size: .86rem; color: var(--text-muted); margin-top: .5rem; }
.pd-stock { margin-top: 1rem; font-size: .9rem; }
.pd-buy { display: flex; gap: .8rem; margin-top: 1.4rem; }
.qty { display: flex; align-items: center; border: 1px solid rgba(15,18,13,.2); border-radius: var(--r-sm); background: #fff; flex-shrink: 0; }
.qty button { width: 46px; height: 54px; display: grid; place-items: center; color: var(--ink); transition: background .2s; }
.qty button:hover { background: var(--bone); }
.qty button .icon { width: 16px; height: 16px; }
.qty input { width: 56px; height: 54px; border: 0; text-align: center; font-weight: 600; font-size: 1.05rem; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; }
.qty:focus-within { border-color: var(--blaze); box-shadow: 0 0 0 3px rgba(224,102,42,.15); }
.pd-purchase { flex: 1; min-height: 56px; font-size: 1.1rem; }
.pd-purchase::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .9s var(--ease-out); z-index: 1; pointer-events: none; }
.pd-purchase:hover::after { left: 130%; }
.pd-purchase.is-backorder { --btn-bg: var(--ink); --btn-fill: var(--olive); box-shadow: none; }
.pd-secondary { display: flex; gap: 1.8rem; margin-top: 1.3rem; }
.pd-secondary .link-arrow { font-size: .9rem; }
.pd-assure { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.2rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark); }
.pd-assure li { display: flex; gap: .55rem; align-items: flex-start; font-size: .86rem; color: var(--text-muted); }
.pd-assure .icon { width: 18px; height: 18px; color: var(--olive); margin-top: 1px; }

/* tabs */
.pd-details { background: #fff; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); padding-block: clamp(3rem, 6vw, 5rem); }
.tabs { position: relative; display: flex; gap: clamp(1rem, 3vw, 2.6rem); border-bottom: 1px solid var(--line-dark); overflow-x: auto; scrollbar-width: none; margin-bottom: 2.2rem; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] { padding: 1rem 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.05rem, 1.6vw, 1.3rem); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; transition: color .3s; }
.tabs [role="tab"][aria-selected="true"], .tabs [role="tab"]:hover { color: var(--ink); }
.tab-ink { position: absolute; bottom: -1px; left: 0; height: 2px; background: var(--blaze); transition: transform .5s var(--ease-out), width .5s var(--ease-out); }
.tab-panel { max-width: 860px; animation: panelIn .5s var(--ease-out); }
.tab-panel:focus-visible { outline-offset: 8px; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }
.tab-panel.rich { color: var(--text-muted); font-size: 1.04rem; }
.spec-table { border: 1px solid var(--line-dark); border-radius: var(--r-md); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.spec-table th, .spec-table td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--line-dark); font-size: .95rem; vertical-align: top; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 38%; background: var(--paper); font-weight: 600; color: var(--ink); }
.spec-table td { color: var(--text-muted); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
.feature-list li { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.1rem; background: var(--paper); border-radius: var(--r-md); }
.feature-list .icon { width: 22px; height: 22px; color: #fff; background: var(--olive); border-radius: 50%; padding: 4px; flex-shrink: 0; }

.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 1.6vw, 1.3rem); }

/* mobile sticky buy bar */
.mobile-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; display: none; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom)); background: rgba(250,248,243,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line-dark); box-shadow: 0 -10px 30px -12px rgba(0,0,0,.2); transform: translateY(110%); transition: transform .5s var(--ease-out); }
.mobile-buy.is-visible { transform: none; }
.mobile-buy strong { display: block; font-family: var(--f-display); font-size: 1.5rem; line-height: 1; }
.mobile-buy span { font-size: .78rem; color: var(--text-muted); }
.mobile-buy .btn { min-height: 48px; padding-inline: 1.3rem; }

@media (max-width: 1023px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-gallery { position: static; }
  .pd-dots { display: flex; }
  .pd-thumbs { display: none; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-buy { display: flex; }
}
@media (max-width: 639px) {
  .pd-track { aspect-ratio: 1 / 1.08; }
  .pd-main { border-radius: var(--r-md); margin-inline: calc(-1 * var(--gutter) + 0px); border-radius: 0; }
  .pd-assure { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .spec-table th { width: 44%; }
  .spec-table th, .spec-table td { padding: .85rem .9rem; font-size: .9rem; }
  .pd-price-box { padding: 1.1rem; }
  .pd-buy { flex-direction: column; }
  .qty { align-self: flex-start; }
}
