/* Collections page (Oct 25, Jay: option B).
   Computer: looks on the left, a sticky stage on the right with a realistic
   laptop + phone, both showing the LIVE invitation (scroll inside each).
   Phone: event picker as a bottom sheet, the live phone preview near the top,
   looks as one swipe row underneath. Loaded after studio.css. */

/* ---------- Event picker ---------- */
.event-picker { position: relative; display: grid; gap: 4px; min-width: 0; }
.event-picker__label { color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.event-picker__native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.event-picker__button {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 52px; min-width: 260px; max-width: 420px; padding: 8px 14px 8px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-button);
  background: #fffdf9; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.event-picker__button:hover, .event-picker__button[aria-expanded="true"] { border-color: var(--ink); }
.event-picker__button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.event-picker__button:disabled { cursor: default; opacity: .7; }
.event-picker__button svg { flex: 0 0 auto; transition: transform .2s ease; }
.event-picker__button[aria-expanded="true"] svg { transform: rotate(180deg); }
.event-picker__text { display: grid; gap: 2px; min-width: 0; }
.event-picker__text strong { overflow: hidden; font-family: var(--serif); font-size: 17px; font-weight: 400; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.event-picker__text small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.event-picker__text small:empty { display: none; }

.event-picker__menu {
  position: absolute; z-index: 40; top: calc(100% + 8px); right: 0;
  width: min(420px, 90vw); max-height: min(420px, 60vh); overflow: auto;
  padding: 8px; border: 1px solid var(--line); border-radius: 14px;
  background: #fffdf9; box-shadow: 0 24px 60px rgba(28, 22, 16, .18);
}
.event-picker__menu[hidden] { display: none; }
.event-picker__menu-title { margin: 6px 10px 8px; color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.event-picker__list { display: grid; gap: 2px; }
.event-picker__option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.event-picker__option:hover, .event-picker__option:focus-visible { background: #f3ece2; outline: none; }
.event-picker__option[aria-selected="true"] { background: #efe6da; }
.event-picker__option span { display: grid; gap: 2px; min-width: 0; }
.event-picker__option strong { font-family: var(--serif); font-size: 17px; font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.event-picker__option small { color: var(--muted); font-size: 12px; }
.event-picker__option i { flex: 0 0 auto; width: 18px; font-style: normal; text-align: center; }

/* ---------- Stage + realistic devices ---------- */
.look-stage { display: grid; gap: 16px; min-width: 0; }
.look-stage__head { display: grid; gap: 4px; }
.look-stage__eyebrow { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.look-stage__head h2 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 400; line-height: 1.2; }
.look-stage__head p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.look-stage__head p:last-child:empty { display: none; }
.look-stage__note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.look-stage__actions { display: flex; justify-content: center; gap: 10px; }
.look-stage__full, .look-stage__open {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius-button);
  background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer;
}
.look-stage__full:hover, .look-stage__open:hover { border-color: var(--ink); }

.rd-stage { position: relative; padding: 4% 0 2%; }
.rd-screen { position: relative; overflow: hidden; background: #0b0a09; }
.rd-screen iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #0b0a09; }

/* Laptop: black glass bezel, silver deck with a keyboard, thin front lip. */
.rd-laptop { position: relative; width: 82%; }
.rd-laptop__lid {
  position: relative; padding: 2.4% 2.4% 3%;
  border: 1px solid #3b3b3e; border-radius: 16px 16px 6px 6px;
  background: linear-gradient(#18181a, #0c0c0d);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 30px 60px -28px rgba(20,16,12,.45);
}
.rd-laptop__cam { position: absolute; top: 0.9%; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: #2b2d33; transform: translateX(-50%); }
.rd-screen--computer { aspect-ratio: 1440 / 900; border-radius: 3px; }
.rd-laptop__deck {
  position: relative; height: 0; padding-bottom: 5.2%; margin: 0 -6.5%;
  background: linear-gradient(#d9d9dc, #c3c3c8 60%, #aeaeb3);
  clip-path: polygon(5.6% 0, 94.4% 0, 100% 100%, 0 100%);
}
.rd-laptop__deck span {
  position: absolute; left: 16%; right: 16%; top: 18%; height: 54%;
  background: repeating-linear-gradient(90deg, #3a3a3e 0 5.4%, #c9c9cd 5.4% 6.2%);
  clip-path: polygon(2% 0, 98% 0, 100% 100%, 0 100%);
  opacity: .55;
}
.rd-laptop__lip {
  height: 0; padding-bottom: 1.4%; margin: 0 -6.5%;
  border-radius: 0 0 14px 14px / 0 0 10px 10px;
  background: linear-gradient(#a7a7ac, #7d7d82);
  box-shadow: 0 18px 30px -12px rgba(20,16,12,.45);
}
.rd-laptop__lip::after { content: ""; display: block; width: 14%; height: 0; padding-bottom: .8%; margin: 0 auto; border-radius: 0 0 8px 8px; background: rgba(0,0,0,.18); }

/* Phone: black frame, rounded screen, dynamic island, side button. */
.rd-phone {
  position: absolute; right: 0; bottom: 0; width: 23%;
  padding: 2.1%; border: 1px solid #3b3b3e; border-radius: 15% / 7%;
  background: linear-gradient(135deg, #2a2a2d, #0d0d0e 40%);
  box-shadow: inset 0 0 0 2px #1a1a1c, 0 30px 50px -22px rgba(20,16,12,.5);
}
.rd-phone::before { content: ""; position: absolute; right: -3px; top: 22%; width: 3px; height: 12%; border-radius: 0 2px 2px 0; background: #2d2d30; }
.rd-screen--phone { aspect-ratio: 390 / 844; border-radius: 11% / 5%; }
.rd-phone__island { position: absolute; z-index: 2; top: 3.6%; left: 50%; width: 30%; height: 2.6%; border-radius: 999px; background: #000; transform: translateX(-50%); }

/* ---------- Computer layout ---------- */
@media (min-width: 761px) {
  .collections-page .collection-browser {
    grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr) !important;
    column-gap: clamp(28px, 4vw, 64px); align-items: start;
  }
  .collections-page .look-list { grid-column: 1; grid-row: 1; min-width: 0; }
  .collections-page .look-stage { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
  .collections-page .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .collections-page .look-stage__full { display: none; }
}
@media (min-width: 1600px) {
  .collections-page .collections-main { max-width: 1680px; }
  .collections-page .collection-grid { gap: 22px; }
}

/* ---------- Phone layout ---------- */
@media (max-width: 760px) {
  /* stretch: keep every block as wide as the screen. The base rule's
     align-items: start let the card list grow wider than the phone. */
  .collections-page .collection-browser { display: flex !important; flex-direction: column; align-items: stretch; gap: 18px; }
  .look-stage__head { text-align: center; }
  .rd-stage { padding: 0; }
  .rd-laptop { display: none; }
  .rd-phone { position: relative; width: min(62vw, 250px); margin: 0 auto; }
  .look-stage__open { display: none; }
  /* Looks in two columns, so every card is fully visible (no hidden swipe). */
  .collections-page .collection-grid {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px;
  }
  .collections-page .collection-card__photo { aspect-ratio: 4 / 5 !important; }
  .collections-page .collection-card strong { font-size: 16px; }

  .event-picker { width: 100%; }
  .event-picker__button { min-width: 0; max-width: none; width: 100%; }
  /* Bottom sheet */
  .event-picker__menu {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh;
    padding: 10px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0; box-shadow: 0 -20px 60px rgba(28,22,16,.25);
    animation: picker-up .28s cubic-bezier(.2,.7,.2,1);
  }
  .event-picker__menu::before { content: ""; display: block; width: 40px; height: 4px; margin: 2px auto 10px; border-radius: 4px; background: #d8cfc3; }
  body[data-event-picker="open"]::after { content: ""; position: fixed; inset: 0; z-index: 39; background: rgba(23,17,13,.35); }
  .event-picker__option { min-height: 60px; }
}
@keyframes picker-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .event-picker__menu { animation: none; } }

/* Gallery styles (Nov 1, 2026): three cards under the invitation looks. */
.collections-page .gallery-styles { margin-top: clamp(56px, 8vw, 96px); }
/* A clear break between invitation looks and gallery styles: a line, the ring, a line. */
.collections-page .gallery-styles__break { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(28px, 4vw, 44px); }
.collections-page .gallery-styles__break span { flex: 1; height: 1px; background: var(--line); }
.collections-page .gallery-styles__break img { width: 22px; height: auto; opacity: .55; }
.collections-page .gallery-styles__eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.collections-page .gallery-styles__swipe { display: none; }
.collections-page .gallery-styles__head h2 { margin: 0; font-family: "Cormorant Garamond", var(--serif); font-size: clamp(30px, 4vw, 40px); font-weight: 500; line-height: 1.1; }
.collections-page .gallery-styles__head p { margin: 8px 0 0; max-width: 60ch; color: var(--muted); font-size: 15px; line-height: 1.55; }
.collections-page .gallery-styles__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin-top: 24px; }
/* 7 styles (Nov 9, First Frost): the last one sits in the middle of its row. */
.collections-page .gallery-styles__list > .gallery-style:last-child:nth-child(3n+1) { grid-column: 2; }
.collections-page .gallery-style { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.collections-page .gallery-style__shot { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #eee6dc center top / cover no-repeat; aspect-ratio: 780 / 1100; }
.collections-page .gallery-style__shot iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.collections-page .gallery-style__text h3 { margin: 0; font-family: "Cormorant Garamond", var(--serif); font-size: 24px; font-weight: 500; line-height: 1.1; }
.collections-page .gallery-style__text p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.collections-page .gallery-style__text small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.collections-page .gallery-style__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.collections-page .gallery-style__actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 14px; text-decoration: none; }
.collections-page .gallery-style__actions .gallery-style__use { border-color: var(--ink); background: var(--ink); color: #fffaf3; }
@media (max-width: 760px) {
  /* Phones: swipe sideways through the three styles. */
  .collections-page .gallery-styles__list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-right: calc(-1 * clamp(18px, 3vw, 36px)); padding-right: clamp(18px, 3vw, 36px); padding-bottom: 6px; scrollbar-width: none; }
  .collections-page .gallery-styles__list::-webkit-scrollbar { display: none; }
  .collections-page .gallery-style { flex: 0 0 78%; scroll-snap-align: start; }
  /* Swipe hint: three dots (which card you're on) + a small moving arrow that stops after the first swipe. */
  .collections-page .gallery-styles__swipe { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--muted); }
  .collections-page .gallery-styles__swipe + .gallery-styles__list { margin-top: 12px; }
  .collections-page .gallery-styles__dots { display: flex; gap: 6px; }
  .collections-page .gallery-styles__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: width .3s, background .3s; }
  .collections-page .gallery-styles__dots i.is-on { width: 18px; border-radius: 3px; background: var(--ink); }
  .collections-page .gallery-styles__hint { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .06em; transition: opacity .4s; }
  .collections-page .gallery-styles__hint svg { animation: gallery-swipe-nudge 1.8s ease-in-out infinite; }
  .collections-page .gallery-styles.is-swiped .gallery-styles__hint { opacity: 0; }
}
@keyframes gallery-swipe-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .collections-page .gallery-styles__hint svg { animation: none; } }
