:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
    min-width: 200px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
    width: 12.5%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    flex: 1;
    position: relative;
}

/* Steps */
.step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--gray-100);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 20px;
    font-weight: 700;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.step-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.step-header p {
    font-size: 16px;
    color: var(--gray-500);
}

/* Form Groups */
.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.multiselect-hint {
    font-weight: 400;
    color: var(--primary);
    font-size: 13px;
    margin-left: 8px;
}

.hint {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 6px;
    font-weight: 400;
}

.hint-inline {
    font-size: 13px;
    color: var(--gray-400);
    margin-left: 4px;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    transition: all 0.2s;
    background: white;
    color: var(--gray-800);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Cards Grid (Design Style) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.card-option {
    cursor: pointer;
    position: relative;
}

.card-option input {
    position: absolute;
    opacity: 0;
}

.card-content {
    padding: 24px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.2s;
    background: white;
    height: 100%;
}

.card-option:hover .card-content {
    border-color: var(--gray-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-option input:checked + .card-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.card-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.card-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.card-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* Color Picker */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.color-option:hover {
    border-color: var(--gray-300);
}

.color-option input {
    display: none;
}

.color-option input:checked + .color-box {
    box-shadow: 0 0 0 3px var(--primary);
}

.color-option input:checked ~ span:last-child {
    color: var(--primary);
    font-weight: 600;
}

.color-box {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--gray-300);
    flex-shrink: 0;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    position: relative;
}

.checkbox-item:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.checkbox-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: none;
}

.checkbox-item input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-item input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-item input:checked ~ span:last-child {
    color: var(--primary);
    font-weight: 600;
}

.checkbox-item input:disabled ~ .checkmark {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.checkbox-item input:disabled ~ span:last-child {
    color: var(--gray-400);
}

/* Payment & Delivery Grids */
.payment-grid,
.delivery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.payment-option,
.delivery-option {
    cursor: pointer;
    position: relative;
}

.payment-option input,
.delivery-option input {
    position: absolute;
    opacity: 0;
}

.payment-content,
.delivery-content {
    padding: 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    background: white;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.payment-option:hover .payment-content,
.delivery-option:hover .delivery-content {
    border-color: var(--gray-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.payment-option input:checked + .payment-content,
.delivery-option input:checked + .delivery-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-logo,
.delivery-logo {
    font-size: 32px;
    margin-bottom: 12px;
}

.payment-name,
.delivery-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.payment-desc,
.delivery-desc {
    font-size: 13px;
    color: var(--gray-500);
}

.delivery-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--success);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Budget Slider */
.budget-slider-container {
    margin: 20px 0;
}

.budget-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--gray-200);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 12px;
}

.budget-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
}

.budget-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.budget-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

.budget-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.budget-display {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    font-size: 16px;
}

/* File Upload */
.file-upload {
    position: relative;
    margin-top: 12px;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    background: var(--gray-50);
    transition: all 0.2s;
    cursor: pointer;
}

.file-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-icon {
    font-size: 24px;
}

.file-text {
    color: var(--gray-500);
    font-size: 14px;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--gray-100);
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -1px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--gray-600);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -1px rgba(16, 185, 129, 0.3);
}

/* Success Preview */
.success-preview {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin: 32px 0;
    text-align: center;
}

.preview-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.success-preview h3 {
    color: var(--gray-800);
    margin-bottom: 12px;
    font-size: 20px;
}

.success-preview p {
    color: var(--gray-600);
    margin-bottom: 16px;
}

.success-preview ul {
    text-align: left;
    display: inline-block;
    color: var(--gray-700);
    font-size: 14px;
}

.success-preview li {
    margin-bottom: 8px;
    padding-left: 8px;
}

/* Checkbox Confirm */
.checkbox-confirm {
    margin-top: 24px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: var(--gray-600);
    font-size: 16px;
    font-weight: 500;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 60px 40px;
    animation: fadeIn 0.5s ease;
}

.success-message.active {
    display: block;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.success-message h2 {
    font-size: 32px;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.success-message > p {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.success-details {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.success-details p {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.success-details ul {
    list-style: none;
    color: var(--gray-600);
}

.success-details li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
}

.success-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .progress-container {
        justify-content: flex-start;
    }

    .progress-bar {
        width: 100%;
    }

    .main-content {
        padding: 24px;
    }

    .step-header h2 {
        font-size: 22px;
    }

    .cards-grid,
    .payment-grid,
    .delivery-grid {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    #prevBtn {
        display: none !important;
    }

    .step-header {
        text-align: center;
    }

    .checkbox-item {
        padding: 10px 12px;
    }
}

/* Validation Styles */
input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

.error-message {
    color: var(--error);
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

input:invalid:not(:placeholder-shown) ~ .error-message {
    display: block;
}