/* ============================================
   Studio Series Configurator Styles
   Matches site aesthetic: Dark, Gold, Clean.
   ============================================ */

/* ============================================
   CONFIGURATOR LAYOUT
   ============================================ */

.configurator-section {
    padding-top: calc(var(--header-height) + var(--space-sm));
    padding-bottom: var(--space-lg);
}

.configurator-section .container {
    max-width: 1320px;
}

/* Zone toggles: only one zone visible at a time */
.configurator-step0 {
    display: none;
}

.configurator-step0.active {
    display: block;
}

.configurator-step0 .step-panel-title,
.configurator-step0 .step-panel-desc {
    text-align: center;
}

.configurator-split {
    display: none;
}

.configurator-split.active {
    display: block;
}

/* Split layout: product panel (left 360px) + options (right) */
.configurator-split-inner {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.config-controls {
    min-width: 0; /* prevent grid blowout */
}

@media (max-width: 1200px) {
    .configurator-split-inner {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRODUCT PANEL (sticky left column)
   ============================================ */

.product-panel {
    position: sticky;
    top: calc(var(--header-height) + 55px);
    z-index: 10;
}

.product-panel-inner {
    background: rgba(35, 41, 56, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.product-panel-image {
    margin-bottom: var(--space-md);
    text-align: center;
}

.product-panel-image img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    opacity: 0.9;
}

.product-panel-image:empty {
    display: none;
}

.build-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.build-name {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: var(--space-sm);
}

@media (max-width: 1200px) {
    .product-panel {
        position: static;
    }

    .product-panel-inner {
        display: flex;
        align-items: center;
        gap: var(--space-md);
        padding: var(--space-sm) var(--space-md);
    }

    .product-panel-image {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .product-panel-image img {
        max-height: 80px;
    }

    /* Hide full summary on mobile, show only build name */
    .product-panel-summary .summary-list,
    .product-panel-summary .price-display,
    .product-panel-summary .actions {
        display: none;
    }
}

/* ============================================
   STEP TRACKER (sticky, pill/segment style)
   ============================================ */

.step-tracker-container {
    position: sticky;
    top: var(--header-height);
    z-index: 15;
    padding: 0.75rem 0;
    margin-bottom: var(--space-sm);
    background: var(--bg-main);
}

.step-tracker {
    display: flex;
    max-width: 960px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.step-chevron {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    font-family: var(--font-body);
    font-size: 0.82rem;
}

.step-chevron:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.step-chevron.active {
    background: rgba(197, 160, 89, 0.12);
    color: var(--gold-primary);
    font-weight: 600;
}

/* Gold underline on active step */
.step-chevron.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 1px;
}

.step-chevron.completed {
    color: var(--gold-muted);
}

.step-chevron.future {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Model step (step 0) — neutral colour */
.step-chevron.step-model.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.step-chevron.step-model.active::after {
    background: var(--text-secondary);
}

.step-chevron.step-model.completed {
    color: var(--gold-muted);
}

.step-chevron-number {
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 1.25rem;
    text-align: center;
}

.step-chevron-label {
    white-space: nowrap;
}

/* Completed: checkmark replaces number */
.step-chevron.completed .step-chevron-number {
    font-size: 0;
}

.step-chevron.completed .step-chevron-number::before {
    content: '\2713';
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .step-chevron-label {
        display: none;
    }

    .step-chevron {
        padding: 0.5rem;
    }

    .step-chevron-number {
        font-size: 0.85rem;
    }
}

/* ============================================
   STEP PANELS
   ============================================ */

.step-viewport {
    width: 100%;
}

.step-panel {
    display: none;
    padding: 0 0.25rem;
}

.step-panel.active {
    display: block;
}

.step-panel-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.step-panel-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

/* Step navigation (inside each panel) */
.step-panel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    margin-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.step-nav-left,
.step-nav-right {
    display: flex;
    align-items: center;
}

.step-nav-back {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    font-family: var(--font-body);
}

.step-nav-back:hover {
    color: var(--text-primary);
}

.step-nav-continue {
    min-width: 160px;
}

/* ============================================
   PRESET CARDS (Step 0 model picker)
   ============================================ */

.preset-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1200px) {
    .preset-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .preset-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Divider between presets and custom */
.preset-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem auto 1rem;
    max-width: 400px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.preset-divider::before,
.preset-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.preset-cross-link {
    text-align: center;
    margin-top: 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.preset-cross-link a {
    color: var(--gold-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.preset-cross-link a:hover {
    border-bottom-color: var(--gold-primary);
}

.preset-card {
    background: rgba(35, 41, 56, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    padding: 1rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.preset-card:hover {
    transform: translateY(-3px);
    border-color: rgba(197, 160, 89, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.preset-card.featured {
    border-color: rgba(255, 255, 255, 0.18);
}

.preset-card.selected {
    border-color: var(--gold-primary);
    background: rgba(35, 41, 56, 0.85);
    box-shadow:
        0 0 18px rgba(197, 160, 89, 0.25),
        0 0 40px rgba(197, 160, 89, 0.08);
}

.preset-card.selected .preset-card-cta {
    background: var(--gold-primary);
    color: var(--bg-main);
}

/* Beauty shot image at top of preset card (added by JS step 5) */
.preset-card-image {
    width: calc(100% + 2rem);
    margin: -1rem -1rem 0.75rem;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    background: rgba(0, 0, 0, 0.2);
}

.preset-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    mask-image: radial-gradient(ellipse 90% 80% at center 50%, black 45%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at center 50%, black 45%, transparent 85%);
}

.preset-card:hover .preset-card-image img {
    transform: scale(1.03);
}

.preset-card-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gold-primary);
    color: var(--bg-main);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 2;
}

.preset-card-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.25rem;
}

.preset-card-tagline {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
    min-height: 2.2em;
}

.preset-card-specs {
    margin-bottom: 0.5rem;
}

.preset-card-spec {
    margin-bottom: 0.25rem;
}

.preset-card-spec strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.preset-card-spec.secondary {
    margin-top: 0.15rem;
}

.preset-card-spec.secondary strong {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.preset-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.preset-card-price {
    margin-bottom: 0.6rem;
}

.preset-card-price-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.1rem;
}

.preset-card-price-value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--gold-primary);
    letter-spacing: 0.05em;
}

/* Custom card variant — horizontal layout below main grid */
.preset-card--custom {
    border-style: dashed;
    flex-direction: row;
    text-align: left;
    align-items: stretch;
    margin-top: 1.25rem;
    padding: 0;
    overflow: hidden;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
}

.preset-card--custom .preset-card-image {
    width: 200px;
    min-width: 200px;
    aspect-ratio: auto;
    margin: 0;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    align-self: stretch;
}

.preset-card--custom-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    flex: 1;
}

.preset-card--custom .preset-card-footer {
    align-items: flex-start;
    margin-top: 0.75rem;
}

.preset-card--custom:hover {
    border-style: solid;
}

.preset-card--custom.selected {
    border-style: solid;
}

@media (max-width: 600px) {
    .preset-card--custom {
        flex-direction: column;
        text-align: center;
    }
    .preset-card--custom .preset-card-image {
        width: calc(100% + 0px);
        min-width: auto;
        aspect-ratio: 16 / 9;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    .preset-card--custom .preset-card-footer {
        align-items: center;
    }
}

/* ============================================
   CONFIG SECTIONS & CARDS (compact)
   ============================================ */

.config-section {
    margin-bottom: var(--space-xl);
}

.config-section-title {
    font-family: var(--font-display);
    color: var(--gold-primary);
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-sm);
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: var(--space-sm);
}

/* Option Cards — compact */
.config-card {
    background: rgba(35, 41, 56, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    padding: 0.8rem 0.6rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.config-card:hover {
    background: rgba(35, 41, 56, 0.7);
    border-color: rgba(197, 160, 89, 0.25);
    transform: translateY(-2px);
}

.config-card.selected {
    border-color: var(--gold-primary);
    background: rgba(35, 41, 56, 0.85);
    box-shadow:
        0 0 18px rgba(197, 160, 89, 0.25),
        0 0 40px rgba(197, 160, 89, 0.08);
}

.config-card.selected .card-image img {
    filter: drop-shadow(0 0 12px rgba(197, 160, 89, 0.35));
}

.card-image {
    height: 100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
}

.card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: filter 0.25s ease;
}

.card-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.card-price {
    font-size: 0.75rem;
    color: var(--gold-accent);
}

.card-price-included {
    color: var(--text-muted);
    font-style: italic;
}

/* Checkbox indicator */
.card-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.config-card.selected .card-check {
    border-color: var(--gold-primary);
    background: var(--gold-primary);
}

.card-check-icon {
    display: none;
    color: var(--bg-main);
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 1;
}

.config-card.selected .card-check-icon {
    display: block;
}

/* Display-only cards (ui_pattern 3) */
.config-card.display-only {
    cursor: default;
}

.config-card.display-only:hover {
    transform: none;
}

.config-card.display-only .card-check {
    display: none;
}

/* ============================================
   BUILD SUMMARY (inside product panel)
   ============================================ */

.summary-list {
    list-style: none;
    margin-bottom: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) 0;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.summary-divider {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin: 0.3rem 0;
}

.summary-label {
    color: var(--text-secondary);
}

.summary-val {
    color: var(--text-primary);
    text-align: right;
    font-weight: 500;
    max-width: 60%;
}

/* Sidebar placeholder (before model selected) */
.summary-placeholder {
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    padding: var(--space-md) 0;
}

.price-display {
    text-align: center;
    margin-bottom: var(--space-md);
}

.total-price {
    display: block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold-primary);
    line-height: 1;
}

.vat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.btn-full {
    width: 100%;
    text-align: center;
}

@keyframes btn-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}
.btn-shake { animation: btn-shake 0.4s ease; }

/* Toast notification */
.config-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: #1A1F2C;
    color: #C5A059;
    border: 1px solid #C5A059;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

.config-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   COLLAPSIBLE SPEC DETAILS
   ============================================ */

.spec-disclosure {
    margin-top: var(--space-sm);
}

.spec-disclosure-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.4rem 0;
    font-family: var(--font-body);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.spec-disclosure-toggle:hover {
    color: var(--text-primary);
}

.spec-disclosure-toggle .chevron {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.spec-disclosure.open .spec-disclosure-toggle .chevron {
    transform: rotate(90deg);
}

.spec-disclosure-content {
    display: none;
}

.spec-disclosure-content.config-component-desc {
    margin-top: 0;
    padding-top: 0.25rem;
}

.spec-disclosure.open .spec-disclosure-content {
    display: block;
}

/* ============================================
   COMPONENT & SLOT DESCRIPTIONS
   ============================================ */

.config-component-desc {
    margin-top: var(--space-md);
    padding: var(--space-md) 0;
    color: var(--text-primary);
    font-size: 0.88rem;
    line-height: 1.7;
}

.config-component-desc p {
    margin-bottom: 0.6em;
}

.config-component-desc p:last-child {
    margin-bottom: 0;
}

.config-component-desc strong {
    color: var(--text-primary);
    font-weight: 600;
}

.config-component-desc ul,
.config-component-desc ol {
    margin: 0.5em 0 0.75em 1.25em;
    padding-left: 0.5em;
}

.config-component-desc ul {
    list-style-type: disc;
}

.config-component-desc li {
    margin-bottom: 0.3em;
    display: list-item;
}

.config-component-desc a {
    color: var(--gold-primary);
    text-decoration: underline;
    text-decoration-color: rgba(197, 160, 89, 0.4);
}

.config-component-desc a:hover {
    text-decoration-color: var(--gold-primary);
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.config-section-header {
    margin-bottom: var(--space-md);
}

.config-section-image {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
    opacity: 0.85;
}

.config-section-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* ============================================
   TWO-PART SUBCATEGORY TABS
   ============================================ */

.subcategory-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.subcategory-tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.subcategory-tab:hover {
    border-color: rgba(197, 160, 89, 0.4);
    color: var(--text-primary);
}

.subcategory-tab.active {
    background: rgba(197, 160, 89, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.subcategory-tab.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: rgba(255, 255, 255, 0.05);
}

.subcategory-tab.disabled:hover {
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* ============================================
   MOBILE STICKY PRICE BAR
   ============================================ */

.mobile-price-bar {
    display: none;
}

@media (max-width: 1200px) {
    .mobile-price-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 20;
        background: var(--bg-darker);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0.75rem var(--space-md);
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    }

    .mobile-price-bar .mobile-price {
        font-family: var(--font-display);
        font-size: 1.4rem;
        color: var(--gold-primary);
    }

    .mobile-price-bar .mobile-vat {
        font-size: 0.7rem;
        color: var(--text-muted);
        display: block;
    }

    /* Extra bottom padding to clear the sticky bar */
    .configurator-section {
        padding-bottom: 80px;
    }
}

/* ============================================
   ERROR STATE
   ============================================ */

.error-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--text-secondary);
}

.error-state h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}
