/* =================================================================
   HEADER STYLES
   ================================================================= */

/* Header Base */
.hvb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed, 300);
    background: linear-gradient(135deg, var(--forest, #1a3a2e) 0%, var(--forest-mid, #2a5d3a) 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    /* Extend header background upward to cover mobile browser URL bar gap */
    padding-top: env(safe-area-inset-top, 0px);
}

/* Cover gap when mobile browser URL bar animates on scroll */
.hvb-header::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: inherit;
}

.hvb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-2xl, 1400px);
    margin: 0 auto;
    padding: 18px 24px;
    gap: 20px;
}

/* Logo */
.hvb-header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.hvb-header-logo img {
    height: 65px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Navigation */
.hvb-header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hvb-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hvb-nav-list li {
    margin: 0;
}

.hvb-nav-list a,
.hvb-nav-list .menu-item a {
    color: var(--white, #ffffff);
    text-decoration: none;
    font-family: var(--font-sans, 'Montserrat', sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 8px 12px;
    border-radius: var(--radius-xs, 4px);
    transition: color var(--transition-fast, 0.15s ease), background var(--transition-fast, 0.15s ease);
    white-space: nowrap;
}

.hvb-nav-list a:hover,
.hvb-nav-list .menu-item a:hover {
    color: var(--gold, #d4af37);
    background: rgba(255, 255, 255, 0.08);
}

/* Highlighted nav item (e.g. contests, promos) */
.hvb-nav-list a.hvb-nav-highlight,
.hvb-mobile-nav-list a.hvb-nav-highlight {
    color: #ff6a00;
    font-weight: 700;
}

.hvb-nav-list a.hvb-nav-highlight:hover,
.hvb-mobile-nav-list a.hvb-nav-highlight:hover {
    color: #ff8c33;
}

/* Header Action Buttons */
.hvb-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hvb-btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border: 1.5px solid var(--gold, #d4af37);
    border-radius: var(--radius-full, 100px);
    color: var(--gold, #d4af37);
    background: transparent;
    text-decoration: none;
    font-family: var(--font-sans, 'Montserrat', sans-serif);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all var(--transition-fast, 0.15s ease);
    white-space: nowrap;
}

.hvb-btn-outline:hover {
    background: var(--gold, #d4af37);
    color: var(--forest, #1a3a2e);
}

/* Cart Icon */
.hvb-header-cart {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--white, #ffffff);
    text-decoration: none;
    position: relative;
    padding: 8px;
    border-radius: var(--radius-xs, 4px);
    transition: color var(--transition-fast, 0.15s ease);
}

.hvb-header-cart:hover {
    color: var(--gold, #d4af37);
}

.hvb-cart-count {
    display: none;
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--gold, #d4af37);
    color: var(--forest, #1a3a2e);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
}

.hvb-cart-count.has-items {
    display: block;
}

.hvb-cart-total {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold, #d4af37);
}

/* Mobile Cart Icon */
.hvb-mobile-cart {
    display: none;
    align-items: center;
    position: relative;
    color: var(--white, #ffffff);
    text-decoration: none;
    padding: 8px;
    border-radius: var(--radius-xs, 4px);
    transition: color var(--transition-fast, 0.15s ease);
}

.hvb-mobile-cart:hover {
    color: var(--gold, #d4af37);
}

/* Hamburger Button */
.hvb-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    overflow: visible;
    border-radius: 0;
    min-width: 0;
    min-height: 0;
    font-size: 0;
    line-height: 0;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.hvb-hamburger-line {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white, #ffffff);
    border-radius: 2px;
    transition: all var(--transition, 0.3s ease);
    transform-origin: center;
}

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

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

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

/* Mobile Menu */
.hvb-mobile-menu {
    display: none;
    background: linear-gradient(180deg, var(--forest, #1a3a2e) 0%, var(--forest-mid, #2a5d3a) 100%);
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hvb-mobile-menu.active {
    display: block;
}

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

.hvb-mobile-nav-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hvb-mobile-nav-list a {
    display: block;
    color: var(--white, #ffffff);
    text-decoration: none;
    font-family: var(--font-sans, 'Montserrat', sans-serif);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 0;
    transition: color var(--transition-fast, 0.15s ease);
}

.hvb-mobile-nav-list a:hover {
    color: var(--gold, #d4af37);
}

.hvb-mobile-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hvb-mobile-actions .hvb-btn-outline {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
}

/* Forest green on html element - plugins only override body, not html */
html {
    background-color: #1a3a2e !important;
}

/* Fixed header offset - matches header height (101px).
   Admin bar adds 32px handled separately. */
body {
    padding-top: 101px !important;
    background-color: var(--forest, #1a3a2e) !important;
}

/* When admin bar is present, push header down and increase body padding.
   Override WP core's margin-top on .admin-bar which creates extra gap. */
body.admin-bar {
    padding-top: 133px !important;
    margin-top: 0 !important;
}

body.admin-bar .hvb-header {
    top: 32px;
}

main#main-content,
#main-content,
.site-content {
    background: transparent !important;
    background-color: transparent !important;
}

.elementor-location-single,
.elementor-location-archive,
.elementor-kit-9757,
[class*="elementor-kit-"] {
    background: transparent !important;
    background-color: transparent !important;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media screen and (max-width: 1024px) {
    .hvb-header-nav {
        display: none;
    }

    .hvb-header-actions {
        display: none;
    }

    .hvb-hamburger {
        display: flex;
    }

    .hvb-mobile-cart {
        display: flex;
        margin-left: auto;
    }

    .hvb-header-inner {
        padding: 8px 16px;
        gap: 12px;
    }

    .hvb-header-logo img {
        height: 50px;
    }

    body {
        padding-top: 75px !important;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding-top: 72px !important;
    }
}

@media screen and (min-width: 1025px) {
    .hvb-mobile-menu {
        display: none !important;
    }
}