/* =============================================================================
   First Element — in-page Classic / Couture / Atelier switcher (mobile).
   PREVIEW 29 Nov 2026, Australia/Melbourne.

   Reveal-on-scroll variant of the 28 Nov switcher. PREVIEW ONLY.

   On phone, the tab bar is hidden at the top of the page so the
   collection heading can stand alone. It slides and fades in under the
   site header only once that heading has scrolled out of view, and
   hides again when the user scrolls back far enough for the heading
   to be fully visible. Tap and swipe behaviour is unchanged.

   Intended for /collections/ (page 7) only. Phone and phone-landscape.
   Desktop and tablet are unchanged: the existing accordion listing stays.

   Place this file in the theme (e.g. css/fe-collection-switcher.css) and
   enqueue it after the hash-critical CSS so it can show the bar. Do not
   add it to Customizer Additional CSS / post 1989.

   The live inline style #fe-collection-hash-critical currently contains:
     .fe-collection-switcher { display: none !important; }
   That hide rule must be removed (or scoped away) before this ships.
   html.fe-collection-switcher-on is set by fe-collection-switcher.js.

   Pairs with the existing hash-focus behaviour:
     html.fe-collection-open + html[data-fe-collection="classic|couture|atelier"]
   Tapping or swiping a collection keeps that focused view and updates
   the hash with history.replaceState (no extra history entries).
   ============================================================================= */

/* Desktop and tablet: keep the bar out of the listing. The phone
   (and phone-landscape) media query below overrides this with
   html.fe-collection-switcher-on .fe-collection-switcher { display: block }. */
.fe-collection-switcher {
  display: none !important;
}

@media (max-width: 767px), screen and (max-width: 812px) and (orientation: landscape) {

  html.fe-collection-switcher-on .fe-collection-switcher {
    display: block !important;
  }

  /* Theme .wrapper padding-top (112px on phone) is sized for a taller
     header than the one that actually renders (~76px). Match it so the
     collection title sits just under the header at rest (the tab bar is
     not reserved for, because it is hidden until the heading scrolls by). */
  html.fe-collection-switcher-on .wrapper {
    padding-top: var(--fe-header-h, 112px);
  }

  html.fe-collection-open.fe-collection-switcher-on .section-collection .accordian__title {
    padding-top: 16px;
    padding-bottom: 10px;
  }

  /* The tabs replace the single "Collection" label (and sit on its rule). */
  html.fe-collection-switcher-on .section-collection .shell > .row > .columns.large-2 {
    display: none !important;
  }

  /* Fixed, not position:sticky: theme .wrapper { overflow: hidden } would
     clip a sticky bar, and the site header is already position: fixed.
     Hidden by default; .is-revealed slides and fades it in under the header. */
  .fe-collection-switcher {
    position: fixed;
    top: var(--fe-header-h, 112px);
    left: 0;
    right: 0;
    z-index: 90; /* header is 100; off-canvas nav is 101 */
    background: #edeae8;
    padding: 0 15px; /* match .shell */
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    -webkit-transform: translateY(-100%);
    -ms-transform: translateY(-100%);
    transform: translateY(-100%);
    -webkit-transition: opacity 0.35s ease, -webkit-transform 0.35s ease, visibility 0s linear 0.35s;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s, -webkit-transform 0.35s ease;
    will-change: transform, opacity;
  }

  .fe-collection-switcher.is-revealed {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
    -webkit-transition: opacity 0.35s ease, -webkit-transform 0.35s ease, visibility 0s linear 0s;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0s;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0s, -webkit-transform 0.35s ease;
  }

  /* Do not reserve a permanent gap for the bar: at the top of the page
     the collection heading sits directly under the site header. When the
     bar appears it overlays the scrolling content just below the header. */

  /* Native #classic / #couture / #atelier scroll must stop below the
     header (landing is at the title, where the bar is hidden). */
  html.fe-collection-switcher-on #classic,
  html.fe-collection-switcher-on #couture,
  html.fe-collection-switcher-on #atelier {
    scroll-margin-top: var(--fe-header-h, 112px);
  }

  /* The accordion's 2px #000a12 border-top is now the switcher's rule
     once the bar is showing; at the top, keep a quiet rule on the title. */
  html.fe-collection-switcher-on .section-collection .accordian {
    border-top: none;
  }

  .fe-collection-switcher__tabs {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid rgba(0, 10, 18, 0.14);
    list-style: none;
  }

  .fe-collection-switcher__tab {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 0;
    flex: 1 1 0;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 14px 4px 12px;
    min-height: 44px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: "Haas Grot Disp Web", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.33;
    letter-spacing: 0.016em;
    color: #a3a3a3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .fe-collection-switcher__tab[aria-selected="true"],
  .fe-collection-switcher__tab.is-active {
    color: #000a12;
  }

  .fe-collection-switcher__tab:focus {
    outline: none;
  }

  .fe-collection-switcher__tab:focus-visible {
    outline: 1px solid #000a12;
    outline-offset: -2px;
  }

  /* Sliding underline. 2px #000a12 — same weight and colour as the
     existing .section-collection .accordian { border-top }. */
  .fe-collection-switcher__ink {
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: calc(100% / 3);
    background: #000a12;
    pointer-events: none;
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
    -webkit-transition: -webkit-transform 0.32s ease;
    transition: -webkit-transform 0.32s ease;
    -o-transition: transform 0.32s ease;
    transition: transform 0.32s ease;
    transition: transform 0.32s ease, -webkit-transform 0.32s ease;
    will-change: transform;
    z-index: 2;
  }

  .fe-collection-switcher.is-dragging .fe-collection-switcher__ink {
    -webkit-transition: none;
    -o-transition: none;
    transition: none;
  }

  /* Quiet content change; disabled when the visitor prefers less motion. */
  html.fe-collection-switcher-on .section-collection .accordian.is-active {
    -webkit-animation: fe-collection-switch-in 0.32s ease;
    animation: fe-collection-switch-in 0.32s ease;
  }

  @-webkit-keyframes fe-collection-switch-in {
    from {
      opacity: 0.4;
      -webkit-transform: translateX(var(--fe-switch-dir, 16px));
      transform: translateX(var(--fe-switch-dir, 16px));
    }
    to {
      opacity: 1;
      -webkit-transform: none;
      transform: none;
    }
  }

  @keyframes fe-collection-switch-in {
    from {
      opacity: 0.4;
      -webkit-transform: translateX(var(--fe-switch-dir, 16px));
      transform: translateX(var(--fe-switch-dir, 16px));
    }
    to {
      opacity: 1;
      -webkit-transform: none;
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .fe-collection-switcher,
  .fe-collection-switcher.is-revealed,
  .fe-collection-switcher__ink,
  html.fe-collection-switcher-on .section-collection .accordian.is-active {
    -webkit-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
    -webkit-animation: none !important;
    animation: none !important;
  }
}
