/* ===== BASIS STRUCTUUR ===== */
.deuren-configurator {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
}

.config-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.config-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.config-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #1a202c;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* ===== MERK & PROFIEL ===== */
.brand-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.brand-card {
    flex: 1;
    cursor: pointer;
}

.brand-card input {
    display: none;
}

.brand-card span {
    display: block;
    padding: 1rem;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.brand-card input:checked + span {
    border-color: #3182ce;
    background: #ebf8ff;
    color: #2c5282;
}

.profile-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.profile-card {
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.profile-card input {
    display: none;
}

.profile-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.profile-card input:checked + .profile-card,
.profile-card:has(input:checked) {
    border-color: #3182ce;
    background: #ebf8ff;
}

.profile-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.u-value {
    font-size: 0.8rem;
    color: #718096;
}

/* ===== AFMETINGEN ===== */
.dimensions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dim-input label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.dim-input input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.dim-input input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
}

.dim-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3182ce;
    cursor: pointer;
}

/* ===== VAKKEN ===== */
.vakken-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.vak-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.vak-btn.active,
.vak-btn:hover {
    border-color: #3182ce;
    background: #ebf8ff;
    color: #2c5282;
}

.vakken-config {
    display: grid;
    gap: 1rem;
}

.vak-config {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.vak-config h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #4a5568;
}

.vak-type-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vak-type-btn {
    flex: 1;
    min-width: 80px;
    cursor: pointer;
}

.vak-type-btn input {
    display: none;
}

.vak-type-btn span {
    display: block;
    padding: 0.5rem;
    text-align: center;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.vak-type-btn i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: #718096;
}

.vak-type-btn input:checked + span {
    background: #3182ce;
    color: white;
    border-color: #3182ce;
}

.vak-type-btn input:checked + span i {
    color: white;
}

.vak-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.vak-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.vak-options select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
}

/* ===== KLEUREN ===== */
.color-section {
    margin-bottom: 1.5rem;
}

.color-section > label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #4a5568;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.75rem;
}

.color-option {
    cursor: pointer;
    text-align: center;
}

.color-option input {
    display: none;
}

.color-swatch {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 0.25rem;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
    position: relative;
}

.color-swatch.same {
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #4a5568;
}

.color-swatch.wood::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.1) 2px,
        rgba(0,0,0,0.1) 4px
    );
}

.color-option input:checked + .color-swatch {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.3);
    transform: scale(1.1);
}

.color-name {
    font-size: 0.7rem;
    color: #4a5568;
    line-height: 1.2;
    display: block;
}

.woodgrain-option {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.hidden {
    display: none !important;
}

/* ===== GLAS & OPTIES ===== */
.glass-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.option-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-card input {
    margin-right: 1rem;
}

.option-card:has(input:checked) {
    border-color: #3182ce;
    background: #ebf8ff;
}

.option-info {
    display: flex;
    justify-content: space-between;
    flex: 1;
}

.extra-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 6px;
    cursor: pointer;
}

.checkbox-card input {
    margin-right: 0.5rem;
}

.checkbox-card .price {
    color: #3182ce;
    font-weight: 600;
}

/* ===== PREVIEW ===== */
.preview-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.preview-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.kozijn-preview {
    background: #f7fafc;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#preview-svg {
    width: 100%;
    height: auto;
    max-height: 250px;
}

.preview-dimensions {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.preview-legend {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #cbd5e0;
}

/* ===== PRIJS ===== */
.price-container {
    background: #2d3748;
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
}

.price-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #4a5568;
    padding-bottom: 0.5rem;
}

.price-breakdown {
    margin-bottom: 1.5rem;
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #4a5568;
    font-size: 0.9rem;
}

.price-line.hidden {
    display: none;
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    border-top: 2px solid #718096;
    margin-top: 0.5rem;
}

.btn-add-quote {
    width: 100%;
    padding: 1rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-add-quote:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .deuren-configurator {
        grid-template-columns: 1fr;
    }
    
    .config-sidebar {
        position: static;
    }
    
    .profile-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dimensions-row {
        grid-template-columns: 1fr;
    }
    
    .profile-selector {
        grid-template-columns: 1fr;
    }
    
    .color-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}