/* Layout Principal - Split View (Dark Theme) */
.config-body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; /* CarHub Identity */
    color: #ffffff;
    background-color: #050505;
    overflow-x: hidden;
    overflow-y: auto; /* native browser scrolling! */
}

/* Compensar el navbar global */
#navbar-container {
    height: 100px;
}

/* Forzar el navbar a ser negro puro */
.navbar {
    background-color: #050505 !important;
    border-bottom: 1px solid #222 !important;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.configurator-layout {
    display: flex;
    align-items: flex-start; /* Permite que el sidebar crezca hacia abajo */
    width: 100%;
    margin-top: 100px; 
}

/* Left Panel */
.configurator-viewer {
    flex: 1 1 70%;
    position: sticky; /* Fija el coche en pantalla */
    top: 100px;
    height: calc(100vh - 100px);
    background: radial-gradient(circle at center, #1f1f1f 0%, #050505 100%); 
    display: flex;
    flex-direction: column;
}

model-viewer#car-model {
    width: 100%;
    flex: 1; 
    --poster-color: transparent;
    outline: none;
}

.viewer-actions {
    position: absolute;
    bottom: 100px;
    left: 40px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.action-btn {
    width: 44px;
    height: 44px;
    background: #151515;
    border: 1px solid #333;
    border-radius: 4px; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s, border-color 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

.action-btn:hover {
    background: #222;
    border-color: #555;
}

.open-360-btn {
    position: absolute;
    bottom: 100px;
    right: 40px;
    background: #fff;
    color: #000;
    border: 1px solid transparent;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}
.open-360-btn:hover {
    background: #e0e0e0;
}

/* Thumbnails */
.thumbnails-container {
    height: 90px;
    display: flex;
    gap: 15px;
    padding: 0 40px 20px 40px;
    align-items: center;
    overflow-x: auto;
}

.thumbnail-btn {
    border: 2px solid transparent;
    background: transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    height: 60px;
    min-width: 90px;
    transition: border-color 0.2s;
}
.thumbnail-btn.active {
    border-color: #fff;
}
.thumbnail-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111;
}
.thumbnail-nav {
    border: 1px solid #333;
    background: #151515;
    color: #fff;
    width: 30px;
    height: 60px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.thumbnail-nav:hover {
    background: #222;
}

/* Right Panel - Sidebar */
.configurator-sidebar {
    flex: 0 0 350px;
    min-width: 350px;
    max-width: 500px;
    background: #0f0f0f;
    border-left: 1px solid #222;
    padding: 25px 35px;
    box-shadow: -2px 0 25px rgba(0,0,0,0.5);
    z-index: 2;
}

.sidebar-header {
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.sidebar-price-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 10px;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-resumen {
    background: #151515;
    border: 1px solid #444;
    color: #fff;
    padding: 10px 15px;
    font-weight: 600;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-resumen:hover {
    background: #222;
    border-color: #fff;
}

.btn-solicitar {
    background: #fff;
    color: #000;
    border: 1px solid #fff;
    padding: 10px 15px;
    font-weight: 600;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-solicitar:hover {
    background: #e0e0e0;
}

.price-disclaimer {
    color: #888;
    font-size: 0.8rem;
    margin-top: 5px;
}

.sidebar-title h1 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

.year-badge {
    display: inline-block;
    border: 1px solid #444;
    background: #151515;
    padding: 3px 8px;
    font-size: 0.85rem;
    color: #ccc;
    margin: 10px 0;
    border-radius: 4px;
}

.technical-data-link {
    display: block;
    color: #fff;
    text-decoration: underline;
    font-size: 0.95rem;
    margin-bottom: 30px;
    transition: color 0.2s;
}
.technical-data-link:hover {
    color: #ccc;
}

.recommendation-banner {
    background: #151515;
    border: 1px solid #222;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
    cursor: pointer;
    margin-bottom: 30px;
    transition: background 0.2s, border-color 0.2s;
}
.recommendation-banner:hover {
    background: #222;
    border-color: #444;
}
.banner-img {
    width: 70px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
}
.banner-text {
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
    line-height: 1.3;
}
.banner-arrow {
    font-weight: 700;
    color: #888;
}

.search-bar {
    display: flex;
    align-items: center;
    border: 1px solid #333;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 30px;
    background: #111;
}
.search-bar svg {
    color: #888;
}
.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    margin-left: 10px;
    font-size: 0.95rem;
    background: transparent;
    color: #fff;
}
.search-bar input::placeholder {
    color: #888;
}

/* Accordions */
.config-accordion {
    border-top: 1px solid #222;
}
.config-accordion:last-of-type {
    border-bottom: 1px solid #222;
}

.config-accordion summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    cursor: pointer;
    padding: 25px 0;
}
.config-accordion summary::-webkit-details-marker {
    display: none;
}
.config-accordion h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}
.accordion-icon {
    width: 18px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: background 0.2s;
}
.config-accordion:not([open]) .accordion-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 18px;
    background: #fff;
    top: -8px;
    left: 8px;
}

.config-accordion-content {
    padding-bottom: 25px;
    animation: fadeIn 0.4s ease;
    position: static;
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Colors Categories */
.color-category {
    margin-bottom: 30px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.category-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
}
.category-price {
    color: #888;
    font-size: 0.95rem;
}
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #888;
    border-radius: 50%;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s, border-color 0.2s;
}
.info-icon:hover {
    color: #fff;
    border-color: #fff;
}

.category-subtitle {
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
}

.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Swatches */
.swatch {
    width: 70px;
    height: 70px;
    border: 2px solid transparent; 
    border-radius: 8px;
    padding: 3px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
}

.swatch:hover {
    transform: scale(1.03); 
    border-color: #555;
}

.swatch.active {
    border-color: #fff;
}

.swatch-inner {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.5); 
    overflow: hidden;
    position: relative;
}

.split-color {
    display: flex;
    flex-direction: column;
}
.split-top, .split-bottom {
    flex: 1;
    width: 100%;
}
.stitch-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
    border-top: 2px dashed #999; 
}

.w-100 { width: 100%; }
.mt-20 { margin-top: 20px; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .configurator-layout {
        flex-direction: column;
        height: auto;
    }
    .configurator-viewer {
        height: 50vh;
        flex: none;
        position: relative;
        top: 0;
    }
    .configurator-sidebar {
        flex: none;
        width: 100%;
        max-width: none;
        border-left: none;
        padding: 20px;
        box-sizing: border-box;
    }
}

/* Purchase Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #0f0f0f;
    border: 1px solid #222;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    color: #fff;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}
.modal-content p {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input {
    padding: 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #1a1a1a;
    color: #fff;
}
.modal-content input::placeholder {
    color: #888;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.modal-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.modal-btn.cancel {
    background: #222;
    color: #fff;
    border: 1px solid #444;
}
.modal-btn.cancel:hover {
    background: #333;
}

.modal-btn.confirm {
    background: #fff;
    color: #000;
}
.modal-btn.confirm:hover {
    background: #e0e0e0;
}