/* ============================================================
   GEWA Germany -- PRODUCT DETAIL PAGE
   product-detail.css (product.html.twig)
   Gallery is a dark tile (--gallery-bg, pure black) so the black-background
   product photography blends in. Single variable controls every surface
   (frame, LightGallery box, backdrop, toolbar, thumbnail strip).
   ============================================================ */

.product-detail-header { padding: 24px var(--side-pad) 0; }

.product-detail { padding: 0 0 80px; }
.product-detail-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px var(--side-pad) 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ── Gallery ──
   LightGallery renders its own main image, thumbnail strip (lgThumbnail
   plugin), zoom (lgZoom plugin) and nav arrows inline into
   .inlineLightGallery (container: this element, in the init) — that's
   what determines its size, since LightGallery otherwise defaults to a
   fullscreen fixed-position overlay on <body>. .inlineLightGallery itself
   is deliberately left as a plain, unpadded square box — the same
   min-height/aspect-ratio approach already proven to work — so
   LightGallery's internal position:absolute elements keep sizing
   predictably against it.

   Background is --gallery-bg (pure black) to match the black backgrounds
   of the product photos. If a photo's own background is not exactly #000,
   change the variable once here.

   .product-gallery is the outer frame: a thin grey border (matching
   .btn-ghost's own border color, for visual consistency with the rest of
   the page's outline-style UI) with a gap before the dark panel begins. */
.product-gallery {
  --gallery-bg: #000;
  position: sticky; top: calc(var(--nav-h) + 24px);
  padding: 16px;
  border: 0.5px solid rgba(255,255,255,0.12);
}

/* One image only (e.g. the "coming soon" placeholder): no arrows, no thumbnail strip */
.product-gallery.is-single .lg-prev,
.product-gallery.is-single .lg-next,
.product-gallery.is-single .lg-thumb-outer {
  display: none !important;
}

.product-gallery-frame {
  background: var(--gallery-bg);
  padding: 20px 20px 20px;
}

.inlineLightGallery {
  position: relative;
  width: 100%; aspect-ratio: 1;
  min-height: 560px; /* aspect-ratio alone wasn't enough — LightGallery's
    internals (.lg-outer etc.) are all position:absolute and contribute no
    height of their own, so with nothing else in the box the browser was
    resolving it to 0 height regardless of aspect-ratio. min-height gives
    it real dimensions to anchor to; aspect-ratio still applies on top of
    that for wider viewports. */
  background: var(--gallery-bg);
  overflow: hidden;
}

/* ── Force LightGallery's inline mode to actually show ──
   By default LightGallery assumes it's a fullscreen modal: .lg-outer /
   .lg-backdrop start at opacity:0 and fade in via a transition tied to its
   own click-triggered open animation. Since we open it programmatically
   (openGallery() on load, no click), that fade-in can fail to complete,
   leaving .lg-backdrop sitting on top of a still-invisible .lg-outer.
   Forcing both to opacity/visibility:1 and position:absolute (so they size
   against our own container instead of assuming a viewport-fixed modal)
   is the standard fix for this. */
.inlineLightGallery .lg-backdrop {
  position: absolute !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: var(--gallery-bg) !important;
}
.inlineLightGallery .lg-outer {
  position: absolute !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.inlineLightGallery .lg-item.lg-complete-o,
.inlineLightGallery .lg-image {
  opacity: 1 !important;
}

/* LightGallery's thumbnail strip + toolbar, recoloured for the dark tile:
   light icons by default (gold on hover, same interaction language as the
   rest of the site). Selectors are LightGallery's own (lg-thumb-item for
   each thumbnail, lg-toolbar for the top icon row, lg-icon for nav
   arrows/close/zoom). */
.inlineLightGallery .lg-thumb-item { border-color: rgba(255,255,255,0.14) !important; background: var(--gallery-bg) !important; }
.inlineLightGallery .lg-thumb-item.active,
.inlineLightGallery .lg-thumb-item:hover { border-color: var(--gold) !important; }
.inlineLightGallery .lg-toolbar { background: var(--gallery-bg) !important; }

/* Thumbnail track inset — padding goes on .lg-components (the thumb
   strip's parent), not .lg-thumb-outer itself. LightGallery's JS reads
   .lg-thumb-outer's own rendered width to calculate scroll/positioning,
   so squeezing that element directly with padding risks throwing its
   internal math off. */
.inlineLightGallery .lg-components { padding: 0 20px; }
.inlineLightGallery .lg-thumb-outer { background: var(--gallery-bg) !important; }
.inlineLightGallery .lg-icon { color: rgba(255,255,255,0.55) !important; }
.inlineLightGallery .lg-icon:hover { color: var(--gold) !important; }

/* Prev/next nav arrows specifically — .lg-icon above only recolors the
   glyph, not the button box. Circular outlined button, light on the dark
   tile, gold on hover. */
.inlineLightGallery .lg-prev,
.inlineLightGallery .lg-next {
  width: 40px !important; height: 40px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 2px solid rgba(255,255,255,0.45) !important;
  color: rgba(255,255,255,0.55) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s !important;
}
.inlineLightGallery .lg-prev:hover,
.inlineLightGallery .lg-next:hover {
  color: var(--gold) !important;
  border-color: var(--gold) !important;
}

/* ── Info column ── */
.product-info-eyebrow { font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.product-title { font-family: var(--font-serif); font-size: clamp(32px, 3.5vw, 48px); font-weight: 300; line-height: 1.05; color: var(--cream); }
.product-subtitle { font-size: 16px; color: var(--w55); margin-top: 8px; letter-spacing: 0.04em; }
.product-price { font-family: var(--font-serif); font-size: 30px; font-weight: 300; color: var(--gold); margin-top: 20px; }
.product-price-net { font-size: 13px; letter-spacing: 0.08em; color: var(--w55); margin-top: 4px; }
.product-teaser { font-size: 16px; line-height: 1.7; color: var(--w55); font-weight: 300; margin-top: 20px; }

.product-features { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.product-features li {
  font-size: 17px; color: var(--w65); line-height: 1.3; padding-left: 18px; position: relative;
}
.product-features li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: 0.7;
}
.product-features-more[hidden] { display: none; }
.product-features-more { margin-top: 8px; }
.product-features-toggle {
  margin-top: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); background: none; border: none; cursor: pointer; padding: 0;
}
.product-features-toggle .pft-arrow { transition: transform 0.2s; }
.product-features-toggle.open .pft-arrow { transform: rotate(180deg); }

/* ── Variant / colour picker ── */
.product-variant-picker { margin-top: 24px; }
.pvp-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--w40); margin-bottom: 10px; }
.pvp-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.pvp-swatch {
  width: 34px; height: 34px; border-radius: 50%;
  background-size: cover; background-position: center;
  border: 1.5px solid var(--w10);
  transition: border-color 0.15s;
  display: block;
}
.pvp-swatch:hover { border-color: var(--w30); }
.pvp-swatch.active { border-color: var(--gold); }

/* ── Meta rows (colour / article numbers) ── */
.product-meta-rows { margin-top: 24px; border-top: 0.5px solid var(--w06); }
.pm-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 0.5px solid var(--w06); }
.pm-label { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--w45); }
.pm-val { font-size: 14px; letter-spacing: 0.12em; color: var(--w65); text-align: right; }

/* ── Actions ── */
.product-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.product-actions .btn-primary, .product-actions .btn-ghost { text-align: center; }

/* ── Compliance (simplified stand-in) ── */
.product-compliance { margin-top: 24px; border-top: 0.5px solid var(--w06); padding-top: 16px; }
.product-compliance-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; cursor: pointer;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--w45);
  padding: 0;
}
.product-compliance-toggle .toggle { transition: transform 0.2s; }
.product-compliance-toggle.open .toggle { transform: rotate(180deg); }
.product-compliance-body { margin-top: 12px; font-size: 13px; color: var(--w55); line-height: 1.7; }
.product-compliance-body.hidden { display: none; }

/* ── Config / module CTA banners ── */
.pd-config-banner { display: flex; align-items: center; gap: 32px; padding: 24px; }
.pd-config-banner-img { width: 140px; height: 100px; object-fit: contain; background: #000; flex-shrink: 0; }
.pd-config-banner .cta-strip-inner { flex: 1; }

/* ── Tabs ── */
.product-tabs { padding: 56px 0 0; border-top: 0.5px solid var(--w06); margin-top: 56px; }
.pd-tab-nav { display: flex; gap: 0; border-bottom: 0.5px solid var(--w06); }
.pd-tab-btn {
  background: none; border: none; cursor: pointer;
  font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--w45); padding: 14px 24px 14px 0; margin-right: 24px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.pd-tab-btn:hover { color: var(--w65); }
.pd-tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.pd-tab-panels { padding: 32px 0; }
.pd-tab-panel { display: none; font-size: 16px; color: var(--w55); line-height: 1.75; font-weight: 300; }
.pd-tab-panel.active { display: block; }
.pd-tab-heading { font-family: var(--font-serif); font-size: 24px; font-weight: 300; color: var(--cream); margin-bottom: 14px; }

/* Video facade (click-to-load YouTube embed, no Plyr dependency)
.pd-video-facade {
  position: relative; aspect-ratio: 16/9; max-width: 720px;
  background: #000; cursor: pointer; overflow: hidden;
}
.pd-video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.pd-video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; } */
.pd-video { max-width: 720px; }
.pd-video iframe { display: block; width: 100%; aspect-ratio: 16/9; height: auto; border: 0; }
.pd-video [data-type="placeholder"] { width: 100%; max-width: 720px; height: auto !important; aspect-ratio: 16/9; }

/* ── Suggested products strip — reuses .product-card ── */
.product-suggestions { padding: 56px var(--side-pad) 0; border-top: 0.5px solid var(--w06); }
.product-suggestions-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin-top: 32px;
}

@media (max-width: 960px) {
  .product-detail-header { padding: 16px 24px 0; }
  .product-detail-inner { grid-template-columns: 1fr; gap: 32px; padding: 24px 24px 40px; }
  .product-gallery { position: static; padding: 10px; }
  .product-gallery-frame { padding: 14px 14px 18px; }
  .inlineLightGallery { min-height: 320px; }
  .pd-config-banner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .pd-config-banner-img { width: 100%; height: 160px; }
  .product-tabs { padding: 40px 24px 0; }
  .pd-tab-nav { overflow-x: auto; }
  .product-suggestions { padding: 40px 24px 0; }
  .product-suggestions-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .product-suggestions-grid { grid-template-columns: 1fr; }
}