/* ===================================================================
   CHECKOUT2 PAGE SPECIFIC STYLES
   ===================================================================
   All styles are scoped with "checkout2-" prefix to avoid conflicts.
   DO NOT modify navbar or footer styles - they are in separate CSS files.
   
   TABLE OF CONTENTS:
   1. Global Styles & Page Wrapper
   2. Progress Steps Section
   3. Main Content Layout
   4. Billing Details & Your Order Section
   5. Payment Method Section
   6. Subtotal Card (Right Column)
   7. Responsive Design (Tablet & Mobile)
   =================================================================== */

/* ===================================================================
   1. GLOBAL STYLES & PAGE WRAPPER
   =================================================================== */

* {
    font-family: 'Raleway', sans-serif;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
}

/* Main wrapper for entire checkout2 page content */
.checkout2-page-wrapper {
    min-height: 100vh;
    padding-top: 120px; /* Space for absolute positioned navbar */
    padding-bottom: 40px;
    background-color: #ffffff;
}

/* ===================================================================
   2. PROGRESS STEPS SECTION
   =================================================================== */

/* Progress section container */
.checkout2-progress-section {
    padding: 30px 20px 45px;
    background-color: #ffffff;
}

/* Container for step circles and lines */
.checkout2-steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    gap: 0;
}

/* Individual step circle */
.checkout2-step {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Completed step - filled with pink */
.checkout2-step.completed {
    background-color: #ec5569;
}

/* Active step - filled with pink and has outer ring */
.checkout2-step.active {
    background-color: #ec5569;
    box-shadow: 0 0 0 4px rgba(236, 85, 105, 0.2);
}

/* Number text inside step circle */
.checkout2-step-number {
    color: #ffffff;
    font-weight: 600;
    font-size: 18px;
    line-height: 1;
}

/* Line connecting the steps */
.checkout2-step-line {
    width: 100px;
    height: 2px;
    background-color: #e5e5e5;
    z-index: 1;
}

/* Container for step labels below circles */
.checkout2-steps-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Individual step label text */
.checkout2-step-label {
    font-size: 15px;
    color: #9ca3af;
    font-weight: 400;
    text-align: center;
    flex: 1;
}

/* Active step label - darker and bold */
.checkout2-step-label.active {
    color: #1f2937;
    font-weight: 600;
}

/* ===================================================================
   3. MAIN CONTENT LAYOUT
   =================================================================== 
   The main content section stretches across the screen with consistent
   spacing on both sides via Bootstrap container and padding utilities.
   This creates a full-width appearance while maintaining visual balance.
   =================================================================== */

.checkout2-main-section {
    padding: 40px 0 80px;
    background-color: #ffffff;
    min-height: 60vh; /* Ensures adequate vertical space */
}

/* ===================================================================
   4. BILLING DETAILS & YOUR ORDER SECTION (Left Column)
   =================================================================== */

/* Billing Details Header */
.checkout2-billing-header {
    margin-bottom: 32px;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

.checkout2-main-heading {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #ec5569; /* Pink accent underline */
    display: inline-block; /* Makes border only as wide as text */
}

/* Your Order Section Container */
.checkout2-order-section {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.checkout2-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
}

/* Products Header Row */
.checkout2-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 2px solid #1f2937;
    margin-bottom: 20px;
}

.checkout2-header-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Products List Container */
.checkout2-products-list {
    margin-bottom: 20px;
}

/* Individual Product Item */
.checkout2-product-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.checkout2-product-item:last-child {
    border-bottom: none;
}

/* Product Left Side (Names) */
.checkout2-product-left {
    flex: 1;
}

.checkout2-product-name {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 6px 0;
}

.checkout2-product-delivery {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Product Right Side (Prices) */
.checkout2-product-right {
    text-align: right;
}

.checkout2-product-price {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
}

.checkout2-delivery-price {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Total Row at Bottom of Order Section */
.checkout2-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    margin-top: 8px;
    border-top: 2px solid #1f2937;
}

.checkout2-total-label {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout2-total-amount {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

/* ===================================================================
   5. PAYMENT METHOD SECTION (Left Column)
   =================================================================== */

.checkout2-payment-section {
    margin-bottom: 0;
    background-color: #ffffff;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content */
}

.checkout2-payment-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    text-align: center; /* Center the title */
}

/* Payment Brand Icons Row */
.checkout2-payment-brands {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center; /* Center the payment icons */
    margin-bottom: 24px;
}

.checkout2-brand-icon {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Payment Form Wrapper - Constrains form width on large screens */
.checkout2-payment-form-wrapper {
    max-width: 700px; /* Prevent form from stretching too wide */
    margin: 0 auto; /* Center the form */
    width: 100%;
}

/* Payment Card Container */
.checkout2-payment-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    background-color: #f9fafb;
}

/* Radio Button Section */
.checkout2-payment-radio {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.checkout2-radio-input {
    width: 20px;
    height: 20px;
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: #ec5569;
}

.checkout2-radio-label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    margin: 0;
}

/* Card Form */
.checkout2-card-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkout2-form-group {
    display: flex;
    flex-direction: column;
}

.checkout2-form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.checkout2-form-input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    color: #1f2937;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Raleway', sans-serif;
}

.checkout2-form-input:focus {
    outline: none;
    border-color: #ec5569;
    box-shadow: 0 0 0 3px rgba(236, 85, 105, 0.1);
}

.checkout2-form-input::placeholder {
    color: #9ca3af;
}

/* Terms and Conditions Checkbox */
.checkout2-terms-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
}

.checkout2-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #ec5569;
    flex-shrink: 0;
}

.checkout2-terms-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
    cursor: pointer;
}

.checkout2-terms-link {
    color: #ec5569;
    text-decoration: none;
    font-weight: 500;
}

.checkout2-terms-link:hover {
    text-decoration: underline;
}

/* ===================================================================
   SAVE BUTTON SECTION
   =================================================================== 
   Save button appears after the terms checkbox and before action buttons.
   - Horizontally centered using flexbox wrapper
   - Pink background (#ec5569) matching site theme
   - White text for contrast
   - Fully responsive: shrinks to full width on mobile
   =================================================================== */

/* Save Button Wrapper - Centers the button horizontally */
.checkout2-save-button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px; /* Space above button after checkbox */
    width: 100%; /* Full width container for proper centering */
}

/* Save Button - Pink background with white text, centered and SMALLER */
.checkout2-btn-save {
    padding: 10px 32px; /* Reduced padding for smaller button */
    background-color: #ec5569; /* Pink background matching site theme */
    color: #ffffff; /* White text for readability */
    border: none;
    border-radius: 30px; /* Rounded pill-shaped button */
    font-size: 14px; /* Smaller font size */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease; /* Smooth hover transitions */
    font-family: 'Raleway', sans-serif;
    min-width: 140px; /* Reduced minimum width */
}

/* Save button hover effect - Darkens and lifts */
.checkout2-btn-save:hover {
    background-color: #d94458; /* Darker pink on hover */
    transform: translateY(-2px); /* Lift effect */
    box-shadow: 0 6px 16px rgba(236, 85, 105, 0.3); /* Shadow for depth */
}

/* Save button active/click state - Returns to normal position */
.checkout2-btn-save:active {
    transform: translateY(0); /* Remove lift on click */
}

/* ===================================================================
   BUTTONS SECTION - Separate from payment form
   ===================================================================
   Buttons are now in their own section outside the payment form.
   This provides better visual separation and layout flexibility.
   =================================================================== */

.checkout2-buttons-section {
    margin-top: 32px; /* Space above buttons section */
    padding: 0;
}

/* Action Buttons Row - Place order and Continue Shopping buttons */
.checkout2-buttons-row {
    display: flex;
    justify-content: space-between; /* One button left, one button right */
    align-items: center;
    margin-top: 24px;
    gap: 16px; /* Maintain gap for responsive stacking */
    flex-wrap: wrap;
}

/* Place Order Button - Primary Pink Button (Left-aligned) */
.checkout2-btn-place {
    flex: 0 1 auto; /* Don't grow, allow natural width */
    min-width: 160px;
    padding: 14px 32px;
    background-color: #ec5569;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Raleway', sans-serif;
}

.checkout2-btn-place:hover {
    background-color: #d94458;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(236, 85, 105, 0.3);
}

.checkout2-btn-place:active {
    transform: translateY(0);
}

/* Continue Shopping Button - Outlined Button (Right-aligned) */
.checkout2-btn-continue {
    flex: 0 1 auto; /* Don't grow, allow natural width */
    min-width: 180px;
    padding: 14px 32px;
    background-color: transparent;
    color: #1f2937;
    border: 2px solid #d1d5db;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Raleway', sans-serif;
}

.checkout2-btn-continue:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

/* ===================================================================
   6. SUBTOTAL CARD (Right Column)
   =================================================================== */

.checkout2-subtotal-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    position: sticky;
    top: 140px; /* Sticky positioning for desktop scrolling */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkout2-subtotal-heading {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Subtotal Items List */
.checkout2-subtotal-list {
    margin-bottom: 20px;
}

.checkout2-subtotal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.checkout2-subtotal-label {
    font-size: 15px;
    color: #4b5563;
    font-weight: 400;
}

.checkout2-subtotal-price {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
}

/* Final Total Row */
.checkout2-subtotal-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
    margin-top: 16px;
}

.checkout2-final-label {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.checkout2-final-price {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

/* ===================================================================
   7. RESPONSIVE DESIGN (Tablet & Mobile)
   =================================================================== */

/* TABLET: 992px and below */
@media (max-width: 992px) {
    .checkout2-page-wrapper {
        padding-top: 100px;
    }

    .checkout2-progress-section {
        padding: 25px 15px 40px;
    }

    .checkout2-main-section {
        padding: 30px 0 70px; /* Maintain full-width approach */
    }

    .checkout2-billing-header {
        padding: 0;
        margin-bottom: 28px;
    }

    .checkout2-main-heading {
        font-size: 26px;
    }

    .checkout2-order-section {
        padding: 24px;
    }

    .checkout2-payment-section {
        padding: 24px;
    }

    .checkout2-steps-container {
        margin-bottom: 16px;
    }

    .checkout2-step {
        width: 40px;
        height: 40px;
    }

    .checkout2-step-number {
        font-size: 16px;
    }

    .checkout2-step-line {
        width: 80px;
    }

    .checkout2-step-label {
        font-size: 14px;
    }

    .checkout2-subtotal-card {
        position: static; /* Remove sticky on tablet */
        margin-top: 30px;
        margin-bottom: 20px;
    }
}

/* MOBILE: 768px and below */
@media (max-width: 768px) {
    .checkout2-page-wrapper {
        padding-top: 90px;
    }

    .checkout2-main-section {
        padding: 25px 0 60px; /* Maintain full-width approach */
    }

    .checkout2-progress-section {
        padding: 20px 12px 35px;
    }

    .checkout2-billing-header {
        padding: 0;
        margin-bottom: 24px;
    }

    .checkout2-main-heading {
        font-size: 24px;
        padding-bottom: 10px;
        margin-bottom: 6px;
    }

    .checkout2-order-section {
        padding: 20px;
        border-radius: 10px;
    }

    .checkout2-section-title {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .checkout2-payment-section {
        padding: 20px;
        border-radius: 10px;
    }

    .checkout2-payment-title {
        font-size: 18px;
    }

    /* Payment form wrapper - full width on mobile */
    .checkout2-payment-form-wrapper {
        max-width: 100%;
    }

    .checkout2-step {
        width: 36px;
        height: 36px;
    }

    .checkout2-step-number {
        font-size: 15px;
    }

    .checkout2-step-line {
        width: 60px;
    }

    .checkout2-step-label {
        font-size: 13px;
    }

    .checkout2-subtotal-heading {
        font-size: 16px;
    }

    .checkout2-subtotal-card {
        margin-top: 24px;
        padding: 20px;
    }

    /* Stack buttons vertically on mobile and center them */
    .checkout2-buttons-row {
        flex-direction: column;
        align-items: stretch; /* Full width buttons */
        justify-content: center;
    }

    .checkout2-btn-place,
    .checkout2-btn-continue {
        width: 100%;
        min-width: 100%;
    }

    /* Save button responsive - full width on mobile */
    .checkout2-btn-save {
        width: 100%;
        max-width: 100%;
    }
}

/* SMALL MOBILE: 535px and below */
@media (max-width: 535px) {
    .checkout2-billing-header {
        padding: 0;
    }

    .checkout2-main-heading {
        font-size: 20px;
        padding-bottom: 0;
        margin-bottom: 18px;
    }

    .checkout2-order-section {
        padding: 18px;
    }

    .checkout2-payment-section {
        padding: 18px;
    }

    .checkout2-step {
        width: 32px;
        height: 32px;
    }

    .checkout2-step-number {
        font-size: 14px;
    }

    .checkout2-step-line {
        width: 45px;
    }

    .checkout2-step-label {
        font-size: 12px;
    }

    .checkout2-main-heading {
        font-size: 20px;
    }

    .checkout2-order-section {
        padding: 16px;
    }

    .checkout2-payment-card {
        padding: 16px;
    }

    .checkout2-subtotal-card {
        padding: 20px;
    }
}

/* EXTRA SMALL: 420px and below */
@media (max-width: 420px) {
    .checkout2-page-wrapper {
        padding-top: 70px;
    }

    .checkout2-progress-section {
        padding: 16px 10px 28px;
    }

    .checkout2-main-section {
        padding: 20px 0 50px; /* Minimal padding, maintain full-width */
    }

    .checkout2-billing-header {
        padding: 0;
        margin-bottom: 20px;
    }

    .checkout2-main-heading {
        font-size: 22px;
        padding-bottom: 8px;
        margin-bottom: 6px;
    }

    .checkout2-order-section {
        padding: 18px;
        border-radius: 8px;
    }

    .checkout2-section-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .checkout2-payment-section {
        padding: 18px;
        border-radius: 8px;
    }

    .checkout2-payment-title {
        font-size: 18px;
    }

    .checkout2-step {
        width: 28px;
        height: 28px;
    }

    .checkout2-step-number {
        font-size: 12px;
    }

    .checkout2-step-line {
        width: 35px;
    }

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

    .checkout2-main-heading {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .checkout2-order-section {
        padding: 14px;
    }

    .checkout2-section-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .checkout2-product-name {
        font-size: 15px;
    }

    .checkout2-product-price {
        font-size: 15px;
    }

    .checkout2-payment-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .checkout2-payment-brands {
        gap: 12px;
    }

    .checkout2-brand-icon {
        height: 26px;
    }

    .checkout2-payment-card {
        padding: 14px;
    }

    .checkout2-form-input {
        padding: 10px 14px;
        font-size: 14px;
    }

    /* Responsive sizing for buttons on extra small screens */
    .checkout2-btn-save {
        padding: 10px 24px; /* Maintain smaller size */
        font-size: 14px;
    }

    .checkout2-btn-place,
    .checkout2-btn-continue {
        padding: 12px 20px;
        font-size: 15px;
    }

    .checkout2-subtotal-card {
        padding: 18px;
    }

    .checkout2-subtotal-heading {
        font-size: 16px;
        margin-bottom: 18px;
    }

    .checkout2-subtotal-label,
    .checkout2-subtotal-price {
        font-size: 14px;
    }

    .checkout2-final-label {
        font-size: 16px;
    }

    .checkout2-final-price {
        font-size: 18px;
    }
}
