/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF5DA2;
    --primary-dark: #E14D93;
    --secondary-color: #4A90E2;
    --success-color: #22C55E;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --bg-light: #F8FAFC;
    --bg-white: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(1200px 600px at 10% 5%, #ffe3f0 0%, transparent 40%),
                radial-gradient(1200px 600px at 90% 0%, #dbeafe 0%, transparent 40%),
                linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px 0;
}

html, body {
    -webkit-text-size-adjust: 100%;
}

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

/* Header */
.checkout-header {
    background: var(--bg-white);
    padding: 25px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 32px;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 28px;
    color: var(--text-primary);
    font-weight: 600;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #E8F5E9;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    color: var(--success-color);
    font-weight: 500;
}

.secure-badge i {
    font-size: 18px;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    gap: 14px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 93, 162, 0.35);
    border-color: transparent;
}

.step span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.step.active span {
    color: var(--primary-color);
    font-weight: 600;
}

.step-line {
    width: 80px;
    height: 4px;
    background: var(--border-color);
    margin-bottom: 25px;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

/* colorir a linha quando o passo anterior está ativo */
.step.active + .step-line,
.step.active + .step-line + .step.active + .step-line {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(255, 93, 162, 0.35);
}

/* Main Content Layout */
.checkout-content-single {
    max-width: 100%;
}

/* Step Content */
.step-content {
    display: block;
    margin-bottom: 30px;
}

.step-content.locked {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.step-content.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    border-radius: var(--radius-lg);
}

.step-content.locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: var(--text-secondary);
    z-index: 11;
}


.form-section {
    background: var(--bg-white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}

.section-header i {
    font-size: 24px;
    color: var(--primary-color);
}

.section-header h2 {
    font-size: 22px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.flex-3 {
    grid-column: span 1;
}

.form-group.flex-1 {
    grid-column: span 1;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px; /* prevent iOS zoom */
    transition: all 0.2s ease;
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.02);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 93, 162, 0.18);
    transform: translateY(-1px);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--error-color);
}

.error-message {
    font-size: 13px;
    color: var(--error-color);
    display: none;
}

.form-group input.error ~ .error-message,
.form-group select.error ~ .error-message {
    display: block;
}

.input-with-button {
    display: flex;
    gap: 10px;
}

.input-with-button input {
    flex: 1;
}

.btn-search-cep {
    padding: 12px 20px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-search-cep:hover {
    background: #3A7BC8;
    transform: translateY(-2px);
}

.link-small {
    font-size: 12px;
    color: var(--secondary-color);
    text-decoration: none;
}

.link-small:hover {
    text-decoration: underline;
}


/* Payment Content */
.payment-content-single {
    display: block;
}

/* Confirmation Summary */
.confirmation-summary {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.summary-section {
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.summary-section h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-section h3 i {
    color: var(--primary-color);
}

.summary-section p {
    margin: 8px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.summary-section strong {
    color: var(--text-primary);
    margin-right: 5px;
}



/* Step Buttons */
.btn-next-step,
.btn-prev-step,
.btn-finish-order {
    padding: 16px 28px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.btn-next-step {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-next-step:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-prev-step {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-prev-step:hover {
    background: var(--border-color);
}

.btn-finish-order {
    background: linear-gradient(135deg, var(--success-color), #16A34A);
    color: white;
    width: 100%;
}

.btn-finish-order:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* disabled state */
.btn-next-step:disabled,
.btn-finish-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.step-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.step-buttons .btn-prev-step {
    flex: 0 0 auto;
    min-width: 150px;
}

.step-buttons .btn-next-step {
    flex: 1;
    margin-top: 0;
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-icon {
    font-size: 80px;
    color: var(--success-color);
    margin-bottom: 20px;
}

.modal-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 16px;
}

.order-number {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 25px;
    font-size: 16px;
}

.order-number strong {
    color: var(--primary-color);
    font-size: 20px;
}

.btn-close-modal {
    padding: 15px 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .progress-steps {
        padding: 20px;
    }

    .step span {
        font-size: 12px;
    }

    .step-line {
        width: 50px;
    }
}

@media (max-width: 768px) {
    .checkout-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo h1 {
        font-size: 24px;
    }

    .progress-steps {
        overflow-x: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .step-buttons {
        flex-direction: column;
    }

    .step-buttons .btn-prev-step {
        min-width: 100%;
        order: 2;
    }

    .step-buttons .btn-next-step,
    .step-buttons .btn-finish-order {
        order: 1;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 0;
    }

    .container {
        padding: 0 10px;
    }

    .form-section {
        padding: 20px;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .btn-next-step,
    .btn-prev-step,
    .btn-finish-order {
        font-size: 15px;
        padding: 15px 20px;
    }
}
