:root { 
    --dark: #0f172a; 
    --card-bg: #1e293b; 
    --accent: #ffb800; 
    --red: #ff4757; 
    --blue: #3b82f6; 
    --green: #22c55e;
}

html {
    scroll-behavior: smooth;
}

body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', sans-serif; 
    background-color: var(--dark); 
    color: white; 
    min-height: 100vh; 
    overflow-x: hidden;
}

/* Dynamische Achtergrond */
.bg-blur {
    background-color: var(--dark);
    background-image: 
        linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), 
        url("https://i.postimg.cc/cJcgS4ny/apple-touch-icon.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: backgroundFadeIn 1.5s ease-out forwards;
}

@keyframes backgroundFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Verbeterde Facade Box (Glassmorphism) */
#facade .admin-form {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 40px;
    border-radius: 24px;
}

/* Navigatie */
.nav-bar { 
    display: flex; 
    gap: 10px; 
    padding: 10px; 
    background: rgba(15, 23, 42, 0.95); 
    position: sticky; 
    top: 0; 
    z-index: 100; /* Verhoogd voor overlap veiligheid */
    border-bottom: 1px solid #334155; 
    backdrop-filter: blur(5px);
}

.dropdown { position: relative; flex-grow: 1; }

.btn-nav-blue { 
    background: var(--blue); 
    color: white; 
    border: none; 
    padding: 12px; 
    border-radius: 12px; 
    width: 100%; 
    font-weight: bold; 
    cursor: pointer; 
    transition: transform 0.2s, background 0.2s;
}

.btn-nav-blue:active { transform: scale(0.98); }

.dropdown-content { 
    display: none; 
    position: absolute; 
    top: 100%; /* Exact onder de navbar */
    background-color: var(--card-bg); 
    min-width: 160px; 
    z-index: 110; 
    border-radius: 12px; 
    width: 100%; 
    border: 1px solid #334155; 
    box-shadow: 0 10px 15px rgba(0,0,0,0.3);
    margin-top: 5px;
    overflow: hidden;
}

.dropdown-content button { 
    color: white; 
    padding: 14px; 
    display: block; 
    background: none; 
    border: none; 
    width: 100%; 
    text-align: left; 
    border-bottom: 1px solid #334155; 
    cursor: pointer; 
    transition: background 0.2s;
}

.dropdown-content button:last-child { border-bottom: none; }
.dropdown-content button:hover { background: rgba(255,255,255,0.1); }
.dropdown:hover .dropdown-content { display: block; }

/* Producten Grid */
.markt-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 25px; 
    padding: 25px; 
}

.product-kaart { 
    background: white; 
    border-radius: 24px; 
    color: var(--dark); 
    overflow: hidden; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-kaart:hover { transform: translateY(-8px); }

.kaart-foto { width: 100%; height: 260px; object-fit: cover; cursor: pointer; }

/* Foto Strip onderaan kaart */
.foto-strip { 
    display: flex; 
    gap: 8px; 
    padding: 10px; 
    background: #f8fafc; 
    overflow-x: auto; 
    border-top: 1px solid #e2e8f0; 
}

.mini-foto { 
    width: 55px; 
    height: 55px; 
    object-fit: cover; 
    border-radius: 10px; 
    cursor: pointer; 
    border: 2px solid transparent; 
    transition: 0.2s;
}

.mini-foto:hover { border-color: var(--blue); }

/* Buttons & Inputs */
.btn-primary { 
    background: var(--blue); 
    color: white; 
    width: 100%; 
    padding: 16px; 
    border-radius: 12px; 
    border: none; 
    font-weight: bold; 
    font-size: 1rem;
    cursor: pointer; 
    transition: background 0.3s, transform 0.1s;
}

.btn-primary:hover { background: #2563eb; }
.btn-primary:active { transform: scale(0.99); }

.form-input { 
    width: 100%; 
    padding: 14px; 
    margin-bottom: 12px; 
    border-radius: 10px; 
    background: var(--dark); 
    color: white; 
    border: 1px solid #334155; 
    box-sizing: border-box; 
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue);
}

/* Lightbox */
#lightbox { 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0,0,0,0.95); 
    z-index: 10000; 
    display: none; 
    align-items: center; 
    justify-content: center; 
}

#lb-img { max-width: 90%; max-height: 80vh; border-radius: 15px; box-shadow: 0 0 30px rgba(0,0,0,0.5); }

/* Animatie voor logo */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 0.9; transform: translateY(0); }
}

.fade-in-logo {
    animation: fadeIn 1s ease-out forwards;
}

/* Toegankelijkheid */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- MOBIELE OPTIMALISATIE --- */
@media (max-width: 600px) {
    .markt-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .nav-bar {
        padding: 8px;
        gap: 5px;
    }

    .btn-nav-blue, .btn-terug {
        padding: 10px;
        font-size: 0.9rem;
    }

    .product-kaart {
        border-radius: 20px;
    }

    .kaart-foto {
        height: 220px;
    }

    #facade .admin-form {
        width: 85%;
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.8rem;
    }
}