/**
 * Mobile Header Styles
 * Sticky header die meescrolt bij scrollen
 * Professionele styling met hamburger menu
 * AdalyaPoint branding
 */

/* ========== HEADER CONTAINER ========== */
/* Z-index: 1001 - onder announcement bar (1002) maar boven content */
.header-mobile {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #0a0a0a !important;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(218, 165, 32, 0.08) 0%, transparent 50%);
    border-bottom: 1px solid rgba(218, 165, 32, 0.2);
    z-index: 1001 !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(218, 165, 32, 0.1);
    display: none; /* Verborgen op desktop */
    margin: 0;
    padding: 0;
}

/* Compensatie voor announcement bar */
body.has-announcement .header-mobile {
    top: 40px !important;
}

@media (max-width: 968px) {
    body.has-announcement .header-mobile {
        top: 36px !important;
    }
}

@media (max-width: 480px) {
    body.has-announcement .header-mobile {
        top: 32px !important;
    }
}

.header-mobile.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(218, 165, 32, 0.15);
    border-bottom-color: rgba(218, 165, 32, 0.3);
}

.mobile-header-bar {
    width: 100%;
    background: #0a0a0a;
}

.mobile-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 70px;
    gap: 1rem;
}

/* ========== LOGO ========== */
.mobile-logo {
    flex-shrink: 0;
}

.mobile-logo a {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.mobile-logo a:active {
    transform: scale(0.95);
}

.mobile-logo-img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ========== ACTIE KNOPPEN ========== */
.mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 221, 136, 0.1);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.1rem;
    -webkit-tap-highlight-color: transparent;
}

.mobile-btn:active {
    transform: scale(0.9);
    background: rgba(255, 221, 136, 0.2);
}

.mobile-btn:hover {
    background: rgba(255, 221, 136, 0.15);
    border-color: rgba(255, 221, 136, 0.3);
    color: #FFDD88;
}

.mobile-btn i {
    transition: transform 0.3s ease;
}

/* Winkelwagen badge */
.mobile-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
    color: #1a1c1e;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(255, 221, 136, 0.4);
}

/* ========== HAMBURGER MENU ========== */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 16px;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.menu-toggle-btn.active {
    background: rgba(255, 221, 136, 0.2);
    border-color: rgba(255, 221, 136, 0.4);
    color: #FFDD88;
}

/* ========== MOBIELE ZOEKBALK ========== */
.mobile-search-bar {
    display: none;
    width: 100%;
    background: #1a1c1e;
    border-top: 1px solid rgba(255, 221, 136, 0.1);
    padding: 0.875rem 1rem;
    animation: slideDown 0.3s ease;
}

.mobile-search-bar.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-search-container {
    width: 100%;
}

.mobile-search-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.mobile-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 221, 136, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
}

.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.mobile-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 221, 136, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 221, 136, 0.1);
}

.mobile-search-submit,
.mobile-search-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 221, 136, 0.1);
    border: 1px solid rgba(255, 221, 136, 0.2);
    color: #FFDD88;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
}

.mobile-search-submit:active,
.mobile-search-close:active {
    transform: scale(0.9);
    background: rgba(255, 221, 136, 0.2);
}

/* ========== MOBIEL NAVIGATIE MENU ========== */
.mobile-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
}

.mobile-nav.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}

.mobile-nav-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10001;
}

.mobile-nav.active .mobile-nav-overlay {
    opacity: 1;
}

.mobile-nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 85% !important;
    max-width: 320px !important;
    height: 100vh !important;
    background: #1a1c1e;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 10002 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mobile-nav.active .mobile-nav-menu {
    transform: translateX(0) !important;
}

/* Menu Header */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 221, 136, 0.1);
    background: rgba(255, 221, 136, 0.05);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: auto;
    height: auto;
}

.mobile-nav-header h3 {
    margin: 0;
    color: #FFDD88;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.mobile-nav-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 221, 136, 0.1);
    border: 1px solid rgba(255, 221, 136, 0.2);
    color: #FFDD88;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.mobile-nav-close:active {
    transform: scale(0.9);
    background: rgba(255, 221, 136, 0.2);
}

/* Menu Items */
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    flex: 1;
}

.mobile-nav-item {
    margin: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link:active {
    background: rgba(255, 221, 136, 0.1);
    transform: translateX(5px);
}

.mobile-nav-link:hover {
    color: #FFDD88;
    background: rgba(255, 221, 136, 0.08);
    border-left-color: rgba(255, 221, 136, 0.3);
}

.mobile-nav-link.active {
    color: #FFDD88;
    background: rgba(255, 221, 136, 0.15);
    border-left-color: #FFDD88;
    font-weight: 600;
}

.mobile-nav-divider {
    height: 1px;
    background: rgba(255, 221, 136, 0.1);
    margin: 0.75rem 1.5rem;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 969px) {
    .header-mobile {
        display: none !important;
    }
    
    .header-desktop {
        display: block !important;
    }
}

@media (max-width: 968px) {
    .header-mobile {
        display: block !important;
    }
    
    .header-desktop {
        display: none !important;
    }
}

/* Kleine mobiele schermen */
@media (max-width: 480px) {
    .mobile-header-container {
        padding: 0 0.75rem;
        height: 65px;
    }

    .mobile-logo-img {
        height: 35px;
    }

    .mobile-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .mobile-actions {
        gap: 0.5rem;
    }

    .mobile-nav-menu {
        width: 90%;
        max-width: 280px;
    }

    .mobile-nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ========== SCROLL BEHAVIOR ========== */
.header-mobile {
    will-change: transform;
    backface-visibility: hidden;
    /* Verwijder transform om sticky niet te blokkeren */
}

/* Performance optimalisatie voor smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    .header-mobile {
        transition: box-shadow 0.3s ease, border-bottom-color 0.3s ease;
    }
}

/* Voor gebruikers die reduced motion prefereren */
@media (prefers-reduced-motion: reduce) {
    .header-mobile,
    .mobile-btn,
    .mobile-nav-link,
    .mobile-nav-menu {
        transition: none;
    }
}

/* Body scroll lock wanneer menu open is */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}
