/*
Theme Name: Botiga Ceraflame
Template: botiga
Version: 1.0.0
*/

/* ═══════════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════════ */
:root {
    --cf-white:       #ffffff;
    --cf-black:       #000000;
    --cf-gray-light:  #f5f5f5;
    --cf-gray-border: #e8e8e8;
    --cf-gray-hover:  #222222;
    --cf-outlet:      #888888;

    --cf-header-h:    72px;
    --cf-cat-h:       46px;
    --cf-max-w:       1280px;
    --cf-pad-x:       24px;

    --cf-font-nav:    0.75rem;
    --cf-ls-nav:      0.1em;
}

/* ═══════════════════════════════════════════════════════════
   RESET BOTIGA HEADER DEFAULTS
═══════════════════════════════════════════════════════════ */
#ceraflame-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   SHARED CONTAINER
═══════════════════════════════════════════════════════════ */
.cf-container {
    max-width: var(--cf-max-w);
    margin: 0 auto;
    padding: 0 var(--cf-pad-x);
    display: flex;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   MAIN HEADER ROW
═══════════════════════════════════════════════════════════ */
.cf-header-main {
    background: var(--cf-white);
    border-bottom: 1px solid var(--cf-gray-border);
}

.cf-header-main .cf-container {
    height: var(--cf-header-h);
    justify-content: space-between;
}

/* Logo ──────────────────────────────────────────────────── */
.cf-header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--cf-black);
}

.cf-header-logo img {
    max-height: 48px;
    width: auto;
    display: block;
}

.cf-site-name {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cf-black);
}

/* Icons ─────────────────────────────────────────────────── */
.cf-header-icons {
    display: flex;
    align-items: center;
    gap: 18px;
}

.cf-icon-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--cf-black);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    transition: opacity 0.15s ease;
    line-height: 1;
}

.cf-icon-btn:hover {
    opacity: 0.55;
    color: var(--cf-black);
}

.cf-cart-count {
    position: absolute;
    top: -5px;
    right: -7px;
    background: var(--cf-black);
    color: var(--cf-white);
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hide hamburger on desktop */
.cf-menu-toggle {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   CATEGORY NAV
═══════════════════════════════════════════════════════════ */
.cf-cat-nav {
    background: var(--cf-black);
}

.cf-cat-nav .cf-container {
    height: var(--cf-cat-h);
    padding: 0;
}

.cf-cat-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 var(--cf-pad-x);
    height: 100%;
    align-items: stretch;
    gap: 0;
}

.cf-cat-menu > li {
    display: flex;
    align-items: stretch;
}

.cf-cat-menu > li > a {
    display: flex;
    align-items: center;
    color: var(--cf-white);
    text-decoration: none;
    font-size: var(--cf-font-nav);
    font-weight: 600;
    letter-spacing: var(--cf-ls-nav);
    text-transform: uppercase;
    padding: 0 18px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.cf-cat-menu > li > a:hover,
.cf-cat-menu > li.current-menu-item > a,
.cf-cat-menu > li.current-menu-ancestor > a {
    border-bottom-color: var(--cf-white);
    background: rgba(255, 255, 255, 0.06);
}

/* Outlet: subtle gray to suggest discount/sale */
.cf-cat-menu > li.cf-outlet > a,
.cf-cat-menu > li:last-child > a {
    color: var(--cf-outlet);
}

.cf-cat-menu > li.cf-outlet > a:hover,
.cf-cat-menu > li:last-child > a:hover {
    color: var(--cf-white);
    border-bottom-color: var(--cf-outlet);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE  (≤ 768px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    :root {
        --cf-header-h: 60px;
        --cf-pad-x: 16px;
    }

    /* Show hamburger, hide account icon */
    .cf-menu-toggle {
        display: flex;
    }

    /* Category nav: hidden by default, slides open */
    .cf-cat-nav {
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease;
    }

    .cf-cat-nav.is-open {
        max-height: 300px;
    }

    .cf-cat-nav .cf-container {
        height: auto;
        padding: 0;
    }

    .cf-cat-menu {
        flex-direction: column;
        padding: 8px 0;
        height: auto;
        gap: 0;
    }

    .cf-cat-menu > li > a {
        padding: 12px var(--cf-pad-x);
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .cf-cat-menu > li > a:hover,
    .cf-cat-menu > li.current-menu-item > a {
        border-left-color: var(--cf-white);
        background: rgba(255, 255, 255, 0.06);
        border-bottom-color: transparent;
    }
}
