/* ============================================
   SofaBed Configurator – Custom Styles
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CARD CONTAINER
   ============================================ */
.card {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.06),
        0 12px 40px rgba(0,0,0,0.04);
    overflow: hidden;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.card-header {
    text-align: center;
    padding: 2rem 1.5rem 0.5rem;
}

.card-footer {
    text-align: center;
    padding: 1rem 1.5rem 1.5rem;
}

/* ============================================
   STEP TRANSITIONS
   ============================================ */
.step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    width: 100%;
}

.step.active {
    display: block;
    animation: stepIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.step.exiting {
    display: block;
    animation: stepOut 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stepOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-16px);
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.step-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: #2D2D2D;
    margin-bottom: 0.25rem;
}

.step-subtitle {
    font-size: 0.95rem;
    color: #6B6B6B;
    line-height: 1.5;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-bg-animation {
    background: linear-gradient(
        135deg,
        rgba(166, 60, 44, 0.03) 0%,
        rgba(166, 60, 44, 0.06) 25%,
        rgba(247, 245, 243, 0.5) 50%,
        rgba(166, 60, 44, 0.04) 75%,
        rgba(166, 60, 44, 0.02) 100%
    );
    background-size: 400% 400%;
    animation: heroGradient 8s ease-in-out infinite;
}

@keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

.hero-title {
    animation: fadeUp 0.8s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-sofa-img {
    animation: fadeUp 0.8s 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Hero Slideshow */
.hero-slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.hero-slide.active {
    opacity: 1;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CHOICE CARDS (Image Buttons)
   ============================================ */
.choice-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #E8E4E0;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    background: #fff;
}

.choice-card:hover {
    border-color: #A63C2C;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(166, 60, 44, 0.15);
}

.choice-card:active {
    transform: translateY(0) scale(0.98);
}

.choice-card.selected {
    border-color: #A63C2C;
    box-shadow: 0 0 0 3px rgba(166, 60, 44, 0.2);
}

.choice-img-wrapper {
    position: relative;
    overflow: hidden;
}

.choice-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.choice-card:hover .choice-img {
    transform: scale(1.05);
}

.choice-card.compact .choice-img {
    height: 100%;
}

.module-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6B6B6B;
    letter-spacing: 0.5px;
}

.choice-label {
    background: #A63C2C;
    color: #FFFFFF;
    text-align: center;
    padding: 10px 8px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.choice-card.compact .choice-label {
    padding: 8px 6px;
}

/* Selection indicator */
.choice-card.selected::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #A63C2C;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}

/* ============================================
   TABURET BUTTONS
   ============================================ */
.taburet-btn {
    background: #A63C2C;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 14px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Source Sans 3', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.3;
    text-align: center;
}

.taburet-btn:hover {
    background: #8B3222;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(166, 60, 44, 0.25);
}

.taburet-btn:active {
    transform: translateY(0);
}

.taburet-btn.selected {
    background: #6B2218;
    box-shadow: 0 0 0 3px rgba(166, 60, 44, 0.3);
}

/* ============================================
   COLOR SWATCHES
   ============================================ */
.color-swatch {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #E8E4E0;
    transition: all 0.2s ease;
    aspect-ratio: 1;
}

.color-swatch:hover {
    border-color: #A63C2C;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.color-swatch.selected {
    border-color: #A63C2C;
    box-shadow: 0 0 0 3px rgba(166, 60, 44, 0.25);
}

.color-swatch.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: rgba(166, 60, 44, 0.9);
    border-radius: 50%;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.swatch-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.65rem;
    font-weight: 500;
    text-align: center;
    padding: 3px 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.color-swatch:hover .swatch-name {
    opacity: 1;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-block;
    background: #A63C2C;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Source Sans 3', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: #8B3222;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(166, 60, 44, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-back {
    background: none;
    border: none;
    color: #A63C2C;
    font-size: 0.95rem;
    font-family: 'Source Sans 3', sans-serif;
    cursor: pointer;
    padding: 8px 16px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #8B3222;
}

/* ============================================
   INPUT FIELDS
   ============================================ */
.input-field {
    width: 100%;
    border: 1.5px solid #E8E4E0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: 'Source Sans 3', sans-serif;
    color: #2D2D2D;
    background: #FAFAF9;
    transition: all 0.2s ease;
    outline: none;
    margin-top: 4px;
}

.input-field:focus {
    border-color: #A63C2C;
    box-shadow: 0 0 0 3px rgba(166, 60, 44, 0.1);
    background: #FFFFFF;
}

.input-field::placeholder {
    color: #B0ACA8;
}

/* ============================================
   SUMMARY SECTION
   ============================================ */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    background: #F7F5F3;
    border-left: 3px solid #A63C2C;
}

.summary-row .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6B6B6B;
    font-weight: 500;
}

.summary-row .value {
    font-weight: 600;
    color: #2D2D2D;
    font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .card {
        border-radius: 12px;
    }

    .step-title {
        font-size: 1.4rem;
    }

    .choice-img {
        height: 110px;
    }

    .grid.grid-cols-2 {
        gap: 0.5rem;
    }

    .taburet-btn {
        font-size: 0.75rem;
        padding: 10px 8px;
    }

    .card-header {
        padding: 1.5rem 1rem 0.5rem;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D4D0CC;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A63C2C;
}
