:root {
    --fch-header-height: 62px;
    --fch-header-bg: rgba(24, 23, 21, 0.82);
    --fch-header-text: #ffffff;
    --fch-panel-bg: #ffffff;
    --fch-panel-text: #858585;
    --fch-border: rgba(255, 255, 255, 0.14);
    --fch-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fch-font-family: "Termina regular", sans-serif;
    --fch-nav-font-size: 14px;
    --fch-mega-title-font-size: 14px;
    --fch-mobile-font-size: 14px;
}

.fch-header,
.fch-header * {
    box-sizing: border-box;
}

.fch-header {
    position: relative;
    z-index: 99990;
    width: 100%;
    color: var(--fch-header-text);
    font-family: var(--fch-font-family);
    overflow: visible;
}

.fch-header a,
.fch-header button {
    -webkit-tap-highlight-color: transparent;
    font-family: var(--fch-font-family);
}

.fch-header button {
    font: inherit;
}

.fch-header-bar {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--fch-header-height);
    padding: 0 28px;
    /*background: var(--fch-header-bg);*/
    border-bottom: 1px solid var(--fch-border);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

/* Brand animation */
.fch-brand-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    /* Reserve a fixed brand column so the navigation never shifts when
       the animated wordmark becomes hidden. */
    flex: 0 0 144px;
    width: 144px;
    min-width: 144px;
    height: var(--fch-header-height);
    color: #fff;
    text-decoration: none;
}

.fch-brand-anim {
    --fch-logo-size: 45px;
    --fch-logo-gap: 10px;
    --fch-logo-duration: 1.4s;
    --fch-logo-delay: 0.25s;
    position: relative;
    /*display: block;*/
    display: flex;
    width: 100%;
    min-width: var(--fch-logo-size);
    height: var(--fch-logo-size);
    overflow: visible;
}

.fch-brand-logo {
    display: block;
    width: var(--fch-logo-size);
    height: var(--fch-logo-size);
    flex: 0 0 auto;
    object-fit: contain;
}

.fch-brand-wordmark {
    position: absolute;
    top: 0%;
    left: calc(var(--fch-logo-size) + var(--fch-logo-gap));
    display: block;
    width: auto;
    height: 18px;
    max-width: none;
    object-fit: contain;
    transform-origin: left center;
    animation: fch-wordmark-into-logo var(--fch-logo-duration) ease-in-out var(--fch-logo-delay) forwards;
    will-change: transform, opacity;
}

.fch-brand-anim.is-done .fch-brand-wordmark {
    opacity: 0;
    visibility: hidden;
    /*transform: scale(0.9);*/
    pointer-events: none;
}

@keyframes fch-wordmark-into-logo {
    /*0% {*/
    /*    transform: translateY(-50%) translateX(0) scale(1.12);*/
    /*    opacity: 1;*/
    /*}*/
    /*60% {*/
    /*    transform: translateY(-50%) translateX(0px) scale(1.12);*/
    /*    opacity: 1;*/
    /*}*/
    /*100% {*/
    /*    transform: translateY(-50%) translateX(calc(-1 * (var(--fch-logo-size) + var(--fch-logo-gap)))) scale(1.12);*/
    /*    opacity: 0;*/
    /*}*/
    
    0%   { transform: translateX(0) scale(1); opacity:1; }
  60%  { transform: translateX(calc(-1 * (var(--fch-logo-gap) * .6))) scale(1); opacity:1; }
  100% { transform: translateX(calc(-1 * (var(--fch-logo-size) + var(--fch-logo-gap)))) scale(1); opacity:0; }
    
}

/* Desktop navigation */
.fch-desktop-nav {
    display: flex;
    align-self: stretch;
    min-width: 0;
    flex: 1 1 auto;
}

.fch-desktop-menu {
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fch-nav-item {
    position: static;
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

.fch-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--fch-header-height);
    padding: 0 clamp(10px, 1.15vw, 19px);
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
    font-family: "Termina regular", sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease;
}

/*.fch-nav-link::after {*/
/*    content: "";*/
/*    position: absolute;*/
/*    left: 50%;*/
/*    right: 50%;*/
/*    bottom: 0;*/
/*    height: 2px;*/
/*    background: #ffffff;*/
/*    transition: left 220ms var(--fch-ease), right 220ms var(--fch-ease);*/
/*}*/

.fch-nav-link:hover,
.fch-nav-link:focus-visible,
.fch-nav-link.is-current,
.fch-nav-item.is-open > .fch-nav-link {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.01);
}

.fch-nav-link:hover::after,
.fch-nav-link:focus-visible::after,
.fch-nav-link.is-current::after,
.fch-nav-item.is-open > .fch-nav-link::after {
    left: 18px;
    right: 18px;
}

.fch-nav-link svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fch-nav-link .fch-heart-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    stroke: none;
}

.fch-chevron {
    transition: transform 220ms var(--fch-ease);
}

.fch-nav-item.is-open .fch-chevron {
    transform: rotate(180deg);
}

/* Six-column desktop mega menu */
.fch-mega-panel {
    position: absolute;
    top: 100%;
    left: 47%;
    z-index: 2;
    width: 100vw;
    color: var(--fch-panel-text);
    background: var(--fch-panel-bg);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.13);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition:
        opacity 180ms ease,
        visibility 180ms ease,
        transform 260ms var(--fch-ease);
}

.fch-nav-item.is-open > .fch-mega-panel,
.fch-nav-item:hover > .fch-mega-panel,
.fch-nav-item:focus-within > .fch-mega-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.fch-mega-inner {
    width: 100%;
    padding: 17px 28px 19px;
}

.fch-mega-grid {
    display: grid;
    margin: 0;
    padding: 0;
}

.fch-mega-grid--desktop {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.fch-mega-card {
    display: block;
    min-width: 0;
    color: #858585;
    text-decoration: none;
    outline: none;
}

.fch-mega-card__title {
    display: block;
    margin: 0 0 7px;
    overflow: hidden;
    color: #8a8a8a;
    font-family: "Termina regular", sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 180ms ease;
}

.fch-mega-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.72 / 1;
    overflow: hidden;
    background: #efefef;
}

.fch-mega-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0, 0, 0, 0.04);
    pointer-events: none;
}

.fch-mega-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 550ms var(--fch-ease), filter 350ms ease;
}

.fch-mega-card:hover .fch-mega-card__title,
.fch-mega-card:focus-visible .fch-mega-card__title {
    color: #1f1f1f;
}

.fch-mega-card:hover img,
.fch-mega-card:focus-visible img {
    transform: scale(1.045);
}

/* Header actions */
.fch-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}

.fch-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: var(--fch-header-height);
    padding: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: none;
    cursor: pointer;
    transition: background-color 180ms ease, opacity 180ms ease;
}

.fch-icon-button:hover,
.fch-icon-button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

.fch-icon-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fch-menu-toggle {
    display: none;
}

.fch-menu-icon {
    display: inline-flex;
}

.fch-menu-icon--close {
    display: none;
}

/* Mobile/tablet panel */
.fch-mobile-panel {
    display: none;
}

body.fch-menu-open {
    overflow: hidden !important;
}

@media (max-width: 1490px) and (min-width: 1200px) {
    .fch-header-bar {
        padding-inline: 18px;
    }

    .fch-brand-link {
        flex-basis: 124px;
        width: 124px;
        min-width: 124px;
    }

    .fch-nav-link {
        padding-inline: 9px;
        font-size: 14px;
    }

    .fch-icon-button {
        width: 42px;
    }
}

/* Tablet portrait + landscape use the same compact header */
@media (max-width: 1199.98px) {
    :root {
        --fch-header-height: 60px;
    }

    .fch-header-bar {
        padding: 0 16px 0 22px;
    }

    .fch-brand-link {
        flex-basis: 124px;
        width: 124px;
        min-width: 124px;
        height: var(--fch-header-height);
    }

    .fch-brand-anim {
        --fch-logo-size: 42px;
    }

    .fch-brand-wordmark {
        height: 18px;
    }

    .fch-desktop-nav {
        display: none;
    }

    .fch-header-actions {
        gap: 2px;
    }

    .fch-icon-button {
        width: 50px;
    }

    .fch-menu-toggle {
        display: inline-flex;
    }

    .fch-header.is-mobile-open .fch-menu-icon--open {
        display: none;
    }

    .fch-header.is-mobile-open .fch-menu-icon--close {
        display: inline-flex;
    }

    .fch-mobile-panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 3;
        display: block;
        width: 100%;
        max-height: calc(100vh - var(--fch-header-height));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        color: #ffffff;
        background: rgba(20, 20, 20, 0.985);
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition:
            opacity 180ms ease,
            visibility 180ms ease,
            transform 260ms var(--fch-ease);
    }

    .fch-header.is-mobile-open .fch-mobile-panel {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .fch-mobile-nav {
        width: 100%;
    }

    .fch-mobile-menu {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .fch-mobile-item {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .fch-mobile-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        width: 100%;
        min-height: 58px;
        margin: 0;
        padding: 0 24px;
        color: rgba(255, 255, 255, 0.94);
        background: transparent;
        border: 0;
        outline: none;
        text-align: left;
        text-decoration: none;
        font-family: "Termina regular", sans-serif !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        line-height: 1.25;
        letter-spacing: 0;
        text-transform: none;
        cursor: pointer;
    }

    .fch-mobile-link:hover,
    .fch-mobile-link:focus-visible {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.055);
    }

    .fch-mobile-link__label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .fch-mobile-link svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .fch-mobile-link .fch-heart-icon {
        width: 14px;
        height: 14px;
        fill: currentColor;
        stroke: none;
    }

    .fch-mobile-submenu-trigger .fch-chevron {
        transition: transform 220ms var(--fch-ease);
    }

    .fch-mobile-item.is-open > .fch-mobile-submenu-trigger .fch-chevron {
        transform: rotate(180deg);
    }

    .fch-mobile-submenu {
        display: grid;
        grid-template-rows: 0fr;
        background: #f7f7f7;
        transition: grid-template-rows 330ms var(--fch-ease);
    }

    .fch-mobile-submenu > .fch-mega-grid {
        min-height: 0;
        overflow: hidden;
    }

    .fch-mobile-item.is-open > .fch-mobile-submenu {
        grid-template-rows: 1fr;
    }

    .fch-mega-grid--mobile {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 18px 22px 22px;
    }

    .fch-mega-grid--mobile .fch-mega-card__title {
        font-size: 14px;
    }
}

@media (max-width: 767.98px) {
    .fch-header-bar {
        padding: 0 8px 0 18px;
    }

    .fch-brand-anim {
        --fch-logo-size: 40px;
    }

    .fch-icon-button {
        width: 46px;
    }

    .fch-mobile-link {
        min-height: 56px;
        padding-inline: 20px;
        font-size: 14px;
    }

    .fch-mega-grid--mobile {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 16px 18px 20px;
    }

    .fch-mega-grid--mobile .fch-mega-card__media {
        aspect-ratio: 1.8 / 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fch-header *,
    .fch-header *::before,
    .fch-header *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fch-brand-wordmark {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%);
    }
}

/* ==========================================================
   v1.0.4 — Targeted fixes only
   1) solid dropdown triangles
   2) mobile/tablet submenus stay fully closed until clicked
   3) open mobile/tablet menu covers the footer layer
   ========================================================== */

/* Solid triangle indicator matching the original menu. */
.fch-chevron {
    display: inline-block;
    width: 0 !important;
    height: 0 !important;
    flex: 0 0 auto;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transform-origin: 50% 42%;
    transition: transform 220ms var(--fch-ease);
}

.fch-nav-item.is-open > .fch-nav-trigger .fch-chevron,
.fch-mobile-item.is-open > .fch-mobile-submenu-trigger .fch-chevron {
    transform: rotate(180deg);
}

@media (max-width: 1199.98px) {
    /* Keep the open header/menu above every page section, including footer. */
    .fch-header.is-mobile-open {
        z-index: 2147483000 !important;
        isolation: isolate;
    }

    .fch-mobile-panel {
        z-index: 2147482999 !important;
        height: calc(100vh - var(--fch-header-height));
        height: calc(100dvh - var(--fch-header-height));
        max-height: calc(100vh - var(--fch-header-height));
        max-height: calc(100dvh - var(--fch-header-height));
    }

    /* Override the previous grid-row accordion only for submenu visibility.
       This removes the padding/min-content leak that showed submenu titles
       before the parent item was clicked. */
    .fch-mobile-submenu {
        display: block;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition:
            max-height 330ms var(--fch-ease),
            opacity 180ms ease,
            visibility 0s linear 330ms;
    }

    .fch-mobile-submenu > .fch-mega-grid--mobile {
        min-height: 0;
        overflow: hidden;
        padding-top: 0;
        padding-bottom: 0;
    }

    .fch-mobile-item.is-open > .fch-mobile-submenu {
        max-height: 1800px;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition:
            max-height 330ms var(--fch-ease),
            opacity 180ms ease,
            visibility 0s linear 0s;
    }

    .fch-mobile-item.is-open > .fch-mobile-submenu > .fch-mega-grid--mobile {
        padding-top: 18px;
        padding-bottom: 22px;
    }
}

@media (max-width: 767.98px) {
    .fch-mobile-item.is-open > .fch-mobile-submenu > .fch-mega-grid--mobile {
        padding-top: 16px;
        padding-bottom: 20px;
    }
}

/* ==========================================================
   v1.0.5 — Logo-first header reveal
   Keep navigation and header actions hidden while the Flooret
   wordmark animation is running, then fade them in together.
   No existing layout, typography or mega-menu rules changed.
   ========================================================== */
.fch-desktop-nav,
.fch-header-actions {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition:
        opacity 420ms ease,
        visibility 0s linear 420ms,
        transform 520ms var(--fch-ease);
    will-change: opacity, transform;
}

.fch-header.is-intro-complete .fch-desktop-nav,
.fch-header.is-intro-complete .fch-header-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition:
        opacity 420ms ease,
        visibility 0s linear 0s,
        transform 520ms var(--fch-ease);
}

@media (prefers-reduced-motion: reduce) {
    .fch-desktop-nav,
    .fch-header-actions,
    .fch-header.is-intro-complete .fch-desktop-nav,
    .fch-header.is-intro-complete .fch-header-actions {
        transform: none;
        transition-duration: 0.01ms !important;
    }
}
