/**
 * Rozen.nl Custom Header & Footer Styles
 * Meertalig | Responsive | Optimized
 * 
 * Add to: /wp-content/themes/astra-child/rozen-header-footer.css
 */

/* ===================
   CRITICAL FIX - Body Width Constraint
   =================== */
html {
    overflow-x: hidden;
}

body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Container wrapper should respect scrollbar */
.site,
#page,
.ast-container {
    max-width: calc(100vw - 16px); /* Account for scrollbar */
}

/* ============================================
   Desktop vs Mobile Header Visibility
   ============================================ */
/* Desktop Header - Default visible, hide on mobile */
.rozen-desktop-header {
    display: block !important;
}

/* Mobile Header - Default HIDDEN, show on mobile */
.rozen-mobile-header {
    display: none !important;
}

/* Mobile Menu Trigger - HIDE on desktop */
.rozen-mobile-menu-trigger {
    display: none !important;
}

/* Hide Mega Menu hamburger on desktop */
.rozen-menu-container .rozen-menu-toggle,
.rozen-menu-container .menu-toggle,
.rozen-menu-container .hamburger,
.rozen-header-row-2 .rozen-menu-toggle {
    display: none !important;
}

/* Mobile Icons Container - HIDE on desktop */
.rozen-mobile-icons {
    display: none !important;
    width: 0 !important;
    overflow: hidden !important;
}

@media (max-width: 1000px) {
    .rozen-desktop-header {
        display: none !important;
    }
    
    .rozen-mobile-header {
        display: block !important;
    }
    
    .rozen-mobile-menu-trigger {
        display: block !important;
    }
    
    .rozen-mobile-icons {
        display: flex !important;
        width: auto !important;
        overflow: visible !important;
    }
}

/* ===================
   Variables
   =================== */
:root {
    --rozen-gold: #C8A882;
    --rozen-dark-gold: #A68B6C;
    --rozen-pink: #E91E63;
    --rozen-white: #FFFFFF;
    --rozen-gray: #666666;
    --rozen-light-gray: #F5F5F5;
    --rozen-black: #000000;
}

/* ===================
   Reset Astra Default Header/Footer
   =================== */
/* Force hide ANY possible Astra header */
#masthead,
.site-header,
.ast-header,
.ast-main-header-wrap,
.ast-header-break-point .site-header,
header.site-header,
.site-header-focus-item,
.ast-builder-header,
.ast-desktop-header,
.ast-mobile-header,
.elementor-location-header,
.elementor-widget-theme-site-logo,
.hfe-header,
body .site-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

/* Force hide ANY possible Astra footer */
#colophon,
.site-footer,
.ast-footer,
.elementor-location-footer {
    display: none !important;
    visibility: hidden !important;
}

/* Make sure OUR header/footer are visible */
.rozen-custom-header,
.rozen-custom-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===================
   Container
   =================== */
.rozen-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ===================
   TOP BAR
   =================== */
.rozen-topbar {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E5E5;
    padding: 8px 0;
    font-size: 13px;
}

.rozen-topbar .rozen-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rozen-topbar-left {
    flex: 0 0 auto;
    max-width: 200px;
}

.rozen-topbar-left .trustpilot-widget {
    text-align: left !important;
}

.rozen-topbar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.rozen-social {
    display: flex;
    gap: 10px;
}

.rozen-social a {
    color: var(--rozen-black);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--rozen-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 16px;
}

.rozen-social a i {
    font-size: 16px;
    line-height: 1;
}

.rozen-social a:hover {
    background: var(--rozen-gold);
    color: var(--rozen-white);
}

/* ===================
   MAIN HEADER
   =================== */
.rozen-main-header {
    background: var(--rozen-white);
    border-bottom: 1px solid #E0E0E0;
}

/* Desktop Header - Default visible */
.rozen-desktop-header {
    display: block !important;
}

/* Mobile Header - Default HIDDEN */
.rozen-mobile-header {
    display: none !important;
}

.rozen-header-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 20px; /* Add gap for spacing */
}

.rozen-contact-info {
    display: flex;
    gap: 15px; /* Smaller gap */
    flex: 0 1 auto; /* Don't grow, can shrink */
    min-width: 0; /* Allow text truncation */
}

.rozen-contact-info a {
    color: var(--rozen-gray);
    text-decoration: none;
    font-size: 13px; /* Smaller font */
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
    white-space: nowrap; /* Prevent wrapping */
}

.rozen-contact-info a:hover {
    color: var(--rozen-gold);
}

.rozen-logo {
    flex: 0 0 auto;
    margin: 0 20px; /* Less margin */
}

.rozen-logo img {
    max-height: 80px;
    width: auto !important; /* Never stretch width */
    height: auto !important; /* Maintain aspect ratio */
    object-fit: contain; /* Prevent distortion */
    transition: max-height 0.3s;
}

/* Logo responsive scaling */
@media (max-width: 1400px) {
    .rozen-logo img {
        max-height: 70px;
    }
}

@media (max-width: 1200px) {
    .rozen-logo img {
        max-height: 60px;
    }
}

@media (max-width: 1000px) {
    .rozen-logo img {
        max-height: 50px;
    }
    
    .rozen-logo {
        margin: 0 15px; /* Less margin on smaller screens */
    }
}

@media (max-width: 992px) {
    .rozen-logo img {
        max-height: 45px;
    }
}

.rozen-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto; /* Fit content, don't grow */
    justify-content: flex-end;
}

/* NUCLEAR OPTION - Force cart icon visibility on desktop */
.rozen-desktop-header .rozen-cart-icon-wrap,
.rozen-desktop-header .rozen-cart-icon-btn,
.rozen-header-actions .rozen-cart-icon-wrap,
.rozen-header-actions .rozen-cart-icon-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
}

/* Search - Target exact classes from rozen-search plugin */
.rozen-header-actions .rozen-search-wrapper {
    flex-shrink: 0;
    max-width: 230px !important;
    width: 230px !important;
}

.rozen-header-actions .rozen-search-container {
    max-width: 230px !important;
    width: 230px !important;
    margin: 0 !important;
}

.rozen-header-actions .rozen-search-input-wrapper {
    max-width: 230px !important;
    width: 230px !important;
}

.rozen-header-actions .rozen-search-input {
    width: 100% !important;
    max-width: 230px !important;
    padding: 10px 45px 10px 15px !important;
    font-size: 14px !important;
    height: auto !important;
}

.rozen-header-actions .rozen-search-icon {
    right: 12px !important;
}

/* Hardcoded Search - Full Control (backup if using custom HTML) */
.rozen-search-wrapper {
    position: relative;
    flex-shrink: 0;
}

.rozen-search-form {
    position: relative;
    width: 230px;
    max-width: 230px;
}

.rozen-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.rozen-search-input:focus {
    border-color: var(--rozen-gold);
}

.rozen-search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--rozen-gray);
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
}

.rozen-search-submit:hover {
    color: var(--rozen-gold);
}

.rozen-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--rozen-gray);
    cursor: pointer;
    padding: 5px 10px;
}

.rozen-lang-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make flags bigger in language switcher */
.rozen-lang-switcher img,
.rozen-lang-switcher .flag-icon,
.rozen-lang-switcher svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
}

.rozen-lang-switcher select,
.rozen-lang-switcher .language-selector {
    font-size: 16px;
    padding: 5px 8px;
}

.rozen-icon {
    color: var(--rozen-gray);
    font-size: 20px;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
    display: inline-block;
}

.rozen-icon i {
    font-size: 20px;
    display: inline-block;
    line-height: 1;
}

.rozen-account-icon i {
    font-size: 22px;
}

.rozen-icon:hover {
    color: var(--rozen-gold);
}

.rozen-cart-icon .rozen-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--rozen-pink);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation Row */
/* Navigation Row - Full Width Golden Bar */
.rozen-header-row-2 {
    background: #F5E3CF;
    width: 100%;
    padding: 0;
}

.rozen-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Mega Menu Styling - Let the plugin handle most styling */
.rozen-nav .rozen-mega-menu-container {
    width: 100%;
}

/* OLD MENU STYLES - Kept for fallback if mega menu disabled */
.rozen-valentijn-btn {
    background: var(--rozen-pink);
    color: white !important;
    padding: 15px 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.rozen-valentijn-btn:hover {
    background: #D81B60;
}

.rozen-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.rozen-menu > li {
    position: relative;
}

.rozen-menu > li > a {
    color: var(--rozen-black);
    text-decoration: none;
    padding: 18px 0;
    display: block;
    font-weight: 500;
    transition: color 0.3s;
}

.rozen-menu > li > a:hover {
    color: var(--rozen-gold);
}

/* Dropdown Menu */
.rozen-menu li.menu-item-has-children > a::after {
    content: '▼';
    font-size: 10px;
    margin-left: 5px;
}

.rozen-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1000;
}

.rozen-menu li.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rozen-menu .sub-menu li a {
    padding: 10px 20px;
    display: block;
    color: var(--rozen-gray);
    text-decoration: none;
    transition: all 0.3s;
}

.rozen-menu .sub-menu li a:hover {
    background: var(--rozen-light-gray);
    color: var(--rozen-gold);
}

/* ===================
   MOBILE & TABLET RESPONSIVE
   =================== */

/* Mobile & Tablet: Below 1000px - Switch to mobile layout */
@media (max-width: 1000px) {
    /* Hide desktop header and menu bar */
    .rozen-desktop-header {
        display: none !important;
    }
    
    .rozen-header-row-2 {
        display: none !important;
    }
    
    /* Show mobile header */
    .rozen-mobile-header {
        display: block !important;
        padding: 10px 0;
    }
    
    /* Mobile Contact Info - Top */
    .rozen-mobile-contact {
        display: flex;
        justify-content: center;
        gap: 15px;
        padding: 8px 0;
        font-size: 12px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 10px;
        flex-wrap: wrap;
    }
    
    .rozen-mobile-contact a {
        color: var(--rozen-gray);
        text-decoration: none;
        white-space: nowrap;
    }
    
    /* Mobile Header Row: Hamburger + Logo + Icons */
    .rozen-mobile-header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
    }
    
    /* Mega Menu Hamburger Trigger */
    .rozen-mobile-menu-trigger {
        flex-shrink: 0;
    }
    
    /* Logo Mobile - Centered, NOT stretched */
    .rozen-logo-mobile {
        flex: 1;
        display: flex;
        justify-content: center;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .rozen-logo-mobile img {
        max-height: 50px;
        width: auto !important; /* Prevent stretching */
        height: auto !important; /* Maintain aspect ratio */
        object-fit: contain;
    }
    
    /* Mobile Icons Right */
    .rozen-mobile-icons {
        display: flex !important;
        gap: 12px;
        align-items: center;
        width: auto !important;
        overflow: visible !important;
        flex-shrink: 0;
    }
    
    /* Mobile Search Bar - Below Logo */
    .rozen-mobile-search {
        width: 100%;
        padding: 0;
    }
    
    .rozen-mobile-search input {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Mobile Menu Overlay - HIDDEN by default with inline style */
    .rozen-mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 99999;
        transition: opacity 0.3s;
    }
    
    /* When JavaScript adds .active class */
    .rozen-mobile-menu-overlay.active {
        display: block !important;
    }
    
    .rozen-mobile-menu-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--rozen-white);
        padding: 20px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .rozen-mobile-menu-overlay.active .rozen-mobile-menu-wrapper {
        transform: translateX(0);
    }
    
    /* Hide mobile overlay on DESKTOP completely */
    @media (min-width: 1025px) {
        .rozen-mobile-menu-overlay {
            display: none !important;
        }
    }
    
    .rozen-mobile-menu-close {
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        font-size: 30px;
        cursor: pointer;
    }
    
    .rozen-mobile-search {
        margin: 20px 0;
        position: relative;
    }
    
    .rozen-mobile-search input {
        width: 100%;
        padding: 12px 40px 12px 15px;
        border: 1px solid #ddd;
        border-radius: 25px;
    }
    
    .rozen-mobile-search button {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
    }
    
    .rozen-mobile-menu {
        list-style: none;
        padding: 0;
        margin: 20px 0;
    }
    
    .rozen-mobile-menu li {
        border-bottom: 1px solid #eee;
    }
    
    .rozen-mobile-menu li a {
        display: block;
        padding: 15px 0;
        color: var(--rozen-black);
        text-decoration: none;
    }
    
    .rozen-mobile-menu .sub-menu {
        list-style: none;
        padding-left: 20px;
    }
}

/* ===================
   FOOTER
   =================== */
.rozen-footer {
    background: var(--rozen-gold);
    color: var(--rozen-white);
}

/* Main footer area with columns */
.rozen-footer-main {
    padding: 50px 0 30px;
}

.rozen-footer-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
    gap: 40px;
}

.rozen-footer-col h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--rozen-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Logo */
.rozen-footer-logo {
    display: inline-block;
    margin-bottom: 15px;
}

.rozen-footer-logo img {
    max-width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
}

.rozen-footer-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--rozen-white);
    text-decoration: none;
}

/* Social Icons */
.rozen-footer-social {
    display: flex;
    gap: 8px;
    margin: 15px 0;
}

.rozen-footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rozen-white);
    text-decoration: none;
    transition: background 0.3s;
    font-size: 14px;
}

.rozen-footer-social a:hover {
    background: rgba(255,255,255,0.35);
}

.rozen-footer-social a i {
    font-size: 14px;
    line-height: 1;
}

/* Contact Info */
.rozen-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.rozen-footer-contact a {
    color: var(--rozen-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: opacity 0.3s;
}

.rozen-footer-contact a:hover {
    opacity: 0.8;
}

.rozen-footer-contact a i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

/* Footer Menus */
.rozen-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rozen-footer-menu li {
    margin-bottom: 8px;
}

.rozen-footer-menu li a {
    color: var(--rozen-white);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: opacity 0.3s;
}

.rozen-footer-menu li a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Payment Methods + Legal Info Bar */
.rozen-footer-info {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 20px 0;
}

.rozen-footer-info-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.rozen-footer-payments {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rozen-footer-payments-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--rozen-white);
    white-space: nowrap;
}

.rozen-payment-icons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.rozen-payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rozen-payment-icon svg {
    display: block;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* KvK / BTW Legal */
.rozen-footer-legal {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.rozen-footer-legal-sep {
    opacity: 0.5;
}

/* Copyright Bar */
.rozen-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 15px 0;
    text-align: center;
}

.rozen-footer-bottom p {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
}

/* ---- Footer Responsive ---- */

/* Tablet: 2x2 grid */
@media (max-width: 1000px) {
    .rozen-footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* Mobile: single column */
@media (max-width: 600px) {
    .rozen-footer-main {
        padding: 35px 0 20px;
    }
    
    .rozen-footer-columns {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .rozen-footer-col-brand {
        text-align: center;
    }
    
    .rozen-footer-col-brand .rozen-footer-social {
        justify-content: center;
    }
    
    .rozen-footer-col-brand .rozen-footer-contact {
        align-items: center;
    }
    
    .rozen-footer-info-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .rozen-footer-payments {
        flex-direction: column;
        align-items: center;
    }
    
    .rozen-payment-icons {
        justify-content: center;
    }
}

/* ===================
   FontAwesome Icons (if not already loaded)
   =================== */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
