/* ==========================================================
   PHIUM ESSENCE — FINAL BLOCKSY HEADER
   ========================================================== */

#header.ct-header {
    position: relative;
    z-index: 999;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid rgba(45, 32, 29, 0.08);
}


/* Announcement bar */

#header [data-row="top"] {
    min-height: 25px !important;
    background: #e7c2aa !important;
}

#header [data-row="top"] > .ct-container {
    min-height: 25px !important;
    padding: 0 !important;
}

#header [data-row="top"] p,
#header [data-row="top"] .ct-header-text {
    margin: 0 !important;
    color: #4b3024 !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
    line-height: 25px !important;
    text-align: center !important;
    text-transform: uppercase !important;
}


/* Main desktop row */

#header [data-device="desktop"] [data-row="middle"] {
    min-height: 140px !important;
    padding: 0 !important;
    background: #fff;
}

#header [data-device="desktop"]
[data-row="middle"]
> .ct-container {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;

    width: min(1320px, calc(100% - 48px)) !important;
    min-height: 140px !important;

    margin: 0 auto !important;
    padding: 0 !important;
}


/* Left menu */

#header [data-device="desktop"] [data-column="start"] {
    grid-column: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: auto !important;
    min-width: 0 !important;
}


/* Centre logo */

#header [data-device="desktop"] [data-column="middle"] {
    grid-column: 2 !important;

    position: static !important;
    inset: auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;

    transform: none !important;
}


/* Right icons */

#header [data-device="desktop"] [data-column="end"] {
    grid-column: 3 !important;
    justify-self: end !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    width: auto !important;
    min-width: 0 !important;
}

#header [data-device="desktop"]
[data-column="end"]
[data-placements],
#header [data-device="desktop"]
[data-column="end"]
[data-placements]
[data-items],
#header [data-device="desktop"]
[data-column="end"]
[data-items="primary"] {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 18px !important;

    width: auto !important;
}


/* Navigation */

#header .header-menu-1,
#header .header-menu-1 .menu {
    margin: 0 !important;
    padding: 0 !important;
}

#header .header-menu-1 .menu {
    display: flex !important;
    align-items: center !important;
    gap: 28px !important;
    list-style: none !important;
}

#header .header-menu-1 .menu > li {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

#header .header-menu-1 .menu > li > .ct-menu-link {
    position: relative;

    display: flex !important;
    align-items: center !important;
    gap: 6px !important;

    min-height: 140px !important;
    padding: 0 !important;

    color: #2d201d !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.095em !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
}


/* Menu underline */

#header .header-menu-1 .menu > li > .ct-menu-link::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;

    height: 1px;

    background: #cf9367;

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.2s ease;
}

#header .header-menu-1 .menu > li:hover > .ct-menu-link,
#header .header-menu-1 .menu > li.current-menu-item > .ct-menu-link,
#header .header-menu-1 .menu > li.current_page_item > .ct-menu-link,
#header .header-menu-1 .menu > li.current-product-ancestor > .ct-menu-link,
#header .header-menu-1 .menu > li.current-menu-parent > .ct-menu-link {
    color: #b8754e !important;
}

#header .header-menu-1 .menu > li:hover > .ct-menu-link::after,
#header .header-menu-1 .menu > li.current-menu-item > .ct-menu-link::after,
#header .header-menu-1 .menu > li.current_page_item > .ct-menu-link::after,
#header .header-menu-1 .menu > li.current-product-ancestor > .ct-menu-link::after,
#header .header-menu-1 .menu > li.current-menu-parent > .ct-menu-link::after {
    transform: scaleX(1);
}


/* ==========================================================
   PHIUM DESKTOP LOGO — FINAL
   ========================================================== */

@media (min-width: 1000px) {

    #header [data-device="desktop"] [data-row="middle"],
    #header [data-device="desktop"] [data-row="middle"] > .ct-container {
        height: 140px !important;
        min-height: 140px !important;
        max-height: 140px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    #header [data-device="desktop"] .site-branding[data-id="logo"] {
        height: 140px !important;
        max-height: 140px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #header [data-device="desktop"] .site-logo-container {
        --logo-max-height: 140px !important;

        height: 140px !important;
        max-height: 140px !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;
    }

    #header [data-device="desktop"] .site-logo-container img.default-logo {
        width: auto !important;
        height: 140px !important;

        max-width: 140px !important;
        max-height: 140px !important;

        margin: 0 !important;

        object-fit: contain !important;
        object-position: center center !important;
    }

    #header .header-menu-1 .menu > li > .ct-menu-link {
        min-height: 140px !important;
    }
}

#header .site-title-container {
    display: none !important;
}


/* Right icons */

#header .ct-header-search,
#header .ct-header-cart,
#header .ct-header-account {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 auto !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #243548 !important;
}

#header .ct-header-search {
    width: 22px !important;
    height: 22px !important;

    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#header .ct-header-search svg,
#header .ct-header-cart svg {
    width: 18px !important;
    height: 18px !important;
}

#header .ct-header-cart .ct-label,
#header .ct-header-cart .ct-amount {
    display: none !important;
}

#header .ct-cart-item {
    position: relative;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 23px !important;
    height: 23px !important;
}

#header .ct-dynamic-count-cart {
    position: absolute !important;
    top: -7px !important;
    right: -8px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;

    padding: 0 !important;

    color: #fff !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    line-height: 15px !important;

    border-radius: 50% !important;
    background: #cf9367 !important;
}


/* Account avatar */

#header .ct-account-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 23px !important;
    height: 23px !important;
}

#header .ct-header-account .ct-media-container {
    width: 21px !important;
    height: 21px !important;

    border: 1px solid rgba(36, 53, 72, 0.42);
    border-radius: 50%;

    overflow: hidden;
}

#header .ct-header-account .ct-media-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}


/* Dropdown */

#header .header-menu-1 .sub-menu {
    min-width: 205px !important;
    padding: 8px !important;

    border: 1px solid rgba(45, 32, 29, 0.1) !important;
    border-radius: 4px !important;

    background: #fff !important;
    box-shadow: 0 16px 35px rgba(45, 32, 29, 0.11) !important;
}

#header .header-menu-1 .sub-menu .ct-menu-link {
    display: block !important;
    padding: 10px 12px !important;

    color: #554b46 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.035em !important;
    text-transform: capitalize !important;
}


/* ==========================================================
   PHIUM MOBILE / TABLET HEADER — FINAL
   Applies to Blocksy mobile header used up to 1024px.
   Keeps logo vertically centred and fully inside white band.
   ========================================================== */

@media (max-width: 999px) {

    #header [data-device="mobile"] [data-row="middle"],
    #header [data-device="mobile"] [data-row="middle"] > .ct-container {
        height: 68px !important;
        min-height: 68px !important;
        max-height: 68px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    #header [data-device="mobile"] [data-row="middle"] > .ct-container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;

        width: calc(100% - 28px) !important;
        margin: 0 auto !important;
    }

    #header [data-device="mobile"] .site-branding[data-id="logo"] {
        align-self: center !important;

        height: 52px !important;
        max-height: 52px !important;

        margin: 0 !important;
        padding: 0 !important;

        line-height: 0 !important;
    }

    #header [data-device="mobile"] .site-logo-container {
        --logo-max-height: 52px !important;

        height: 52px !important;
        max-height: 52px !important;

        margin: 0 !important;
        padding: 0 !important;

        line-height: 0 !important;
    }

    /*
     * Size all possible Blocksy logo-state images, but DO NOT
     * force display/visibility. Blocksy remains responsible for
     * selecting the normal/sticky logo state.
     */
    #header [data-device="mobile"] .site-logo-container img {
        width: auto !important;
        height: 52px !important;

        max-width: 52px !important;
        max-height: 52px !important;

        margin: 0 !important;

        object-fit: contain !important;
        object-position: center center !important;
    }
}

#header .ct-header-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 34px !important;
    height: 34px !important;

    padding: 8px !important;

    color: #243548 !important;

    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}


@media (max-width: 1180px) {

    #header [data-device="desktop"]
    [data-row="middle"]
    > .ct-container {
        width: calc(100% - 36px) !important;
    }

    #header .header-menu-1 .menu {
        gap: 20px !important;
    }
}

/* ==========================================================
   HEADER — MINI CART DROPDOWN HOST
   ----------------------------------------------------------
   Header owns only dropdown visibility/stacking/vertical offset.
   Width, scrolling, subtotal, CTA layout and mobile sizing are
   owned by assets/css/woocommerce/mini-cart.css.
   Blocksy remains responsible for horizontal placement through
   --theme-submenu-inline-offset.
   ========================================================== */

/* Never clip dropdowns inside header rows. */
#header,
#header .ct-sticky-container,
#header [data-row],
#header [data-row] > .ct-container,
#header [data-column],
#header [data-items],
#header .ct-header-cart {
    overflow: visible !important;
}

/* Keep cart dropdown above hero/banner content. */
#header .ct-header-cart {
    position: relative !important;
    z-index: 9999 !important;
}

#header .ct-cart-content {
    position: absolute !important;
    z-index: 99999 !important;
    top: calc(100% + 10px) !important;
}

/* Do not force inner header containers to clip content. */
#header [data-row="middle"],
#header [data-row="middle"] > .ct-container {
    overflow: visible !important;
}
/* ==========================================================
   PHIUM A11Y CONTRAST V1
   Homepage accessibility contrast corrections
   ========================================================== */

/* Header cart count */
body.home #header .ct-dynamic-count-cart {
    background: #8c5a3d !important;
    color: #ffffff !important;
}

/* Mobile current / hover menu */
@media (max-width: 999.98px) {
    body.home #offcanvas .mobile-menu li.current-menu-item > a,
    body.home #offcanvas .mobile-menu li.current_page_item > a,
    body.home #offcanvas .mobile-menu a:hover,
    body.home #offcanvas .ct-menu-link:hover {
        color: #8c5a3d !important;
    }
}

/* Product card promotional badge */
body.home .wp-block-woocommerce-product-collection
.wc-block-product
.phium-card-promo-badge {
    background: #8c5a3d !important;
    color: #ffffff !important;
}

/* Quick Buy muted labels */
body.home .wp-block-woocommerce-product-collection
.wc-block-product
.phium-quick-buy-label {
    color: #5f4b42 !important;
}

/* Selected Quick Buy option */
body.home .wp-block-woocommerce-product-collection
.wc-block-product
button.phium-quick-buy-size.is-selected,
body.home .wp-block-woocommerce-product-collection
.wc-block-product
button.phium-quick-buy-size.is-selected .phium-quick-buy-size-name,
body.home .wp-block-woocommerce-product-collection
.wc-block-product
.phium-quick-buy-size-check,
body.home .wp-block-woocommerce-product-collection
.wc-block-product
.phium-quick-buy-best-value {
    color: #8c5a3d !important;
}

/* Main Quick Buy CTA */
body.home .wp-block-woocommerce-product-collection
.wc-block-product
button.phium-quick-buy-add {
    background: #8c5a3d !important;
    border-color: #8c5a3d !important;
    color: #ffffff !important;
}

/* PHIUM Community accent text/icons */
body.home .phium-community-eyebrow,
body.home .phium-community-icon,
body.home .phium-instagram-mark,
body.home .phium-instagram-profile span {
    color: #8c5a3d !important;
}

/* Newsletter CTA */
body.home #wpforms-submit-34 {
    background: #8c5a3d !important;
    border-color: #8c5a3d !important;
    color: #ffffff !important;
}

/* Explore Collections CTA */
body.home .wp-block-buttons .wp-block-button__link {
    background: #8c5a3d !important;
    border-color: #8c5a3d !important;
    color: #ffffff !important;
}

/* Keyboard skip link */
body.home a.skip-link {
    color: #5f4b42 !important;
}

