:root {
    --text-primary: #171a20;
    --text-secondary: #5c5e62;
    --bg-primary: #f4f4f4;
    --bg-secondary: #ffffff;
    --border-color: #d0d1d2;
    --border-light: #e2e3e3;
    --btn-border: #d0d1d2;
    --btn-active-border: #3e6ae1;
    --btn-active-shadow: rgba(62, 106, 225, 0.2);
    --blue-primary: #3e6ae1;
    --blue-hover: #3457b1;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 48px;
    background-color: transparent;
    z-index: 100;
    transition: background-color var(--transition-speed) ease;
}

.navbar:hover {
    background-color: var(--bg-secondary);
}

.logo svg {
    fill: var(--text-primary);
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo svg:hover {
    opacity: 0.7;
}

nav {
    display: none;
}

.menu-link {
    display: inline-block;
}

@media (min-width: 1200px) {
    nav {
        display: flex;
        gap: 32px;
    }

    .menu-link {
        display: none !important;
    }
}

nav a,
.right-nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color var(--transition-speed) ease;
}

nav a:hover,
.right-nav a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.right-nav {
    display: flex;
    gap: 8px;
}

/* Layout */
.configurator {
    display: flex;
    height: 100vh;
    padding-top: 56px;
    /* Space for navbar */
    padding-bottom: 96px;
    /* Space for order bar */
}

/* Left side - Visualizer */
.visualizer {
    flex: 1 1 70%;
    position: relative;
    background: linear-gradient(180deg, #f7f7f7 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.image-container img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* Helps image blend with background */
    animation: slideIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.1));
}

@keyframes slideIn {
    0% {
        transform: translateX(50px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Right side - Details Panel */
.details-panel {
    flex: 1 1 30%;
    max-width: 480px;
    padding: 32px 48px 120px 48px;
    overflow-y: scroll;
    height: 100%;
    background-color: var(--bg-secondary);
}

.model-title {
    text-align: center;
    font-size: 40px;
    font-weight: 500;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

.specs-hero {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    text-align: center;
}

.spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spec-value {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
}

.spec-unit {
    font-size: 14px;
    font-weight: 500;
    margin-left: 2px;
}

.spec-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-speed);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* Options */
.trim-selector {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.trim-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    width: 100%;
}

.trim-option:hover {
    border-color: #8e8e8e;
}

.trim-option.active {
    border-color: var(--btn-active-border);
    box-shadow: inset 0 0 0 1px var(--btn-active-border);
}

.trim-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.trim-price {
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background-color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 32px;
    transition: background-color var(--transition-speed);
}

.feature-link:hover {
    background-color: #e5e5e5;
}

.feature-list h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

.feature-list ul {
    list-style-type: none;
}

.feature-list li {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    position: relative;
    padding-left: 16px;
}

.feature-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

/* New Configuration Options */
.options-section {
    margin-top: 48px;
    border-top: 1px solid var(--border-light);
    padding-top: 32px;
}

.option-group {
    margin-bottom: 40px;
}

.option-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 24px;
    text-align: center;
}

.option-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.option-selected-name {
    font-size: 16px;
    font-weight: 500;
}

.option-selected-price {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Color & Interior Pickers */
.color-picker-circles,
.wheel-picker-circles {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.color-btn,
.interior-btn,
.wheel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: transform 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.wheel-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
}

.wheel-icon {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
}

/* Fallback icons using CSS gradients to look like wheels */
.wheel-icon.gemini {
    background: repeating-conic-gradient(from 0deg, #555 0deg 20deg, #ccc 20deg 40deg);
}

.wheel-icon.induction {
    background: repeating-conic-gradient(from 10deg, #222 0deg 15deg, #111 15deg 30deg);
}

.color-btn:hover,
.interior-btn:hover,
.wheel-btn:hover {
    transform: scale(1.05);
}

.color-btn.active::after,
.interior-btn.active::after,
.wheel-btn.active::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 2px solid var(--blue-primary);
    border-radius: 50%;
}

.wheel-btn.hidden {
    display: none;
}

/* Accessories Checkboxes */
.accessories-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accessory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    transition: border-color var(--transition-speed);
}

.accessory-item:hover {
    border-color: #8e8e8e;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover input~.checkmark {
    border-color: var(--blue-primary);
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--blue-primary);
    border-color: var(--blue-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.acc-price {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Bottom Order Bar */
.order-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 96px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 48px;
}

.price-details {
    display: flex;
    flex-direction: column;
}

.total-price {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
}

.price-note {
    font-size: 12px;
    color: var(--text-secondary);
}

.order-button {
    background-color: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 48px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-button:hover {
    background-color: var(--blue-hover);
}

/* Responsive */
@media (max-width: 900px) {
    .configurator {
        flex-direction: column;
        height: auto;
    }

    .visualizer {
        height: 50vh;
        flex: none;
    }

    .details-panel {
        flex: none;
        max-width: 100%;
        padding: 32px 24px 120px 24px;
    }

    .order-summary {
        padding: 0 24px;
    }

    .order-button {
        padding: 10px 24px;
    }

    .price-details {
        align-items: flex-start;
    }

    .navbar {
        padding: 0 24px;
    }
}

/* Checkout Section */
.checkout-section {
    display: none;
    /* Hidden by default */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.checkout-section.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.checkout-title {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 8px;
}

.checkout-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.checkout-summary-box {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.total-row {
    font-size: 18px;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.summary-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* Checkout Form */
.form-section {
    margin-bottom: 40px;
}

.form-section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    background-color: transparent;
    transition: border-color var(--transition-speed);
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 1px var(--blue-primary);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group.half {
    flex: 1;
}

.final-checkout-btn {
    width: 100%;
    background-color: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

.final-checkout-btn:hover {
    background-color: var(--blue-hover);
}

/* Mobile Menu Overlay Styles */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff !important;
    z-index: 10000;
    display: none;
    flex-direction: column;
    opacity: 1 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.overlay-header {
    display: flex;
    justify-content: flex-end;
    padding: 24px 32px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 36px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 10px;
    line-height: 1;
}

.overlay-nav {
    display: flex !important;
    /* Force display in overlay */
    flex-direction: column;
    padding: 20px 48px;
    gap: 24px;
}

.overlay-link {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 500;
    padding: 8px 0;
    width: 100%;
    transition: opacity 0.2s;
}

.overlay-link:hover {
    opacity: 0.6;
}