/*
Theme Name: Texel Vliegerhuis Child Theme
Template: storefront
Description: Custom child theme for Texel Kite Shop
Version: 4.0 (White Bar Fixed + Smart Header)
*/

/* =========================================
   1. CRITICAL SETUP & VARIABLES
   ========================================= */
:root {
    --primary-orange: #FF6B35;
    --primary-blue: #1E3A8A;
    --dark-blue: #0F172A;
    --light-blue: #3B82F6;
    --sand-beige: #F3E9D2;
    --ocean-blue: #0EA5E9;
    --sunset-orange: #FB923C;
    --white: #FFFFFF;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-600: #4B5563;
    --gray-800: #1F2937;
}

* { box-sizing: border-box; }
html, body { margin: 0 !important; padding: 0; }

/* Body Padding matches Header Height via JS Sensor */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1F2937;
    background-color: #F3E9D2;
    /* padding-top removed so JS can calculate it automatically */
}

/* =========================================
   2. HEADER & MENU STYLES
   ========================================= */
.site-header {
    position: fixed !important;
    top: 0; left: 0; width: 100% !important;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: visible !important;
}

/* 2a. Top Bar */
.top-bar {
    background: var(--dark-blue);
    color: var(--white);
    padding: 4px 0;
    font-size: 12px;
    margin: 0 !important;
}
.top-bar-content {
    max-width: 1200px; margin: 0 auto; display: flex; justify-content: flex-end; padding: 0 20px;
}
.language-switcher, .currency-switcher { display: flex; gap: 10px; margin-left: 20px; }
.language-switcher a, .currency-switcher a { color: var(--white); text-decoration: none; }
.language-switcher a:hover, .currency-switcher a:hover { color: var(--primary-orange); }

/* 2b. Main Header */
.main-header {
    background: var(--white);
    border-bottom: none !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    display: block !important;
    float: none !important;
    clear: both !important;
}
.main-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
}

/* Logo */
.logo-area { display: flex; align-items: center; padding: 0 !important; margin: 0 !important; }
.site-title { font-size: 24px !important; font-weight: bold; color: var(--primary-blue); line-height: 1; }
.logo { text-decoration: none; }

/* Search Bar */
.search-bar { position: relative; max-width: 500px; margin: 0 auto; width: 100%; }
.search-bar form { position: relative; width: 100%; }
.search-bar input[type="search"] {
    width: 100%;
    padding: 10px 45px 10px 20px !important;
    height: 44px !important;
    border: 2px solid var(--gray-200);
    border-radius: 25px;
    font-size: 14px;
}
.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-orange);
    color: var(--white);
    border: none;
    height: 36px !important;
    padding: 0 20px !important;
    border-radius: 20px;
    cursor: pointer;
}

/* Icons */
.header-icons { display: flex; justify-content: flex-end; gap: 20px; }
.icon-item a { color: var(--gray-800); font-size: 20px; line-height: 40px; text-decoration: none; }
.icon-item a:hover { color: var(--primary-orange); }
.cart-count { 
    background: var(--primary-orange); color: white; font-size: 10px; 
    border-radius: 50%; padding: 2px 5px; position: relative; top: -10px; left: -5px; 
}

/* 2c. Navigation Bar */
.navigation-bar { 
    background: #ffffff; 
    border-bottom: 1px solid #e5e7eb; 
    position: relative;
    overflow: visible !important;
    z-index: 10002;
}

.navigation-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
    display: flex;
    align-items: center;
    overflow: visible !important;
}

/* Categorieën Button */
.categories-dropdown-wrapper { position: relative; display: inline-block; overflow: visible !important; }
.categories-button {
    background: #1E3A8A;
    color: white;
    padding: 15px 25px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    z-index: 10003;
}

/* Main Nav Links */
.main-nav { 
    display: flex; 
    list-style: none; 
    margin: 0 0 0 30px; 
    padding: 0; 
}
.main-nav a { 
    display: block; 
    padding: 15px 20px; 
    color: var(--gray-800); 
    text-decoration: none; 
    font-weight: 500; 
}
.main-nav a:hover { color: var(--primary-orange); }

/* DROPDOWN MENUS (Bol.com Style) */
.bol-menu-container {
    position: absolute; top: 100%; left: 0; width: 260px;
    background: white; border: 1px solid #ddd; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 10000; display: block; 
    opacity: 0; visibility: hidden; transform: translateY(-20px); transition: all 0.3s ease-out;
}
.categories-dropdown-wrapper:hover .bol-menu-container { opacity: 1; visibility: visible; transform: translateY(0); }
.bol-sidebar { list-style: none; padding: 0; margin: 0; }
.bol-sidebar > li { position: relative; }
.parent-link {
    display: block; padding: 12px 20px; color: #333; text-decoration: none;
    border-bottom: 1px solid #f0f0f0; font-size: 14px; font-weight: 500;
}
.parent-link:hover { background-color: #f5f5f5; color: #1E3A8A; font-weight: bold; }
.arrow { float: right; color: #999; }

/* Sub-Menu Flyout */
.bol-popup-content {
    position: absolute; top: 0; left: 100%; width: 600px; min-height: 100%;
    background: white; border: 1px solid #ddd; border-left: none; box-shadow: 5px 10px 20px rgba(0,0,0,0.1);
    padding: 30px; z-index: 10001; display: block !important; 
    opacity: 0; visibility: hidden; transform: translateX(-30px); transition: all 0.4s ease; pointer-events: none; 
}
.has-child:hover .bol-popup-content { opacity: 1; visibility: visible; transform: translateX(0); pointer-events: auto; }
.popup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.popup-grid h3 { color: #1E3A8A; font-size: 15px; font-weight: 800; margin: 0 0 10px 0; border-bottom: 2px solid #f0f0f0; }
.popup-grid ul { list-style: none; padding: 0; margin: 0; }
.popup-grid a { text-decoration: none; color: #555; font-size: 13px; }
.popup-grid a:hover { color: #FF6B35; text-decoration: underline; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-section {
    position: relative; width: 100%; height: 70vh; min-height: 500px;
    background: linear-gradient(135deg, #0EA5E9, #1E3A8A);
    display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 0; 
}
.hero-content { position: relative; z-index: 2; text-align: center; color: #FFFFFF; padding: 0 20px; }
.hero-title { font-size: 3.5rem; font-weight: bold; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); line-height: 1.2; }
.hero-button { 
    display: inline-block; background: #FF6B35; color: white; 
    padding: 15px 30px; text-decoration: none; border-radius: 5px; 
    font-weight: bold; margin-top: 20px; transition: background 0.2s;
}
.hero-button:hover { background: #FB923C; }

/* =========================================
   4. HOMEPAGE & CATEGORY GRID
   ========================================= */
h2 { color: #1E3A8A; text-align: center; font-size: 2rem; margin-bottom: 40px; margin-top: 60px; }
.category-grid { padding: 40px 20px; max-width: 1200px; margin: 0 auto; }
.category-grid-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.category-card { 
    background: white; border-radius: 15px; padding: 30px; text-align: center; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; 
}
.category-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.category-image { font-size: 2.5rem; color: #FF6B35; margin-bottom: 15px; }
.category-card h3 { color: #1F2937; font-size: 1.1rem; font-weight: 600; margin: 0; }

/* Best Deals */
.best-deals { padding: 40px 20px; background: #F3F4F6; margin-bottom: 40px; }
.deals-container { max-width: 1200px; margin: 0 auto; }
.deals-scroll { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { 
    background: white; border-radius: 12px; overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease; 
}
.product-card:hover { transform: translateY(-5px); }
.product-image { height: 200px; background: #E5E7EB; display: flex; align-items: center; justify-content: center; color: #9CA3AF; font-size: 3rem; }
.product-info { padding: 20px; text-align: center; }
.product-title { font-size: 1rem; color: #1F2937; margin: 0 0 10px 0; }
.product-price { color: #FF6B35; font-weight: bold; font-size: 1.2rem; margin: 0; }

/* =========================================
   5. FOOTER STYLES
   ========================================= */
.site-footer { background: #0F172A; color: white; padding: 60px 0 20px; margin-top: 60px; }
.footer-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-column h3 { color: #FF6B35; margin-bottom: 20px; font-size: 1.2rem; text-align: left; margin-top: 0; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column a { color: #9CA3AF; text-decoration: none; transition: color 0.2s; }
.footer-column a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 20px; text-align: center; color: #6B7280; font-size: 0.9rem; }

/* =========================================
   6. RESPONSIVE / MOBILE
   ========================================= */
@media (max-width: 768px) {
    body { padding-top: 150px !important; }
    .hero-title { font-size: 2.5rem; }
    .main-header-content { grid-template-columns: 1fr; gap: 15px; text-align: center; }
    .header-icons { justify-content: center; }
    .navigation-content { flex-direction: column; gap: 15px; }
    .main-nav { display: none; } 
    
    .category-grid-container { grid-template-columns: repeat(2, 1fr); }
    .deals-scroll { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-column h3 { text-align: center; }
    
    /* Mobile Menu Reset */
    .bol-menu-container { position: static; width: 100%; box-shadow: none; border: none; opacity: 1; visibility: visible; transform: none; transition: none; display: none; }
    .bol-menu-container.active { display: block; }
    .bol-popup-content { position: static; width: 100%; box-shadow: none; border: none; padding-left: 20px; border-left: 3px solid #FF6B35; opacity: 1; visibility: visible; transform: none; transition: none; display: none !important; }
    .has-child.active .bol-popup-content { display: block !important; }
    
    .contact-grid { grid-template-columns: 1fr; }
    .contact-page-container { margin-top: 0; }
}

/* =========================================
   7. UTILITIES & LAYOUT
   ========================================= */
.container, .col-full, .site-content, .main-header-content, .top-bar-content, .navigation-content, .category-grid, .deals-container, .footer-content { max-width: 1200px !important; width: 100%; margin-left: auto !important; margin-right: auto !important; padding-left: 20px; padding-right: 20px; }

/* =========================================
   12. WOOCOMMERCE SHOP OVERRIDES
   ========================================= */
.site-main ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 0; padding: 0; }
@media (max-width: 900px) { .site-main ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .site-main ul.products { grid-template-columns: 1fr; } }

.site-main ul.products li.product {
    background: #ffffff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 20px; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none !important; width: 100% !important; margin-bottom: 0 !important; overflow: hidden;
}
.site-main ul.products li.product:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
.site-main ul.products li.product img { border-radius: 8px; margin-bottom: 15px !important; transition: transform 0.5s ease; width: 100%; height: auto; }
.site-main ul.products li.product:hover img { transform: scale(1.05); }
.site-main ul.products li.product h2.woocommerce-loop-product__title { color: #1F2937; font-size: 1.1rem; font-weight: 600; padding-top: 10px; }
.site-main ul.products li.product .price { color: #FF6B35; font-weight: 800; font-size: 1.1rem; display: block; margin-bottom: 15px; }
.site-main ul.products li.product .price del { color: #9CA3AF; font-size: 0.9rem; opacity: 0.7; font-weight: normal; }
.site-main ul.products li.product .button {
    background: #1E3A8A; color: white !important; border-radius: 5px; padding: 10px 20px;
    font-weight: bold; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; transition: background 0.2s;
}
.site-main ul.products li.product .button:hover { background: #3B82F6; text-decoration: none; }
.woocommerce-products-header__title.page-title { text-align: center; color: #1E3A8A; font-size: 2.5rem; margin-bottom: 40px; margin-top: 20px; }
.storefront-pagination .page-numbers { border: none; }
.storefront-pagination .page-numbers li .page-numbers.current { background-color: #FF6B35; color: white; border-radius: 50%; }

/* =========================================
   13. CONTACT PAGE STYLES
   ========================================= */
.contact-page-container { max-width: 1200px; margin: -50px auto 60px; padding: 0 20px; position: relative; z-index: 10; }
.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.contact-info-card { background: #1E3A8A; color: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.contact-info-card h2 { color: white !important; text-align: left !important; margin-top: 0 !important; font-size: 1.8rem; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 15px; }
.info-list { list-style: none; padding: 0; margin: 30px 0; }
.info-list li { display: flex; align-items: flex-start; margin-bottom: 25px; }
.info-list li i { background: #FF6B35; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 15px; flex-shrink: 0; }
.info-list li a { color: white; text-decoration: underline; }
.contact-socials { margin-top: 30px; }
.social-btn { display: inline-flex; width: 40px; height: 40px; background: rgba(255,255,255,0.1); color: white; align-items: center; justify-content: center; border-radius: 50%; margin-right: 10px; transition: background 0.3s; }
.social-btn:hover { background: #FF6B35; }
.contact-form-card { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.contact-form-card h2 { text-align: left !important; margin-top: 0 !important; color: #1E3A8A; }
.contact-form-card input, .contact-form-card textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 15px; background: #F9FAFB; }

/* =========================================
   14. VLIEGERAVONDEN (EVENTS) STYLES
   ========================================= */
.event-badge {
    background: #FF6B35; color: white; padding: 5px 15px; 
    border-radius: 20px; font-weight: bold; text-transform: uppercase; 
    font-size: 0.9rem; letter-spacing: 1px; display: inline-block; margin-bottom: 15px;
}

.event-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.event-list-card { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

.event-item {
    display: flex; align-items: center; padding: 20px 0;
    border-bottom: 1px solid #eee; transition: transform 0.2s;
}
.event-item:last-child { border-bottom: none; }
.event-item:hover { transform: translateX(10px); }

.event-date {
    background: #F3F4F6; color: #1E3A8A; width: 70px; height: 70px;
    border-radius: 10px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; margin-right: 20px; flex-shrink: 0;
}
.event-date .day { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.event-date .month { font-size: 0.8rem; text-transform: uppercase; font-weight: 600; }

.event-details h3 { margin: 0 0 5px 0; text-align: left; font-size: 1.2rem; color: #1F2937; }
.event-meta { font-size: 0.9rem; color: #6B7280; }
.event-meta i { color: #FF6B35; width: 20px; text-align: center; }

/* Sidebar Info */
.info-box { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.info-box h3 { text-align: left; margin-top: 0; font-size: 1.3rem; border-bottom: 2px solid rgba(0,0,0,0.05); padding-bottom: 15px; }

.info-check-list { list-style: none; padding: 0; margin: 0; }
.info-check-list li { margin-bottom: 15px; display: flex; align-items: center; }
.info-check-list li i { color: #10B981; margin-right: 10px; }

.weather-widget { 
    margin-top: 20px; background: #E0F2FE; color: #0369A1; 
    padding: 15px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; 
}
.weather-widget i { font-size: 1.5rem; margin-right: 10px; }

.button-white { 
    display: inline-block; background: white; color: #FF6B35; 
    padding: 10px 20px; border-radius: 5px; text-decoration: none; 
    font-weight: bold; margin-top: 15px; 
}
.button-white:hover { background: #f0f0f0; }

@media (max-width: 768px) {
    .event-grid { grid-template-columns: 1fr; }
}

/* =========================================
   15. FOTOBOEK (GALLERY) STYLES
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    gap: 15px;
    padding-bottom: 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.overlay i {
    color: white;
    font-size: 2rem;
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

@media (min-width: 768px) {
    .gallery-item.wide { grid-column: span 2; }
    .gallery-item.tall { grid-row: span 2; }
    .gallery-item.large { grid-column: span 2; grid-row: span 2; }
}

/* =========================================
   16. CART & CHECKOUT
   ========================================= */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 1200px;
    margin: 0 auto;
}

.shop_table {
    border: 1px solid #E5E7EB !important;
    border-radius: 8px;
    border-collapse: separate !important; 
    border-spacing: 0;
    width: 100%;
}

.shop_table th {
    background: #1E3A8A;
    color: white;
    padding: 15px !important;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.shop_table td {
    padding: 20px !important;
    border-top: 1px solid #E5E7EB;
    vertical-align: middle;
}

.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt,
#place_order {
    background-color: #FF6B35 !important;
    color: white !important;
    font-weight: bold;
    padding: 15px 30px !important;
    border-radius: 5px !important;
    transition: background 0.3s;
    text-transform: uppercase;
    border: none;
}

.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover,
#place_order:hover {
    background-color: #FB923C !important;
}

.woocommerce button.button {
    background-color: #1E3A8A;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 600;
}
.woocommerce button.button:hover {
    background-color: #3B82F6;
}

.woocommerce-message {
    border-top-color: #10B981 !important;
    background-color: #ECFDF5 !important;
    color: #065F46 !important;
}
.woocommerce-error {
    border-top-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
    color: #991B1B !important;
}
.woocommerce-info {
    border-top-color: #3B82F6 !important;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background-color: #F9FAFB;
}

.woocommerce-checkout-payment {
    background: #F3F4F6 !important;
    border-radius: 8px;
    padding: 20px !important;
}

/* =========================================
   17. SMART HEADER ANIMATION
   ========================================= */
.site-header {
    transition: transform 0.3s ease-in-out;
}
.site-header.header-hidden {
    transform: translateY(-100%);
}

/* =========================================
   18. WHITE BAR FIX (Phantom Killer)
   ========================================= */
/* Removes extra spacing added by Storefront theme */
.site-header + .site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensures the hero section sits flush against the header */
.hero-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
/* --- KILL WHITE BAR (BREADCRUMB & CONTAINER REMOVAL) --- */
/* Force the main content wrapper to touch the header */
.site-content {
    padding-top: 0 !important;
}

/* Remove default padding from the inner column */
.col-full {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure homepage content has no top margin */
.home .entry-content {
    margin-top: 0 !important;
}
.main-header {
    margin: 0 !important;
    padding: 10px 0 !important;
}
#content.site-content > .col-full {
    padding: 0 !important;
    margin: 0 !important;
}
.site-header * {
    float: none !important;
    clear: none !important;
}
.navigation-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.site-header .main-header {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.site-header .navigation-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}