/* ============================================================
   PRODUCT DETAIL — PAGE STYLES
   Extends style.css. Reuses the existing brand tokens
   (--pop, --surface, --line, --ink, --ink-soft, --ink-faint,
   --bg-page, --radius-*, --shadow-*, --danger,
   --font-display/body/mono) already defined globally.

   Mobile-first. Every rule is written once; enhancements layer
   on top via min-width media queries — no duplicate/competing
   declarations.

   Sections in this file:
     1. Resets & local tokens
     2. Badges / title row / share
     3. Seller line, rating, stock
     4. Description card                 (NEW — redesigned)
     5. Specifications grid              (NEW — redesigned)
     6. Buy box (qty + add to cart/buy)  (NEW — redesigned)
     7. Wholesale terms panel
     8. Variant picker
     9. Related products
    10. Share popover
   ============================================================ */

/* ---------------------------------------------------------- */
/* 1. Resets & local tokens                                    */
/* ---------------------------------------------------------- */
#pdContent * { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

#pdContent {
  --pd-accent: var(--pop, #7C3AED);
  --pd-brand: #E8500F;
  --pd-brand-soft: #FFF1EA;
}

/* ---------------------------------------------------------- */
/* 0. Layout — fluid two-column grid, sticky buy column on     */
/*    larger screens so price/qty/actions stay in view while   */
/*    the reader scrolls description, specs, and reviews.      */
/* ---------------------------------------------------------- */
#pdContent .pd-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
@media (min-width: 900px) {
  #pdContent .pd-wrap { grid-template-columns: 1.15fr 0.85fr; gap: 44px; }
  #pdContent .pd-wrap > div:last-child {
    position: sticky;
    top: 20px;
  }
}

.pd-section-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.pd-section-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--pd-brand);
  flex-shrink: 0;
}

/* ---------------------------------------------------------- */
/* 2. Badges / title row / share                               */
/* ---------------------------------------------------------- */
.pd-badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.pd-wholesale-badge,
.pd-hotdeal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 16px;
}
.pd-wholesale-badge {
  background: linear-gradient(135deg, var(--pd-accent), #5B21B6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}
.pd-hotdeal-badge { background: var(--pd-brand-soft); color: #B23C0B; }

.pd-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 6px;
}
.pd-title-row .pd-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: clamp(18px, 3.2vw, 26px);
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}

.pd-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  margin-top: 2px;
}
.pd-share-btn i { font-size: 15px; color: var(--pd-accent); }
.pd-share-btn span { display: none; }
.pd-share-btn:hover { border-color: var(--pd-accent); background: var(--wholesale-bg, #F5F0FF); }
.pd-share-btn:active { transform: scale(0.92); }

/* ---------------------------------------------------------- */
/* 3. Rating, stock                                             */
/*    (.pd-seller-line is kept only for the related-products    */
/*    rail's role chip — the main product view never shows a    */
/*    seller name.)                                              */
/* ---------------------------------------------------------- */
.pd-seller-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 4px 0 10px;
}
.pd-seller-line i { color: var(--pd-accent); font-size: 12px; }
.pd-seller-line .role-chip {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--bg-page);
  border: 1px solid var(--line);
  color: var(--ink-faint);
}

.pd-rating-num { font-family: var(--font-mono); font-weight: 700; color: var(--ink); font-size: 13px; margin-right: 3px; }

.pd-stock-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  margin: 10px 0 4px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-page);
  width: fit-content;
}
.pd-stock-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pd-stock-dot.in  { background: #2E7D32; box-shadow: 0 0 0 3px rgba(46,125,50,.15); }
.pd-stock-dot.low { background: #C77700; box-shadow: 0 0 0 3px rgba(199,119,0,.15); }
.pd-stock-dot.out { background: var(--danger, #D64545); box-shadow: 0 0 0 3px rgba(214,69,69,.15); }
.pd-stock-row.in  span { color: #2E7D32; }
.pd-stock-row.low span { color: #C77700; }
.pd-stock-row.out span { color: var(--danger, #D64545); }

/* ---------------------------------------------------------- */
/* 4. Description card — NEW                                   */
/* ---------------------------------------------------------- */
.pd-description-card {
  margin: 22px 0;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.pd-description-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.pd-desc {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0;
  white-space: pre-line;
}
.pd-desc.clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.pd-desc-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--pd-brand);
  cursor: pointer;
}
.pd-desc-toggle.show { display: inline-flex; }
.pd-desc-toggle i { font-size: 11px; transition: transform .2s ease; }
.pd-desc-toggle.open i { transform: rotate(180deg); }

/* ---------------------------------------------------------- */
/* 5. Specifications — NEW spec-sheet grid                      */
/* ---------------------------------------------------------- */
.pd-specs { margin: 22px 0; }
.pd-specs__head {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
}
.pd-specs__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pd-specs__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  background: var(--surface);
}
.pd-specs__item:nth-child(odd) { background: var(--bg-page); }
.pd-specs__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.pd-specs__value {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}

/* ---------------------------------------------------------- */
/* 6. Price row + purchase panel (qty / actions / trust)        */
/* ---------------------------------------------------------- */
.pd-price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.pd-price-row .price-tag.lg {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-display);
}
.pd-old { font-size: 14px; color: var(--ink-faint); text-decoration: line-through; }
.pd-discount-chip {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--pd-brand);
  padding: 3px 9px;
  border-radius: 999px;
}

/* Purchase panel wraps only the transactional controls (qty,
   live pricing, add/buy, trust row) — it sits after the specs,
   wholesale terms, and variant picker, exactly where the flow
   naturally lands on a decision. On desktop this column is
   sticky (see section 0), so it's what stays on screen while
   the reader scrolls the description below. */
.pd-purchase-panel {
  margin: 18px 0 0;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(23,24,28,.03);
}
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 6px;
}
.qty-row > .form-hint { font-size: 12px; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-page);
}
.qty-stepper button {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.qty-stepper button:hover:not(:disabled) { background: var(--surface); color: var(--pd-brand); }
.qty-stepper button:disabled { color: var(--ink-faint); cursor: not-allowed; }
.qty-stepper span {
  min-width: 42px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.pd-unit-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.pd-unit-note strong { font-family: var(--font-mono); color: var(--pd-accent); }

.pd-total-line {
  font-size: 14px;
  color: var(--ink);
  margin-top: 6px;
  font-weight: 600;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.pd-total-line span { font-family: var(--font-mono); font-weight: 800; color: var(--pd-accent); font-size: 16px; }

.pd-stock-warn {
  font-size: 12px;
  font-weight: 600;
  color: var(--danger, #D64545);
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(214,69,69,.07);
  border-radius: var(--radius-sm);
}

.pd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.pd-actions .btn {
  width: 100%;
  height: 50px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trust-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.trust-row > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}
.trust-row i { color: var(--pd-brand); font-size: 13px; width: 16px; text-align: center; }

/* ---------------------------------------------------------- */
/* 7. Wholesale terms panel                                     */
/* ---------------------------------------------------------- */
.pd-wholesale-panel {
  margin: 14px 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.pd-wholesale-panel__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 16px;
  background: var(--wholesale-bg, #F5F0FF);
  border-bottom: 1px solid var(--line);
}
.pd-wholesale-panel__head h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--pd-accent);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.pd-moq-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 3px 11px;
  border-radius: 12px;
}
.pd-wholesale-panel__body { padding: 14px 16px; }

.pd-tier-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.pd-tier-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--ink-faint);
  font-weight: 700;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line);
}
.pd-tier-table td { padding: 8px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.pd-tier-table tr:last-child td { border-bottom: none; }
.pd-tier-table tr.active-tier td { background: var(--wholesale-bg, #F5F0FF); color: var(--pd-accent); font-weight: 700; }
.pd-tier-table td.tier-qty { font-family: var(--font-mono); }
.pd-tier-table td.tier-price { font-family: var(--font-mono); text-align: right; }

.pd-delivery-info {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.pd-delivery-info i { color: var(--pd-accent); margin-top: 1px; }
.pd-delivery-info strong { color: var(--ink); }
.pd-delivery-info.free { color: #2E7D32; background: #E8F5E9; }
.pd-delivery-info.free i { color: #2E7D32; }

/* ---------------------------------------------------------- */
/* 8. Variant picker                                            */
/* ---------------------------------------------------------- */
.pd-variant-group { margin: 14px 0; }
.pd-variant-group__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--ink-faint);
  margin-bottom: 7px;
}
.pd-variant-group__opts { display: flex; flex-wrap: wrap; gap: 7px; }
.pd-variant-opt {
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
  min-height: 38px;
  user-select: none;
}
.pd-variant-opt:hover { border-color: var(--pd-accent); transform: translateY(-1px); }
.pd-variant-opt:active { transform: scale(.96); }
.pd-variant-opt.active { border-color: var(--pd-accent); background: var(--wholesale-bg, #F5F0FF); color: var(--pd-accent); }
.pd-variant-status { font-size: 12.5px; margin-top: 8px; color: var(--ink-soft); }
.pd-variant-status.ok { color: #2E7D32; font-weight: 600; }
.pd-variant-status.error { color: var(--danger, #D64545); font-weight: 600; }

/* ---------------------------------------------------------- */
/* 9. Related products                                          */
/* ---------------------------------------------------------- */
.pd-related { margin-top: 36px; }
.pd-related .sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.pd-related .sec-head h2 { font-size: 16px; margin: 0; }
.pd-related .sec-head a { font-size: 12px; }
.pd-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pd-related-grid .p-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.pd-related-grid .p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.pd-related-grid .p-card.wholesale { border-top: 3px solid var(--pd-accent); }
.pd-related-grid .wholesale-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--pd-accent), #5B21B6);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  z-index: 2;
}
.pd-related-grid .moq-badge { font-size: 10px; font-weight: 600; color: var(--ink-soft); margin-top: 3px; display: block; }
.pd-related-grid .moq-badge i { color: var(--pd-accent); }

/* ---------------------------------------------------------- */
/* 10. Share popover                                            */
/* ---------------------------------------------------------- */
.pd-share-popover { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; justify-content: center; }
.pd-share-popover[hidden] { display: none; }
.pd-share-popover__backdrop {
  position: absolute; inset: 0;
  background: rgba(23,24,28,.5);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s ease;
}
.pd-share-popover.open .pd-share-popover__backdrop { opacity: 1; }
.pd-share-popover__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 44px rgba(23,24,28,.22);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0));
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
}
.pd-share-popover.open .pd-share-popover__card { transform: translateY(0); }
.pd-share-popover__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pd-share-popover__head span { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); }
.pd-share-popover__head button {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: var(--bg-page); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s ease; flex-shrink: 0;
}
.pd-share-popover__head button:hover { background: var(--line); color: var(--ink); }

.pd-share-preview { display: flex; align-items: center; gap: 11px; padding: 11px; background: var(--bg-page); border-radius: var(--radius-sm); margin-bottom: 14px; }
.pd-share-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 9px; flex-shrink: 0; background: var(--surface); border: 1px solid var(--line); }
.pd-share-preview__name { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-share-preview__price { font-family: var(--font-mono); font-weight: 800; color: var(--pd-accent); font-size: 12.5px; margin-top: 3px; }

.pd-share-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.pd-share-opt {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 3px; border: none; background: none; cursor: pointer;
  border-radius: var(--radius-sm); transition: all .2s ease;
}
.pd-share-opt:hover { background: var(--bg-page); transform: translateY(-2px); }
.pd-share-opt:active { transform: scale(.94); }
.pd-share-opt i { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; color: #fff; }
.pd-share-opt span { font-size: 9.5px; font-weight: 700; color: var(--ink-soft); }
.pd-share-opt[data-share="whatsapp"] i { background: #25D366; }
.pd-share-opt[data-share="facebook"] i { background: #1877F2; }
.pd-share-opt[data-share="twitter"] i { background: #000; }
.pd-share-opt[data-share="telegram"] i { background: #229ED9; }
.pd-share-opt[data-share="copy"] i { background: var(--ink); }

/* ============================================================
   RESPONSIVE — mobile-first enhancements
   ============================================================ */
@media (min-width: 480px) {
  .pd-specs__grid { grid-template-columns: repeat(2, 1fr); }
  .trust-row { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 600px) {
  .pd-title-row .pd-title { font-size: 22px; }
  .pd-share-btn { width: 44px; height: 44px; font-size: 16px; }
  .pd-share-btn i { font-size: 18px; }
  .pd-related-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .pd-wholesale-panel__head { flex-direction: row; align-items: center; justify-content: space-between; }
  .pd-share-popover { align-items: center; }
  .pd-share-popover__card { border-radius: var(--radius-lg); transform: translateY(16px) scale(.97); opacity: 0; box-shadow: var(--shadow-card-hover); padding: 20px; }
  .pd-share-popover.open .pd-share-popover__card { transform: translateY(0) scale(1); opacity: 1; }
}

@media (min-width: 768px) {
  .pd-title-row .pd-title { font-size: 26px; }
  .pd-related-grid { grid-template-columns: repeat(4, 1fr); }
  .pd-wholesale-badge, .pd-hotdeal-badge { font-size: 10px; padding: 5px 14px; }
  .pd-purchase-panel { padding: 20px 22px; }
  .pd-actions { grid-template-columns: 1fr 1fr; }
  .pd-specs__grid { grid-template-columns: repeat(2, 1fr); }
  .pd-specs__item { padding: 14px 18px; }
}

@media (max-width: 374px) {
  .pd-title-row .pd-title { font-size: 16px; }
  .pd-share-btn { width: 32px; height: 32px; }
  .pd-share-btn i { font-size: 13px; }
  .pd-related-grid { gap: 6px; }
  .pd-wholesale-badge, .pd-hotdeal-badge { font-size: 8px; padding: 3px 8px; }
  .pd-share-options { grid-template-columns: repeat(3, 1fr); }
  .pd-variant-opt { font-size: 11px; padding: 6px 11px; min-height: 34px; }
  .pd-actions { grid-template-columns: 1fr; }
}

@supports (padding: max(0px)) {
  .pd-share-popover__card { padding-bottom: max(16px, env(safe-area-inset-bottom, 0)); }
}





/* ---------------------------------------------------------- */
/* 0b. Swipeable gallery track (main image area)                */
/* ---------------------------------------------------------- */
#pdContent .pd-gallery__main {
  position: relative;
  overflow: hidden;
}

#pdContent .pd-gallery__track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  outline: none; /* focus ring not needed — arrows/thumbs already show state */
}
#pdContent .pd-gallery__track::-webkit-scrollbar { display: none; }

#pdContent .pd-gallery__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
#pdContent .pd-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none; /* clicks pass through to the track, not the img */
}

/* Prev/next arrows — hidden until hover on pointer devices, always
   visible on touch (no hover state to reveal them there). */
#pdContent .pd-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(23, 24, 28, .55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease, transform .15s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
#pdContent .pd-gallery__main:hover .pd-gallery__nav { opacity: 1; }
#pdContent .pd-gallery__nav:hover { background: var(--pd-brand, #E8500F); }
#pdContent .pd-gallery__nav:active { transform: translateY(-50%) scale(.92); }
#pdContent .pd-gallery__nav:disabled { opacity: 0 !important; pointer-events: none; }
#pdContent .pd-gallery__nav--prev { left: 10px; }
#pdContent .pd-gallery__nav--next { right: 10px; }

/* Touch devices have no hover — show the arrows all the time instead,
   a little smaller so they don't dominate the image. */
@media (hover: none) {
  #pdContent .pd-gallery__nav {
    opacity: .9;
    width: 34px;
    height: 34px;
    font-size: 12px;
  }
}

/* Slide counter, e.g. "2 / 5" */
#pdContent .pd-gallery__counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(23, 24, 28, .6);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 599px) {
  #pdContent .pd-gallery__nav { width: 32px; height: 32px; font-size: 12px; }
  #pdContent .pd-gallery__counter { font-size: 10px; padding: 2px 8px; }
}





/* ============================================================
   NEW — expand icon + full-screen image lightbox
   ============================================================ */

/* Small "view full size" icon, bottom-right of the main image */
#pdContent .pd-gallery__expand {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(23, 24, 28, .6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  z-index: 6;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: background .2s ease, transform .15s ease;
}
#pdContent .pd-gallery__expand:hover { background: var(--pd-brand, #E8500F); }
#pdContent .pd-gallery__expand:active { transform: scale(.92); }

/* If the counter is also showing (multiple images), stack the expand
   icon above it so the two never overlap. */
#pdContent .pd-gallery__counter ~ .pd-gallery__expand { right: 10px; bottom: 46px; }

#pdContent .pd-gallery__slide { cursor: zoom-in; }

/* ---------------------------------------------------------- */
/* 11. Full-screen image lightbox                                */
/* ---------------------------------------------------------- */
.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100010; /* above the share popover (100000) */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.pd-lightbox[hidden] { display: none; }
.pd-lightbox.open { opacity: 1; }

.pd-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, .96);
}

.pd-lightbox__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 40px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
  pointer-events: none;
}
.pd-lightbox__topbar > * { pointer-events: auto; }

.pd-lightbox__counter {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.12);
  padding: 5px 12px;
  border-radius: 20px;
}

.pd-lightbox__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.pd-lightbox__close:hover { background: rgba(255,255,255,.24); }
.pd-lightbox__close:active { transform: scale(.9); }

.pd-lightbox__track {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  outline: none;
}
.pd-lightbox__track::-webkit-scrollbar { display: none; }

.pd-lightbox__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 60px 16px;
}
.pd-lightbox__slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

.pd-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.pd-lightbox__nav:hover { background: rgba(255,255,255,.24); }
.pd-lightbox__nav:active { transform: translateY(-50%) scale(.9); }
.pd-lightbox__nav:disabled { opacity: 0; pointer-events: none; }
.pd-lightbox__nav--prev { left: 14px; }
.pd-lightbox__nav--next { right: 14px; }

.pd-lightbox__thumbs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  overflow-x: auto;
  scrollbar-width: none;
}
.pd-lightbox__thumbs::-webkit-scrollbar { display: none; }
.pd-lightbox__thumbs img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  opacity: .5;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity .2s ease, border-color .2s ease;
}
.pd-lightbox__thumbs img.active {
  opacity: 1;
  border-color: var(--pd-brand, #E8500F);
}

/* Prevent the page behind the lightbox from scrolling while it's open */
body.pd-lightbox-open { overflow: hidden; }

@media (hover: none) {
  .pd-lightbox__nav { opacity: .85; }
}

@media (max-width: 480px) {
  .pd-lightbox__slide { padding: 50px 8px; }
  .pd-lightbox__nav { width: 36px; height: 36px; font-size: 13px; }
  .pd-lightbox__thumbs img { width: 38px; height: 38px; }
}