/**
 * File: your-theme/assets/css/configurator.css
 * 
 * MU35 Configurator Styles
 */

/* Main Container */
.mu35-configurator {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Viewer Section */
.mu35-viewer-section {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.mu35-image-viewer {
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
}

.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: #fff;
}

.mu35-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.image-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Thumbnails */
.image-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
}

.thumb-btn {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    padding: 0;
}

.thumb-btn:hover {
    border-color: #999;
}

.thumb-btn.active {
    border-color: #000;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floor Plan */
.floorplan-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.floorplan-section h3 {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
}

.floorplan-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Configuration Panel */
.mu35-config-panel {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Product Header */
.product-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.product-title {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.base-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.base-price .label {
    font-size: 14px;
    color: #666;
}

.base-price .amount {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

/* Steps Navigation */
.steps-navigation {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.step-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    background: #f8f8f8;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.step-nav-btn:hover {
    background: #f0f0f0;
}

.step-nav-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
}

.step-nav-btn.active .step-number {
    background: rgba(255,255,255,0.2);
}

.step-label {
    text-align: center;
    font-weight: 500;
}

/* Configuration Steps */
.config-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.config-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.step-description {
    margin: 0 0 25px;
    color: #666;
    font-size: 15px;
}

/* Color Swatches */
.color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.swatch-button {
    position: relative;
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.color-swatch:hover .swatch-button {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.color-swatch.selected .swatch-button {
    border-color: #000;
    transform: scale(1.05);
}

.swatch-checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.color-swatch.selected .swatch-checkmark {
    opacity: 1;
}

.swatch-label {
    font-size: 13px;
    text-align: center;
    color: #333;
    font-weight: 500;
}

/* Interior Options */
.interior-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.interior-option {
    cursor: pointer;
}

.option-card {
    position: relative;
    padding: 20px;
    background: #f8f8f8;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.interior-option:hover .option-card {
    background: #f0f0f0;
    border-color: #ccc;
}

.interior-option.selected .option-card {
    background: #fff;
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.option-image {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.option-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.option-description {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.option-checkmark {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.interior-option.selected .option-checkmark,
.core-option.selected .option-checkmark {
    opacity: 1;
    transform: scale(1);
}

/* Core Options */
.core-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.core-option {
    cursor: pointer;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.option-price {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.option-features {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.option-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.option-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

/* Extras List */
.extras-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.extra-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f8f8;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.extra-item:hover {
    background: #f0f0f0;
}

.extra-item:has(.extra-checkbox:checked) {
    background: #fff;
    border-color: #000;
}

.extra-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #000;
}

.extra-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.extra-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.extra-description {
    font-size: 13px;
    color: #666;
}

.extra-price {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

/* Pricing Summary */
.pricing-summary {
    margin: 30px 0;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 10px;
}

.pricing-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.price-row.total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #ddd;
    font-size: 18px;
    font-weight: 700;
}

.price-label {
    color: #666;
}

.price-row.total .price-label {
    color: #000;
}

.price-value {
    font-weight: 600;
    color: #000;
}

.total-amount {
    font-size: 24px;
    transition: all 0.3s ease;
}

.total-amount.price-updated {
    color: #4CAF50;
    transform: scale(1.1);
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #000;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    border-color: #000;
    background: #f8f8f8;
}

/* Additional Info */
.additional-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.info-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.info-link:hover {
    background: #e8e8e8;
}

.info-link .icon {
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mu35-configurator {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .mu35-viewer-section {
        position: relative;
        top: 0;
    }

    .mu35-config-panel {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .mu35-configurator {
        padding: 20px 10px;
    }

    .mu35-config-panel {
        padding: 20px;
    }

    .steps-navigation {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-title {
        font-size: 24px;
    }

    .step-title {
        font-size: 20px;
    }

    .color-swatches {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-image-container {
        aspect-ratio: 4/3;
    }

    .steps-navigation {
        gap: 8px;
    }

    .step-nav-btn {
        padding: 10px 5px;
        font-size: 11px;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .color-swatches {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .swatch-button {
        width: 50px;
        height: 50px;
    }
}