/*
 * HFR Collection v1: header navigation with The Collection menu, /the-collection/ and /the-daily-return/.
 * Builds on the live HFR tokens (Customizer CSS and core pages): cream #FBF8F2, linen #F4EFE5,
 * espresso #3C322D, muted gold #B89A72, dark gold text #86683F, border #D9D2C2,
 * Cormorant Garamond 300 for display, Poppins for interface and body text, 2px radius on buttons.
 * Light theme only, like the rest of the site. Every rule is scoped to new classes or to
 * .hfr-header--collection, so existing pages and blocks are not restyled.
 */

:root {
  --hfrc-cream: #FBF8F2;
  --hfrc-linen: #F4EFE5;
  --hfrc-espresso: #3C322D;
  --hfrc-espresso-soft: #5A4C44;
  --hfrc-gold: #B89A72;
  --hfrc-gold-text: #86683F;
  --hfrc-gold-on-dark: #D9C29B;
  --hfrc-border: #D9D2C2;
  --hfrc-display: "Cormorant Garamond", Georgia, serif;
  --hfrc-ui: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hfrc-radius: 2px;
  --hfrc-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --hfrc-header-h: 72px;
  --hfrc-shadow: 0 18px 40px rgba(60, 50, 45, 0.10);
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.hfr-header.hfr-header--collection .hfr-header__inner {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  min-height: var(--hfrc-header-h);
  padding: 0 clamp(16px, 3vw, 28px);
  gap: 20px;
}

.hfr-header--collection .hfr-logo {
  flex: 0 0 auto;
  line-height: 1.2;
}

.hfr-header .hfrc-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.hfr-header .hfrc-nav__list {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hfr-header .hfrc-nav__list > li {
  position: relative;
  margin: 0;
}

.hfr-header .hfrc-nav__link,
.hfr-header .hfrc-nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #0B0B0C;
  font: 500 11px/1 var(--hfrc-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
}

.hfr-header .hfrc-nav__link:hover,
.hfr-header .hfrc-nav__toggle:hover {
  color: var(--hfrc-espresso);
  border-bottom-color: var(--hfrc-gold);
}

.hfr-header .hfrc-nav__link[aria-current="page"],
.hfr-header .hfrc-nav__toggle.is-current {
  border-bottom-color: var(--hfrc-espresso);
}

.hfr-header .hfrc-chevron {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms var(--hfrc-ease);
}

.hfr-header .hfrc-nav__toggle[aria-expanded="true"] .hfrc-chevron {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.hfr-header .hfrc-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -24px;
  z-index: 1000;
  width: 380px;
  padding: 10px 0 0;
  background: var(--hfrc-cream);
  border: 1px solid var(--hfrc-border);
  border-top: 2px solid var(--hfrc-gold);
  box-shadow: var(--hfrc-shadow);
}

.hfr-header .hfrc-menu[hidden] {
  display: none;
}

.hfr-header .hfrc-menu__list {
  margin: 0;
  padding: 0 0 6px;
  list-style: none;
}

.hfr-header .hfrc-menu__item {
  display: grid;
  gap: 4px;
  padding: 14px 24px;
  color: var(--hfrc-espresso);
  text-decoration: none;
  transition: background-color 150ms ease;
}

.hfr-header .hfrc-menu__item:hover,
.hfr-header .hfrc-menu__item:focus-visible {
  background: var(--hfrc-linen);
}

.hfr-header .hfrc-menu__item[aria-current="page"] {
  background: var(--hfrc-linen);
  box-shadow: inset 2px 0 0 var(--hfrc-gold);
}

.hfr-header .hfrc-menu__name {
  font: 400 22px/1.15 var(--hfrc-display);
  letter-spacing: 0;
  text-transform: none;
}

.hfr-header .hfrc-menu__cat {
  font: 500 11px/1.4 var(--hfrc-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hfrc-gold-text);
}

.hfr-header .hfrc-menu__all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 24px;
  border-top: 1px solid var(--hfrc-border);
  color: var(--hfrc-espresso);
  font: 500 11px/1 var(--hfrc-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

.hfr-header .hfrc-menu__all::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width 180ms var(--hfrc-ease);
}

.hfr-header .hfrc-menu__all:hover::after,
.hfr-header .hfrc-menu__all:focus-visible::after {
  width: 28px;
}

.hfr-header .hfrc-menu__all[aria-current="page"] {
  background: var(--hfrc-linen);
}

.hfr-header--collection .hfr-lang {
  font-size: 10px;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.hfr-header--collection .hfr-lang a {
  display: inline-block;
  padding: 12px 2px;
}

.hfr-header .hfrc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--hfrc-espresso);
  border-radius: var(--hfrc-radius);
  background: var(--hfrc-espresso);
  color: var(--hfrc-cream);
  font: 500 11px/1 var(--hfrc-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, transform 150ms ease;
}

.hfr-header .hfrc-cta:hover {
  background: var(--hfrc-espresso-soft);
  color: var(--hfrc-cream);
}

.hfr-header .hfrc-cta:active {
  transform: translateY(1px);
}

.hfr-header .hfrc-menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--hfrc-espresso);
  font: 500 11px/1 var(--hfrc-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.hfr-header .hfrc-menu-toggle__lines {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: background-color 150ms ease;
}

.hfr-header .hfrc-menu-toggle__lines::before,
.hfr-header .hfrc-menu-toggle__lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform 200ms var(--hfrc-ease);
}

.hfr-header .hfrc-menu-toggle__lines::before { transform: translateY(-5px); }
.hfr-header .hfrc-menu-toggle__lines::after { transform: translateY(5px); }

.hfr-header .hfrc-menu-toggle[aria-expanded="true"] .hfrc-menu-toggle__lines { background: transparent; }
.hfr-header .hfrc-menu-toggle[aria-expanded="true"] .hfrc-menu-toggle__lines::before { transform: rotate(45deg); }
.hfr-header .hfrc-menu-toggle[aria-expanded="true"] .hfrc-menu-toggle__lines::after { transform: rotate(-45deg); }

/* Mobile and tablet panel */
.hfr-header .hfrc-panel {
  position: fixed;
  top: var(--hfrc-panel-top, var(--hfrc-header-h));
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 998;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px clamp(16px, 5vw, 40px) 40px;
  background: var(--hfrc-cream);
  border-top: 1px solid var(--hfrc-border);
}

.hfr-header .hfrc-panel[hidden] {
  display: none;
}

.hfr-header .hfrc-panel__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hfr-header .hfrc-panel__link {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--hfrc-border);
  color: var(--hfrc-espresso);
  font: 400 26px/1.15 var(--hfrc-display);
  text-decoration: none;
}

.hfr-header .hfrc-panel__link[aria-current="page"] {
  color: var(--hfrc-gold-text);
}

.hfr-header .hfrc-panel__group {
  padding: 22px 0 10px;
  border-bottom: 1px solid var(--hfrc-border);
}

.hfr-header .hfrc-panel__group-title {
  margin: 0 0 6px;
  color: var(--hfrc-gold-text);
  font: 500 11px/1.4 var(--hfrc-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hfr-header .hfrc-panel__product {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  color: var(--hfrc-espresso);
  text-decoration: none;
}

.hfr-header .hfrc-panel__product[aria-current="page"] .hfrc-menu__name {
  color: var(--hfrc-gold-text);
}

.hfr-header .hfrc-panel__all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--hfrc-espresso);
  font: 500 11px/1 var(--hfrc-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hfr-header .hfrc-panel__actions {
  display: grid;
  gap: 18px;
  padding-top: 28px;
}

.hfr-header .hfrc-panel__actions .hfrc-cta {
  width: 100%;
  min-height: 52px;
  font-size: 12px;
}

.hfr-header .hfrc-panel .hfr-lang {
  font-size: 11px;
}

html.hfrc-panel-open,
html.hfrc-panel-open body {
  overflow: hidden;
}

/* The live header uses backdrop-filter, which turns it into the containing block for
   position: fixed children. While the panel is open the filter is switched off so the
   panel is positioned against the viewport. */
.hfr-header.hfr-header--collection.is-menu-open {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: var(--hfrc-cream);
}

@media (max-width: 1199px) {
  .hfr-header .hfrc-nav,
  .hfr-header .hfrc-bar > .hfr-lang {
    display: none;
  }

  .hfr-header .hfrc-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  :root { --hfrc-header-h: 64px; }

  .hfr-header .hfrc-bar > .hfrc-cta {
    display: none;
  }

  .hfr-header.hfr-header--collection .hfr-header__inner {
    gap: 12px;
  }
}

@media (min-width: 1200px) {
  .hfr-header .hfrc-panel {
    display: none !important;
  }
}

/* Without JavaScript: products open on hover or keyboard focus, and the panel is a plain list. */
html:not(.hfrc-js) .hfrc-nav__item--collection:hover > .hfrc-menu,
html:not(.hfrc-js) .hfrc-nav__item--collection:focus-within > .hfrc-menu {
  display: block;
}

html:not(.hfrc-js) .hfrc-menu-toggle {
  display: none;
}

@media (max-width: 1199px) {
  html:not(.hfrc-js) .hfr-header.hfr-header--collection .hfr-header__inner {
    flex-wrap: wrap;
  }

  html:not(.hfrc-js) .hfrc-panel[hidden] {
    position: static;
    display: block;
    flex-basis: 100%;
    padding: 0 0 24px;
    border-top: 0;
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hfrc-page *,
  .hfr-header--collection * {
    transition: none !important;
  }
}
