/**
 * Header Styles - ChegôSJK
 * 
 * Styles for header-home.php and header-shop.php
 * Usa variáveis de variables.css
 * 
 * @package monsitheme
 * @version 2.0.0
 */

/* ==========================================
   HEADER-SPECIFIC VARIABLES
   Com fallbacks para garantir compatibilidade
   ========================================== */
:root {
    --header-bg: var(--color-neutral-0, #ffffff);
    --header-bg-transparent: transparent;
    --header-border: rgba(155, 111, 80, 0.15);
    --header-text: var(--color-neutral-700, #6e5c4a);
    --header-text-light: rgba(255, 255, 255, 0.9);
    --header-hover-bg: rgba(155, 111, 80, 0.1);
    --header-btn-bg: var(--color-neutral-100, #f8f6f4);
    --header-btn-hover: var(--color-primary-500, #9b6f50);
    --header-accent: var(--color-secondary-500, #d4a84a);
    --coffee-brown: var(--color-neutral-700, #6e5c4a);
    --coffee-dark: var(--color-neutral-950, #2a211a);
}

/* ==========================================
   COMMON HEADER STYLES
   ========================================== */
.header-home,
.header-shop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-shop {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    padding: 12px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}

/* ==========================================
   HEADER HOME - WHITE BACKGROUND
   ========================================== */
.header-home {
    background: #ffffff;
    border-bottom: 1px solid rgba(155, 111, 80, 0.15);
}

/* Sempre mostrar logo escura */
.header-home .logo-light {
    display: none;
}

.header-home .logo-dark {
    display: block;
}

/* Estado com scroll: adiciona sombra */
.header-home.scrolled {
    box-shadow: 0 4px 20px rgba(26, 18, 11, 0.08);
    padding: 12px 0;
}

/* ==========================================
   NAVIGATION
   ========================================== */
.header-nav .nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav .nav-menu li a {
    display: block;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* Home Header - Dark text (white background) */
.header-home .nav-menu li a {
    color: var(--header-text);
}

.header-home .nav-menu li a:hover {
    background: var(--header-hover-bg);
    color: var(--color-primary-600);
}

.header-home.scrolled .nav-menu li a:hover {
    background: var(--header-hover-bg);
    color: var(--coffee-dark);
}

/* Shop Header - Dark text */
.header-shop .nav-menu li a {
    color: var(--header-text);
}

.header-shop .nav-menu li a:hover {
    background: var(--header-hover-bg);
    color: var(--coffee-dark);
}

/* ==========================================
   HEADER ACTIONS
   ========================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Home Header Buttons - White Background */
.header-home .header-account-btn,
.header-home .header-cart-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-neutral-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    color: var(--color-neutral-700);
}

.header-home .header-account-btn:hover,
.header-home .header-cart-btn:hover {
    background: var(--color-primary-500);
    color: #fff;
    transform: scale(1.05);
}

/* Shop Header Buttons */
.header-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-btn-bg);
    border: none;
    border-radius: 50%;
    color: var(--coffee-brown);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.header-btn:hover {
    background: var(--header-btn-hover);
    color: #fff;
}

/* Cart Count Badge */
.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--header-accent);
    color: var(--coffee-dark);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

/* ==========================================
   MOBILE MENU TOGGLE
   ========================================== */
.mobile-menu-toggle,
.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: var(--color-neutral-100);
    border: none;
    border-radius: 50%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span,
.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-neutral-700);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover,
.mobile-toggle:hover {
    background: var(--color-primary-500);
}

.mobile-menu-toggle:hover span,
.mobile-toggle:hover span {
    background: #fff;
}

/* Shop Header Toggle */
.mobile-toggle {
    background: var(--header-btn-bg);
}

.mobile-toggle span {
    background: var(--coffee-brown);
}

/* ==========================================
   MOBILE MENU - HOME
   ========================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 18, 11, 0.5);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open .mobile-menu-content {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--header-border);
}

.mobile-logo img {
    height: 36px;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    background: var(--header-btn-bg);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--coffee-brown);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--header-btn-hover);
    color: #fff;
}

.mobile-nav {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

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

.mobile-nav-menu li {
    border-bottom: 1px solid rgba(212, 165, 116, 0.1);
}

.mobile-nav-menu li a {
    display: block;
    padding: 16px 0;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--coffee-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav-menu li a:hover {
    color: var(--header-btn-hover);
}

.mobile-menu-footer {
    padding: 24px;
    border-top: 1px solid var(--header-border);
}

.mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--coffee-dark);
    color: #fff;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-cta-btn:hover {
    background: var(--coffee-brown);
}

/* ==========================================
   MOBILE MENU - SHOP (DRAWER)
   ========================================== */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 18, 11, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: var(--coffee-cream);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
}

.mobile-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--header-border);
}

.drawer-close {
    width: 40px;
    height: 40px;
    background: var(--header-btn-bg);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--coffee-brown);
    cursor: pointer;
    transition: all 0.3s ease;
}

.drawer-close:hover {
    background: var(--header-btn-hover);
    color: #fff;
}

.drawer-nav {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

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

.drawer-menu li {
    border-bottom: 1px solid rgba(212, 165, 116, 0.1);
}

.drawer-menu a {
    display: block;
    padding: 16px 0;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--coffee-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.drawer-menu a:hover {
    color: var(--header-btn-hover);
}

.drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--header-border);
}

.drawer-cta {
    display: block;
    text-align: center;
    padding: 16px;
    background: var(--coffee-dark);
    color: #fff;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.drawer-cta:hover {
    background: var(--coffee-brown);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle,
    .mobile-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .header-logo img {
        height: 32px;
    }
    
    .header-account-btn,
    .header-cart-btn,
    .header-btn,
    .mobile-menu-toggle,
    .mobile-toggle {
        width: 40px;
        height: 40px;
    }
    
    .mobile-menu-content {
        width: 100%;
    }
}

