/* ==========================================================================
   Product detail — /products/{slug}
   --------------------------------------------------------------------------
   Ported from the $pageStyles block in html/product-detail.php. Loaded only by
   frontend/pages/product_detail.blade.php, which keeps it clear of the older
   .pd-* rules in style.css that the article detail page still uses (.pd-section,
   .pd-thumb and .pd-related-grid mean something different there).
   ========================================================================== */

/* ── Breadcrumb bar ─────────────────────────────────────────────────── */
.pd-topbar { background: var(--primary-dark); padding: 12px 0; }
.pd-nav-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.pd-breadcrumb { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pd-breadcrumb a { color: rgba(255,255,255,.6); font-size: 12.5px; transition: color .25s; }
.pd-breadcrumb a:hover { color: var(--gold-light); }
.pd-breadcrumb span { color: rgba(255,255,255,.9); font-size: 12.5px; }
.pd-bc-sep { color: rgba(255,255,255,.3); font-size: 9px; }
.pd-prev-next { display: flex; gap: 16px; }
.pd-prev-next a { color: rgba(255,255,255,.6); font-size: 12.5px; display: flex; align-items: center; gap: 5px; transition: color .25s; }
.pd-prev-next a:hover { color: var(--gold-light); }

/* ── Main product section ───────────────────────────────────────────── */
.pd-section-wrap { padding: 52px 0 70px; background: #fff; }

/* Gallery — vertical thumbs left + main right */
.pd-gallery-wrap { display: grid; grid-template-columns: 78px 1fr; gap: 12px; position: sticky; top: 100px; }
.pd-thumbs-col { display: flex; flex-direction: column; gap: 8px; max-height: 540px; overflow-y: auto; scrollbar-width: thin; }
.pd-section-wrap .pd-thumb { border-radius: 8px; overflow: hidden; border: 2px solid var(--border); cursor: pointer; transition: border-color .25s; aspect-ratio: 1; background: var(--light-bg); width: auto; height: auto; }
.pd-section-wrap .pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-section-wrap .pd-thumb.active,
.pd-section-wrap .pd-thumb:hover { border-color: var(--gold); }
.pd-main-img-wrap { position: relative; border-radius: 12px; overflow: hidden; background: var(--light-bg); box-shadow: var(--shadow-md); }
.pd-main-img-wrap img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; transition: opacity .25s; }
.pd-zoom-hint { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; padding: 5px 10px; border-radius: 30px; pointer-events: none; display: flex; align-items: center; gap: 5px; }

/* Info column */
.pd-info-wrap { padding-left: 10px; }

/* Title / meta */
.pd-category-tag { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin-bottom: 8px; display: block; }
.pd-info-wrap .pd-title { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 800; color: var(--text-dark); line-height: 1.15; margin-bottom: 14px; }
.pd-sku-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.pd-sku-item { font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 5px; }
.pd-sku-item strong { color: var(--text-dark); }
.pd-stock { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #22a559; background: rgba(34,165,89,.1); padding: 3px 10px; border-radius: 30px; }
.pd-stock i { font-size: 10px; }
.pd-stock.out { color: #e53e3e; background: rgba(229,62,62,.1); }
.pd-badge-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; background: var(--gold); padding: 3px 10px; border-radius: 30px; }

/* Section labels */
.pd-attr-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-light); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.pd-attr-label span { font-size: 12px; font-weight: 600; color: var(--primary); text-transform: none; letter-spacing: 0; }
.pd-attr-label-inline { justify-content: flex-start; gap: 6px; }
.pd-attr-block { margin-bottom: 24px; }

/* Color cards — image only, name shows next to the Color heading */
.color-card-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.color-card { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; cursor: pointer; text-align: center; transition: border-color .25s, box-shadow .25s, transform .25s; }
.color-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.color-card.active { border-color: var(--primary); box-shadow: 0 3px 12px rgba(27,54,100,.16); }
.color-card-img { aspect-ratio: 1; background: var(--light-bg); overflow: hidden; }
.color-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Colourways with no photo of their own fall back to the hex swatch. */
.color-card-swatch { aspect-ratio: 1; display: block; }
.color-card-name { display: block; font-size: 11px; font-weight: 600; color: var(--text-mid); padding: 5px 4px; border-top: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Selected-colour price */
.pd-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pd-price-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-light); }
.pd-price { font-family: var(--font-heading); font-size: 19px; font-weight: 800; color: var(--primary); line-height: 1; }
.pd-price-note { font-size: 12px; color: var(--text-light); }

/* ── Size × quantity grid ───────────────────────────────────────────── */
.size-qty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 7px; }
.size-qty-cell { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; transition: border-color .25s, box-shadow .25s; }
.size-qty-cell:focus-within, .size-qty-cell.has-qty { border-color: var(--primary); box-shadow: 0 2px 10px rgba(27,54,100,.12); }
.size-qty-cell.has-qty .size-qty-label { background: var(--primary); color: #fff; }
.size-qty-label { display: block; text-align: center; padding: 4px; font-family: var(--font-heading); font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--text-dark); background: var(--light-bg); border-bottom: 1.5px solid var(--border); transition: all .25s; }
.size-qty-input { width: 100%; height: 32px; border: none; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--text-dark); font-family: var(--font-heading); outline: none; background: transparent; -moz-appearance: textfield; }
.size-qty-input::-webkit-outer-spin-button, .size-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.size-qty-input::placeholder { color: #cbd5e0; font-weight: 400; }
.size-qty-stock { display: block; text-align: center; padding: 3px 3px 5px; font-size: 10px; font-weight: 600; letter-spacing: .2px; color: var(--text-light); background: #fafbfc; border-top: 1px solid var(--border); }
.size-qty-stock.low { color: #e53e3e; }
.size-qty-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.size-qty-total { font-size: 13.5px; color: var(--text-mid); }
.size-qty-total strong { font-family: var(--font-heading); font-size: 19px; color: var(--primary); }
.size-qty-total.below-min strong { color: #e53e3e; }
.size-qty-hint { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 5px; }
.size-qty-hint i { color: var(--gold); }
.btn-qty-clear { background: none; border: none; font-size: 12px; color: var(--text-light); cursor: pointer; text-decoration: underline; padding: 0; }
.btn-qty-clear:hover { color: var(--primary); }

/* CTA row */
.qty-cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 26px 0 20px; }
.btn-add-cart { flex: 1; min-width: 180px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: #fff; border: 2px solid var(--primary); padding: 13px 24px; border-radius: var(--radius); font-size: 14px; font-weight: 700; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .5px; cursor: pointer; transition: all .25s; }
.btn-add-cart:hover { background: transparent; color: var(--primary); }
.btn-add-cart:disabled { opacity: .6; cursor: not-allowed; }
.btn-quote-link { flex: 1; min-width: 160px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: var(--primary); border: 2px solid var(--primary); padding: 13px 24px; border-radius: var(--radius); font-size: 14px; font-weight: 700; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .5px; text-decoration: none; transition: all .25s; }
.btn-quote-link:hover { background: var(--primary); color: #fff; }

/* Summary features */
.pd-features { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.pd-feat { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-mid); }
.pd-feat i { color: var(--primary); font-size: 14px; }

.pd-short-desc { font-size: 14.5px; color: var(--text-mid); line-height: 1.75; margin-bottom: 20px; }

/* Share */
.pd-share { display: flex; align-items: center; gap: 10px; }
.pd-share span { font-size: 12.5px; color: var(--text-light); font-weight: 600; }
.pd-share a { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-mid); font-size: 12px; transition: all .25s; text-decoration: none; }
.pd-share a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Description tabs ───────────────────────────────────────────────── */
.pd-desc-section { padding: 60px 0 70px; background: var(--light-bg); }
.pd-tab-nav { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 32px; gap: 0; flex-wrap: wrap; }
.pd-tab-btn { padding: 12px 24px; font-size: 14px; font-weight: 700; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .5px; color: var(--text-mid); background: none; border: none; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .25s; }
.pd-tab-btn:hover { color: var(--primary); }
.pd-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.pd-tab-pane { display: none; }
.pd-tab-pane.active { display: block; }
.pd-tab-pane p { font-size: 15px; color: var(--text-mid); line-height: 1.8; margin-bottom: 14px; }
.pd-feature-list { list-style: none; padding: 0; margin: 0; }
.pd-feature-list li { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; font-size: 14.5px; color: var(--text-mid); border-bottom: 1px solid var(--border); }
.pd-feature-list li:last-child { border-bottom: none; }
.pd-feature-list li i { color: var(--gold); flex-shrink: 0; margin-top: 3px; }
.pd-spec-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.pd-spec-table th { background: var(--primary); color: #fff; padding: 10px 16px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; font-family: var(--font-heading); }
.pd-spec-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text-mid); }
.pd-spec-table tr:nth-child(even) td { background: #f8fafb; }
.pd-spec-table tr:hover td { background: rgba(27,54,100,.03); }

/* "At a Glance" card beside the description */
.pd-glance { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 22px; }
.pd-glance h5 { font-family: var(--font-heading); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); }
.pd-glance ul { list-style: none; padding: 0; margin: 0; }
.pd-glance li { padding: 6px 0; font-size: 13.5px; color: var(--text-mid); border-bottom: 1px solid #f1f3f5; display: flex; align-items: center; gap: 7px; }
.pd-glance li:last-child { border-bottom: none; }
.pd-glance li i { color: var(--gold); font-size: 11px; }

/* ── Related products ───────────────────────────────────────────────── */
.pd-related { padding: 60px 0 80px; background: #fff; }
.pd-related-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.pd-related-head h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 800; color: var(--primary-dark); margin: 8px 0 0; }
.pd-related .pd-related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pd-rel-card { border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--border); transition: all .3s; text-decoration: none; display: block; }
.pd-rel-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.pd-rel-img { aspect-ratio: 3/4; overflow: hidden; background: var(--light-bg); }
.pd-rel-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pd-rel-card:hover .pd-rel-img img { transform: scale(1.06); }
.pd-rel-body { padding: 14px 16px; }
.pd-rel-sku { font-size: 10.5px; color: var(--text-light); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.pd-rel-name { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; line-height: 1.3; }
.pd-rel-colors { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 4px; }
.pd-rel-colors i { font-size: 9px; color: var(--gold); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .pd-gallery-wrap { grid-template-columns: 64px 1fr; gap: 8px; }
  .pd-related .pd-related-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-info-wrap { padding-left: 0; margin-top: 28px; }
}
@media (max-width: 575px) {
  .pd-gallery-wrap { grid-template-columns: 1fr; }
  .pd-thumbs-col { flex-direction: row; max-height: unset; overflow-x: auto; overflow-y: hidden; }
  .pd-section-wrap .pd-thumb { width: 64px; flex-shrink: 0; }
  .qty-cta-row { flex-direction: column; align-items: stretch; }
  .btn-add-cart, .btn-quote-link { justify-content: center; }
  .size-qty-grid { grid-template-columns: repeat(3, 1fr); }
}
