/* Popup dialogs */
.popup-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 900px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.popup-dialog::backdrop {
    background: rgba(0,0,0,0.5);
}

.popup-dialog.wide-dialog {
    max-width: 1000px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.popup-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.4em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.popup-content {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Smartphone popup stijlen */
.smartphone-popup-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.smartphone-popup-header h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.4em;
}

.smartphone-popup-header p {
    margin: 0;
    color: #666;
    font-size: 0.95em;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.brand-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 12px;
}

.brand-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.brand-logo-container {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    flex-shrink: 0;
}

.brand-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.brand-info {
    flex: 1;
}

.brand-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.model-count {
    font-size: 0.8em;
    color: #666;
}

.brand-arrow {
    color: #999;
    font-size: 1.2em;
    font-weight: bold;
}


.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.model-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.model-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.model-image-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.model-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.model-info {
    margin-bottom: 12px;
}

.model-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    margin-bottom: 4px;
    line-height: 1.3;
}

.model-select-btn {
    width: 100%;
    padding: 8px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: background-color 0.3s;
}

.model-select-btn:hover {
    background: #0056b3;
}

.popup-back-button {
    text-align: left;
    margin-top: 20px;
}

.back-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.back-button:hover {
    background: #545b62;
}

/* Products popup cards */
.products-popup-card {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.products-popup-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.products-popup-thumb {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 15px;
    border-radius: 8px;
}

.products-popup-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.products-popup-price {
    color: #28a745;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.products-popup-btn {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-bottom: 10px;
}

.products-popup-btn:hover {
    background: #0056b3;
}

.more-info-link {
    display: block;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.more-info-link:hover {
    background-color: #f8f9fa;
    text-decoration: underline;
}

/* GESP POPUP TOEVOEGINGEN HIERONDER */
/* Grid voor gesp producten */
.products-popup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
    margin-top: 20px;
}

/* Gesp popup header */
.gesp-popup-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.gesp-popup-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
}

.gesp-popup-header p {
    margin: 0;
    color: #666;
    font-size: 1em;
    line-height: 1.5;
}

/* Selected state voor geselecteerd product */
.products-popup-card.selected {
    border-color: #28a745;
    background: #f8fff9;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.products-popup-card.selected .products-popup-btn {
    background: #28a745;
}

.products-popup-card.selected .products-popup-btn:hover {
    background: #218838;
}

/* Model thumb container voor gesp overlay - EENVOUDIG */
.model-thumb-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.model-leer-background,
.model-overlay,
.gesp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.model-leer-background {
    z-index: 1;
}

.model-overlay {
    z-index: 2;
}

.gesp-overlay {
    z-index: 3;
}

/* Model detail popup */
.model-detail-popup {
    width: 100%;
    max-width: 900px;
    border: none;
    border-radius: 12px;
    padding: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.model-detail-popup::backdrop {
    background: rgba(0,0,0,0.5);
}

.model-detail-wrapper {
    position: relative;
    max-height: 100vh;
    overflow-y: auto;
}

.model-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
    padding: 20px;
}

.model-detail-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.model-detail-main {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

.detail-leer-background,
.main-detail-image,
.detail-gesp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.detail-leer-background {
    z-index: 1;
}

.main-detail-image {
    z-index: 2;
    transition: opacity 0.3s ease;
}

.detail-gesp-overlay {
    z-index: 3;
}

.additional-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
}

.thumbnail-container {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
}

.thumbnail-background,
.thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.thumbnail-background {
    z-index: 1;
}

.thumbnail {
    z-index: 2;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #28a745;
    border-width: 3px;
}

.model-detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #28a745;
}

.detail-description h3,
.detail-features h3 {
    margin-bottom: 10px;
    color: #333;
}

.detail-description ul {
    list-style: none;
    padding: 0;
}

.detail-description li {
    padding: 5px 0;
    color: #555;
}

.detail-features ul {
    padding-left: 20px;
    color: #555;
}

.detail-features li {
    padding: 3px 0;
}

.select-model-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.select-model-btn:hover {
    background: #0056b3;
}

.smartphone-context {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.9em;
    color: #495057;
}

/* Gesp notice */
.gesp-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    font-size: 1em;
    color: #856404;
    text-align: center;
}

.gesp-notice h3 {
    margin-top: 0;
    color: #856404;
}

.gesp-notice p {
    margin: 10px 0;
}

/* Gesp section unavailable */
.gesp-section-unavailable {
    position: relative;
}

.gesp-section-unavailable::before {
    content: "Gesp alleen beschikbaar voor Standaard model";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1em;
    text-align: center;
    width: 90%;
    z-index: 10;
    font-weight: bold;
}

.gesp-section-unavailable::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    z-index: 5;
    border-radius: 8px;
}

/* Responsive popups - GESP AANPASSINGEN HIERONDER */
@media (max-width: 768px) {
    .model-detail-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 60px 15px 20px 15px;
    }
    
    .model-detail-popup {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
        margin: 0;
    }
    
    .model-detail-wrapper {
        height: 100vh;
    }
    
    .model-detail-main {
        height: 300px;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .brand-card {
        padding: 12px;
        gap: 10px;
    }
    
    .brand-logo-container {
        width: 40px;
        height: 40px;
    }
    
    .brand-logo {
        width: 24px;
        height: 24px;
    }
    
    .model-card {
        padding: 12px;
    }
    
    .model-image-container {
        width: 70px;
        height: 70px;
    }
    
    .model-image {
        width: 50px;
        height: 50px;
    }
    
    .model-thumb-container {
        width: 100px;
        height: 100px;
    }
    
    /* GESP POPUP RESPONSIVE */
    .products-popup-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 15px;
    }
    
    .gesp-popup-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .gesp-popup-header h3 {
        font-size: 1.3em;
    }
    
    .gesp-popup-header p {
        font-size: 0.95em;
    }
    
    /* Zorg dat de popup container flex gebruikt */
    #productsPopupContainer {
        display: flex;
        flex-direction: column;
    }
    
    .gesp-popup-header {
        order: 1;
    }
    
    .products-popup-grid {
        order: 2;
    }
}

@media (max-width: 480px) {
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .model-detail-main {
        height: 250px;
    }
    
    .thumbnail-container {
        width: 50px;
        height: 50px;
    }
    
    .model-thumb-container {
        width: 80px;
        height: 80px;
    }
    
    /* GESP POPUP EXTRA KLEIN */
    .products-popup-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 100%;
    }
}

/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Leer Filter Styling */
.leer-filter-container {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}

.filter-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Leer kleur indicator in productkaarten */
.leer-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    right: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.products-popup-color {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
    font-style: italic;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}
/* Leer Filter Search Styles */
.leer-filter-container {
    margin-bottom: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.search-container {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.clear-search-btn:hover {
    color: #666;
    background: #f0f0f0;
}

.search-results-count {
    width: 100%;
    margin-top: 10px;
    padding: 8px 15px;
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
    border-radius: 3px;
    font-size: 14px;
    color: #2e7d32;
}

/* Product SKU Badge */
.product-sku-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.products-popup-card {
    position: relative;
}

/* Responsive styling voor zoekbalk */
@media (max-width: 768px) {
    .filter-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-title {
        text-align: center;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-input {
        font-size: 16px; /* Groter voor mobiel voor betere toegankelijkheid */
    }
}

@media (max-width: 480px) {
    .filter-buttons {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .filter-buttons::-webkit-scrollbar {
        height: 4px;
    }
    
    .filter-buttons::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }
    
    .product-sku-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Geen resultaten styling */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.no-results p {
    margin: 5px 0;
    color: #666;
}

.no-results p:first-child {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}