* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

/* Theme */
:root {
    --brand-green: #064e44;
    --brand-green-hover: #0a6b5f;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0c0a09;
    background-color: #ffffff;
    padding: 20px;
}

h1 {
    font-size: 40px;
    font-weight: 300;
    margin-bottom: 40px;
    max-width: 480px;
}

h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 16px;
}

h3 {
    font-size: 18px;
    font-weight: 500;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
    gap: 40px;
    position: relative;
}

.left-panel {
    width: 480px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.model-viewer {
    flex: 1;
    position: relative;
    height: 680px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

#model-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.component-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.component-item {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.component-header {
    display: flex;
    align-items: center;
    width: 100%;
}

.component-number {
    font-family: 'Geist Mono', monospace;
    font-size: 16px;
    font-weight: 400;
    color: #999;
    width: 40px;
    opacity: 0.6;
}

.component-item.active .component-number {
    color: #e11d48;
    opacity: 1;
}

.component-item h3 {
    font-size: 16px;
    font-weight: 400;
    color: #777;
    margin-left: 5px;
}

.component-item.active h3 {
    color: #000;
    font-weight: 500;
}

.component-description {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    width: 100%;
    padding-left: 45px;
    display: none;
}

.component-item.active .component-description {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: var(--brand-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn:hover {
    background: var(--brand-green-hover);
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--brand-green);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--brand-green-hover);
}

/* House list */
#screen-houses .filters {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 14px;
    color: #444;
}

select, input, textarea {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

/* Range slider */
/* Dual handle slider layout */
.range-group .range-dual {
    position: relative;
    height: 24px;
    margin-top: 6px;
}

.range-group .range-track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    transform: translateY(-50%);
}

.range-group .range-fill {
    position: absolute;
    top: 50%;
    height: 6px;
    background: var(--brand-green);
    border-radius: 999px;
    transform: translateY(-50%);
}

.range-group .range-values {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #374151;
    margin-top: 6px;
}

input.range {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    pointer-events: none; /* allow thumbs only */
    left: 0;
    top: 0;
    width: 100%;
    height: 24px;
    background: none;
    margin: 0;
    outline: none;
}

input.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-green);
    cursor: pointer;
    pointer-events: auto;
}

input.range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-green);
    cursor: pointer;
    pointer-events: auto;
}

/* Toggle buttons */
.toggle-group {
    display: inline-flex;
    gap: 8px;
}

.toggle-btn {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

.toggle-btn.active {
    background: var(--brand-green);
    color: #fff;
    border-color: var(--brand-green);
}

.house-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.house-card {
    border: 1px solid #f1f1f1;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.house-media.placeholder {
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.house-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
}

.house-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.house-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Builder layout */
#screen-builder {
    display: grid;
    grid-template-columns: 480px 1fr 560px;
    gap: 24px;
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.options-panel {
    border-left: 1px solid #f1f1f1;
    padding-left: 24px;
}

.option-group {
    margin-bottom: 16px;
}

.swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.swatch {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

.swatch.active {
    border-color: #0f172a;
    box-shadow: 0 0 0 2px rgba(15,23,42,0.1);
}

.hint {
    color: #6b7280;
    font-size: 12px;
}

/* Checkout */
#screen-checkout .checkout-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.summary {
    border: 1px solid #f1f1f1;
    border-radius: 12px;
    padding: 24px;
}

/* Selection screen layout adjustments */
#screen-houses {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

#summary-thumb {
    width: 100%;
    max-width: 560px;
    height: auto;
    border-radius: 8px;
    margin-top: 12px;
    margin-bottom: 16px;
}

#screen-checkout h2 { font-size: 28px; }
#screen-checkout h3 { font-size: 20px; margin-top: 12px; }
#screen-checkout p { font-size: 18px; }
#summary-steps, #summary-options { font-size: 16px; }

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .left-panel {
        width: 100%;
    }
    
    .model-viewer {
        height: 400px;
    }
    
    .house-grid {
        grid-template-columns: 1fr;
    }
    
    #screen-builder {
        grid-template-columns: 1fr;
    }
    
    #screen-checkout .checkout-layout {
        grid-template-columns: 1fr;
    }
}