/* ===== Checkout Page Styles ===== */
/* ===== Checkout Section ===== */
.checkout-section {
    background: #f5f7f8;
    padding: 48px 32px 72px;
}
.checkout-container {
    max-width: 1140px;
    margin: 0 auto;
}
.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 36px;
    align-items: start;
}
/* ===== Checkout Cards (Left Column) ===== */
.checkout-forms {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.checkout-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 34px;
    border: 1px solid rgba(45, 96, 120, 0.06);
    box-shadow: 0 2px 12px rgba(45, 96, 120, 0.04);
}
.checkout-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a3d4e;
    margin-bottom: 0;
}
.order-divider-full {
    height: 1px;
    background: #e8edf0;
    margin: 18px 0 24px;
}
/* ===== Auth Card (Left) ===== */
.checkout-auth-card {
    border: 1.5px dashed rgba(45, 96, 120, 0.18);
    background: linear-gradient(135deg, #f8fcfb 0%, #f5f8fa 100%);
}
.checkout-welcome-card {
    border: 1.5px solid rgba(22, 163, 74, 0.2);
    background: linear-gradient(135deg, #f7fdf9 0%, #f0fdf4 100%);
}
.checkout-auth-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.checkout-auth-text {
    flex: 1;
}
.checkout-auth-card .checkout-card-title {
    margin-bottom: 6px;
}
.checkout-auth-desc {
    font-size: 13px;
    color: #6b8a8e;
    line-height: 1.5;
    margin: 0;
}
.checkout-auth-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
.checkout-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.checkout-auth-login {
    background: linear-gradient(135deg, #2d6078, #3a7a92);
    color: #ffffff;
    border: none;
}
.checkout-auth-login:hover {
    background: linear-gradient(135deg, #245266, #2d6078);
    box-shadow: 0 4px 16px rgba(45, 96, 120, 0.3);
    transform: translateY(-1px);
}
.checkout-auth-register {
    background: #ffffff;
    color: #2d6078;
    border: 1.5px solid #2d6078;
}
.checkout-auth-register:hover {
    background: #f0f7f6;
    box-shadow: 0 4px 16px rgba(45, 96, 120, 0.12);
    transform: translateY(-1px);
}
.checkout-auth-switch {
    background: #ffffff;
    color: #6b8a8e;
    border: 1.5px solid #dde4e7;
    text-decoration: none;
    font-size: 13px;
    padding: 9px 18px;
}
.checkout-auth-switch:hover {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
    transform: translateY(-1px);
}
.checkout-welcome-continue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    white-space: nowrap;
}
.checkout-welcome-email {
    color: #6b8a8e;
    font-weight: 400;
}
.checkout-guest-notice {
    border: 1.5px solid rgba(217, 119, 6, 0.2);
    background: linear-gradient(135deg, #fffdf7 0%, #fffbeb 100%);
    padding: 20px 24px;
}
.checkout-guest-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.checkout-guest-content svg {
    flex-shrink: 0;
}
.checkout-guest-text {
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}
/* ===== Order Summary ===== */
.order-item {
    display: flex;
    align-items: center;
    gap: 18px;
}
.order-item-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a3d4e, #2d6078);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.order-thumb-img {
    width: 56px;
    height: auto;
    filter: brightness(0) invert(1);
    object-fit: contain;
}
.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.order-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a3d4e;
}
.order-item-desc {
    font-size: 13px;
    color: #066885;
}
.order-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #2d6078;
    margin-top: 2px;
}
/* ===== Form Styles ===== */
.checkout-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-row {
    display: flex;
    flex-direction: column;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1a3d4e;
}
.label-hint {
    font-weight: 400;
    color: #8a9fa5;
    font-size: 12px;
}
.required-star {
    color: #dc2626;
    margin-left: 2px;
    font-weight: 700;
}
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1.5px solid #dde4e7;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1a3d4e;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #a0b3ba;
}
.form-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b8a8e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #2d6078;
    box-shadow: 0 0 0 3px rgba(45, 96, 120, 0.08);
}
.form-field textarea {
    resize: vertical;
    min-height: 90px;
}
/* Disabled state */
.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled {
    background: #f1f5f7;
    color: #8a9fa5;
    border-color: #e2e8eb;
    cursor: not-allowed;
    opacity: 0.7;
}
/* .form-field select:disabled {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23b0c0c5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
} */
.checkbox-label:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}
.checkout-submit-btn:disabled {
    background: #c0cdd2;
    cursor: not-allowed;
    opacity: 0.7;
}
/* ===== Right Column – Sidebar ===== */
.checkout-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.sidebar-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 26px;
    border: 1px solid rgba(45, 96, 120, 0.06);
    box-shadow: 0 2px 12px rgba(45, 96, 120, 0.04);
}
/* Terms Card */
.sidebar-terms {
    padding: 22px 24px;
}
/* Order Summary in Sidebar */
.sidebar-order-summary {
    padding: 24px 26px 28px;
}
.sidebar-order-summary .sidebar-card-title {
    margin-bottom: 0;
}
.sidebar-order-summary .order-divider-full {
    margin: 14px 0 18px;
}
.terms-check {
    margin: 0;
}
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    display: none;
}
.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #dde4e7;
    border-radius: 5px;
    background: #f8fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
    margin-top: 2px;
}
.checkbox-custom::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform 0.2s ease;
    position: absolute;
    top: 4px;
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #2d6078, #3a7a92);
    border-color: #2d6078;
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    transform: rotate(-45deg) scale(1);
}
.checkbox-text {
    font-size: 13px;
    color: #4a6a75;
    line-height: 1.55;
}
.terms-link {
    color: #2d6078;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}
.terms-link:hover {
    color: #5fb8b0;
}
/* Price Card */
.sidebar-price-card {
    background: linear-gradient(135deg, #f0f7f6, #edf3f5);
    border: 1px solid rgba(45, 96, 120, 0.08);
    text-align: left;
}
.sidebar-total-price {
    font-size: 30px;
    font-weight: 800;
    color: #1a3d4e;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.sidebar-price-note {
    font-size: 13px;
    color: #6b8a8e;
    line-height: 1.55;
}
/* Card Details */
.sidebar-card-details {
    padding: 28px 26px;
}
.sidebar-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a3d4e;
    margin-bottom: 16px;
}
.card-type-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f5f8f9;
    border: 1.5px solid #2d6078;
    border-radius: 8px;
    margin-bottom: 12px;
}
.card-type-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a3d4e;
}
.stripe-secure-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5fb8b0;
    font-weight: 500;
    margin-bottom: 18px;
    padding-left: 2px;
}
.card-fields-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.card-fields-sidebar .form-field input,
.card-fields-sidebar .form-field select {
    padding: 11px 14px;
    font-size: 13px;
    border-radius: 8px;
    background: #ffffff;
    border: 1.5px solid #dde4e7;
}
.card-fields-sidebar .form-field label {
    font-size: 12px;
    color: #6b8a8e;
    font-weight: 500;
}
.card-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
#card-number {
    letter-spacing: 2px;
}
/* Submit Button */
.checkout-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #2d6078, #3a7a92);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}
.checkout-submit-btn:hover {
    background: linear-gradient(135deg, #245266, #2d6078);
    box-shadow: 0 6px 24px rgba(45, 96, 120, 0.35);
    transform: translateY(-2px);
}
.checkout-submit-btn:active {
    transform: translateY(0);
}
.checkout-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.sidebar-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #8a9fa5;
    margin-top: 4px;
}
/* ===== Responsive ===== */
@media (max-width: 968px) {
    .checkout-section {
        padding: 32px 20px 56px;
    }
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .checkout-auth-content {
        flex-direction: column;
        text-align: center;
    }
    .checkout-auth-buttons {
        width: 100%;
    }
    .checkout-auth-btn {
        flex: 1;
        justify-content: center;
    }
    .checkout-sidebar {
        position: static;
    }
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 36px 30px;
    }
}
@media (max-width: 600px) {
    .checkout-section {
        padding: 24px 14px 40px;
    }
    .checkout-card {
        padding: 24px 20px;
        border-radius: 14px;
    }
    .checkout-auth-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .checkout-auth-buttons {
        flex-direction: column;
        width: 100%;
    }
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .card-row-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .sidebar-card {
        padding: 20px 18px;
        border-radius: 14px;
    }
    .sidebar-total-price {
        font-size: 24px;
    }
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 20px 30px;
    }
    .footer-brand {
        align-items: center;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
    .auth-modal {
        max-width: 100%;
        margin: 12px;
        padding: 36px 24px 28px;
        border-radius: 16px;
    }
}
/* ===== CIF Feedback ===== */
.cif-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 2px;
}
.cif-feedback svg {
    flex-shrink: 0;
}
.cif-feedback-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.cif-feedback-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.cif-feedback-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.cif-feedback-loading {
    background: #f0f7ff;
    color: #2d6078;
    border: 1px solid #bfdbfe;
}
.cif-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #bfdbfe;
    border-top-color: #2d6078;
    border-radius: 50%;
    animation: cifSpin 0.6s linear infinite;
    flex-shrink: 0;
}
@keyframes cifSpin {
    to { transform: rotate(360deg); }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.checkout-card,
.sidebar-card {
    opacity: 0;
    transform: translateY(24px);
}
.checkout-card.animate-in,
.sidebar-card.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}
