/* Shared Header CSS — single source of truth for all pages */

header {
    background: linear-gradient(135deg, var(--sage-green) 0%, var(--terracotta) 50%, var(--dusty-rose) 100%);
    color: white;
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-timer-bar {
    background: rgba(0, 0, 0, 0.15);
    color: white;
    padding: 0.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    height: 2rem;
}

.header-timer-bar span {
    position: absolute;
    width: 100%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
}

.header-timer-bar span.active {
    opacity: 1;
    transform: translateY(-50%);
}

.header-timer-bar span.exit-up {
    opacity: 0;
    transform: translateY(-150%);
}

.header-timer-bar span.enter-below {
    opacity: 0;
    transform: translateY(50%);
}

nav {
    padding: 0.8rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1001;
    min-height: 52px;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 46px !important;
    width: auto !important;
    max-height: 46px !important;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.25rem;
    align-items: center;
    margin: 0 auto;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.bloompass-button {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bloompass-button:hover {
    background: rgba(255,255,255,0.15);
}

.rewards-button {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.6);
    padding: 0.4rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.rewards-button:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
}

.rewards-button .btn-label {
    display: none;
}

.cart-button {
    background: linear-gradient(135deg, var(--terracotta), var(--dusty-rose));
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.cart-count {
    background: white;
    color: var(--terracotta);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1002;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Dropdowns */
.dropdown-toggle::after {
    content: '▾';
    font-size: 0.7rem;
    margin-left: 0.2rem;
    display: inline-block;
    transition: transform 0.2s;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    padding-top: 1rem;
    z-index: 1000;
}

.dropdown-content a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: var(--terracotta) !important;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background: var(--warm-cream);
}

@media (min-width: 769px) {
    .nav-dropdown:hover .dropdown-content {
        display: block;
    }

    .nav-dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

.mobile-nav-close {
    display: none;
}

/* Mobile */
@media (max-width: 768px) {
    .header-timer-bar {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, var(--sage-green), var(--terracotta));
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem 2rem 2rem;
        gap: 0;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links > li > a {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
    }

    .logo {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        margin-left: 0.8rem;
    }

    .logo img {
        height: 36px !important;
        width: auto !important;
        max-height: 36px !important;
    }

    .nav-actions {
        flex-direction: row;
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .bloompass-button,
    .rewards-button {
        padding: 0.4rem !important;
        border-radius: 50% !important;
    }

    .cart-button {
        padding: 0.4rem !important;
        border-radius: 10px !important;
    }

    .rewards-button {
        border-width: 1.5px;
    }

    .bloompass-button svg,
    .cart-button svg,
    .rewards-button svg {
        width: 18px;
        height: 18px;
    }

    .btn-label {
        display: none;
    }

    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .mobile-nav-close {
        display: none;
    }

    /* Mobile dropdown toggle */
    .nav-dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static !important;
        box-shadow: none !important;
        background: transparent !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: unset !important;
    }

    .dropdown-content a {
        color: rgba(255,255,255,0.9) !important;
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: none !important;
    }

    .nav-dropdown .dropdown-content {
        display: none !important;
    }

    .nav-dropdown.active .dropdown-content {
        display: block !important;
    }

    .nav-dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}
