/* Basis stijlen */
/* ========== HOOFDFOTO ZOOM STYLES ========== */

/* Main image zoom container */
.main-image-zoom-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 400px;
    cursor: zoom-in;
}

#mainLeerImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

/* Zoom indicator - ZONDER OVERLAY */
.zoom-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.zoom-icon {
    font-size: 20px;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
}

.zoom-text {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Thumbnail styles (geen zoom) */
.thumbnail-container {
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail-container.active {
    border-color: #007bff;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.thumbnail-container:hover .thumbnail {
    transform: scale(1.05);
}

/* Hover effect op de container, niet op de afbeelding */
.main-image-zoom-container:hover .zoom-indicator {
    opacity: 1;
}

/* Responsive styles */
@media (max-width: 768px) {
    .main-image-zoom-container {
        height: 300px;
    }
    
    .zoom-text {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .zoom-icon {
        font-size: 18px;
        width: 35px;
        height: 35px;
    }
}

/* Voor browsers zonder hover support */
@media (hover: none) {
    .main-image-zoom-container {
        cursor: pointer;
    }
    
    .zoom-indicator {
        opacity: 1;
    }
}

/* CSS voor custom smartphone input */
.custom-smartphone-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.custom-smartphone-container h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

#customSmartphoneInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#selectCustomSmartphone:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Winkelwagen styling voor custom smartphone */
.cart-item.custom-smartphone {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
}

.cart-item.custom-smartphone .item-name {
    color: #333;
    font-weight: 600;
}

.cart-item.custom-smartphone .item-type {
    background: #667eea;
    color: white;
}

/* Responsive aanpassingen */
@media (max-width: 768px) {
    .custom-smartphone-container {
        padding: 20px;
        margin-top: 20px;
    }
    
    .custom-input-group {
        flex-direction: column;
    }
    
    #customSmartphoneInput {
        width: 100%;
        margin-bottom: 10px;
    }
    
    #selectCustomSmartphone {
        width: 100%;
    }
}

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

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Touch-optimization voor mobiel (buiten media query!) */
html {
    touch-action: manipulation; /* Voorkomt dubbeltik-zoom */
}



/* Volledige schermlayout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    flex-shrink: 0;
}

h1 {
    color: #2c3e50;
    font-size: 2em;
}

/* Hoofdinhoud - verdeelt het resterende scherm */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Desktop layout: product display en producten naast elkaar */
@media (min-width: 992px) {
    main {
        flex-direction: row;
        height: calc(100vh - 80px); /* Hoogte minus header */
    }
    
    .product-display-section {
        flex: 0 0 40%;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .product-display {
        flex: 1;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        min-height: 400px;
    }
    
    .product-section {
        flex: 1;
        height: 100%;
        overflow-y: auto;
    }
}

/* Tablet layout */
@media (min-width: 768px) and (max-width: 991px) {
    main {
        flex-direction: column;
    }
    
    .product-display-section {
        height: 40vh;
        min-height: 300px;
    }
    
    .product-display {
        width: 300px;
        height: 300px;
    }
    
    .product-section {
        height: 60vh;
        overflow-y: auto;
    }
}

/* Mobiele layout */
@media (max-width: 767px) {
    main {
        padding: 10px;
        gap: 15px;
    }
    
    .product-display-section {
        min-height: 250px;
    }
    
    .product-display {
        width: 250px;
        height: 250px;
    }
    
    .product-section {
        min-height: 50vh;
    }
}

/* Bestaande stijlen blijven behouden */
.product-display-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.product-display {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

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

.product-thumb {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
}

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

.product-price {
    color: #28a745;
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn-primary, .btn-success, .btn-info, .btn-secondary, .btn-outline {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

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

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-outline {
    background: white;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline:hover {
    background: #f8f9fa;
}

/* Formulier stijlen */
form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

form input, form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Winkelmandje */
#cartDialog {
    border: none;
    border-radius: 10px;
    padding: 0;
    width: 90%;
    max-width: 500px;
}

#cartDialog::backdrop {
    background: rgba(0,0,0,0.5);
}

#cartDialog .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

#cartDialog .popup-content {
    padding: 20px;
}

#cart-items {
    list-style: none;
    margin-bottom: 20px;
}

#cart-items li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

#total {
    font-size: 1.2em;
    font-weight: bold;
    color: #28a745;
    text-align: right;
}

/* Responsive aanpassingen voor knoppen */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-success, .btn-info, .btn-secondary, .btn-outline {
        width: 100%;
        max-width: 300px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-thumb {
        width: 80px;
        height: 80px;
    }
}