/* Checkout Modal CSS - Single Page Layout */

:root {
    --bg-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --primary-black: #111827;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --radius: 12px;
    --space-md: 1.5rem;
    --mobile-footer-height: 80px;
    --white: #ffffff;
    --accent-green: #22c55e;
}

/* Modal Overlay */
.checkout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10002;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.checkout-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Container */
.checkout-modal-container {
    background: var(--bg-color);
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    /* Fixed height for modal feel */
    border-radius: var(--radius);
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    /* Important for internal scrolling */
    display: flex;
    flex-direction: column;
}

.checkout-modal-overlay.active .checkout-modal-container {
    transform: translateY(0);
}

/* Close Button */
.checkout-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-modal-close:hover {
    color: var(--primary-black);
    background: #fff;
}

/* Layout Grid */
.checkout-layout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    height: 100%;
    overflow: hidden;
}

/* --- Left Column: Scrollable Form --- */
.checkout-form-column {
    padding: 30px 40px;
    overflow-y: auto;
    background: #fff;
}

.checkout-section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.checkout-section:last-child {
    border-bottom: none;
    margin-bottom: 60px;
    /* Space for mobile footer if needed */
}

#authSection h2 {
    display: none;
}

.checkout-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Scope section-header to checkout only */
.checkout-modal .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

/* --- Right Column: Summary (Desktop Sticky) --- */
.checkout-summary-column {
    position: sticky;
    top: 120px;
    /* Adjusted for navbar - matches cart.css .summary-wrapper */
}

.summary-card {
    background-color: var(--surface);
    padding: 30px;
    border-radius: 8px;
}

.summary-header {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Summary Cost Rows - Match Cart Page */
.cost-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    align-items: center;
}

.cost-row span:first-child {
    color: #111;
}

.cost-row span:last-child {
    font-weight: 600;
}

/* Discounts Section */
.discounts-section {
    margin-bottom: 12px;
}

.discounts-section>div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.discounts-section>div:first-child span:last-child {
    font-weight: 600;
}

.discounts-list {
    display: none;
    margin-top: 8px;
    padding-left: 0;
}

.discounts-list>div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.discounts-list>div span:first-child {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

.discounts-list>div span:last-child {
    color: #1f7f23;
}

/* Total Row */
.total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

/* Savings Banner */
.savings-box,
.savings-banner {
    background: #ecfdf5;
    color: #1f7f23;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 0.9em;
    font-weight: 400;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.close-mobile-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Product List */
.product-list-scroll {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item-preview {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-preview:last-child {
    border-bottom: none;
}

.cart-item-img img {
    width: 60px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
}

.cart-item-info h4 {
    font-size: 14px;
    margin: 0 0 4px;
    font-weight: 500;
}

.cart-item-meta {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Cost Breakdown */
.cost-breakdown {
    margin-top: 10px;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cost-row.total {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
}

/* Auth / Login Styles (Preserved/Updated) */
.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.input-text {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.input-text:focus {
    border-color: var(--primary-black);
}

/* Phone Group - Standard Style */
.phone-input-wrapper {
    display: flex;
    gap: 10px;
    border: none;
    border-radius: 0;
    background: transparent;
}

.country-code {
    padding: 0 16px;
    background: #f3f4f6;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.phone-input-wrapper .input-text {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    flex: 1;
}

.phone-input-wrapper:focus-within {
    border-color: transparent;
    background: transparent;
}

.center-text {
    text-align: center;
    letter-spacing: 4px;
    font-weight: 600;
    font-size: 18px;
}

/* Buttons */
.checkout-btn-primary {
    width: 100%;
    background: var(--primary-black);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkout-btn-primary:hover {
    background: #000;
}

.checkout-btn-desktop {
    width: 100%;
    background: var(--primary-black);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
}

.checkout-btn-mobile {
    background-color: var(--primary-black);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
}

/* Address Styling */
.btn-text-action {
    background: none;
    border: none;
    color: var(--primary-black);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.address-card {
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.address-card:hover {
    border-color: #9ca3af;
}

.address-card.selected {
    border-color: var(--primary-black);
    background: #f9fafb;
    box-shadow: 0 0 0 1px var(--primary-black);
}

.address-card h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
}

.address-card .addr-text {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.check-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--primary-black);
    display: none;
}

.address-card.selected .check-icon {
    display: block;
}

/* Payment Options */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.payment-option-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.payment-option-card:hover {
    border-color: #9ca3af;
}

.payment-option-card input {
    margin-right: 16px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-black);
}

.payment-content {
    flex: 1;
}

.payment-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-black);
}

.payment-desc {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.payment-icon {
    color: var(--text-secondary);
}

/* Payment Option Selected State */
.payment-option-card:has(input:checked) {
    border-color: var(--primary-black);
    background: #f9fafb;
}

/* Coupon */
.coupon-wrapper {
    display: flex;
    gap: 8px;
}

.btn-apply {
    padding: 0 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

/* Mobile Footer Bar */
.mobile-footer-bar {
    display: none;
}

.mobile-drawer-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* Address Sub-Modal (Popup) */
.address-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 70;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.address-popup-container {
    background: #fff;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.address-popup-container h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.name-row {
    display: flex;
    gap: 12px;
}

.name-row .form-row {
    flex: 1;
}

.popup-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary {
    padding: 14px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
}

/* Error/Success Messages */
.input-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.input-error.show {
    display: block;
}

#couponMessage {
    font-size: 12px;
    margin-top: 6px;
}

#couponMessage.success {
    color: var(--accent-green);
}

#couponMessage.error {
    color: #ef4444;
}

/* Loader */
.checkout-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-black);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== CHECKOUT LAYOUT GRID (Desktop) ===== */
.checkout-layout-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 32px;
    height: 100%;
}

.checkout-form-column {
    overflow-y: auto;
    padding-right: 8px;
    /* Custom Scrollbar for form column */
}

/* Custom Scrollbar */
.checkout-form-column::-webkit-scrollbar {
    width: 6px;
}

.checkout-form-column::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.checkout-form-column::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}




/* Responsive Visibility */
.desktop-only {
    display: block;
}

.mobile-footer-bar {
    display: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .checkout-layout-grid {
        display: block;
        /* Stack vertically on mobile */
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-footer-bar {
        display: flex !important;
    }

    .checkout-form-column {
        padding-right: 0;
        padding-bottom: 100px;
        /* Space for footer */
    }

    .checkout-summary-column {
        display: block;
        /* Hide desktop summary on mobile */
    }

    .checkout-modal-container {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
    }

    .checkout-layout-grid {
        grid-template-columns: 1fr;
        display: block;
        /* Stack */
    }

    .checkout-form-column {
        height: calc(100% - var(--mobile-footer-height));
        /* Leave space for footer */
        padding: 20px;
        /* Extra padding bottom */
    }

    /* Drawer Logic */
    .checkout-summary-column {
        position: sticky;
        bottom: 0px;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 85vh;
        /* Max height when open */
        background: white;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 60;
        transform: translateY(110%);
        /* Hidden by default */
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 0;
        border-left: none;
    }

    .checkout-summary-column.open {
        transform: translateY(0);
    }

    .summary-card {
        padding: 24px;
        /* Padding to account for footer overlap is handled by footer z-index */
        padding-bottom: 90px;
    }

    .close-mobile-btn {
        display: block;
    }

    .checkout-btn-desktop {
        display: none;
    }

    /* Mobile Footer */
    .mobile-footer-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        border-top: 1px solid var(--border-color);
        padding: 15px 20px;
        z-index: 80;
        height: var(--mobile-footer-height);
        box-sizing: border-box;
    }

    .footer-info {
        display: flex;
        flex-direction: column;
    }

    .footer-total {
        font-weight: 700;
        font-size: 1.1rem;
    }

    .toggle-details-btn {
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
        text-align: left;
        padding: 0;
        margin-top: 2px;
        display: flex;
        align-items: center;
        gap: 4px;
    }
}

/* ===== OTP MODAL STYLES (For Address Popup) ===== */
.otp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10003;
    /* Above checkout modal */
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.otp-modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    animation: slideUpDesktop 0.3s ease;
    position: relative;
}

@keyframes slideUpDesktop {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.otp-modal-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    z-index: 10;
}

.otp-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    padding-right: 30px;
}

.otp-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.otp-close-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.otp-modal-body {
    padding: 24px;
}

.address-form-field {
    margin-bottom: 20px;
}

.address-form-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: none;
}

.address-form-field input,
.address-form-field select,
.address-form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.address-form-field input:focus,
.address-form-field select:focus,
.address-form-field textarea:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.address-form-field input:read-only,
.address-form-field select:disabled {
    background: #f9fafb;
    cursor: not-allowed;
    color: #9ca3af;
}

.address-form-field input::placeholder {
    color: #d1d5db;
}

.address-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.address-form-row .address-form-field {
    margin-bottom: 0;
}

/* Customer Information Heading */
.otp-modal-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 24px 0 16px 0;
}

.address-type-selector {
    display: flex;
    gap: 12px;
}

.address-type-selector label {
    flex: 1;
    text-align: center;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.address-type-selector label:hover {
    border-color: #9ca3af;
}

.address-type-selector input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.address-type-selector input[type="radio"]:checked+span {
    color: #fff;
}

.address-type-selector label:has(input[type="radio"]:checked) {
    border-color: #111827;
    background: #111827;
}

.address-type-selector label:has(input[type="radio"]:checked) span {
    color: #fff;
}

.address-type-selector span {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.otp-modal-footer {
    padding: 16px 24px 24px;
    background: #fff;
    position: sticky;
    bottom: 0;
}

.otp-verify-btn {
    width: 100%;
    padding: 16px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.otp-verify-btn:hover {
    background: #111827;
}

.otp-verify-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Mobile styles - slide from bottom */
@media (max-width: 768px) {
    .otp-modal {
        align-items: flex-end;
    }

    .otp-modal-content {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        animation: slideUpMobile 0.3s ease;
    }

    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .address-form-row {
        grid-template-columns: 1fr;
    }

    .otp-modal-header {
        padding: 16px 20px;
    }

    .otp-modal-body {
        padding: 20px;
    }

    .otp-modal-footer {
        padding: 12px 20px 20px;
    }
}

/* ===== NEW FLOATING LABEL STYLES ===== */
.floating-form-group {
    position: relative;
    margin-bottom: 20px;
}

.floating-input {
    width: 100%;
    padding: 16px 12px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #111;
    background: #fff;
    outline: none;
    transition: all 0.2s;
    height: 40px;
    box-sizing: border-box;
    font-family: inherit;
}

.floating-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

.floating-label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    background: #fff;
    padding: 0 4px;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.2s;
    pointer-events: none;
    line-height: 1;
}

.floating-input:focus~.floating-label,
.floating-input:not(:placeholder-shown)~.floating-label {
    top: 0;
    font-size: 12px;
    color: #111;
    font-weight: 500;
    transform: translateY(-50%);
}

.floating-input:read-only {
    background: #f9fafb;
    color: #4b5563;
    border-color: #f3f4f6;
}

.floating-input:read-only:focus {
    box-shadow: none;
    border-color: #e5e7eb;
}

/* Address Chip Selector */
.address-chip-selector {
    display: flex;
    gap: 12px;
}

.addr-chip {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
    height: 48px;
    position: relative;
    box-sizing: border-box;
    background: #fff;
    justify-content: space-between;
}

.addr-chip input {
    display: none;
}

.addr-chip:has(input:checked) {
    border-color: #000;
    background: #fff;
    color: #000;
    box-shadow: 0 0 0 1px #000;
}

/* Check Ring */
.check-ring {
    width: 18px;
    height: 18px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.addr-chip:has(input:checked) .check-ring {
    border-color: #000;
}

.check-ring div {
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.addr-chip:has(input:checked) .check-ring div {
    opacity: 1;
    transform: scale(1);
}

/* Mobile Adjustments for separate modal */
@media (max-width: 768px) {
    #addressPopup .otp-modal-content {
        max-height: 90vh;
        /* Allow more height for form */
        border-radius: 20px 20px 0 0;
    }
}

/* Desktop Force Styles */
@media (min-width: 769px) {

    .mobile-footer-bar,
    .mobile-drawer-overlay,
    .close-mobile-btn {
        display: none !important;
    }

    .checkout-summary-column {
        display: block !important;
        position: sticky !important;
        top: 120px !important;
        transform: none !important;
        border-left: none !important;
        background: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
}

/* --- Mobile Specific Fixes --- */
@media (max-width: 768px) {

    /* Hide desktop pay button on mobile */
    .checkout-btn-desktop,
    #desktopPayBtn {
        display: none !important;
    }

    /* Style the close button */
    .close-mobile-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: #f3f4f6;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        color: #374151;
        cursor: pointer;
        padding: 0;
    }

    .close-mobile-btn .ph {
        font-size: 18px;
        line-height: 1;
    }

    /* Ensure flex header alignment */
    .summary-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }
}

/* Ensure Icons are Visible */
.ph-caret-down,
.ph-caret-up {
    color: #6b7280;
    display: inline-block;
    vertical-align: middle;
}