/* ==========================================================================
   KIVRAÇ hardware — header & layout repair
   Loaded AFTER style.css and the shared responsive sheet, so this file owns
   the final word on header layout. Written mobile-first.
   Brand: amber #FFC400 on near-black #1A1A1A.
   ========================================================================== */

body.fc-body,
body.fc-body-db {
    overflow-x: clip;
}

.fc-container {
    width: min(1280px, 100%);
    max-width: 1280px;
}

/* --------------------------------------------------------------------------
   1. Announcement / promo bar — ONE clean non-wrapping line.
   -------------------------------------------------------------------------- */
.fc-promo-bar {
    background: #1a1a1a;
    color: var(--brand, #ffc400);
    padding: 0;
    overflow: hidden;
}

.fc-promo-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-height: 30px;
    font-size: .6875rem;
    line-height: 1.2;
}

.fc-promo-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-promo-divider {
    opacity: .45;
    flex: 0 0 auto;
}

/* Below 480px only the brand line survives — no wrap, no dangling separator. */
@media (max-width: 479px) {
    .fc-promo-bar {
        display: none;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .fc-promo-inner > .fc-promo-item:nth-of-type(n + 3),
    .fc-promo-inner > .fc-promo-divider:nth-of-type(n + 2) {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   2. Header shell.
      No backdrop-filter / transform / filter anywhere on the header chain,
      so position:fixed drawer children are contained by the viewport.
   -------------------------------------------------------------------------- */
.fc-header,
.fc-header-hardware {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #1a1a1a;
    box-shadow: none;
    border-bottom: 3px solid var(--brand, #ffc400);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: none;
    transform: none;
    perspective: none;
}

/* --------------------------------------------------------------------------
   3. Mobile header: ONE compact row.
      [hamburger] [logo (flex:1)] [search toggle] [cart]
   -------------------------------------------------------------------------- */
.fc-header-main {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .25rem;
    padding: .375rem 16px;
    min-height: 56px;
}

/* Tap targets — 44px minimum on every icon control. */
.fc-mobile-toggle,
.fc-search-toggle,
.fc-header-main .fc-mini-cart-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
    background: none;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    position: relative;
}

.fc-mobile-toggle:active,
.fc-search-toggle:active,
.fc-header-main .fc-mini-cart-trigger:active {
    background: rgba(255, 196, 0, .14);
}

.fc-mobile-toggle svg,
.fc-search-toggle svg {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

/* The base .fc-action rule paints SVGs with var(--text) (near-black), which is
   invisible on the dark header. Force header icons to inherit. */
.fc-header-main .fc-action svg,
.fc-header-main .fc-mini-cart-trigger svg,
.fc-header-hardware .fc-action svg {
    color: currentColor;
    stroke: currentColor;
}

.fc-header-main .fc-mini-cart-trigger {
    color: #fff;
}

.fc-header-hardware .fc-mobile-toggle,
.fc-header-hardware .fc-search-toggle {
    color: #fff;
}

/* Logo — centred, takes the remaining space, never overlapped.
   margin-left matches the width of the extra right-hand button so the
   wordmark lands optically centred between the two icon clusters. */
.fc-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    gap: .5rem;
    min-width: 0;
    max-width: none;
    padding: 0 .25rem;
    margin-left: 44px;
    overflow: hidden;
}

.fc-logo-img,
.fc-logo-lockup {
    display: block;
    width: auto;
    max-width: 100%;
    height: 34px;
    max-height: 34px;
    object-fit: contain;
    object-position: center;
}

.fc-logo-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fc-logo-text,
.fc-logo-slogan,
.fc-cat-links a,
.fc-cat-all {
    overflow-wrap: normal;
    word-break: keep-all;
    white-space: nowrap;
}

.fc-logo-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-header-hardware .fc-logo-slogan {
    font-size: .625rem;
    letter-spacing: .06em;
    color: #cfcfcf;
}

/* Cart wrapper on mobile sits inline in the single row. */
.fc-mini-cart-wrap {
    position: relative;
    flex: 0 0 auto;
}

.fc-header-main .fc-mini-cart-trigger span:not(.fc-cart-badge):not(.cart-badge) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fc-header-main .fc-mini-cart-trigger .fc-cart-badge,
.fc-header-main .fc-mini-cart-trigger .cart-badge {
    top: 4px;
    right: 2px;
    background: var(--brand, #ffc400);
    color: #1a1a1a;
}

/* The desktop action cluster (lang / track / account / wishlist / whatsapp)
   is hidden on mobile — its contents live in the drawer instead. */
.fc-header-actions {
    display: none;
}

/* --------------------------------------------------------------------------
   4. Mobile search — deliberate full-width row, toggled.
   -------------------------------------------------------------------------- */
.fc-header-main .fc-search {
    display: none;
    order: 10;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0 0 .5rem;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

body.fc-search-open .fc-header-main {
    flex-wrap: wrap;
    padding-bottom: 0;
}

/* Keep the icon row intact when the search row wraps underneath:
   explicit order puts every control in row 1 and search alone in row 2.
   The logo drops its centring margin and is allowed to shrink so the
   cart never gets pushed onto a second line. */
body.fc-search-open .fc-mobile-toggle { order: 1; }
body.fc-search-open .fc-search-toggle { order: 3; }
body.fc-search-open .fc-mini-cart-wrap { order: 4; }
body.fc-search-open .fc-header-main .fc-search { order: 5; }

body.fc-search-open .fc-logo {
    order: 2;
    margin-left: 0;
    flex: 1 1 0;
    min-width: 0;
}

body.fc-search-open .fc-header-main .fc-search {
    display: flex;
}

body.fc-search-open .fc-search-toggle {
    background: rgba(255, 196, 0, .18);
    color: var(--brand, #ffc400);
}

.fc-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    padding: .75rem .875rem;
    font-size: 16px;
    background: #fff;
    color: #1a1a1a;
}

.fc-search button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-height: 44px;
    border: none;
    cursor: pointer;
    background: var(--brand, #ffc400);
    color: #1a1a1a;
}

/* --------------------------------------------------------------------------
   5. Mobile drawer (reuses .fc-category-nav + body.fc-nav-open from the
      shared fc-commerce-nav.js). Slides in as an off-canvas panel.
   -------------------------------------------------------------------------- */
.fc-category-nav {
    background: #fff;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

@media (max-width: 1023px) {
    .fc-category-nav,
    .fc-category-nav-hardware {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 340px);
        max-width: 340px;
        background: #1a1a1a;
        border: none;
        border-right: 3px solid var(--brand, #ffc400);
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 0 0 2rem;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .24s ease, visibility .24s ease;
        box-shadow: 8px 0 32px rgba(0, 0, 0, .45);
    }

    body.fc-nav-open .fc-category-nav,
    body.fc-nav-open .fc-category-nav-hardware {
        transform: translateX(0);
        visibility: visible;
    }

    .fc-category-nav .fc-container,
    .fc-category-nav-hardware .fc-container {
        display: block;
        overflow: visible;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 0;
        width: 100%;
        max-width: none;
    }

    .fc-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
        padding: .5rem .75rem .5rem 1rem;
        min-height: 56px;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
        background: #141414;
    }

    .fc-drawer-title {
        font-size: .75rem;
        font-weight: 800;
        letter-spacing: .18em;
        text-transform: uppercase;
        color: var(--brand, #ffc400);
    }

    .fc-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        background: none;
        border: none;
        border-radius: 8px;
        color: #fff;
        cursor: pointer;
    }

    .fc-category-nav .fc-cat-all,
    .fc-category-nav-hardware .fc-cat-all {
        display: block;
        padding: .9rem 1rem;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        color: var(--brand, #ffc400);
        font-size: .8125rem;
        font-weight: 800;
        letter-spacing: .1em;
        min-height: 48px;
    }

    .fc-category-nav .fc-cat-links,
    .fc-category-nav-hardware .fc-cat-links {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .fc-category-nav .fc-cat-links a,
    .fc-category-nav-hardware .fc-cat-links a {
        display: flex;
        align-items: center;
        padding: .85rem 1rem;
        min-height: 48px;
        color: #f0f0f0;
        font-size: .8125rem;
        font-weight: 600;
        letter-spacing: .08em;
        border-bottom: 1px solid rgba(255, 255, 255, .06);
    }

    .fc-category-nav .fc-cat-links a:hover,
    .fc-category-nav .fc-cat-links a:active {
        background: rgba(255, 196, 0, .12);
        color: var(--brand, #ffc400);
        text-decoration: none;
    }

    .fc-drawer-extra {
        display: flex;
        flex-direction: column;
        margin-top: .75rem;
        border-top: 1px solid rgba(255, 255, 255, .12);
    }

    .fc-drawer-extra a {
        display: flex;
        align-items: center;
        padding: .8rem 1rem;
        min-height: 46px;
        color: #c9c9c9;
        font-size: .8125rem;
        border-bottom: 1px solid rgba(255, 255, 255, .06);
    }

    .fc-drawer-extra a:hover,
    .fc-drawer-extra a:active {
        color: var(--brand, #ffc400);
        text-decoration: none;
    }

    .fc-drawer-lang {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding: 1rem;
        margin-top: .25rem;
    }

    .fc-drawer-lang > span {
        font-size: .6875rem;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: #8d8d8d;
    }

    .fc-lang-switch-drawer {
        display: inline-flex;
        gap: 0;
        border: 1px solid rgba(255, 255, 255, .2);
        border-radius: 8px;
        overflow: hidden;
    }

    .fc-lang-switch-drawer a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        min-height: 40px;
        padding: 0 .75rem;
        font-size: .75rem;
        font-weight: 700;
        color: #d6d6d6;
        background: transparent;
    }

    .fc-lang-switch-drawer a.active {
        background: var(--brand, #ffc400);
        color: #1a1a1a;
    }

    /* Overlay injected by fc-commerce-nav.js must sit under the drawer. */
    .fc-nav-overlay {
        z-index: 999;
        background: rgba(0, 0, 0, .55);
    }

    /* Trust bar is redundant on small screens. */
    .fc-trust-bar {
        display: none;
    }
}

/* Drawer-only chrome never shows on desktop. */
@media (min-width: 1024px) {
    .fc-drawer-head,
    .fc-drawer-extra,
    .fc-drawer-lang,
    .fc-drawer-close,
    .fc-search-toggle {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   6. Desktop (>= 1024px) — restore the classic three-zone header.
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    .fc-header-main {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 1.25rem;
        padding: .875rem 16px;
        min-height: 72px;
    }

    .fc-mobile-toggle {
        display: none !important;
    }

    .fc-logo {
        flex: 0 0 auto;
        justify-content: flex-start;
        min-width: min(220px, 26vw);
        max-width: 280px;
        padding: 0;
        margin-left: 0;
    }

    .fc-logo-img,
    .fc-logo-lockup {
        width: min(260px, 24vw);
        height: 48px;
        max-height: 48px;
        object-position: left center;
    }

    .fc-header-main .fc-search {
        display: flex;
        order: 0;
        flex: 1 1 16rem;
        width: auto;
        max-width: 520px;
        margin: 0;
        border-radius: 0;
    }

    .fc-header-actions {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
        flex: 0 0 auto;
        min-width: 0;
    }

    .fc-header-main .fc-mini-cart-trigger {
        width: auto;
        height: auto;
        min-width: 44px;
        min-height: 44px;
        flex-direction: column;
        gap: .15rem;
        border-radius: 0;
        color: #eee;
    }

    .fc-header-main .fc-mini-cart-trigger span:not(.fc-cart-badge):not(.cart-badge) {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        clip: auto;
        overflow: visible;
        font-size: .75rem;
    }

    .fc-header-main .fc-mini-cart-trigger .fc-cart-badge,
    .fc-header-main .fc-mini-cart-trigger .cart-badge {
        top: -4px;
        right: -8px;
    }

    .fc-lang-switch {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
    }

    .fc-category-nav,
    .fc-category-nav-hardware {
        position: static;
        display: block;
        width: auto;
        max-width: none;
        transform: none;
        visibility: visible;
        box-shadow: none;
        overflow: visible;
        background: #fff;
        padding: 0;
        border-right: none;
    }

    .fc-category-nav .fc-container,
    .fc-category-nav-hardware .fc-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-top: .5rem;
        padding-bottom: .5rem;
    }

    .fc-trust-bar {
        display: block;
    }
}

/* Tablet 768–1023px keeps the compact single row but can show the wordmark
   a little larger. */
@media (min-width: 768px) and (max-width: 1023px) {
    .fc-header-main {
        min-height: 64px;
        gap: .5rem;
    }

    .fc-logo-img,
    .fc-logo-lockup {
        height: 40px;
        max-height: 40px;
    }
}

/* --------------------------------------------------------------------------
   8. Graceful image fallback — product images are added after launch, so a
      missing file must render a deliberate branded placeholder that keeps the
      card/gallery box intact (never a broken-image icon or collapsed layout).
   -------------------------------------------------------------------------- */
.fc-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f2f2f2;
}

.fc-product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fc-product-placeholder,
.fc-gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 100%;
    min-height: 160px;
    margin: 0;
    /* style.css rounds these to a circle; the placeholder must fill the
       square/4:3 media box instead so cards never look like avatars. */
    border-radius: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--brand, #ffc400);
    background:
        repeating-linear-gradient(
            135deg,
            #202020 0 14px,
            #1a1a1a 14px 28px
        );
    border: 1px solid rgba(255, 196, 0, .22);
    box-sizing: border-box;
    text-transform: uppercase;
    user-select: none;
    text-align: center;
    padding: 1rem;
}

.fc-placeholder-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(56px, 22%, 88px);
    aspect-ratio: 1 / 1;
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    color: #1a1a1a;
    background: var(--brand, #ffc400);
    border-radius: 10px;
}

.fc-placeholder-note {
    font-size: .625rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: .12em;
    color: #9a9a9a;
    max-width: 90%;
    line-height: 1.4;
}

.fc-gallery-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f2f2f2;
}

.fc-gallery-main .fc-gallery-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Zoom hint is a caption, not a flex sibling competing with the photo. */
.fc-gallery-main .fc-zoom-hint {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    margin: 0;
    padding: .25rem .6rem;
    width: auto;
    max-width: calc(100% - 16px);
    white-space: nowrap;
    font-size: .6875rem;
    line-height: 1.2;
    color: #1a1a1a;
    background: rgba(255, 255, 255, .88);
    border-radius: 999px;
    pointer-events: none;
}

.fc-gallery-placeholder {
    min-height: 240px;
}

.fc-gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* --------------------------------------------------------------------------
   9. Product description prose — the stored descriptions ship a technical
      spec list, so give <ul>/<li>/<p> real typography.
   -------------------------------------------------------------------------- */
.fc-prose p {
    margin: 0 0 .85rem;
    line-height: 1.7;
}

.fc-prose ul,
.fc-prose ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.fc-prose li {
    margin: 0 0 .4rem;
    line-height: 1.6;
    padding-left: .15rem;
}

.fc-prose ul {
    list-style: none;
    padding-left: 0;
}

.fc-prose ul > li {
    position: relative;
    padding-left: 1.1rem;
}

.fc-prose ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55em;
    width: 7px;
    height: 7px;
    background: var(--brand, #ffc400);
    border-radius: 1px;
}

.fc-prose h3,
.fc-prose h4 {
    margin: 1.25rem 0 .6rem;
    font-size: .9375rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fc-prose strong {
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   10. Non-header layout safety (kept from the original repair sheet).
   -------------------------------------------------------------------------- */
.fc-footer-hardware .fc-footer-logo {
    display: block;
    width: min(260px, 68vw);
    height: 48px;
    object-fit: contain;
    object-position: left center;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 4px 8px;
    box-sizing: content-box;
}

.fc-db-hero-slide img {
    width: 100%;
    max-width: none;
    height: clamp(240px, 42vw, 520px);
    object-fit: cover;
}

.fc-promo-inner,
.fc-trust-inner {
    min-width: 0;
}

.fc-mini-cart {
    z-index: 300;
}

.fc-features-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .fc-features-grid,
    .fc-category-grid-hardware {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .fc-features-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .gz-cat-hero,
    .gz-package-grid,
    .fc-campaign-hardware {
        grid-template-columns: 1fr;
    }
}
