/* Configurator Styles */
.configurator-section {
    background-color: var(--color-bg-alt);
    /* Slightly distinct background */
    border-top: 1px solid var(--color-border);
}

.configurator-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    align-items: start;
}

/* Steps */
.config-step {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
    /* For smooth scroll offset */
}

.step-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-badge {
    background: #000;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Option Card */
.option-card {
    position: relative;
    background: var(--color-bg-card);
    border: 2px solid transparent;
    /* Prepare for selected state */
    border-radius: var(--radius-md);
    padding: 24px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}

.option-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Hide Radio Input */
.option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Selected State - The "Apple" Magic */
/* Logic handled in js keying off .selected class */

.option-card:has(.option-input:checked),
.option-card.selected {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
    /* Glow ring */
}

.option-title {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.option-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-bottom: 16px;
}

.option-price {
    display: block;
    font-weight: 500;
    margin-top: auto;
    /* Push to bottom */
}

/* Sidebar Summary */
.configurator-sidebar {
    height: 100%;
}

.summary-card {
    background: var(--color-bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle rim */
}

@media (min-width: 901px) {
    .sticky {
        position: sticky;
        top: 100px;
        /* Offset for header */
    }
}

.summary-card h3 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.summary-items {
    min-height: 100px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
}

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

.summary-row-price {
    font-weight: 500;
}

.summary-row.pending {
    opacity: 0.6;
    font-style: italic;
    color: var(--color-text-secondary);
}

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

.summary-row.pending .summary-row-price {
    font-size: 0.8rem;
    font-weight: 400;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.trust-list {
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.trust-list li {
    margin-bottom: 6px;
}

/* Empty State */
.empty-state {
    color: var(--color-text-secondary);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Configurator */
@media (max-width: 900px) {
    .configurator-layout {
        grid-template-columns: 1fr;
    }

    .configurator-sidebar {
        order: -1;
        /* Show summary on top on mobile? or sticky bottom? */
        /* Common pattern: Sticky bottom bar for mobile, but let's keep it simple top for now
           or let it follow flow. Let's put it at the bottom of the section. */
        order: 1;
        margin-top: 40px;
    }

    .sticky {
        position: static;
    }
}

/* Design Mini Catalog */
.design-catalog-wrapper {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    animation: slideDown 0.4s ease-out;
}

.design-catalog-wrapper.hidden {
    display: none;
}

.catalog-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--color-text-secondary);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.catalog-item {
    aspect-ratio: 16/10;
    border-radius: var(--radius-sm);
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    /* Text at bottom */
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
    padding-bottom: 8px;
    cursor: pointer;
    /* Clickable */
}

.catalog-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
    color: var(--color-text-primary);
}

.catalog-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
    backdrop-filter: blur(2px);
}

.catalog-item:hover .catalog-hover-overlay {
    opacity: 1;
}

/* SKELETONS for different types */
.skeleton {
    width: 80%;
    background: rgba(0, 0, 0, 0.06);
    position: absolute;
    top: 15%;
    left: 10%;
}

/* Type: Landing (Header + Hero) */
.sk-landing-header {
    top: 10%;
    height: 10%;
    width: 80%;
    left: 10%;
    border-radius: 2px;
}

.sk-landing-hero {
    top: 25%;
    height: 40%;
    width: 80%;
    left: 10%;
    border-radius: 2px;
}

/* Type: Ecommerce (Header + Grid) */
.sk-ecom-header {
    top: 10%;
    height: 10%;
    width: 80%;
    left: 10%;
    border-radius: 2px;
}

.sk-ecom-grid {
    top: 25%;
    height: 40%;
    width: 80%;
    left: 10%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.sk-child {
    background: currentColor;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    border-radius: 2px;
}

/* Type: Dashboard/Creative (Sidebar + Content) */
.sk-dash-side {
    top: 10%;
    height: 60%;
    width: 20%;
    left: 10%;
    border-radius: 2px;
}

.sk-dash-main {
    top: 10%;
    height: 60%;
    width: 55%;
    left: 35%;
    border-radius: 2px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Enhanced Option Cards (Middle Ground) --- */

.option-card {
    /* Cleaner look, less bulky */
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    /* Softer shadow */
    justify-content: flex-start;
    height: 100%;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border added */
}

.option-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    /* Less movement */
}

/* Selected State Override */
.option-card:has(.option-input:checked),
.option-card.selected {
    border-color: var(--color-accent);
    background-color: var(--color-bg-card);
    box-shadow: 0 0 0 2px var(--color-accent), 0 8px 20px rgba(0, 113, 227, 0.1);
}

/* Feature List - More Compact */
.option-features {
    list-style: none;
    margin: 0;
    padding: 12px 0 0 0;
    border-top: 1px solid var(--color-border);
    flex-grow: 1;
}

.option-features li {
    font-size: 0.8rem;
    /* Smaller text */
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    /* Tighter spacing */
    display: flex;
    align-items: center;
    gap: 6px;
}

.option-features li::before {
    content: '•';
    /* Bullet instead of Checkmark for cleaner look */
    color: var(--color-accent);
    font-weight: bold;
    font-size: 1.2em;
    line-height: 1;
}

/* Badges - Slightly smaller */
.badge-recommended {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25);
    z-index: 10;
}

/* Icons for Steps - Smaller */
.card-icon {
    font-size: 1.4rem;
    /* Reduced from 1.8rem */
    margin-bottom: 12px;
    display: inline-block;
}

.option-desc {
    min-height: auto;
    /* Remove forced height to reduce whitespace */
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.option-title {
    font-size: 1.1rem;
    /* Slightly smaller title */
}

.option-price {
    font-size: 1rem;
    margin-bottom: 12px;
}