/*
Theme Name: Kubelio Child - STOCOZ Header
Theme URI: https://wordpress.org/themes/kubelio/
Description: Kubelio child theme with a custom STOCOZ fashion-store header.
Author: STOCOZ
Template: kubelio
Version: 1.0.0
Text Domain: kubelio-child
*/

/* ================================
   STOCOZ DESKTOP HEADER
   ================================ */

.stocoz-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.stocoz-header__inner {
    width: min(100% - 60px, 1440px);
    min-height: 92px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 32px;
}

.stocoz-header__left,
.stocoz-header__right,
.stocoz-header__logo,
.stocoz-header__right-inner {
    min-width: 0;
}

.stocoz-header__left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.stocoz-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.stocoz-header__logo .rt-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.stocoz-header__logo .site-logo-img {
    display: block;
    width: auto;
    max-width: 155px;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}

.stocoz-header__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.stocoz-header__right-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

/* Navigation */
.stocoz-header .stocoz-nav,
.stocoz-header .stocoz-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.stocoz-header .stocoz-nav > div > ul,
.stocoz-header .stocoz-nav > ul {
    display: flex;
    align-items: center;
    gap: 25px;
}

.stocoz-header .stocoz-nav li {
    position: relative;
    margin: 0;
    padding: 0;
}

.stocoz-header .stocoz-nav > div > ul > li > a,
.stocoz-header .stocoz-nav > ul > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 92px;
    color: #111;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity .2s ease;
}

.stocoz-header .stocoz-nav a:hover {
    opacity: .55;
}

/* Small downward indicator for menu items with children */
.stocoz-header .stocoz-nav .menu-item-has-children > a::after {
    content: '';
    width: 5px;
    height: 5px;
    margin-left: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}

/* Dropdowns */
.stocoz-header .stocoz-nav .sub-menu {
    position: absolute;
    top: calc(100% - 1px);
    left: -18px;
    z-index: 1100;
    min-width: 190px;
    padding: 14px 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.stocoz-header .stocoz-nav li:hover > .sub-menu,
.stocoz-header .stocoz-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.stocoz-header .stocoz-nav .sub-menu li {
    display: block;
}

.stocoz-header .stocoz-nav .sub-menu a {
    display: block;
    padding: 9px 20px;
    color: #111;
    text-decoration: none;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Header utility icons */
.stocoz-header__utility {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111;
    text-decoration: none;
    line-height: 1;
}

.stocoz-header__utility:hover {
    opacity: .55;
}

.stocoz-header__utility .rt-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.stocoz-header__utility svg {
    display: block;
    width: 100%;
    height: 100%;
}

.stocoz-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    margin-left: -16px;
    margin-top: -20px;
    padding: 0 4px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 8px;
    line-height: 1;
}

/* Sticky state */
.stocoz-header.js-header {
    transition: box-shadow .25s ease, background-color .25s ease;
}

.stocoz-header.js-header.is-sticky,
.stocoz-header.js-header.sticky,
.stocoz-header.js-header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, .05);
}

/* Hide desktop custom header on mobile; Kubelio's native mobile header takes over. */
@media (max-width: 900px) {
    .stocoz-header {
        display: none !important;
    }
}

@media (max-width: 1200px) and (min-width: 901px) {
    .stocoz-header__inner {
        width: min(100% - 40px, 1440px);
        column-gap: 20px;
    }

    .stocoz-header .stocoz-nav > div > ul,
    .stocoz-header .stocoz-nav > ul {
        gap: 15px;
    }

    .stocoz-header__right-inner {
        gap: 15px;
    }

    .stocoz-header .stocoz-nav > div > ul > li > a,
    .stocoz-header .stocoz-nav > ul > li > a {
        font-size: 10px;
    }
}

/* Improve Kubelio's native mobile header to match the minimalist design. */
@media (max-width: 900px) {
    .site-header-mobile {
        background: #fff !important;
        border-bottom: 1px solid #e8e8e8 !important;
    }

    .site-header-mobile__main {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .site-header-mobile .site-logo-img {
        max-width: 120px;
        max-height: 34px;
        object-fit: contain;
    }

    .site-header-mobile .rt-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .site-header-mobile__main {
        padding-top: 17px !important;
        padding-bottom: 17px !important;
    }

    .site-header-mobile .site-logo-img {
        max-width: 105px;
    }
}
