/* ===== PREMIUM WOOCOMMERCE CHECKOUT STYLING ===== */

/* Base Reset & Fonts */
.woocommerce-checkout,
.woocommerce-checkout *,
.wc-block-checkout,
.wc-block-checkout * {
    font-family: 'Montserrat', sans-serif !important;
    box-sizing: border-box;
}

/* Page Setup & Layout */
.woocommerce-checkout .site-main {
    background-color: #ffffff;
    /* Light background for contrast with white cards */
    padding: 60px 0;
    overflow-x: hidden;
}

/* Prevent horizontal overflow from form grid */
.woocommerce-checkout form.checkout {
    overflow-x: hidden;
}

/* Align checkout page content with Header container (max-width 1120px, padding 20px) */
.woocommerce-checkout .entry-header,
.woocommerce-checkout .entry-content,
.woocommerce-checkout #main-container {
    max-width: 1120px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100% !important;
}

/* Zero out GP page wrappers double padding */
.woocommerce-checkout .grid-container,
.woocommerce-checkout .site-content,
.woocommerce-checkout .inside-article,
.woocommerce-checkout #primary,
.woocommerce-checkout #main {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ────────────────────────────────────────────────────────
   DISTRACTION-FREE CHECKOUT HEADER
   ──────────────────────────────────────────────────────── */
.clena-header.checkout-header {
    border-bottom: 1px solid #E5E7EB;
    background: #FFFFFF;
    padding: 16px 0;
    margin-bottom: 0;
}

.checkout-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.secure-checkout-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.secure-checkout-badge svg {
    color: var(--primary);
    stroke-width: 2.5px;
}

/* ────────────────────────────────────────────────────────
   TWO COLUMN LAYOUT GRID (CLASSIC & BLOCKS)
   ──────────────────────────────────────────────────────── */

/* Grid container for Classic Checkout */
.woocommerce-checkout form.checkout {
    display: grid !important;
    grid-template-columns: 1fr 400px !important;
    gap: 24px !important;
    align-items: start !important;
    margin-top: 20px;
}

/* Ensure checkout notices span full width in the grid layout */
.woocommerce-checkout form.checkout .woocommerce-NoticeGroup,
.woocommerce-checkout form.checkout .woocommerce-NoticeGroup-checkout,
.woocommerce-checkout form.checkout .woocommerce-error,
.woocommerce-checkout form.checkout .woocommerce-message,
.woocommerce-checkout form.checkout .woocommerce-info {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}


/* Grid container for Gutenberg Block Checkout */
.wc-block-checkout__container,
.wc-block-components-sidebar-layout,
.wc-block-components-checkout-layout {
    display: grid !important;
    grid-template-columns: 1fr 400px !important;
    gap: 24px !important;
    align-items: start !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ── Sticky Right Sidebar (Order Summary) ── */
.wc-block-checkout__sidebar,
.wc-block-components-sidebar-layout__sidebar,
.wc-block-components-checkout-layout__sidebar {
    position: sticky !important;
    top: 90px !important;
    align-self: start !important;
}

/* Classic checkout order review sticky */
.woocommerce-checkout-review-order {
    position: sticky !important;
    top: 90px !important;
    align-self: start !important;
}

/* ────────────────────────────────────────────────────────
   LEFT COLUMN: BILLING & SHIPPING FORM
   ──────────────────────────────────────────────────────── */
.woocommerce-checkout #customer_details,
.wc-block-checkout__main {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 16px !important;
    padding: 30px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01) !important;
}

/* Header style for sections */
.woocommerce-checkout #customer_details h3,
.wc-block-checkout__main h2,
.wc-block-checkout__main h3,
.woocommerce-checkout h3#order_review_heading {
    color: var(--primary) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 24px !important;
    padding-bottom: 0 !important;
    border: none !important;
    text-transform: none !important;
}

.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin-bottom: 30px;
}

.woocommerce-checkout #customer_details .col-2:last-child {
    margin-bottom: 0;
}

/* Form controls styling */
.woocommerce-checkout form .form-row {
    margin-bottom: 20px !important;
    padding: 0 !important;
}

.woocommerce-checkout form .form-row label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 8px !important;
}

.woocommerce-checkout form .form-row input.input-text,
.woocommerce-checkout form .form-row select,
.woocommerce-checkout form .form-row textarea {
    width: 100% !important;
    height: 50px !important;
    border-radius: 8px !important;
    border: 1px solid #E5E7EB !important;
    background: #FFFFFF !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    color: #111827 !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

/* Gutenberg block checkout floating input styling to prevent label overlapping */
.wc-block-components-text-input input,
.wc-block-components-combobox input {
    width: 100% !important;
    height: 56px !important;
    border-radius: 8px !important;
    border: 1px solid #E5E7EB !important;
    background: #FFFFFF !important;
    padding: 22px 16px 4px 16px !important;
    font-size: 14px !important;
    color: #111827 !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce-checkout form .form-row textarea {
    height: 100px !important;
}

.woocommerce-checkout form .form-row input.input-text:focus,
.woocommerce-checkout form .form-row select:focus,
.woocommerce-checkout form .form-row textarea:focus,
.wc-block-components-text-input input:focus,
.wc-block-components-combobox input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) !important;
}

/* 2-Column align inline fields */
@media (min-width: 768px) {

    .woocommerce-checkout form .form-row-first,
    .woocommerce-checkout form .form-row-last {
        width: 48% !important;
        float: left !important;
        clear: none !important;
    }

    .woocommerce-checkout form .form-row-first {
        margin-right: 4% !important;
    }

    .woocommerce-checkout form .form-row-wide {
        width: 100% !important;
        clear: both !important;
        float: none !important;
    }

    /* Clearfix for form rows */
    .woocommerce-checkout #customer_details::after,
    .woocommerce-checkout form.checkout::after,
    .woocommerce-checkout form .form-row::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
}

/* Styling WooCommerce native Select2/Dropdown boxes */
.select2-container--default .select2-selection--single {
    height: 50px !important;
    border-radius: 8px !important;
    border: 1px solid #E5E7EB !important;
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #111827 !important;
    font-size: 14px !important;
    padding-left: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    right: 12px !important;
}

.select2-dropdown {
    border: 1px solid #E5E7EB !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Shipping & Billing Form Banner */
.checkout-form-banner {
    margin-top: 32px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
}

.checkout-form-banner img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

/* ────────────────────────────────────────────────────────
   RIGHT COLUMN: YOUR ORDER (SIDEBAR CARD)
   ──────────────────────────────────────────────────────── */
.woocommerce-checkout-review-order,
.wc-block-checkout__sidebar,
.wc-block-components-sidebar-layout__sidebar,
.wc-block-components-checkout-layout__sidebar {
    position: sticky !important;
    top: 100px !important;
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 16px !important;
    padding: 30px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01) !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Strip inner block styling on desktop to avoid double card borders and padding issues */
.wc-block-components-sidebar,
.wp-block-woocommerce-checkout-order-summary-block {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Header style inside order card */
.woocommerce-checkout #order_review_heading {
    display: none !important;
    /* Hide classic outside title */
}

.wc-block-checkout__sidebar h2,
.woocommerce-checkout-review-order::before {
    content: "Your Order" !important;
    display: block !important;
    color: var(--primary) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 24px !important;
    padding-bottom: 0 !important;
    border: none !important;
    text-transform: none !important;
}

/* ── Product List Row Styling ── */
.woocommerce-checkout-review-order-table,
.wc-block-components-totals-wrapper {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 20px !important;
}

/* Styling table inside classic review order */
table.woocommerce-checkout-review-order-table thead {
    display: none !important;
    /* Hide header row */
}

table.woocommerce-checkout-review-order-table tr.cart_item {
    border-bottom: 1px solid #F3F4F6 !important;
    display: table-row !important;
}

table.woocommerce-checkout-review-order-table tr.cart_item td.product-name {
    padding: 16px 0 !important;
    background: none !important;
    border: none !important;
    display: table-cell !important;
    width: 75% !important;
    text-align: left !important;
    vertical-align: middle !important;
}

table.woocommerce-checkout-review-order-table tr.cart_item td.product-total {
    padding: 16px 0 !important;
    background: none !important;
    border: none !important;
    display: table-cell !important;
    width: 25% !important;
    text-align: right !important;
    vertical-align: middle !important;
    font-weight: 700 !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Hide default product quantity markup appended by WooCommerce */
table.woocommerce-checkout-review-order-table tr.cart_item td.product-name strong.product-quantity {
    display: none !important;
}

/* Create flex-like product display using helper CSS */
.checkout-product-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    width: 100% !important;
}

.checkout-product-details {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
}

.checkout-product-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    padding: 4px;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.checkout-product-thumbnail a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.checkout-product-thumbnail img,
.checkout-product-thumbnail a img,
.wc-block-components-order-summary-item__image img,
.wc-block-components-order-summary-item__image a img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: auto !important;
}

.checkout-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkout-product-name {
    font-size: 14px;
    font-weight: 700;
    color: #111111;
    line-height: 1.4;
    display: block !important;
}

.checkout-product-qty {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
}

/* ── Calculations Lines ── */
table.woocommerce-checkout-review-order-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    margin-bottom: 20px !important;
}

table.woocommerce-checkout-review-order-table th,
table.woocommerce-checkout-review-order-table td {
    border: none !important;
    background: transparent !important;
    padding: 14px 0 !important;
    font-family: 'Montserrat', sans-serif !important;
    vertical-align: top !important;
}

table.woocommerce-checkout-review-order-table tr {
    border-bottom: 1px solid #F3F4F6 !important;
}

table.woocommerce-checkout-review-order-table tr.cart_item td {
    padding: 16px 0 !important;
}

/* Subtotal Row & Labels */
table.woocommerce-checkout-review-order-table tr.cart-subtotal th,
table.woocommerce-checkout-review-order-table tr.shipping th,
table.woocommerce-checkout-review-order-table tr.tax-rate th {
    text-align: left !important;
    font-weight: 600 !important;
    color: #4B5563 !important;
    font-size: 14px !important;
    width: 35% !important;
}

table.woocommerce-checkout-review-order-table tr.cart-subtotal td,
table.woocommerce-checkout-review-order-table tr.shipping td,
table.woocommerce-checkout-review-order-table tr.tax-rate td {
    text-align: right !important;
    font-weight: 700 !important;
    color: #111827 !important;
    font-size: 14px !important;
    width: 65% !important;
}

/* Grand Total Row */
table.woocommerce-checkout-review-order-table tr.order-total th {
    text-align: left !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    padding: 24px 0 12px 0 !important;
    width: 35% !important;
}

table.woocommerce-checkout-review-order-table tr.order-total td {
    text-align: right !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    padding: 24px 0 12px 0 !important;
    width: 65% !important;
}

/* Shipping Method Selection inside Table Cell */
table.woocommerce-checkout-review-order-table ul#shipping_method {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: right !important;
}

table.woocommerce-checkout-review-order-table ul#shipping_method li {
    display: inline-block !important;
    width: 100% !important;
    padding: 6px 12px !important;
    margin: 0 0 6px 0 !important;
    background: #F8F9FB !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    box-sizing: border-box !important;
    text-align: right !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

table.woocommerce-checkout-review-order-table ul#shipping_method li:hover {
    border-color: var(--primary) !important;
    background: #FAFAFA !important;
}

table.woocommerce-checkout-review-order-table ul#shipping_method li.active-shipping-option {
    border-color: var(--primary) !important;
    background: #F4F4F5 !important;
    color: var(--primary) !important;
}

table.woocommerce-checkout-review-order-table ul#shipping_method li input[type="radio"] {
    margin-left: 8px !important;
    margin-right: 0 !important;
    accent-color: var(--primary) !important;
    float: right !important;
    margin-top: 4px !important;
}

table.woocommerce-checkout-review-order-table ul#shipping_method li label {
    cursor: pointer !important;
    display: block !important;
    text-align: right !important;
    line-height: 1.4 !important;
    padding-right: 22px !important;
    font-weight: 600 !important;
}

/* ────────────────────────────────────────────────────────
   PAYMENT METHOD SECTION
   ──────────────────────────────────────────────────────── */
.woocommerce-checkout #payment {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.woocommerce-checkout #payment ul.payment_methods li {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 12px !important;
    padding: 18px 20px !important;
    margin-bottom: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: block !important;
}

.woocommerce-checkout #payment ul.payment_methods li:hover {
    border-color: var(--primary) !important;
    background: #FAFAFA !important;
}

.woocommerce-checkout #payment ul.payment_methods li.active-payment-option {
    border-color: var(--primary) !important;
    background: #F4F4F5 !important;
}

.woocommerce-checkout #payment ul.payment_methods li > input[type="radio"] {
    float: left !important;
    margin-top: 4px !important;
    margin-right: 12px !important;
    accent-color: var(--primary) !important;
    transform: scale(1.2) !important;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    display: block !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 22px !important;
}

/* Hide the giant PayHere image in the label */
.woocommerce-checkout #payment ul.payment_methods li label img {
    display: none !important;
}

.woocommerce-checkout #payment ul.payment_methods li::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* Payment description details panel styling */
.woocommerce-checkout #payment div.payment_box {
    margin: 12px 0 0 0 !important;
    padding: 16px 18px !important;
    background: #F8F9FB !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #4B5563 !important;
    font-weight: 500 !important;
    clear: both !important;
}

.woocommerce-checkout #payment div.payment_box::before {
    display: none !important;
}

/* Hide logo inside the description box as well */
.woocommerce-checkout #payment div.payment_box img,
.woocommerce-checkout #payment div.payment_box p img {
    display: none !important;
}

/* ── Agreement Checkbox ── */
.woocommerce-checkout-payment-wrapper .form-row.terms,
.woocommerce-checkout #payment .place-row,
.wc-block-checkout__agreement {
    margin: 20px 0 !important;
    padding: 0 !important;
}

.woocommerce-checkout-payment-wrapper .form-row.terms label,
.woocommerce-checkout #payment .place-row label,
.wc-block-checkout__agreement label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    color: #6B7280 !important;
    cursor: pointer !important;
}

.woocommerce-checkout-payment-wrapper .form-row.terms label a,
.woocommerce-checkout #payment .place-row label a,
.wc-block-checkout__agreement a {
    color: var(--primary) !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

.woocommerce-checkout-payment-wrapper .form-row.terms input[type="checkbox"],
.woocommerce-checkout #payment .place-row input[type="checkbox"],
.wc-block-checkout__agreement input[type="checkbox"] {
    margin-top: 2px !important;
    transform: scale(1.1) !important;
    accent-color: var(--primary) !important;
    flex-shrink: 0 !important;
}

/* ── Place Order Button ── */
.woocommerce-checkout #payment #place_order,
.wc-block-checkout__submit-button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 54px !important;
    background: var(--primary) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 30px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
    text-decoration: none !important;
    margin-top: 15px !important;
}

.woocommerce-checkout #payment #place_order:hover,
.wc-block-checkout__submit-button:hover {
    background: var(--primary) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35) !important;
}

/* ── Trust Security Badge ── */
.checkout-trust-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

.checkout-trust-badge svg {
    color: #10B981;
    /* Green lock icon */
}

/* ────────────────────────────────────────────────────────
   RESPONSIVE / MOBILE LAYOUT OVERRIDES (< 991px)
   ──────────────────────────────────────────────────────── */
@media (max-width: 991px) {

    .woocommerce-checkout form.checkout,
    .wc-block-checkout__container,
    .wc-block-components-sidebar-layout,
    .wc-block-components-checkout-layout {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .woocommerce-checkout #customer_details,
    .wc-block-checkout__main,
    .wc-block-components-checkout-layout__main {
        padding: 20px !important;
        border-radius: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .woocommerce-checkout-review-order,
    .wc-block-checkout__sidebar,
    .wc-block-components-checkout-layout__sidebar {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px !important;
        border-radius: 12px !important;
    }

    /* Premium mobile/tablet styling for WooCommerce order summary toggle banner */
    .wc-block-components-checkout-layout__sidebar-toggle,
    .wc-block-checkout__sidebar-toggle,
    .wc-block-components-sidebar-layout__toggle {
        background-color: #f8fafc !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 16px 20px !important;
        margin-bottom: 20px !important;
        font-family: 'Montserrat', sans-serif !important;
        font-weight: 700 !important;
        color: #111827 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .wc-block-components-checkout-layout__sidebar-toggle:hover,
    .wc-block-checkout__sidebar-toggle:hover,
    .wc-block-components-sidebar-layout__toggle:hover {
        background-color: #ffffff !important;
        border-color: var(--primary) !important;
    }

    /* Fix alignments and internal spacings of the toggle elements */
    .wc-block-components-checkout-layout__sidebar-toggle-text,
    .wc-block-components-sidebar-layout__toggle-text {
        font-size: 13.5px !important;
        font-weight: 700 !important;
        color: #111827 !important;
    }

    .wc-block-components-checkout-layout__sidebar-toggle-total,
    .wc-block-components-sidebar-layout__toggle-total {
        font-size: 14.5px !important;
        font-weight: 800 !important;
        color: var(--primary) !important;
    }

    /* Ensure checkout item details on mobile are balanced */
    .wc-block-components-order-summary-item {
        padding: 12px 0 !important;
        gap: 12px !important;
    }

    /* Style block checkout product name to be black Montserrat on mobile */
    .wc-block-components-product-name,
    .wc-block-components-product-name a,
    .wc-block-components-order-summary-item__name,
    .wc-block-components-order-summary-item__name a {
        font-family: 'Montserrat', sans-serif !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #111111 !important;
        text-decoration: none !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    /* Prevent price wrapping on mobile/tablet */
    .wc-block-components-product-price,
    .wc-block-components-order-summary-item__price,
    .wc-block-components-totals-item__value {
        white-space: nowrap !important;
    }
}

/* Mobile-only View Overrides */
@media (max-width: 782px) {
    /* Hide duplicate sidebar on mobile (already handled by the top toggle) */
    .wc-block-checkout__sidebar,
    .wc-block-components-checkout-layout__sidebar {
        display: none !important;
    }

    /* Strip default card styling and nesting padding on mobile */
    .wc-block-components-sidebar {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Wrap the entire order summary block (including totals) inside the card */
    .wp-block-woocommerce-checkout-order-summary-block {
        background: #FFFFFF !important;
        border: 1px solid #E5E7EB !important;
        border-radius: 16px !important;
        padding: 20px !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hide the duplicate/overflowing product price on the right on mobile */
    .wc-block-components-order-summary-item__value {
        display: none !important;
    }
}

/* ==========================================================
   WOOCOMMERCE PAY FOR ORDER PAGE STYLING
   ========================================================== */
.woocommerce-order-pay {
    background-color: #F8F9FB !important;
}

.woocommerce-order-pay .site-main {
    padding: 80px 0 !important;
    background-color: #F8F9FB !important;
}

/* Pay for Order Container Card */
.woocommerce-order-pay #primary {
    max-width: 680px !important;
    margin: 0 auto !important;
    float: none !important;
    width: 100% !important;
}

.woocommerce-order-pay article.page {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 24px !important;
    padding: 50px 45px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
}

/* Title Styling */
.woocommerce-order-pay h1.entry-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    text-align: center !important;
    margin-bottom: 35px !important;
    margin-top: 0 !important;
    letter-spacing: -0.02em !important;
}

/* Order overview details list (horizontal metadata row) */
.woocommerce-order-pay ul.order_details {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 16px 28px !important;
    list-style: none !important;
    margin: 0 0 35px 0 !important;
    padding: 24px !important;
    background: #F8F9FB !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 16px !important;
}

.woocommerce-order-pay ul.order_details li {
    font-size: 11px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    color: #6B7280 !important;
    letter-spacing: 0.05em !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    border: none !important; /* clear default borders */
    padding: 0 !important; /* clear default paddings */
    margin: 0 !important;
}

/* Add custom divider lines inside the order details list */
.woocommerce-order-pay ul.order_details li:not(:last-child) {
    position: relative;
}

@media (min-width: 769px) {
    .woocommerce-order-pay ul.order_details li:not(:last-child)::after {
        content: "" !important;
        position: absolute !important;
        right: -14px !important;
        top: 10% !important;
        height: 80% !important;
        width: 1px !important;
        background: #E5E7EB !important;
    }
}

.woocommerce-order-pay ul.order_details li strong {
    font-size: 15px !important;
    text-transform: none !important;
    color: #111827 !important;
    font-weight: 800 !important;
    letter-spacing: normal !important;
    display: block !important;
    margin-top: 4px !important;
}

/* Pay instructions and button area */
.woocommerce-order-pay p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #4B5563 !important;
    text-align: center !important;
    margin-bottom: 24px !important;
}

/* Bold text inside the message */
.woocommerce-order-pay p strong {
    color: #111827 !important;
    font-weight: 700 !important;
}

/* Pay review form wrapper */
.woocommerce-order-pay form#order_review {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    align-items: center !important;
    margin-top: 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
}

/* Submit Pay Button */
.woocommerce-order-pay form#order_review #place_order,
.woocommerce-order-pay .woocommerce-button.button.pay {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 240px !important;
    padding: 15px 36px !important;
    background: var(--primary) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 30px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 14px rgba(43, 56, 144, 0.20) !important;
    text-decoration: none !important;
    margin-top: 10px !important;
}

.woocommerce-order-pay form#order_review #place_order:hover,
.woocommerce-order-pay .woocommerce-button.button.pay:hover {
    background: var(--secondary) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 173, 239, 0.32) !important;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .woocommerce-order-pay .site-main {
        padding: 40px 0 !important;
    }

    .woocommerce-order-pay article.page {
        padding: 30px 20px !important;
        border-radius: 16px !important;
    }

    .woocommerce-order-pay h1.entry-title {
        font-size: 26px !important;
        margin-bottom: 25px !important;
    }

    .woocommerce-order-pay ul.order_details {
        gap: 12px 16px !important;
        padding: 16px !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .woocommerce-order-pay ul.order_details li {
        font-size: 10px !important;
        width: 100% !important;
        border-bottom: 1px solid #E5E7EB !important;
        padding-bottom: 10px !important;
    }

    .woocommerce-order-pay ul.order_details li:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .woocommerce-order-pay ul.order_details li strong {
        font-size: 13px !important;
    }
}

/* ── Out of Zone Delivery Warning Banner ── */
.clena-delivery-info-box {
    display: none;
    align-items: center !important;
    gap: 16px !important;
    background-color: #FFFBEB !important; /* Premium soft amber-yellow background */
    border: 1px solid #FEF3C7 !important; /* Soft yellow border */
    border-left: 5px solid #F59E0B !important; /* Strong amber left accent accent */
    color: #92400E !important; /* Dark warm brown-amber text for readability */
    font-size: 14px !important;
    line-height: 1.6 !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 30px !important;
    font-family: 'Montserrat', sans-serif !important;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.05), 0 2px 4px -1px rgba(245, 158, 11, 0.03) !important;
    text-align: left !important;
}

.clena-delivery-info-box.visible {
    display: flex !important;
}

.clena-delivery-info-box::before {
    display: none !important; /* Hide default WooCommerce info symbol */
}

.clena-notice-icon {
    color: #D97706 !important;
    flex-shrink: 0 !important;
}

.clena-delivery-info-box strong {
    color: #78350F !important;
}

/* ===== WOOCOMMERCE ERROR BANNER STYLING ===== */
.wc-block-components-notice-banner.is-error,
.woocommerce-error {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    background-color: #FFF5F5 !important; /* Premium soft red-pink background */
    border: 1px solid #FED7D7 !important; /* Soft red border */
    border-left: 5px solid #E53E3E !important; /* Strong red left accent line */
    color: #C53030 !important; /* Dark warm red text for readability */
    font-size: 14px !important;
    line-height: 1.6 !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 30px !important;
    font-family: 'Montserrat', sans-serif !important;
    box-shadow: 0 4px 6px -1px rgba(229, 62, 62, 0.05), 0 2px 4px -1px rgba(229, 62, 62, 0.03) !important;
    text-align: left !important;
    width: 100% !important;
}

.wc-block-components-notice-banner.is-error::before,
.woocommerce-error::before {
    display: none !important; /* Hide default WooCommerce error symbol/bullet pseudo-element */
    content: none !important;
}

.wc-block-components-notice-banner.is-error svg,
.woocommerce-error svg {
    color: #E53E3E !important; /* Strong red color for warning/error icon */
    flex-shrink: 0 !important;
}

.wc-block-components-notice-banner.is-error strong,
.woocommerce-error strong {
    color: #9B2C2C !important; /* Rich dark red color for bold labels */
    font-weight: 700 !important;
}

.wc-block-components-notice-banner__content {
    flex-grow: 1 !important;
}

/* Ensure list items inside classic WooCommerce errors style nicely */
.woocommerce-error li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Select2 Dropdown Styling Overrides ── */
.woocommerce-checkout .select2-container--default .select2-selection--single {
    height: 50px !important;
    border-radius: 8px !important;
    border: 1px solid #E5E7EB !important;
    background: #FFFFFF !important;
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center !important;
    outline: none !important;
    width: 100% !important;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #111827 !important;
    font-size: 14px !important;
    padding-left: 0 !important;
    line-height: normal !important;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    right: 12px !important;
}

.woocommerce-checkout .select2-container--default .select2-selection--single:focus,
.woocommerce-checkout .select2-container--default .select2-selection--single[aria-expanded="true"] {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) !important;
}

.select2-dropdown {
    border: 1px solid #E5E7EB !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05) !important;
    z-index: 99999 !important;
}

.select2-results__option {
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-family: 'Montserrat', sans-serif !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: var(--primary) !important;
    color: #FFFFFF !important;
}

/* Disabled Place Order Button */
#place_order.clena-disabled-btn {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    background-color: #9CA3AF !important;
    border-color: #9CA3AF !important;
}

/* ===== PREMIUM CHECKOUT COUPON BANNER STYLING ===== */
.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
    display: block !important;
    background-color: #f9fafb !important; /* Minimal light gray background */
    border: 1px solid #e5e7eb !important; /* Simple clean border */
    border-left: 3px solid var(--primary) !important; /* Simple left accent */
    color: #4b5563 !important; /* Neutral dark gray text */
    font-size: 14px !important;
    line-height: 1.6 !important;
    border-radius: 8px !important;
    padding: 14px 20px !important;
    margin-bottom: 24px !important;
    box-shadow: none !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Hide the icon entirely */
.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before {
    display: none !important;
    content: none !important;
}

/* Click here to enter your code link styling */
.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a {
    color: var(--primary) !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    transition: color 0.2s ease !important;
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a:hover {
    color: var(--secondary) !important;
}

/* ==========================================================
   CHECKOUT MOBILE - FIX RIGHT SIDE HORIZONTAL OVERFLOW
   ========================================================== */

@media (max-width: 767px) {

    /* Keep the checkout page exactly within the viewport */
    body.woocommerce-checkout {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body.woocommerce-checkout #page,
    body.woocommerce-checkout .site,
    body.woocommerce-checkout .site-main,
    body.woocommerce-checkout .site-content,
    body.woocommerce-checkout #main,
    body.woocommerce-checkout #primary {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Checkout header */
    body.woocommerce-checkout .clena-header,
    body.woocommerce-checkout .checkout-header-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Main checkout wrappers */
    body.woocommerce-checkout .entry-content,
    body.woocommerce-checkout #main-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Checkout form */
    body.woocommerce-checkout form.checkout {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: hidden !important;
    }

    /* Checkout cards */
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout .woocommerce-checkout-review-order {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Prevent inputs/selects from creating horizontal overflow */
    body.woocommerce-checkout input,
    body.woocommerce-checkout select,
    body.woocommerce-checkout textarea,
    body.woocommerce-checkout .select2-container {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Images must stay inside the viewport */
    body.woocommerce-checkout img,
    body.woocommerce-checkout iframe {
        max-width: 100% !important;
    }
}

/* ===== SRI LANKAN PHONE VALIDATION FEEDBACK ===== */
.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select,
.woocommerce-checkout form .form-row.woocommerce-invalid input.input-text,
.woocommerce-checkout form .form-row.woocommerce-invalid select {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
}

.woocommerce form .form-row.woocommerce-validated input.input-text,
.woocommerce-checkout form .form-row.woocommerce-validated input.input-text {
    border-color: #10B981 !important;
}

.clena-phone-inline-error {
    color: #EF4444 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-top: 6px !important;
    display: block;
    font-family: 'Montserrat', sans-serif !important;
    line-height: 1.4 !important;
}

.form-row:not(.woocommerce-invalid) .clena-phone-inline-error {
    display: none !important;
}
