/* ==========================================================================
   A&M 3D Printing - Master Stylesheet
   ========================================================================== */

:root {
    --primary-blue: #0077C8; 
    --accent-cyan: #00A8CC;  
    --accent-green: #7ED957; 
    
    --bg-body: #0F172A; 
    --bg-card: #1E293B;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #334155;
    
    --brand-gradient: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    --success-gradient: linear-gradient(135deg, #10B981, var(--accent-green));
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.4);
    --shadow-hover: 0 20px 40px rgba(0, 168, 204, 0.15);
}

/* --- Algemene Reset --- */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; }

input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
    -webkit-text-fill-color: #F8FAFC !important;
    -webkit-box-shadow: 0 0 0px 1000px #0F172A inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================================================
   Header Styling (Desktop & Mobiel)
   ========================================================================== */
.main-header { 
    background-color: rgba(15, 23, 42, 0.95); 
    backdrop-filter: blur(10px); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid var(--border-color); 
    box-shadow: var(--shadow-sm); 
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.header-logo img {
    max-height: 50px; 
    width: auto;
    display: block;
}

.desktop-nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-nav ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.desktop-nav ul li a::after { 
    content: ''; 
    position: absolute; 
    width: 0; 
    height: 2px; 
    bottom: -5px; 
    left: 0; 
    background: var(--brand-gradient); 
    transition: width 0.3s ease; 
}

.desktop-nav ul li a:hover {
    color: var(--accent-cyan);
}

.desktop-nav ul li a:hover::after { 
    width: 100%; 
}

.desktop-only {
    display: inline-flex;
}

.mobile-menu-toggle {
    display: none; 
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
}

/* ==========================================================================
   Mobiel Uitklapmenu (Geanimeerd)
   ========================================================================== */
.mobile-nav {
    display: flex; /* Altijd flex, we verbergen het visueel met max-height */
    flex-direction: column;
    background: rgba(30, 41, 59, 0.98); /* Iets transpanter voor een luxe effect */
    backdrop-filter: blur(12px);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 0; /* Standaard ingeklapt */
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.4s ease, padding 0.4s ease;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-nav.active {
    max-height: 400px; /* Schuift open tot deze hoogte */
    padding: 20px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* --- Knoppen & Cart Icon --- */
.cart-icon-btn { background: transparent; border: none; color: var(--text-main); cursor: pointer; position: relative; display: flex; transition: transform 0.3s ease; }
.cart-icon-btn:hover { color: var(--accent-cyan); transform: scale(1.1); }
#cart-count { position: absolute; top: -8px; right: -12px; background: var(--brand-gradient); color: white; padding: 2px 6px; border-radius: 12px; font-size: 0.75rem; font-weight: 800; border: 2px solid var(--bg-body); }

.btn-primary { display: inline-block; background: var(--brand-gradient); color: white; padding: 12px 24px; border-radius: 8px; text-decoration: none; font-size: 1rem; font-weight: 600; border: none; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; text-align: center; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 168, 204, 0.4); }

/* ==========================================================================
   Homepagina - USP Balk
   ========================================================================== */
.usp-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.usp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* ==========================================================================
   Secties & Grids
   ========================================================================== */
.shop-section { max-width: 1400px !important; width: 100%; margin: 50px auto 80px auto; padding: 0 20px; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 15px; }
.section-header .divider { height: 4px; width: 80px; background: var(--brand-gradient); margin: 0 auto; border-radius: 2px; }

/* Layout Grids voor verschillende pagina's */
.pod-grid, .product-detail-grid, .checkout-grid, .account-grid, .contact-grid { display: grid; gap: 30px; align-items: start; }
.pod-grid { grid-template-columns: 1.15fr 1fr; }
.product-detail-grid { grid-template-columns: 1.05fr 1fr; }
.checkout-grid { grid-template-columns: 1.35fr 1fr; }
.account-grid { grid-template-columns: 1.5fr 1fr; }
.contact-grid { grid-template-columns: 1fr 1.5fr; }

/* ==========================================================================
   Product Card (Compact Grid) - Shop & Homepagina
   ========================================================================== */
.shop-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 24px;
}

.compact-product-card {
    background: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.compact-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: var(--accent-cyan);
}

.compact-img {
    height: 185px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.4s ease;
}

.compact-product-card:hover .compact-img { 
    transform: scale(1.04); 
}

.compact-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: var(--bg-card);
    z-index: 1;
}

.badge { position: absolute; top: 12px; right: 12px; background: var(--brand-gradient); color: white; padding: 4px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 800; z-index: 2; box-shadow: var(--shadow-sm); }
.badge.custom { background: var(--success-gradient); }

.compact-cat {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--accent-cyan);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.compact-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.3;
}

.compact-excerpt {
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.compact-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

.btn-card-action {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--accent-cyan, #00A8CC);
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.2s;
}

.btn-card-action.upload {
    background: var(--accent-green, #10b981);
}

.btn-card-action:hover {
    filter: brightness(1.1);
}

/* ==========================================================================
   Materialen Kaarten (materialen.php)
   ========================================================================== */
.mat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.mat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    border-color: var(--accent-cyan);
}

.mat-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    align-self: flex-start;
}

.mat-card h3 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.mat-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.mat-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 20px;
}

.mat-specs li {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.5;
}

.mat-specs li strong {
    color: #f8fafc;
}

/* ==========================================================================
   Formulieren, Hero Slider & Modals
   ========================================================================== */
.config-group { margin-bottom: 15px; }
.config-group label { display: block; font-size: 0.85rem; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; color: var(--text-muted); }
.config-group select, .config-group input, .config-group textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-body); color: var(--text-main); font-size: 1rem; outline: none; transition: border-color 0.3s; }
.config-group select:focus, .config-group input:focus, .config-group textarea:focus { border-color: var(--accent-cyan); }

.hero-slider-container { position: relative; width: 100%; height: 600px; overflow: hidden; background: #000; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease-in-out; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.slide::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.4) 100%); }
.slide.active { opacity: 1; z-index: 10; }
.slide-content { position: relative; z-index: 20; text-align: center; color: white; max-width: 800px; padding: 0 20px; transform: translateY(20px); opacity: 0; transition: all 0.8s ease 0.3s; }
.slide.active .slide-content { transform: translateY(0); opacity: 1; }
.slide-content h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.slide-content p { font-size: 1.2rem; margin-bottom: 30px; color: #E2E8F0; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 30; background: rgba(255,255,255,0.1); color: white; border: 2px solid rgba(255,255,255,0.3); width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; backdrop-filter: blur(5px); }
.slider-btn.prev { left: 30px; } .slider-btn.next { right: 30px; }
.slider-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; }
.dot.active { background: var(--accent-cyan); transform: scale(1.3); }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(5px); z-index: 2000; justify-content: center; align-items: center; padding: 20px; opacity: 0; transition: opacity 0.3s; }
.modal-overlay.show { opacity: 1; }
.cart-modal { background: var(--bg-card); width: 100%; max-width: 550px; border-radius: 16px; padding: 30px; border: 1px solid var(--border-color); display: flex; flex-direction: column; transform: translateY(20px); transition: transform 0.3s; max-height: 90vh; }
.modal-overlay.show .cart-modal { transform: translateY(0); }
.cart-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 20px; }
.cart-items { overflow-y: auto; flex-grow: 1; margin-bottom: 20px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border-color); }

/* ==========================================================================
   Centrale Custom Dropdown Styling
   ========================================================================== */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    flex: 1;
    min-width: 180px;
}

.custom-select-trigger {
    padding: 0 45px 0 14px;
    height: 44px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body); /* Achtergrondkleur gelijk aan zoekveld */
    color: var(--text-muted); /* Tekstkleur minder fel gemaakt */
    font-size: 14px; /* Tekstgrootte verkleind naar 14px */
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.3s;
}

.custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 15px; /* Nette vaste rechtermarge */
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    /* Kleur van het pijltje aangepast naar #94A3B8 (muted) zodat het bij de tekst past */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22none%22%20stroke%3D%22%2394A3B8%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cpath%20d%3D%22M4%206l4%204%204-4%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    transition: transform 0.3s;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--accent-cyan);
}

.custom-select-wrapper.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

.custom-option {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s, color 0.2s;
    font-size: 14px; /* Tekstgrootte in het uitklapmenu aangepast */
    color: var(--text-muted); /* Tekstkleur in het uitklapmenu aangepast */
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover, .custom-option.selected {
    background: rgba(0, 168, 204, 0.1);
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Responsive Formulier Grids */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid-2.uneven {
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
}

/* Pas de padding van de hoofdblokken aan zodat er meer ruimte is op mobiel */
.pod-card-container {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    /* Zet de kolommen onder elkaar op mobiel */
    .form-grid-2, 
    .form-grid-2.uneven {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Minder padding op mobiele schermen voor de blokken */
    .pod-card-container {
        padding: 16px !important;
    }
}

/* ==========================================================================
   📱 MOBIELE WEERGAVE (RESPONSIVE)
   ========================================================================== */
@media (max-width: 960px) {
    .pod-grid, .product-detail-grid, .checkout-grid, .account-grid, .contact-grid { 
        grid-template-columns: 1fr; 
        gap: 30px;
    }
    
    .hero-slider-container { height: 450px; }
    .slide-content h1 { font-size: 2.2rem; }
    .slide-content p { font-size: 1rem; }
    .slider-btn { display: none; }
    
    .detail-image-box img { height: 320px !important; }
    .section-header h2 { font-size: 1.8rem; }
}

@media (max-width: 860px) {
    /* Header & Menu Mobiel */
    .header-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr; 
        align-items: center;
        padding: 12px 15px;
    }
    .mobile-menu-toggle { display: block; justify-self: start; }
    .desktop-nav, .desktop-only { display: none !important; }
    .header-logo { justify-self: center; }
    .header-logo img { max-height: 35px; }
    .header-actions { justify-self: end; }
	
	.usp-bar {
        flex-direction: column;
        align-items: center; /* Zet het hele blok in het midden */
        justify-content: center;
        gap: 16px;
        padding: 24px;
    }

    .usp-item {
        width: 100%;
        justify-content: center; /* Zet het icoontje en de tekst samen in het midden */
        text-align: center;
    }

}

@media (max-width: 500px) {
    .shop-compact-grid { grid-template-columns: 1fr; }
    .btn-primary { padding: 10px 18px; font-size: 0.9rem; }
    .cart-modal { padding: 20px; }
}

/* Zoekveld & knop uitlijning op de shoppagina */
.shop-search-input {
    padding: 0 14px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: #fff;
    outline: none;
    transition: border-color 0.3s;
}

.shop-search-input:focus {
    border-color: var(--accent-cyan);
}

.shop-search-btn {
    height: 44px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}