/* ======================================================================
   MERCH
   The merch relaunch holding page, merch.php. A Core page: desktop first,
   @media (max-width: 768px) for phones. Loaded after style.css (the
   countdown, the buttons).
   ====================================================================== */

/* ── 1. Black Friday strip ────────────────────────────────────────────
   Directly under the fixed navbar. A ticker: the track holds BLACK FRIDAY
   24 times and slides left by half its width, which is exactly twelve
   copies, so the loop has no visible seam. The line under it is still. */

.merch-ticker {
  margin-top: var(--nav-h);
  overflow: hidden;
  background: var(--teal);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}

.merch-ticker-track {
  display: inline-flex;
  padding: 14px 0;
  animation: merch-ticker 30s linear infinite;
}

.merch-ticker-item {
  padding-right: 2em;
}

@keyframes merch-ticker {
  to { transform: translateX(-50%); }
}

.merch-ticker-line {
  padding: 12px var(--gutter);
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--sand);
}

/* ── 2. Hero ──────────────────────────────────────────────────────────
   The headline with photos dropped round it like prints on a table.
   On a desktop (the min-width block below) the stage is three columns:
   three prints down the left, the headline in the middle, three down the
   right, with a gap either side of the headline that a tilted print
   cannot reach. So no print ever covers the text. Phones: see the end. */

.merch-hero {
  overflow: hidden;
  background: var(--navy);
  padding: 56px 0 72px;
}

.merch-hero-heading {
  position: relative;
  z-index: 2;
  max-width: 4.8em;
  font-family: var(--font-head);
  font-size: clamp(64px, 9.5vw, 132px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 6px 32px rgba(15, 26, 36, 0.7);
}

.merch-print {
  padding: 8px 8px 26px;
  background: var(--white);
  border-radius: 2px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transform: rotate(var(--tilt, 0deg));
}

.merch-print img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

@media (min-width: 769px) {
  .merch-hero-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: repeat(3, auto);
    column-gap: clamp(40px, 5vw, 80px);
    align-items: center;
  }

  .merch-hero-heading {
    grid-column: 2;
    grid-row: 1 / -1;
  }

  /* The prints join the stage's grid directly. */
  .merch-prints {
    display: contents;
  }

  .merch-print {
    position: relative;
    width: min(100%, clamp(130px, 14.5vw, 200px));
  }

  /* Left column, then right column, overlapping down each side. */
  .merch-print--1 { --tilt: -7deg; grid-column: 1; grid-row: 1; justify-self: start; }
  .merch-print--3 { --tilt: 4deg;  grid-column: 1; grid-row: 2; justify-self: end;   margin-top: -56px; z-index: 1; }
  .merch-print--5 { --tilt: -3deg; grid-column: 1; grid-row: 3; justify-self: start; margin-top: -56px; }
  .merch-print--2 { --tilt: 5deg;  grid-column: 3; grid-row: 1; justify-self: end; }
  .merch-print--4 { --tilt: -5deg; grid-column: 3; grid-row: 2; justify-self: start; margin-top: -56px; z-index: 1; }
  .merch-print--6 { --tilt: 8deg;  grid-column: 3; grid-row: 3; justify-self: end;   margin-top: -56px; }
}

/* ── 3. Countdown and signup ──────────────────────────────────────────
   The countdown itself is the homepage's (.countdown in style.css). The
   button drops down Brevo's form. The iframe is Brevo's embed as given;
   only its size is set here, tall enough that the form and its success
   or error message fit without scrolling inside it (measured: about
   450px at 540px wide, about 510px at phone width). */

.merch-drop {
  background: var(--navy);
  padding: 72px 0 88px;
}

.merch-drop-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

/* "Drops Friday 7pm": the homepage eyebrow, much bigger. */
.merch-drop-label {
  margin-bottom: 24px;
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
}

.merch-countdown {
  margin-bottom: 0;
}

.merch-drop-now {
  font-family: var(--font-head);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  color: var(--white);
}

.merch-notify-toggle {
  max-width: 100%;
  margin-top: 36px;
  white-space: normal;
}

.merch-notify-panel {
  margin-top: 24px;
}

.merch-notify-note {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--sand);
}

.merch-notify-form iframe {
  width: 540px;
  height: 540px;
  border-radius: 8px;
}

/* ── Travel Discount Card reminders ───────────────────────────────────
   Two short strips: after the video and after the gallery. */

.merch-card-strip {
  background: var(--navy-mid);
  border-block: 1px solid rgba(255, 255, 255, 0.06);
  padding: 36px 0;
}

.merch-card-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  max-width: 960px;
  margin: 0 auto;
}

.merch-card-strip-line {
  font-family: var(--font-head);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
}

.merch-card-strip-prices {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--sand);
}

.merch-card-strip-btn {
  flex-shrink: 0;
}

/* ── 4. Gallery ───────────────────────────────────────────────────────
   A masonry grid. Without JS it is a plain grid of photos. merch.js
   places each photo in the shortest column, in the numbered order, on
   2px rows (.is-masonry). */

.merch-gallery-section {
  background: var(--white);
  padding: 80px 0 96px;
}

.merch-gallery-intro {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 18px;
  line-height: 1.6;
  text-align: center;
  color: var(--navy);
}

.merch-grid {
  --cols: 4;
  --gap: 12px;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.merch-grid.is-masonry {
  grid-auto-rows: 2px;
  row-gap: 0;
}

.merch-grid-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--sand);
  cursor: zoom-in;
}

.merch-grid-open img {
  width: 100%;
  transition: transform 0.3s;
}

.merch-grid-open:hover img {
  transform: scale(1.03);
}

/* The full screen viewer. A native horizontal scroller with snap points:
   swipe on a phone, trackpad or arrow keys on a desktop, and a click on
   the left or right of a photo. No arrows or dots, like every slider. */

.merch-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 26, 36, 0.97);
}

.merch-viewer-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.merch-viewer-track::-webkit-scrollbar {
  display: none;
}

.merch-viewer-track:focus {
  outline: none;
}

.merch-viewer-slide {
  display: grid;
  flex: 0 0 100%;
  place-items: center;
  padding: 56px 16px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.merch-viewer-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  cursor: pointer;
}

.merch-viewer-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.merch-viewer-count {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  font-size: 14px;
  text-align: center;
  color: var(--sand);
  pointer-events: none;
}

/* While the viewer is open the page behind it does not scroll. */
.merch-viewer-open {
  overflow: hidden;
}

/* ── 5. Video ─────────────────────────────────────────────────────────
   A 9:16 frame. One clip is centred on its own; several sit in the
   videos slider, which sizes the slides itself. */

.merch-video-section {
  background: var(--navy);
  padding: 80px 0;
}

.merch-video-single {
  max-width: 360px;
  margin: 0 auto;
}

.merch-clip {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: var(--navy-mid);
  cursor: pointer;
}

.merch-clip-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.merch-clip-sound {
  position: absolute;
  bottom: 14px;
  left: 50%;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 26, 36, 0.75);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  cursor: pointer;
}

/* ── Smaller screens ─────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .merch-grid { --cols: 3; }
}

@media (max-width: 768px) {
  .merch-ticker-track { padding: 12px 0; }

  .merch-hero { padding: 40px 0 48px; }

  /* The headline first, the prints in a fanned row under it. */
  .merch-hero-stage {
    display: block;
    min-height: 0;
  }

  .merch-hero-heading {
    margin-inline: auto;
    font-size: clamp(56px, 17vw, 84px);
  }

  .merch-prints {
    position: static;
    display: flex;
    justify-content: center;
    margin-top: 32px;
  }

  .merch-print {
    position: relative;
    inset: auto;
    width: 30%;
    margin: 0 -3%;
    padding: 5px 5px 16px;
  }

  .merch-print--1 { --tilt: -6deg; }
  .merch-print--2 { --tilt: 4deg;  margin-top: 14px; }
  .merch-print--3 { --tilt: -3deg; }
  .merch-print--4 { --tilt: 6deg;  margin-top: 10px; }
  .merch-print--5,
  .merch-print--6 { display: none; }

  .merch-drop { padding: 56px 0 64px; }

  .merch-ticker-line { font-size: 14px; }

  .merch-notify-toggle { width: 100%; }

  /* The form runs the full width of the screen, past the column's gutters. */
  .merch-notify-form { margin-inline: calc(-1 * var(--gutter)); }
  .merch-notify-form iframe {
    width: 100%;
    height: 600px;
    border-radius: 0;
  }

  .merch-card-strip { padding: 32px 0; }
  .merch-card-strip-inner {
    flex-direction: column;
    text-align: center;
  }
  .merch-card-strip-btn { width: 100%; }

  .merch-gallery-section { padding: 56px 0 64px; }
  .merch-gallery-intro { font-size: 16px; margin-bottom: 28px; }
  .merch-grid { --cols: 2; --gap: 8px; }

  .merch-video-section { padding: 56px 0; }
  .merch-video-single { max-width: 300px; }
}
