/* Reset & Base Styles — brand red (matches visualizer) */
:root {
    --viz-accent: #e52727;
    --viz-accent-hover: #c41e20;
    --viz-accent-dark: #9b1c1c;
    --viz-accent-soft-bg: #fff5f5;
    --viz-accent-tint-bg: #fff0f0;
    --viz-accent-ring: rgba(229, 39, 39, 0.35);
    --viz-accent-ring-soft: rgba(229, 39, 39, 0.22);
    --viz-accent-shadow: rgba(229, 39, 39, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--viz-accent);
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 80px);
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: #2c3e50;
}

/* Wizard */
.wizard-container {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 0 10px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--viz-accent);
    color: #fff;
}

.step-label {
    font-size: 12px;
    color: #999;
    text-align: center;
}

.step.active .step-label {
    color: var(--viz-accent);
    font-weight: 600;
}

.wizard-content {
    min-height: 400px;
}

.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

/* Selection Grid */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.selection-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.selection-card:hover {
    border-color: var(--viz-accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--viz-accent-shadow);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.selection-card-thumb-holder {
    width: 100%;
    margin-bottom: 12px;
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-card-thumb {
    width: 100%;
    max-height: 140px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    background: #f4f4f4;
}

.selection-card-thumb-holder .selection-card-thumb-fallback {
    margin-bottom: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.card-subtitle {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

/* Buttons */
.btn-back, .btn-next {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back {
    background: #6c757d;
    color: #fff;
}

.btn-back:hover {
    background: var(--viz-accent-dark);
}

.btn-next {
    background: var(--viz-accent);
    color: #fff;
}

.btn-next:hover {
    background: var(--viz-accent-hover);
}

/* Step nav: no floats (prevents mobile overlap) */
.wizard-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    margin-top: 28px;
    padding-top: 8px;
    clear: both;
    width: 100%;
    box-sizing: border-box;
}

.wizard-actions .btn-back,
.wizard-actions .btn-next {
    float: none;
    margin: 0;
    flex: 1 1 200px;
    min-width: 0;
    text-align: center;
    box-sizing: border-box;
}

/* Color & Size Grids */
.color-grid, .size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.color-card {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.color-card:hover {
    transform: scale(1.05);
    border-color: var(--viz-accent);
}

.color-card.active {
    border-color: var(--viz-accent);
    box-shadow: 0 0 0 3px var(--viz-accent-ring);
}

/* Light paint (white, silver…) — readable label + visible edge */
.color-card.color-card--light {
    color: #1a1a1a !important;
    text-shadow: none !important;
    border: 2px solid #bbb !important;
}

.color-card.color-card--light:hover {
    border-color: var(--viz-accent) !important;
}

.color-card.color-card--light.active {
    border-color: var(--viz-accent) !important;
    box-shadow: 0 0 0 3px var(--viz-accent-ring) !important;
}

.size-card {
    padding: 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.size-card:hover {
    border-color: var(--viz-accent);
    background: var(--viz-accent-soft-bg);
}

.size-card.active {
    border-color: var(--viz-accent);
    background: var(--viz-accent-tint-bg);
    box-shadow: 0 0 0 2px var(--viz-accent-ring-soft);
}

/* Loading & Empty States */
.loading, .empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: none;
    }

    .main-nav.active {
        display: flex;
    }

    /* Horizontal step slider (scroll left ↔ right) */
    .wizard-steps {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 8px;
        margin-bottom: 28px;
        padding: 8px 4px 14px;
        scrollbar-width: thin;
        scrollbar-color: #ccc transparent;
    }

    .wizard-steps::-webkit-scrollbar {
        height: 5px;
    }

    .wizard-steps::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }

    .wizard-steps::-webkit-scrollbar-track {
        background: transparent;
    }

    /* Connecting line doesn’t span scroll width — hide on small screens */
    .wizard-steps::before {
        display: none;
    }

    .step {
        flex: 0 0 auto;
        min-width: 76px;
        max-width: 92px;
        scroll-snap-align: start;
        padding: 0 4px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
        line-height: 1.25;
        hyphens: auto;
    }

    .selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .wizard-container {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .wizard-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 24px;
        padding-top: 16px;
        border-top: 1px solid #eee;
    }

    .wizard-actions .btn-back,
    .wizard-actions .btn-next {
        flex: none;
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
        order: unset;
    }

    /* Primary action below Back on narrow screens */
    .wizard-actions .btn-next {
        order: 2;
    }

    .wizard-actions .btn-back {
        order: 1;
    }

    #step5 .color-grid,
    #step5 .size-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    #step5 .color-card,
    #step5 .size-card {
        min-height: 48px;
        box-sizing: border-box;
    }

    #step5 h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    #step5 h3 {
        font-size: 16px;
        margin: 18px 0 10px;
    }
}

