/* =========================================
   PUBLIC_HTML/STYLE.CSS (FRONTEND)
   ========================================= */

/* 1. GLOBAL & RESET */
body {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: #f8f9fa; color: #333;
    display: flex; flex-direction: column; min-height: 100vh;
}
* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }

/* Algemene Container */
.container {
    max-width: 1200px; width: 100%;
    margin: 40px auto; padding: 0 20px;
    flex: 1;
}

/* 2. HEADER */
.site-header {
    background: white; border-bottom: 1px solid #ddd;
    padding: 15px 30px; display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); gap: 20px;
}
.logo { font-size: 1.5em; font-weight: 800; color: #222; letter-spacing: -1px; }
.logo span { color: #007bff; }

.header-search { flex: 1; max-width: 600px; position: relative; }
.search-input { width: 100%; padding: 10px 15px; border: 2px solid #eee; border-radius: 50px; font-size: 1em; background: #f9f9f9; transition: all 0.2s; }
.search-input:focus { border-color: #007bff; background: white; outline: none; }

.search-dropdown {
    position: absolute; top: 110%; left: 0; right: 0;
    background: white; border: 1px solid #ddd; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 1001;
    max-height: 400px; overflow-y: auto; display: none;
}
.search-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #f5f5f5; transition: background 0.1s; color: #333; }
.search-item:hover { background: #f0f8ff; }
.search-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; margin-right: 15px; border: 1px solid #eee; }
.search-info { display: flex; flex-direction: column; }
.search-name { font-weight: 600; font-size: 0.95em; color: #333; }
.search-price { color: #007bff; font-size: 0.9em; }

.header-actions { display: flex; align-items: center; gap: 20px; font-weight: 600; font-size: 0.95em; }
.action-link { display: flex; align-items: center; gap: 6px; color: #555; transition: color 0.2s; }
.action-link:hover { color: #007bff; }
.badge-count { background: #dc3545; color: white; font-size: 0.75em; padding: 2px 6px; border-radius: 10px; margin-left: -5px; }
@media (max-width: 900px) { .header-search { display: none; } }

/* 3. FOOTER */
.site-footer {
    background-color: #1a1a1a; color: #b0b0b0;
    font-family: 'Segoe UI', system-ui, sans-serif; font-size: 0.95em;
    margin-top: 50px; border-top: 4px solid #007bff;
}
.footer-container {
    max-width: 1200px; margin: 0 auto; padding: 40px 20px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px;
}
.footer-col h4 { color: #fff; margin-top: 0; margin-bottom: 20px; font-size: 1.1em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #b0b0b0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { background-color: #111; text-align: center; padding: 20px; font-size: 0.85em; color: #666; border-top: 1px solid #333; }
.social-links { display: flex; gap: 15px; }

/* =========================================
   4. HOME / PRODUCT LIST & SIDEBAR
   ========================================= */
.main-container {
    max-width: 100%;       
    margin: 0;             
    padding: 20px 40px;    
    display: flex;
    gap: 40px;             
    align-items: flex-start;
    flex: 1;
}

/* --- SIDEBAR STYLING (GENESTE CATEGORIEËN) --- */
.sidebar {
    width: 260px; 
    flex-shrink: 0; 
    background: white; 
    padding: 20px;
    border-radius: 8px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky; 
    top: 100px;
}
.sidebar h3 { font-size: 1.1em; margin-top: 0; margin-bottom: 15px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }

/* Reset de lijsten */
.cat-list, .cat-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Basis link stijl */
.cat-link {
    display: block;
    padding: 8px 12px;
    margin-bottom: 2px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

/* Hover effect */
.cat-link:hover {
    background: #f1f3f5;
    color: #007bff;
    padding-left: 18px; /* Klein sprongetje naar rechts */
}

/* ACTIVE STATE: Witte tekst op blauw (Leesbaar!) */
.cat-link.active {
    background: #007bff;
    color: #ffffff !important; 
    font-weight: 600;
    font-style: normal !important;
}

.cat-link.active:hover {
    padding-left: 12px; /* Niet springen als hij al actief is */
    background: #0069d9;
}

/* --- RECURSIEVE INSPRINGING (3 LAGEN) --- */

/* Niveau 1: Directe kinderen van de root */
.cat-list > li > ul {
    margin-top: 2px;
    margin-bottom: 5px;
}

/* Niveau 1 Links (Hoofdcategorie) */
.cat-list > li > a.cat-link {
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

/* Niveau 2: Eerste inspringing */
.cat-list ul {
    padding-left: 0; 
    margin-left: 15px; /* Schuif naar rechts */
    border-left: 2px solid #e9ecef; /* Lichtgrijs lijntje */
}

/* Niveau 2 Links (Sub) */
.cat-list ul li a.cat-link {
    font-size: 0.95em; 
    padding: 6px 10px;
    color: #555;
}

/* Niveau 3: Extra inspringing (Sub-Sub) */
.cat-list ul ul {
    margin-left: 15px; /* Nog eens 15px naar rechts */
    border-left: 2px solid #dee2e6; /* Iets donkerder lijntje voor contrast */
}

/* Niveau 3 Links (Sub-Sub) */
.cat-list ul ul li a.cat-link {
    font-size: 0.9em;
    padding: 5px 10px;
    color: #777;
    font-style: italic; /* Visueel onderscheid */
}

/* --- EINDE SIDEBAR --- */

.content-area { flex: 1; }

/* Product Grid */
.products-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 25px; 
}

.product-card {
    background: white; border: 1px solid #eee; border-radius: 10px;
    overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.card-img-wrap { height: 220px; overflow: hidden; position: relative; background: #f9f9f9; border-bottom: 1px solid #f0f0f0; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .card-img-wrap img { transform: scale(1.05); }
.card-info { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-weight: 600; margin: 0 0 5px; color: #333; font-size: 1.05em; }
.card-price { font-size: 1.1em; color: #007bff; font-weight: bold; margin-bottom: 15px; }
.btn-view { margin-top: auto; display: block; text-align: center; background: #f0f0f0; color: #333; padding: 10px; border-radius: 6px; font-weight: 600; transition: all 0.2s; }
.btn-view:hover { background: #333; color: white; }

@media (max-width: 900px) {
    .main-container { flex-direction: column; padding: 20px; } 
    .sidebar { width: 100%; position: static; margin-bottom: 20px; }
}

/* 5. PRODUCT DETAIL */
.back-link { display: inline-block; margin-bottom: 20px; color: #666; font-size: 0.95em; }
.back-link:hover { color: #007bff; text-decoration: underline; }
.product-wrapper {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
    background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.product-gallery { display: flex; flex-direction: column; gap: 15px; }
.main-image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }
.thumbnail-list { display: flex; gap: 10px; overflow-x: auto; }
.thumbnail { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid #ddd; cursor: pointer; opacity: 0.7; transition: all 0.2s; }
.thumbnail:hover, .thumbnail.active { opacity: 1; border-color: #007bff; border-width: 2px; }
.product-info { padding-top: 10px; }
.product-title { margin: 0 0 15px 0; font-size: 2.2em; color: #222; }
.product-price { font-size: 1.8em; color: #007bff; font-weight: bold; margin-bottom: 25px; }
.add-to-cart-form { display: flex; gap: 15px; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid #eee; }
.qty-input { width: 70px; padding: 12px; font-size: 1.1em; border: 1px solid #ccc; border-radius: 6px; text-align: center; }
.btn-add { background: #28a745; color: white; border: none; padding: 12px 30px; border-radius: 6px; font-size: 1.1em; font-weight: bold; cursor: pointer; flex: 1; transition: background 0.2s; }
.btn-add:hover { background: #218838; }
.product-description { color: #555; line-height: 1.6; font-size: 1.05em; }
.product-description h2 { color: #333; margin-top: 20px; margin-bottom: 10px; }
.product-description img { max-width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 900px) { .product-wrapper { grid-template-columns: 1fr; } }

/* 6. WINKELWAGEN */
.container-cart { max-width: 900px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cart-container { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 30px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px; border-bottom: 2px solid #eee; color: #555; }
td { padding: 15px 10px; border-bottom: 1px solid #eee; vertical-align: middle; }
.total-row { text-align: right; font-size: 1.3em; font-weight: bold; margin-top: 20px; padding-top: 10px; border-top: 2px solid #333; }
.checkout-container { background: white; padding: 30px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.row { display: flex; gap: 20px; }
.col { flex: 1; }
.btn-pay { background: #F27200; color: white; padding: 15px; width: 100%; border: none; font-size: 1.2em; font-weight: bold; cursor: pointer; border-radius: 5px; transition: background 0.2s; }
.btn-pay:hover { background: #d96600; }
.delete-btn { color: #dc3545; font-size: 0.85em; text-decoration: underline; cursor: pointer; border: none; background: none; padding: 0; }

/* 7. KLANT ACCOUNT (DASHBOARD) */
.container-dashboard { max-width: 1100px; }
.dashboard-intro { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.btn-logout { background-color: white; border: 1px solid #dc3545; color: #dc3545; padding: 8px 16px; border-radius: 6px; font-weight: 600; transition: all 0.2s; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-logout:hover { background-color: #dc3545; color: white; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; align-items: start; }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }
.card { background: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); overflow: hidden; margin-bottom: 30px; }
.card-header { padding: 20px; border-bottom: 1px solid #f0f0f0; background: #fff; display: flex; align-items: center; gap: 10px; }
.card-header h3 { margin: 0; font-size: 1.2em; color: #333; }
.card-body { padding: 25px; }
.btn-save { background: #007bff; color: white; border: none; padding: 12px 20px; border-radius: 6px; cursor: pointer; width: 100%; font-weight: bold; transition: background 0.2s; }
.btn-save:hover { background: #0056b3; }
.order-table { width: 100%; border-collapse: collapse; }
.order-table th { text-align: left; padding: 15px; background: #f9f9f9; color: #666; font-weight: 600; font-size: 0.9em; }
.order-table td { padding: 15px; border-bottom: 1px solid #f0f0f0; }
.badge { padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight: bold; }
.status-betaald { background: #d4edda; color: #155724; }
.status-open { background: #fff3cd; color: #856404; }
.status-geannuleerd { background: #f8d7da; color: #721c24; }
.alert-success { background: #d4edda; color: #155724; padding: 15px; border-radius: 6px; margin-bottom: 20px; border: 1px solid #c3e6cb; }

/* 8. BEDANKT PAGINA */
.thank-you-container {
    max-width: 600px; margin: 60px auto; padding: 40px;
    background: white; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center; animation: slideUp 0.5s ease-out;
}
.icon-circle { width: 80px; height: 80px; background: #d4edda; color: #155724; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; }
.icon-circle svg { width: 40px; height: 40px; }
.order-info { background: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 30px; font-weight: 500; color: #444; border: 1px solid #eee; }
.btn-home { display: inline-block; background: #007bff; color: white; padding: 12px 30px; border-radius: 50px; font-weight: bold; transition: background 0.2s; }
.btn-home:hover { background: #0056b3; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 9. ADRESBOEK (ACCOUNT) */
.header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.address-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card-header-flex { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; background: #fff; }
.card-header-flex h3 { margin: 0; font-size: 1.1em; color: #333; }
.action-icons a { text-decoration: none; font-size: 1.1em; margin-left: 10px; transition: opacity 0.2s; }
.action-icons a:hover { opacity: 0.7; }
.icon-edit { color: #007bff; }
.icon-delete { color: #dc3545; }
.empty-state { text-align: center; padding: 40px; color: #666; }
.container-small { max-width: 600px; }
.dashboard-divider { margin: 20px 0; border: 0; border-top: 1px solid #eee; }
.dashboard-link { display: block; text-align: center; color: #007bff; font-weight: bold; text-decoration: none; padding: 10px; }
.dashboard-link:hover { text-decoration: underline; }

/* FORMULIEREN (Mijn Gegevens) */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9em; color: #444; }
.form-control { width: 100%; padding: 12px 15px; font-size: 1em; color: #333; background-color: #fff; border: 1px solid #dce0e4; border-radius: 8px; transition: all 0.2s ease-in-out; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.form-control:focus { border-color: #007bff; outline: none; box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1); }
.form-section-title { margin-top: 30px; margin-bottom: 15px; font-size: 1rem; font-weight: 700; color: #1a1a1a; padding-bottom: 8px; border-bottom: 2px solid #f0f2f5; text-transform: uppercase; letter-spacing: 0.5px; }
.form-row { display: flex; gap: 15px; }
.form-col { flex: 1; }
.btn-save { margin-top: 10px; background: #007bff; color: white; border: none; padding: 14px 20px; border-radius: 8px; width: 100%; font-weight: 600; font-size: 1em; cursor: pointer; transition: background 0.2s, transform 0.1s; }
.btn-save:hover { background: #0056b3; }
.btn-save:active { transform: scale(0.98); }