/* ========================================
   NutritionMD - Checkout Styles
   ======================================== */

/* Checkout Banner */
.checkout-banner {
    background: var(--primary-blue);
    padding: 30px 0;
    text-align: center;
}

.checkout-banner h1 {
    color: var(--white);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

/* Main Checkout Container */
.checkout-container {
    padding: 40px 0 60px;
    background: var(--bg-light);
    min-height: 60vh;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Form Section */
.form-section {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: var(--box-border);
    margin-bottom: 20px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
}

/* Form Elements */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group.half {
    flex: 1;
}

.form-group.quarter {
    flex: 0 0 calc(25% - 10px);
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: var(--font-main);
    border: 1px solid #ddd;
    border-radius: 6px;
    background: var(--white);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 86, 184, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

.form-group select {
    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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Billing Toggle */
.billing-toggle {
    background: var(--bg-light);
    padding: 15px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.billing-toggle p {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
}

#billing-address-section {
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

#billing-address-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* Customer Info Display */
.customer-info-display {
    background: #e8f4e8;
    border: 1px solid #c3e6c3;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}

.customer-info-display p {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.customer-info-display p:last-child {
    margin-bottom: 0;
}

/* Card Icons */
.card-icons {
    margin-bottom: 20px;
}

.card-icons img {
    height: 35px;
}

/* Error Message */
.errorMessage {
    background: #ffe6e6;
    border: 1px solid #ffcccc;
    color: #cc0000;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Order Total Box */
.order-total-box {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 15px 18px;
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
}

.total-price {
    color: var(--primary-blue);
    font-size: 24px;
}

/* Terms Checkbox */
.terms-checkbox {
    margin-bottom: 20px;
}

.terms-checkbox label {
    display: flex;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-gray);
}

.terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary-blue);
}

.terms-checkbox a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.terms-checkbox em {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Buttons */
.btn-block {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Secure Badge */
.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    font-size: 13px;
    color: #28a745;
}

/* Guarantee Box */
.guarantee-box {
    background: var(--white);
    border: 2px solid #28a745;
    border-radius: 12px;

    text-align: center;
}

.guarantee-box h3 {
    color: #28a745;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.guarantee-box p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Order Summary Sidebar */
.order-summary {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: var(--box-border);
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}

.product-preview {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.product-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.product-info h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
}

.product-info p {
    font-size: 13px;
    color: var(--text-gray);
}

.price-breakdown {
    margin-bottom: 0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.ingredients-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ingredients-info p {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.ingredients-info strong {
    color: var(--text-dark);
}

.price-row.total {
    border-bottom: none;
    font-size: 18px;
    font-weight: 700;
    padding-top: 15px;
    color: var(--primary-blue);
}

/* Trust Badges Small */
.trust-badges-small {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.trust-badges-small img {
    height: 40px;
    opacity: 0.8;
}

/* Money Back Guarantee */
.guarantee-box {
    margin-top: 25px;
    border: 2px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
}

.guarantee-box .guarantee-header {
    background: #000000;
    color: var(--white);
    padding: 12px 15px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
}


.guarantee-box .guarantee-content {
    padding: 0;
    display: flex;
    gap: 15px;
    align-items: center;
    background: var(--white);
}

.guarantee-box .guarantee-content img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: 10px;
}

.guarantee-box .guarantee-content p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-gray);
    margin: 0;
    padding: 15px 15px 15px 0;
}

.guarantee-box .guarantee-content a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.guarantee-box .guarantee-content a:hover {
    text-decoration: none;
}

/* Secure Badge */
.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-gray);
}

.secure-badge svg {
    color: var(--primary-blue);
}

/* Processing Popup */
.processing-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-content {
    background: var(--white);
    padding: 40px 50px;
    border-radius: 12px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #eee;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.popup-content p {
    font-size: 16px;
    color: var(--text-dark);
}

/* Checkout Footer */
.checkout-footer {
    background: var(--white);
    padding: 30px 0;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 1024px) {
    .checkout-grid {
        display: flex;
        flex-direction: column;
    }
    
    .checkout-sidebar {
        order: -1;
        margin-bottom: 30px;
    }
    
    .checkout-forms {
        order: 1;
    }
    
    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-container {
        padding: 20px 0 40px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half,
    .form-group.quarter {
        flex: none;
        width: 100%;
    }
    
    .section-heading {
        font-size: 18px;
    }
    
    .checkout-banner h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 15px;
        border-radius: 8px;
    }
    
    .order-summary {
        padding: 20px;
    }
    
    .product-preview img {
        width: 60px;
        height: 60px;
    }
    
    .guarantee-box .guarantee-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }
    
    .guarantee-box .guarantee-content img {
        width: 80px;
        height: 80px;
    }
    
    .guarantee-box .guarantee-content p {
        padding: 0;
    }
}



