/**
 * XTREMEOFFICE - STYLE V6
 * 
 * Header: Logo | Zoekbalk | Contact/Actions/Dex op Ã©Ã©n rij
 */

:root {
    --primary: #8B3A9C;
    --primary-dark: #6B2A7C;
    --secondary: #9ACD32;
    --secondary-dark: #7AB512;
    --text: #333;
    --text-light: #666;
    --border: #e5e7eb;
    --bg: #f5f5f5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ================================================================
   HEADER - ALLES OP Ã‰Ã‰N RIJ
   ================================================================ */
.header {
    background: linear-gradient(135deg, #8B3A9C 0%, #6B2A7C 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-row {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 15px 0;
}

/* LOGO - GROOT */
.logo-link {
    flex-shrink: 0;
}

.logo-img {
    height: 80px;
    width: auto;
}

/* ZOEKBALK - FLEX GROW */
.search-form {
    flex: 1;
    max-width: 600px;
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 0.95em;
    outline: none;
    min-width: 0;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--secondary);
    color: white;
    border: none;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--secondary-dark);
}

/* HEADER RECHTS */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Contact */
.header-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-contact a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.85em;
    text-decoration: none;
    opacity: 0.9;
    white-space: nowrap;
}

.header-contact a:hover {
    opacity: 1;
    text-decoration: none;
}

/* Actions */
.header-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    color: white;
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.action-btn:hover {
    background: rgba(255,255,255,0.25);
    text-decoration: none;
}

/* DEX BUTTON */
.dex-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dex-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.dex-btn img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.dex-btn span {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85em;
    white-space: nowrap;
}

/* ================================================================
   DEX ZOEKT OVERLAY
   ================================================================ */
.dex-zoekt-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 58, 156, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.dex-zoekt-overlay.visible {
    display: flex;
}

.dex-zoekt-overlay img {
    max-width: 400px;
    max-height: 80vh;
    object-fit: contain;
    animation: dexBounce 0.5s ease-out;
}

@keyframes dexBounce {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.main-content {
    margin-top: 120px;
    min-height: calc(100vh - 300px);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    background: linear-gradient(135deg, #333, #1a1a2e);
    color: white;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 8px; }
.footer-section a { color: rgba(255,255,255,0.8); font-size: 0.95em; }
.footer-section a:hover { color: white; }

.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 15px 20px;
    text-align: center;
    font-size: 0.9em;
    color: rgba(255,255,255,0.7);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1200px) {
    .header-contact { display: none; }
}

@media (max-width: 900px) {
    .header-row {
        flex-wrap: wrap;
    }
    
    .logo-img { height: 60px; }
    
    .search-form {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .action-btn span { display: none; }
    .action-btn { padding: 10px; }
    
    .dex-btn span { display: none; }
    .dex-btn { padding: 5px; border-radius: 50%; }
    
    .main-content { margin-top: 150px; }
}

@media (max-width: 500px) {
    .header-row { gap: 10px; }
    .logo-img { height: 50px; }
    .header-actions { gap: 5px; }
    .main-content { margin-top: 160px; }
}

/* ================================================================
   DEX BESCHRIJVING KADER
   ================================================================ */
.dex-description-section {
    margin: 30px 0;
}

.dex-card {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    background: linear-gradient(135deg, #f9f5fb 0%, #f3eaf6 100%);
    border: 3px solid var(--primary);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(139, 58, 156, 0.15);
}

.dex-card-image {
    flex-shrink: 0;
    width: 80px;
}

.dex-card-image img {
    width: 80px;
    height: auto;
    border-radius: 8px;
}

.dex-card-content {
    flex: 1;
}

.dex-card-content h2 {
    color: var(--primary);
    font-size: 1.2em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dex-card-content h2::before {
    content: "\1F49C";
    font-size: 1em;
}

.dex-card-content .description {
    color: var(--text);
    line-height: 1.7;
}

/* ================================================================
   FABRIKANT BESCHRIJVING KADER
   ================================================================ */
.fabrikant-description-section {
    margin: 30px 0;
}

.fabrikant-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fabrikant-card h2 {
    color: var(--text);
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fabrikant-card h2::before {
    content: "\1F4CB";
    font-size: 1.1em;
}

.fabrikant-card .description {
    color: var(--text-light);
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 600px) {
    .dex-card {
        flex-direction: column;
        text-align: center;
    }
    
    .dex-card-image img {
        width: 100px;
    }
    
    .dex-card-content h2 {
        justify-content: center;
    }
}

/* ================================================================
   LEVERWEEK INFO BOX
   ================================================================ */
.delivery-info-box {
    margin: 15px 0;
    padding: 15px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
}

.delivery-expected,
.delivery-extra {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.delivery-icon {
    font-size: 1.5em;
    line-height: 1;
}

.delivery-text {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--text);
}

.delivery-text strong {
    color: #0369a1;
}

.delivery-note {
    color: var(--text-light);
    font-size: 0.85em;
    display: block;
    margin-top: 4px;
}

/* Wanneer niet op voorraad - oranje tint */
.out-of-stock + .delivery-info-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
}

.out-of-stock + .delivery-info-box .delivery-text strong {
    color: #b45309;
}

/* ====================================================================
   WINKELWAGEN BADGE & TOAST NOTIFICATIES
   ==================================================================== */

/* Cart badge (nummer op winkelwagen icoon) */
.cart-badge {
    position: absolute; top: -6px; right: -6px;
    background: #ef4444; color: white; font-size: 0.65em; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
}
.action-btn-cart { position: relative; }

/* Cart bounce animatie */
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.25); }
    60% { transform: scale(0.95); }
}
.cart-bounce { animation: cartBounce 0.6s ease; }
.cart-adding { opacity: 0.6; pointer-events: none; }

/* Toast notificaties */
.xo-toast {
    position: fixed; bottom: 20px; right: 20px; z-index: 10000;
    background: white; border-radius: 10px; padding: 14px 18px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 10px;
    max-width: 380px; transform: translateX(120%); transition: transform 0.3s ease;
    font-size: 0.9em; border-left: 4px solid #ccc;
}
.xo-toast-visible { transform: translateX(0); }
.xo-toast-success { border-left-color: #22c55e; }
.xo-toast-error { border-left-color: #ef4444; }
.xo-toast-warning { border-left-color: #f59e0b; }
.xo-toast-icon { font-size: 1.3em; flex-shrink: 0; }
.xo-toast-text { flex: 1; }
.xo-toast-text strong { display: block; font-size: 0.85em; color: #333; margin-bottom: 2px; }
.xo-toast-close {
    background: none; border: none; font-size: 1.2em; cursor: pointer;
    color: #999; padding: 0 0 0 8px; line-height: 1;
}
.xo-toast-close:hover { color: #333; }

/* Header rapportcijfer badge */
.header-rating {
    display: flex; align-items: center; gap: 6px; padding: 4px 12px;
    background: rgba(255,255,255,0.15); border-radius: 20px; cursor: pointer;
    text-decoration: none; color: white; transition: background 0.2s; font-size: 0.85em;
}
.header-rating:hover { background: rgba(255,255,255,0.25); }
.header-rating-score { font-weight: 800; font-size: 1.1em; }
.header-rating-stars { color: #fbbf24; }
