/* Comprar - Página de Checkout */

/* ===== Checkout Header ===== */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.logo i {
    font-size: 1.75rem;
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: opacity var(--transition-normal);
}

.step.active {
    opacity: 1;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-medium);
    transition: all var(--transition-normal);
}

.step.active .step-number {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-medium);
}

.step-divider {
    width: 40px;
    height: 2px;
    background: var(--border-color);
}

/* ===== Main Content ===== */
.checkout-main {
    padding: 3rem 0 5rem;
    background-color: var(--bg-secondary);
    min-height: calc(100vh - 200px);
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2.5rem;
    align-items: start;
}

/* ===== Form Column ===== */
.checkout-form-column {
    width: 100%;
}

.checkout-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.section-header-checkout {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.section-header-checkout h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-header-checkout h2 i {
    color: var(--primary-color);
}

.section-header-checkout p {
    font-size: 1rem;
    color: var(--text-medium);
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.form-section-title i {
    color: var(--primary-color);
    font-size: 1.15rem;
}

/* Form Groups */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row .form-group:only-child {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.flex-3 {
    grid-column: span 3;
}

.form-group.flex-1 {
    grid-column: span 1;
}

.form-row .form-group.flex-3,
.form-row .form-group.flex-1 {
    display: flex;
    flex-direction: column;
}

.form-row:has(.flex-3) {
    grid-template-columns: 3fr 1fr;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    font-family: 'Nunito', sans-serif;
}

.form-control:hover {
    border-color: var(--primary-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 153, 255, 0.1);
}

select.form-control {
    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='%234099ff' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 12px;
    padding-right: 3rem;
}

/* Plan Type Selector */
.plan-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-card-content {
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.radio-card:hover .radio-card-content {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.radio-card input[type="radio"]:checked + .radio-card-content {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
    box-shadow: 0 0 0 3px rgba(64, 153, 255, 0.1);
}

.radio-card.featured input[type="radio"]:checked + .radio-card-content {
    background: linear-gradient(135deg, #f0fdf9 0%, #ffffff 100%);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(46, 216, 182, 0.1);
}

.radio-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.radio-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.radio-card-price {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary-color);
}

.radio-card.featured .radio-card-price {
    color: var(--secondary-color);
}

/* CEP Input with Button */
.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button .form-control {
    flex: 1;
}

.btn-search-cep {
    padding: 0.875rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 600;
}

.btn-search-cep:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Payment Methods */
.payment-methods {
    display: grid;
    gap: 1rem;
}

.payment-card {
    position: relative;
    cursor: pointer;
}

.payment-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.payment-card:hover .payment-card-content {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.payment-card input[type="radio"]:checked + .payment-card-content {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
    box-shadow: 0 0 0 3px rgba(64, 153, 255, 0.1);
}

.payment-card-content i {
    font-size: 2rem;
    color: var(--primary-color);
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.payment-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.payment-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Coupon Input */
.coupon-input-group {
    display: flex;
    gap: 0.75rem;
}

.coupon-input-group .form-control {
    flex: 1;
}

.btn-apply-coupon {
    padding: 0.875rem 2rem;
    background: var(--gradient-secondary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn-apply-coupon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-apply-coupon:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.coupon-message {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    display: none;
}

.coupon-message.success {
    background: #f0fdf9;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.coupon-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Terms Checkbox */
.terms-checkbox {
    margin-top: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--primary-dark);
}

/* Submit Button */
.btn-submit-purchase {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    margin-top: 2rem;
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 10px 30px rgba(46, 216, 182, 0.3);
}

.btn-submit-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(46, 216, 182, 0.4);
}

.btn-submit-purchase:active {
    transform: translateY(0);
}

.security-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.security-note i {
    color: var(--secondary-color);
}

/* ===== Order Summary Column ===== */
.checkout-summary-column {
    position: sticky;
    top: 100px;
}

.order-summary {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-light);
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.summary-title i {
    color: var(--primary-color);
}

.summary-product {
    margin-bottom: 1.5rem;
}

.product-info h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-type {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin-bottom: 0.25rem;
}

.product-quantity {
    font-size: 0.875rem;
    color: var(--text-light);
}

.summary-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1.5rem 0;
}

.summary-pricing {
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-medium);
}

.price-row:last-child {
    margin-bottom: 0;
}

.discount-row {
    color: var(--secondary-color);
}

.discount-code {
    font-size: 0.75rem;
    font-weight: 600;
}

.discount-value {
    font-weight: 700;
}

.total-row {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 2px solid var(--border-light);
}

.total-row span:last-child {
    color: var(--primary-color);
}

.summary-benefits {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f8ff 0%, #f0fdf9 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.summary-benefits h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.summary-benefits ul {
    list-style: none;
}

.summary-benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

.summary-benefits li:last-child {
    margin-bottom: 0;
}

.summary-benefits i {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.security-badges {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
    text-align: center;
}

.badge-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

/* ===== Footer Minimal ===== */
.footer-minimal {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-minimal .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-minimal p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.875rem;
}

.footer-links-minimal {
    display: flex;
    gap: 2rem;
}

.footer-links-minimal a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-normal);
}

.footer-links-minimal a:hover {
    color: white;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr 350px;
        gap: 2rem;
    }

    .checkout-section {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .checkout-steps {
        display: none;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .checkout-summary-column {
        position: static;
        order: -1;
    }

    .checkout-section {
        padding: 2rem 1.5rem;
    }

    .section-header-checkout h2 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-row:has(.flex-3) {
        grid-template-columns: 1fr;
    }

    .plan-type-selector {
        grid-template-columns: 1fr;
    }

    .coupon-input-group {
        flex-direction: column;
    }

    .btn-apply-coupon {
        width: 100%;
    }

    .order-summary {
        padding: 1.5rem;
    }

    .security-badges {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .checkout-main {
        padding: 2rem 0 3rem;
    }

    .checkout-section {
        padding: 1.5rem 1rem;
    }

    .section-header-checkout h2 {
        font-size: 1.25rem;
    }

    .form-section-title {
        font-size: 1.1rem;
    }

    .form-control {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .btn-submit-purchase {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

    .footer-links-minimal {
        flex-direction: column;
        gap: 0.75rem;
    }
}
