/* ------------------------------
   Gallery page intro
-------------------------------- */

.gallery-hero {
  padding: 72px 0 56px;
}

.gallery-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.gallery-title {
  margin: 0 0 14px;
  font-size: clamp(34px, 4.2vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.gallery-subtitle {
  margin: 0 auto;
  max-width: 680px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
}

/* ------------------------------
   Product sections (hero-like)
-------------------------------- */

.product {
  padding: 72px 0 80px;
  border-top: 1px solid rgba(210, 210, 215, 0.8);
}

.product-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.product-text {
  max-width: 520px;
}

.product-heading {
  margin: 0 0 14px;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.product-subtitle {
  margin: 0;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.55;
}

.product-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}

/* Alternating sections: swap columns */
.product-inner.reverse .product-text {
  grid-column: 2;
  grid-row: 1;
}
.product-inner.reverse .product-gallery {
  grid-column: 1;
  grid-row: 1;
}

/* ------------------------------
   Image grid (max 4 images)
   Small tiles stack bottom -> top
-------------------------------- */

.product-gallery {
  --big: 420px;     /* big square size (matches your hero image vibe) */
  --small: 132px;   /* small tile size */
  --gap: 14px;

  display: grid;
  grid-template-columns: var(--big) var(--small);
  grid-template-rows: repeat(3, var(--small));
  gap: var(--gap);
  justify-content: end; /* keeps the block tidy on wide screens */
}

/* Main square */
.product-gallery .tile--main {
  grid-column: 1;
  grid-row: 1 / 4;
  width: var(--big);
  height: var(--big);
}

/* Small squares — forced placement:
   s1 bottom, s2 middle, s3 top */
.product-gallery .tile--s1 {
  grid-column: 2;
  grid-row: 3;
}
.product-gallery .tile--s2 {
  grid-column: 2;
  grid-row: 2;
}
.product-gallery .tile--s3 {
  grid-column: 2;
  grid-row: 1;
}

.product-gallery .tile--s1,
.product-gallery .tile--s2,
.product-gallery .tile--s3 {
  width: var(--small);
  height: var(--small);
}

/* Tile styling */
.product-gallery .tile {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(210, 210, 215, 0.85);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  display: block;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.product-gallery .tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: none) {
  .product-gallery .tile:hover {
    transform: none;
  }
}

/* ------------------------------
   CTA
-------------------------------- */

.gallery-cta {
  padding: 72px 0 80px;
  border-top: 1px solid rgba(210, 210, 215, 0.8);
}

.gallery-cta-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.gallery-cta-heading {
  margin: 0 0 12px;
  font-size: 34px;
  letter-spacing: -0.02em;
}

.gallery-cta-subtitle {
  margin: 0 auto 22px;
  max-width: 640px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
}

/* ------------------------------
   Responsive
-------------------------------- */

@media (max-width: 700px) {
  .gallery-hero {
    padding: 64px 0 44px;
  }

  .gallery-subtitle {
    font-size: 15px;
  }

  .product-inner,
  .product-inner.reverse {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

/* Fix reverse on mobile: reset forced grid placement */
.product-inner.reverse .product-text,
.product-inner.reverse .product-gallery {
  grid-column: auto !important;
  grid-row: auto !important;
}

/* On mobile: big full width square, smalls become 2-col grid below */ 

.product-gallery { 
  --gap: 12px; 
  display: grid;
  gap: var(--gap);

  grid-template-columns: repeat(3, 1fr); 
  grid-template-rows: auto auto; 
  justify-content: start; 
} 

.product-gallery .tile--main { 
  grid-column: 1 / -1;
  grid-row: 1; 
  width: 100%; 
  height: auto; 
  aspect-ratio: 1 / 1; 
} 

.product-gallery .tile--s1, 
.product-gallery .tile--s2, 
.product-gallery .tile--s3 { 
  grid-column: auto !important;
  grid-row: 2 !important;
  width: 100%; 
  height: auto; 
  aspect-ratio: 1 / 1; 
}

  .gallery-cta {
    padding: 64px 0;
  }

  .gallery-cta-heading {
    font-size: 28px;
  }

  .gallery-cta-subtitle {
    font-size: 15px;
  }
}

/* ------------------------------
   Lightbox
-------------------------------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.lb.is-open {
  display: block;
}

.lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(10px);
}

.lb__dialog {
  position: relative;
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
}

.lb__stage {
  position: relative;
  display: inline-block;
  padding-inline: clamp(100px, 8vw, 150px);
  box-sizing: content-box;
}

.lb__img {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  width: auto;
  height: auto;

  border-radius: var(--radius-lg);
  border: 1px solid rgba(210, 210, 215, 0.35);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 255, 255, 0.06);
}

/* Controls */
.lb__close,
.lb__nav {
  position: absolute;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(210, 210, 215, 0.35);
  background: rgba(245, 245, 247, 0.14);
  color: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.lb__close:hover {
  background: rgba(245, 245, 247, 0.2);
  border-color: rgba(210, 210, 215, 0.5);
}

.lb__nav:hover {
  background: rgba(245, 245, 247, 0.2);
  border-color: rgba(210, 210, 215, 0.5);
}

.lb__close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 18px;
  line-height: 1;
}

.lb__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 34px;
  line-height: 1;
  padding: 0;
}

.lb__nav svg {
  display: block; /* removes inline baseline alignment */
}

.lb__nav--prev { left: 18px; }
.lb__nav--next { right: 18px; }

@media (max-width: 700px){
  .lb__stage{
    padding: 0;
  }

  .lb__nav{
    top: auto;
    bottom: -60px;
    transform: none;
  }

  .lb__nav--prev{
    left: calc(50% - 60px);
  }

  .lb__nav--next{
    right: calc(50% - 60px);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lb__close,
  .lb__nav {
    transition: none;
  }
}