/**
 * Paddle Customizer - Step Based Product Builder
 * Version: 2.0.0
 * Stylesheet for wizard interface
 */

/* ==================== RESET & BASE ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
#btn-next{color: #fff !important;}
.paddle-wizard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
}

/* ==================== PROGRESS INDICATOR ==================== */
.wizard-progress {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 20%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 0.8;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
}

.progress-step.active .step-label {
    color: #764ba2;
    font-weight: 600;
}

/* ==================== WIZARD FORM ==================== */
.wizard-form {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 500px;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

.step-content {
    max-width: 900px;
    margin: 0 auto;
}

.step-title {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
    text-align: center;
}

.step-description {
    font-size: 16px;
    color: #6c757d;
    text-align: center;
    margin-bottom: 40px;
}

/* ==================== STEP 1: PADDLE TYPE CARDS ==================== */
.paddle-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.type-card {
    position: relative;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
}

.type-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-card input[type="radio"]:checked ~ .card-content {
    color: #667eea;
}

.type-card input[type="radio"]:checked + .card-content + .card-check {
    opacity: 1;
    transform: scale(1);
}

.type-card:has(input:checked) {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.card-content {
    text-align: center;
    transition: all 0.3s ease;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #667eea;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.card-description {
    font-size: 14px;
    color: #6c757d;
}

.card-check {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

/* ==================== STEP 2: SURFACE MATERIAL ==================== */
.surface-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.surface-card {
    position: relative;
    border: 3px solid #e9ecef;
    border-radius: 16px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.surface-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
}

.surface-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.surface-card:has(input:checked) {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
}

.surface-content {
    text-align: center;
}

.surface-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.surface-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
}

.surface-desc {
    font-size: 15px;
    color: #6c757d;
    margin-bottom: 20px;
}

.surface-features {
    list-style: none;
    text-align: left;
    margin-bottom: 15px;
}

.surface-features li {
    padding: 8px 0 8px 30px;
    position: relative;
    font-size: 14px;
    color: #495057;
}

.surface-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.surface-price {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
}

.surface-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 14px;
    background: #28a745;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.surface-badge.premium {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ==================== STEP 3: TEMPLATE SELECTION ==================== */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.template-card {
    position: relative;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.template-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.template-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.template-card:has(input:checked) {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.template-card:has(input:checked):after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.template-image {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #f8f9fa;
}

.template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.template-name {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    background: white;
}

/* ==================== STEP 4: CUSTOMIZATION OPTIONS ==================== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group.full-width {
    grid-column: 1 / -1;
}

.option-label {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 10px;
}

.form-select,
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    color: #495057;
    background: white;
    transition: all 0.3s ease;
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.option-help {
    font-size: 13px;
    color: #6c757d;
    margin-top: 6px;
}

.thickness-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.thickness-card {
    border: 3px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.thickness-card:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.thickness-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.thickness-card:has(input:checked) {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.thickness-value {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.thickness-desc {
    font-size: 13px;
    color: #6c757d;
}

/* ==================== STEP 5: UPLOAD & NOTES ==================== */
.details-section {
    display: grid;
    gap: 30px;
}

.upload-label,
.notes-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
}

.upload-area {
    border: 3px dashed #e9ecef;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}

.upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    color: #667eea;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #6c757d;
}

.upload-preview {
    position: relative;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.form-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    color: #495057;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.notes-help {
    display: block;
    font-size: 13px;
    color: #6c757d;
    margin-top: 8px;
}

/* ==================== NAVIGATION ==================== */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.price-display {
    flex: 1;
    text-align: center;
}

.price-label {
    font-size: 14px;
    color: #6c757d;
    display: block;
    margin-bottom: 5px;
}

.price-value {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn.loading:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== FORM MESSAGES ==================== */
.form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    display: none;
    font-size: 15px;
    font-weight: 500;
}

.form-message.show {
    display: block;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .paddle-wizard-wrapper {
        padding: 20px 15px;
    }

    .wizard-form {
        padding: 30px 20px;
    }

    .step-title {
        font-size: 24px;
    }

    .step-description {
        font-size: 14px;
    }

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

    .type-card {
        padding: 20px 15px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
    }

    .card-title {
        font-size: 16px;
    }

    .surface-options {
        grid-template-columns: 1fr;
    }

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

    .options-grid {
        grid-template-columns: 1fr;
    }

    .thickness-options {
        grid-template-columns: 1fr;
    }

    .wizard-navigation {
        flex-direction: column;
    }

    .price-display {
        order: -1;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .progress-steps {
        gap: 5px;
    }

    .step-label {
        font-size: 11px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .wizard-progress {
        padding: 20px 15px;
    }

    .step-title {
        font-size: 20px;
    }

    .paddle-type-grid {
        grid-template-columns: 1fr;
    }

    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .upload-area {
        padding: 30px 20px;
    }

    .price-value {
        font-size: 28px;
    }
}