/* ==========================================================================
   AMERICA NUTRITION PREMIUM WOOCOMMERCE STYLES
   ========================================================================== */

/* Typography & Reset for Woo Pages */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
    font-family: var(--font-body);
    color: var(--black);
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

/* --------------------------------------------------------------------------
   CART PAGE STYLING
   -------------------------------------------------------------------------- */
.woocommerce-cart .woocommerce {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 992px) {
    .woocommerce-cart .woocommerce {
        display: grid !important;
        grid-template-columns: 1.4fr 1fr !important;
        gap: 40px !important;
        align-items: flex-start !important;
    }
    .woocommerce-cart .woocommerce-notices-wrapper {
        grid-column: 1 / span 2 !important;
        width: 100% !important;
    }
    .woocommerce-cart .woocommerce-cart-form {
        grid-column: 1 !important;
        margin-bottom: 0 !important;
    }
    .woocommerce-cart .cart-collaterals {
        grid-column: 2 !important;
        position: sticky !important;
        top: 130px !important;
        align-self: flex-start !important;
        margin-top: 0 !important;
        width: 100% !important;
    }
    .woocommerce-cart .woocommerce .cart-empty,
    .woocommerce-cart .woocommerce .return-to-shop {
        grid-column: 1 / span 2 !important;
    }
}

/* Cart Table */
.shop_table.cart {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 16px;
    margin-top: -16px;
    border: none;
}
.shop_table.cart thead th {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gray-600);
    border: none;
    padding: 10px 20px;
    text-align: left;
}
.shop_table.cart tbody tr.cart_item {
    background: #ffffff;
    border: 1px solid rgba(8, 13, 22, 0.07);
    border-radius: 18px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.shop_table.cart tbody tr.cart_item:hover {
    box-shadow: 0px 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}
.shop_table.cart td {
    border: none;
    padding: 24px 20px;
    vertical-align: middle;
}
.shop_table.cart td:first-child { border-radius: 12px 0 0 12px; }
.shop_table.cart td:last-child { border-radius: 0 12px 12px 0; }

/* Product Details in Cart */
.product-remove a.remove {
    color: var(--gray-400) !important;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    transition: color 0.2s;
}
.product-remove a.remove:hover {
    color: var(--brand-red, #E60000) !important;
    background: transparent !important;
}
.product-thumbnail img {
    width: 80px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.product-name a {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
}
.product-name a:hover {
    color: var(--brand-red, #E60000);
}
.product-price, .product-subtotal {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 16px;
}

/* Quantity Input */
.quantity input.qty {
    width: 60px;
    height: 40px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--black);
    background: var(--gray-100);
    transition: border-color 0.2s;
}
.quantity input.qty:focus {
    outline: none;
    border-color: var(--brand-red, #E60000);
    background: #ffffff;
}

/* Coupon & Actions */
.actions {
    padding: 24px 0 !important;
    background: transparent !important;
    border: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.coupon {
    display: flex;
    gap: 12px;
    align-items: stretch !important;
}
.coupon input.input-text {
    width: 200px !important;
    height: 44px !important;
    padding: 0 12px !important;
    border-radius: 6px !important;
    border: 1px solid var(--gray-200) !important;
    font-family: var(--font-body) !important;
    text-transform: uppercase !important;
}
.coupon button.button, .actions > button.button {
    height: 44px !important;
    background: var(--brand-red, #E60000) !important;
    color: #fff !important;
    border-radius: 6px !important;
    font-family: var(--font-display) !important;
    font-size: 16px !important;
    letter-spacing: 0.05em;
    padding: 0 20px !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.coupon button.button:hover, .actions > button.button:hover {
    background: var(--brand-red-dark, #C20000) !important;
}

/* Cart Totals */
.cart_totals {
    background: #ffffff;
    border: 1px solid rgba(8, 13, 22, 0.07);
    border-radius: 18px;
    padding: 32px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cart_totals:hover {
    box-shadow: 0px 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}
.cart_totals h2 {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 12px;
}
.shop_table.shop_table_responsive {
    width: 100%;
    margin-bottom: 24px;
}
.shop_table.shop_table_responsive th,
.shop_table.shop_table_responsive td {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}
.shop_table.shop_table_responsive th {
    font-weight: 600;
    color: var(--gray-600);
}
.shop_table.shop_table_responsive td {
    text-align: right;
    font-family: var(--font-mono);
    font-weight: 700;
}
.order-total th, .order-total td {
    font-size: 20px;
    border-bottom: none !important;
    color: var(--black);
}
.wc-proceed-to-checkout a.checkout-button {
    display: block;
    width: 100%;
    background: var(--brand-red, #E60000) !important;
    color: #fff !important;
    text-align: center;
    padding: 18px 0 !important;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 20px rgba(230,0,0,0.2);
}
.wc-proceed-to-checkout a.checkout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(230,0,0,0.3);
    background: var(--brand-red-dark, #C20000) !important;
}

/* Responsive Cart Mobile */
@media (max-width: 768px) {
    .woocommerce-cart .woocommerce { padding: 20px 15px; }
    .shop_table.cart thead { display: none; }
    .shop_table.cart tbody tr.cart_item {
        display: flex;
        flex-wrap: wrap;
        padding: 20px;
        position: relative;
    }
    .shop_table.cart td { padding: 8px 0; display: block; border: none !important; }
    .shop_table.cart td.product-remove {
        position: absolute;
        top: 10px;
        right: 15px;
    }
    .shop_table.cart td.product-thumbnail {
        width: 100px;
        margin-right: 20px;
    }
    .shop_table.cart td.product-name, 
    .shop_table.cart td.product-price, 
    .shop_table.cart td.product-quantity, 
    .shop_table.cart td.product-subtotal {
        width: calc(100% - 120px);
        text-align: left !important;
    }
    .shop_table.cart td.product-name a { font-size: 15px; }
    .shop_table.cart td::before { display: none !important; }
    .actions { flex-direction: column; align-items: stretch; }
    .coupon { flex-direction: column; width: 100%; }
    .coupon input.input-text { width: 100% !important; }
}


/* --------------------------------------------------------------------------
   CHECKOUT PAGE STYLING
   -------------------------------------------------------------------------- */
.woocommerce-checkout .woocommerce {
    position: relative;
}

.woocommerce-checkout form.checkout_coupon,
.woocommerce-checkout .woocommerce-form-login {
    background: #ffffff;
    border: 1px solid rgba(8, 13, 22, 0.07);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 20px;
}

.woocommerce-checkout form.checkout .clear {
    display: none !important;
}

.woocommerce-checkout .col2-set {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
}
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

@media (min-width: 992px) {
    .woocommerce-checkout form.checkout {
        display: grid !important;
        grid-template-columns: 1.4fr 1fr !important;
        gap: 40px !important;
        align-items: flex-start !important;
    }
    
    .woocommerce-checkout form.checkout > * {
        grid-column: 1 / span 2;
    }
    
    .woocommerce-checkout #customer_details {
        grid-column: 1 !important;
        grid-row: 1 / span 3 !important;
        margin-bottom: 0 !important;
    }
    
    .woocommerce-checkout #order_review_heading {
        grid-column: 2 !important;
        grid-row: 1 !important;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        border-bottom: 2px solid var(--brand-red, #E60000) !important;
        padding-bottom: 12px !important;
        display: block !important;
        width: 100% !important;
    }
    
    .woocommerce-checkout #order_review {
        grid-column: 2 !important;
        grid-row: 2 !important;
        background: #ffffff !important;
        border: 1px solid rgba(8, 13, 22, 0.07) !important;
        border-radius: 18px !important;
        padding: 32px !important;
        position: sticky !important;
        top: 130px !important;
        align-self: flex-start !important;
        transition: transform 0.2s, box-shadow 0.2s !important;
        margin-top: 0 !important;
        width: 100% !important;
    }
    
    .woocommerce-checkout #order_review:hover {
        box-shadow: 0px 8px 30px rgba(0,0,0,0.06) !important;
        transform: translateY(-3px) !important;
    }
}

.woocommerce-checkout h3 {
    font-family: var(--font-display);
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--brand-red, #E60000);
    padding-bottom: 12px;
    display: inline-block;
}

/* Form Fields */
.form-row {
    margin-bottom: 20px;
}
.form-row label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    display: block;
    margin-bottom: 8px;
}
.form-row label .required {
    color: var(--brand-red, #E60000);
}
.woocommerce-input-wrapper {
    width: 100%;
}
.input-text, .select2-container .select2-selection {
    width: 100%;
    height: 50px;
    background: #ffffff;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 0 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--black);
    transition: all 0.2s;
}
.input-text:focus {
    outline: none;
    border-color: var(--brand-red, #E60000);
    box-shadow: 0 0 0 4px rgba(230,0,0,0.05);
}
textarea.input-text {
    height: 120px;
    padding: 16px;
    resize: vertical;
}

/* Select2 Overrides for Woo */
.select2-container .select2-selection--single {
    height: 50px !important;
    border: 2px solid var(--gray-200) !important;
    border-radius: 8px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px !important;
    padding-left: 16px !important;
    color: var(--black) !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    right: 10px !important;
}

/* Order Review Table */
.woocommerce-checkout-review-order-table {
    width: 100%;
    margin-bottom: 24px;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}
.woocommerce-checkout-review-order-table th {
    text-align: left;
    color: var(--gray-600);
    font-weight: 500;
}
.woocommerce-checkout-review-order-table td {
    text-align: right;
    font-weight: 700;
}
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 20px;
    color: var(--black);
    border-bottom: none;
    padding-top: 24px;
}

/* Payment Methods */
#payment {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    padding: 24px;
    margin-bottom: 24px;
}
ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    border-bottom: 1px solid var(--gray-200);
}
ul.payment_methods li {
    margin-bottom: 16px;
}
ul.payment_methods label {
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}
.payment_box {
    background: var(--gray-100);
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 10px;
}
.payment_box::before { display: none !important; }

/* Place Order Button */
#place_order {
    width: 100%;
    background: var(--brand-red, #E60000);
    color: #fff;
    font-family: var(--font-display);
    font-size: 24px;
    padding: 20px 0;
    border-radius: 8px;
    border: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 20px rgba(230,0,0,0.2);
}
#place_order:hover {
    background: var(--brand-red-dark, #C20000);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(230,0,0,0.3);
}

/* Mobile Checkout */
@media (max-width: 768px) {
    .woocommerce-checkout .woocommerce { padding: 20px 15px; }
    #order_review { padding: 20px 15px; }
    .woocommerce-checkout h3 { font-size: 24px; }
    .form-row { width: 100% !important; float: none !important; }
}

/* ==========================================================================
   SPACING, HEIGHT, LAYOUT & DUPLICATION CORRECTIONS
   ========================================================================== */

/* 1. MATCH SHOP PRODUCT HERO SPACING & PREVENT NAVIGATION OVERLAPPING */
body.woocommerce-cart .generic-page-container,
body.woocommerce-checkout .generic-page-container {
    padding-top: 0px !important; /* Reduced to decrease space after page header */
    padding-bottom: 60px !important;
    margin-top: 0 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcf5 250px) !important; /* Seamless background gradient blending the white header */
}

body.woocommerce-cart .page-header,
body.woocommerce-checkout .page-header {
    padding-top: 0px !important; /* Premium clearance space below sticky header */
    margin-top: 0 !important;
    margin-bottom: 0px !important; /* Reduced to decrease space after page header */
}

body.woocommerce-cart .page-header .page-title,
body.woocommerce-checkout .page-header .page-title {
    margin-top: 0 !important;
    font-size: 56px !important;
}

body.woocommerce-cart .page-header p,
body.woocommerce-checkout .page-header p {
    margin-top: 16px !important;
    margin-bottom: 0 !important;
}

body.woocommerce-cart .entry-content,
body.woocommerce-checkout .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Eliminate Gutenberg block default margins and paddings */
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-checkout .wp-block-woocommerce-checkout,
body.woocommerce-cart .wc-block-cart,
body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-cart .wc-block-cart__template-container,
body.woocommerce-checkout .wc-block-checkout__template-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Eliminate notices container extra spacing */
body.woocommerce-cart .woocommerce-notices-wrapper,
body.woocommerce-checkout .woocommerce-notices-wrapper {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
}

/* 2. PREVENT EQUAL-HEIGHT STRETCH (KEEP NATURAL HEIGHT BASED ON CONTENT) */
/* We apply align-self: flex-start only to child columns so WooCommerce's native grid widths and two-column layouts on desktop are untouched and perfect */
.woocommerce-cart .woocommerce-cart-form,
.woocommerce-cart .cart-collaterals,
.wc-block-cart__main,
.wc-block-cart__sidebar,
.wc-block-checkout__main,
.wc-block-checkout__sidebar,
.wp-block-woocommerce-cart-items-block,
.wp-block-woocommerce-cart-totals-block,
.wc-block-cart__sidebar-wrapper,
.wc-block-checkout__sidebar-wrapper {
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
    align-self: start !important;
    align-self: flex-start !important;
}

/* 3. ROBUST DESKTOP TWO-COLUMN GRID FOR BLOCK-BASED CART & CHECKOUT */
@media (min-width: 992px) {
    /* Main block grids when template container is not present */
    body.woocommerce-cart .wp-block-woocommerce-cart,
    body.woocommerce-cart .wc-block-cart,
    body.woocommerce-checkout .wp-block-woocommerce-checkout,
    body.woocommerce-checkout .wc-block-checkout,
    /* Inner template container grids (if present) */
    body.woocommerce-cart .wc-block-cart__template-container,
    body.woocommerce-checkout .wc-block-checkout__template-container {
        display: grid !important;
        grid-template-columns: 1.35fr 1fr !important; /* Premium balanced column widths */
        gap: 40px !important;
        width: 100% !important;
        align-items: flex-start !important;
    }
    
    /* Reset outer parents if they contain a nested block container, to prevent double-grids */
    body.woocommerce-cart .wp-block-woocommerce-cart:has(.wc-block-cart),
    body.woocommerce-cart .wp-block-woocommerce-cart:has(.wc-block-cart__template-container),
    body.woocommerce-cart .wc-block-cart:has(.wc-block-cart__template-container),
    body.woocommerce-checkout .wp-block-woocommerce-checkout:has(.wc-block-checkout),
    body.woocommerce-checkout .wp-block-woocommerce-checkout:has(.wc-block-checkout__template-container),
    body.woocommerce-checkout .wc-block-checkout:has(.wc-block-checkout__template-container) {
        display: block !important;
    }

    /* DISABLE TWO-COLUMN GRID ON EMPTY CART & EMPTY CHECKOUT PAGES */
    body.woocommerce-cart:has(.wp-block-woocommerce-empty-cart-block) .wp-block-woocommerce-cart,
    body.woocommerce-cart:has(.wp-block-woocommerce-empty-cart-block) .wc-block-cart,
    body.woocommerce-cart:has(.wp-block-woocommerce-empty-cart-block) .wc-block-cart__template-container,
    body.woocommerce-checkout:has(.wc-block-checkout__empty-cart) .wp-block-woocommerce-checkout,
    body.woocommerce-checkout:has(.wc-block-checkout__empty-cart) .wc-block-checkout,
    body.woocommerce-checkout:has(.wc-block-checkout__empty-cart) .wc-block-checkout__template-container {
        display: block !important;
        width: 100% !important;
    }

    /* Left Column (Items / Fields / Main Content) */
    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-cart .wp-block-woocommerce-cart-items-block,
    body.woocommerce-checkout .wc-block-checkout__main,
    body.woocommerce-checkout .wc-block-checkout__form,
    body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block {
        grid-column: 1 !important;
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        margin-bottom: 0 !important; /* Managed by grid gap on desktop */
    }
    
    /* Right Column (Totals / Payments / Sticky Sidebar) */
    body.woocommerce-cart .wc-block-cart__sidebar,
    body.woocommerce-cart .wp-block-woocommerce-cart-totals-block,
    body.woocommerce-cart .wc-block-cart__sidebar-wrapper,
    body.woocommerce-checkout .wc-block-checkout__sidebar,
    body.woocommerce-checkout .wc-block-checkout__payment,
    body.woocommerce-checkout .wp-block-woocommerce-checkout-totals-block,
    body.woocommerce-checkout .wc-block-checkout__sidebar-wrapper {
        grid-column: 2 !important;
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        position: sticky !important;
        top: 130px !important;
        align-self: flex-start !important;
        margin-top: 0 !important;
    }
}

/* Stacked Layout on Tablet and smaller screens */
@media (max-width: 991px) {
    body.woocommerce-cart .wc-block-cart__template-container,
    body.woocommerce-checkout .wc-block-checkout__template-container,
    body.woocommerce-cart .wp-block-woocommerce-cart,
    body.woocommerce-cart .wc-block-cart,
    body.woocommerce-checkout .wp-block-woocommerce-checkout,
    body.woocommerce-checkout .wc-block-checkout {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        width: 100% !important;
    }
    
    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-cart .wp-block-woocommerce-cart-items-block,
    body.woocommerce-checkout .wc-block-checkout__main,
    body.woocommerce-checkout .wc-block-checkout__form,
    body.woocommerce-checkout .wp-block-woocommerce-checkout-fields-block {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        display: block !important;
        margin-bottom: 30px !important; /* Guaranteed vertical gap between stacked main and sidebar card on mobile */
    }

    body.woocommerce-cart .wc-block-cart__sidebar,
    body.woocommerce-cart .wp-block-woocommerce-cart-totals-block,
    body.woocommerce-cart .wc-block-cart__sidebar-wrapper,
    body.woocommerce-checkout .wc-block-checkout__payment {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        display: block !important; /* Ensure they are fully visible and stacked properly */
        margin-top: 0 !important;
    }
}

/* 4. SHOW ONLY ONE CHECKOUT ORDER SUMMARY ON STACKED SCREEN SIZES - PREVENT EXTRA DUPLICATES */
/* Instead of hiding the main checkout sidebar, we only clean up redundant elements if any are explicitly duplicate. We do NOT hide .wc-block-checkout__sidebar completely to keep mobile checkout functional. */
@media (max-width: 991px) {
    /* If there are explicit duplicate/redundant totals components rendered outside the form, clean them up */
    .woocommerce-checkout .wc-block-checkout__sidebar-wrapper .wc-block-checkout__sidebar-wrapper {
        display: none !important;
    }
}

/* 5. PREMIUM MOBILE VIEW SAFE GUTTERS & INTERIOR CARD PADDING */
@media (max-width: 768px) {
    /* Set safe inner padding on the card columns on mobile so text never touches the card edges */
    .wc-block-cart__main,
    .wc-block-checkout__main,
    .wc-block-cart__sidebar,
    .wc-block-checkout__sidebar,
    .wp-block-woocommerce-cart-items-block,
    .wp-block-woocommerce-cart-totals-block,
    .wc-block-checkout__form,
    .wc-block-checkout__payment,
    .wc-block-components-sidebar {
        padding: 24px 20px !important;
    }
    
    /* Ensure traditional cart items also have elegant spacing */
    .shop_table.cart tbody tr.cart_item {
        padding: 20px !important;
        margin-bottom: 12px !important;
    }
    
    /* Ensure the page container on mobile has clean 20px side gutters */
    body.woocommerce-cart .generic-page-container .container,
    body.woocommerce-checkout .generic-page-container .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* Reduce top padding on mobile slightly for a tighter flow */
    body.woocommerce-cart .generic-page-container,
    body.woocommerce-checkout .generic-page-container {
        padding-top: 0px !important; /* Reduced from 30px */
        padding-bottom: 40px !important;
    }
    
    body.woocommerce-cart .page-header,
    body.woocommerce-checkout .page-header {
        padding-top: 0px !important;
        margin-bottom: 0px !important; /* Force no gap */
    }

    /* Force Gutenberg / WooCommerce blocks to have no top margins or padding on mobile */
    body.woocommerce-cart .entry-content,
    body.woocommerce-checkout .entry-content,
    body.woocommerce-cart .wp-block-woocommerce-cart,
    body.woocommerce-checkout .wp-block-woocommerce-checkout,
    body.woocommerce-cart .wc-block-cart,
    body.woocommerce-checkout .wc-block-checkout,
    body.woocommerce-cart .wc-block-cart__template-container,
    body.woocommerce-checkout .wc-block-checkout__template-container {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* 6. GUBENBERG BLOCKS COUPON FORM PREMIUM POLISH */
body .wc-block-components-coupon-code-form,
body .wp-block-woocommerce-cart-totals-block .wc-block-components-totals-coupon,
body .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-coupon,
body .wc-block-components-totals-coupon {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 16px !important;
    height: auto !important;
}

body .wc-block-components-totals-coupon__content,
body .wc-block-components-coupon-code-form > div:not(.wc-block-components-totals-coupon__error) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    align-items: flex-start !important;
    width: 100% !important;
}

body .wc-block-components-coupon-code-form .wc-block-components-text-input,
body .wc-block-components-totals-coupon .wc-block-components-text-input,
body .wc-block-components-totals-coupon__input {
    flex-grow: 1 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    position: relative !important;
}

body .wc-block-components-coupon-code-form input[type="text"],
body .wc-block-components-totals-coupon input[type="text"],
body .wc-block-components-totals-coupon__input input {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 16px 12px 0px 12px !important;
    border-radius: 6px !important;
    border: 1px solid var(--gray-300) !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    text-transform: uppercase !important;
}

body .wc-block-components-coupon-code-form .wc-block-components-text-input label,
body .wc-block-components-totals-coupon .wc-block-components-text-input label,
body .wc-block-components-totals-coupon__input label {
    top: 12px !important;
    font-size: 13px !important;
    transition: all 0.2s ease-in-out !important;
}

body .wc-block-components-coupon-code-form .wc-block-components-text-input.is-active label,
body .wc-block-components-totals-coupon .wc-block-components-text-input.is-active label,
body .wc-block-components-totals-coupon__input.is-active label,
body .wc-block-components-coupon-code-form .wc-block-components-text-input:focus-within label,
body .wc-block-components-totals-coupon .wc-block-components-text-input:focus-within label,
body .wc-block-components-totals-coupon__input:focus-within label {
    transform: translateY(-5px) scale(0.75) !important;
    top: 6px !important;
}

body .wc-block-components-coupon-code-form button,
body .wc-block-components-totals-coupon button,
body .wc-block-components-totals-coupon__button,
body .wc-block-components-totals-coupon .wc-block-components-button {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 16px !important;
    font-family: var(--font-display) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #ffffff !important;
    background-color: var(--brand-red, #E60000) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    align-self: center !important;
}

body .wc-block-components-coupon-code-form button:hover,
body .wc-block-components-totals-coupon button:hover,
body .wc-block-components-totals-coupon__button:hover,
body .wc-block-components-totals-coupon .wc-block-components-button:hover {
    background-color: var(--brand-red-dark, #C20000) !important;
    color: #ffffff !important;
}

/* Traditional Checkout Coupon Form Custom Polish */
.woocommerce-checkout form.checkout_coupon {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    padding: 24px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid rgba(8, 13, 22, 0.07) !important;
}

.woocommerce-checkout form.checkout_coupon p:not(.form-row) {
    width: 100% !important;
    margin-bottom: 12px !important;
    color: var(--gray-600) !important;
    font-size: 14px !important;
}

.woocommerce-checkout form.checkout_coupon p.form-row {
    margin: 0 !important;
    width: auto !important;
    float: none !important;
}

.woocommerce-checkout form.checkout_coupon p.form-row-first {
    flex-grow: 1 !important;
    max-width: 250px !important;
    width: 100% !important;
}

.woocommerce-checkout form.checkout_coupon p.form-row-last {
    width: auto !important;
}

.woocommerce-checkout form.checkout_coupon input.input-text {
    height: 44px !important;
    padding: 0 12px !important;
    border-radius: 6px !important;
    border: 1px solid var(--gray-200) !important;
    font-family: var(--font-body) !important;
    text-transform: uppercase !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.woocommerce-checkout form.checkout_coupon button.button {
    height: 44px !important;
    background: var(--brand-red, #E60000) !important;
    color: #fff !important;
    border-radius: 6px !important;
    font-family: var(--font-display) !important;
    font-size: 16px !important;
    letter-spacing: 0.05em;
    padding: 0 20px !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
}

.woocommerce-checkout form.checkout_coupon button.button:hover {
    background: var(--brand-red-dark, #C20000) !important;
}

@media (max-width: 768px) {
    .woocommerce-checkout form.checkout_coupon {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .woocommerce-checkout form.checkout_coupon p.form-row-first {
        max-width: none !important;
        width: 100% !important;
    }
    .woocommerce-checkout form.checkout_coupon button.button {
        width: 100% !important;
    }
}

/* 7. CHECKOUT & CART PAGE LAYOUT FIXES */

@media (max-width: 991px) {
    /* Hide the empty/duplicate desktop sidebar on mobile checkout to prevent blank card issue */
    body.woocommerce-checkout .wc-block-checkout__sidebar,
    body.woocommerce-checkout .wc-block-checkout__sidebar-wrapper {
        display: none !important;
    }
}
/* 8. CART & CHECKOUT PAGE BACKGROUND MATCH */
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-cart .site-content,
body.woocommerce-checkout .site-content,
body.woocommerce-cart .generic-page-container,
body.woocommerce-checkout .generic-page-container {
    background-color: var(--cream, #fcfcf5) !important;
}

/* 9. COUPON FORM WIDTH FIX */
body .wc-block-components-coupon-code-form,
body .wc-block-components-totals-coupon,
body .wc-block-components-totals-coupon__content {
    width: 100% !important;
    max-width: 100% !important;
}
body .wc-block-components-coupon-code-form .wc-block-components-text-input,
body .wc-block-components-totals-coupon .wc-block-components-text-input,
body .wc-block-components-totals-coupon__input {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
}
body .wc-block-components-coupon-code-form button,
body .wc-block-components-totals-coupon button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 100px !important;
}

/* 10. PAY FOR ORDER & THANK YOU PAGE PREMIUM STYLES */
body ul.order_details,
body ul.premium-order-details {
    list-style: none !important;
    padding: 30px !important;
    margin: 0 0 40px !important;
    background: #ffffff !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    text-align: left !important;
    gap: 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}

body ul.order_details li,
body ul.premium-order-details li {
    flex: 1 !important;
    min-width: 150px !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body ul.order_details li > span:not(.woocommerce-Price-amount),
body ul.order_details li .title,
body ul.premium-order-details li > span:not(.woocommerce-Price-amount),
body ul.premium-order-details li .title {
    display: block !important;
    font-size: 12px !important;
    color: var(--gray-600) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 8px !important;
}

body ul.order_details li strong,
body ul.premium-order-details li strong {
    color: var(--black) !important;
    font-size: 18px !important;
}

body ul.order_details li .total-price,
body ul.order_details li .total-price .woocommerce-Price-amount,
body ul.order_details li strong .woocommerce-Price-amount,
body ul.premium-order-details li .total-price,
body ul.premium-order-details li .total-price .woocommerce-Price-amount,
body ul.premium-order-details li strong .woocommerce-Price-amount {
    color: var(--brand-red, #E60000) !important;
    font-size: 24px !important;
    font-family: var(--font-display) !important;
    display: inline-block !important;
    margin-top: 0 !important;
}

body.woocommerce-order-pay #order_review {
    display: flex !important;
    flex-direction: row !important;
    gap: 30px !important;
    align-items: flex-start !important;
    max-width: 1200px !important;
    margin: 50px auto 60px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
}

body.woocommerce-order-pay #order_review .pay-details-column {
    flex: 2 !important;
    background: #ffffff !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important;
}

body.woocommerce-order-pay #order_review .pay-method-column {
    flex: 1 !important;
    background: #ffffff !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important;
    position: sticky !important;
    top: 100px !important;
}

@media (max-width: 900px) {
    body.woocommerce-order-pay #order_review {
        flex-direction: column !important;
        gap: 20px !important;
    }
    body.woocommerce-order-pay #order_review .pay-details-column,
    body.woocommerce-order-pay #order_review .pay-method-column {
        flex: none !important;
        width: 100% !important;
        position: static !important;
        padding: 20px !important;
    }
}


/* Style Razorpay Pay Now / Cancel Buttons & Payment Flow */
body.woocommerce-order-pay .woocommerce-order {
    max-width: 900px !important;
    margin: 40px auto 80px !important;
    padding: 0 20px !important;
}

body.woocommerce-order-pay .woocommerce-order > p:first-of-type {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--gray-600, #4b5563) !important;
    line-height: 1.6 !important;
    margin: 30px 0 15px !important;
    text-align: left !important;
}

body.woocommerce-order-pay #btn-razorpay,
body.woocommerce-order-pay #btn-razorpay-cancel,
body.woocommerce-order-pay #payment .button,
body.woocommerce-order-pay #payment input[type="submit"],
body.woocommerce-order-pay #payment input[type="button"],
body.woocommerce-order-pay #payment button,
body.woocommerce-order-pay #rzp-button1 {
    height: 52px !important;
    padding: 0 36px !important;
    font-family: var(--font-body, inherit) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    outline: none !important;
    border: none !important;
    vertical-align: middle !important;
}

body.woocommerce-order-pay #btn-razorpay,
body.woocommerce-order-pay #payment .button,
body.woocommerce-order-pay #payment input[type="submit"],
body.woocommerce-order-pay #payment button,
body.woocommerce-order-pay #rzp-button1 {
    background: var(--brand-red, #E60000) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(230, 0, 0, 0.18) !important;
    margin-right: 12px !important;
    margin-top: 15px !important;
}

body.woocommerce-order-pay #btn-razorpay:hover:not(:disabled),
body.woocommerce-order-pay #payment .button:hover:not(:disabled),
body.woocommerce-order-pay #payment input[type="submit"]:hover:not(:disabled),
body.woocommerce-order-pay #payment button:hover:not(:disabled),
body.woocommerce-order-pay #rzp-button1:hover:not(:disabled) {
    background: var(--brand-red-dark, #C20000) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 35px rgba(230, 0, 0, 0.28) !important;
}

body.woocommerce-order-pay #btn-razorpay:active,
body.woocommerce-order-pay #payment .button:active {
    transform: translateY(0) !important;
}

body.woocommerce-order-pay #btn-razorpay:disabled,
body.woocommerce-order-pay #payment .button:disabled,
body.woocommerce-order-pay #payment input[type="submit"]:disabled {
    background: var(--gray-400, #9ca3af) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.8 !important;
}

body.woocommerce-order-pay #btn-razorpay-cancel,
body.woocommerce-order-pay #payment input[value="Cancel"] {
    background: #ffffff !important;
    color: var(--black, #080d16) !important;
    border: 1px solid var(--gray-300, #d1d5db) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    margin-top: 15px !important;
}

body.woocommerce-order-pay #btn-razorpay-cancel:hover,
body.woocommerce-order-pay #payment input[value="Cancel"]:hover {
    background: var(--gray-100, #f3f4f6) !important;
    border-color: var(--gray-400, #9ca3af) !important;
    color: var(--brand-red, #E60000) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

body.woocommerce-order-pay #btn-razorpay-cancel:active,
body.woocommerce-order-pay #payment input[value="Cancel"]:active {
    transform: translateY(0) !important;
}

/* Fix & Polish Razorpay message / notice box */
body.woocommerce-order-pay #msg-razorpay-success,
body.woocommerce-order-pay .woocommerce-message,
body.woocommerce-order-pay .woocommerce-info,
body.woocommerce-order-pay .woocommerce-error {
    background: #ffffff !important;
    border: 1px solid var(--gray-200, #e5e7eb) !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 12px !important;
    padding: 20px 25px 20px 52px !important;
    color: var(--black, #080d16) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    box-shadow: 0 8px 30px rgba(8, 13, 22, 0.05) !important;
    margin: 20px 0 !important;
    position: relative !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

body.woocommerce-order-pay #msg-razorpay-success,
body.woocommerce-order-pay .woocommerce-message {
    border-left: 5px solid var(--brand-red, #E60000) !important;
}

body.woocommerce-order-pay .woocommerce-info {
    border-left: 5px solid var(--brand-yellow, #FFD700) !important;
}

body.woocommerce-order-pay .woocommerce-error {
    border-left: 5px solid var(--black, #080d16) !important;
}

/* Add custom stylized Info Circle icon next to the message */
body.woocommerce-order-pay #msg-razorpay-success::before,
body.woocommerce-order-pay .woocommerce-info::before {
    content: "!" !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 22px !important;
    height: 22px !important;
    background: var(--brand-yellow, #FFD700) !important;
    color: var(--black, #080d16) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

body.woocommerce-order-pay #msg-razorpay-success::before {
    content: "✓" !important;
    background: var(--brand-red, #E60000) !important;
    color: #ffffff !important;
}

@media (max-width: 576px) {
    body.woocommerce-order-pay #btn-razorpay,
    body.woocommerce-order-pay #btn-razorpay-cancel {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 12px !important;
    }
    body.woocommerce-order-pay #btn-razorpay-cancel {
        margin-top: 0 !important;
    }
}

/* Fix order-receipt.php bare text nodes */
body ul.order_details li,
body ul.premium-order-details li {
    font-size: 12px !important;
    color: var(--gray-600) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}
body ul.order_details li strong,
body ul.premium-order-details li strong {
    display: block !important;
    margin-top: 8px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Side-by-Side Customer Addresses for Thank You & View Order Pages */
body.woocommerce-checkout .woocommerce-customer-details .col2-set,
body.woocommerce-account .woocommerce-customer-details .col2-set {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    margin-top: 40px !important;
    width: 100% !important;
}
body.woocommerce-checkout .woocommerce-customer-details .col2-set::before,
body.woocommerce-checkout .woocommerce-customer-details .col2-set::after,
body.woocommerce-account .woocommerce-customer-details .col2-set::before,
body.woocommerce-account .woocommerce-customer-details .col2-set::after {
    display: none !important;
}
body.woocommerce-checkout .woocommerce-customer-details .col2-set .col-1,
body.woocommerce-checkout .woocommerce-customer-details .col2-set .col-2,
body.woocommerce-account .woocommerce-customer-details .col2-set .col-1,
body.woocommerce-account .woocommerce-customer-details .col2-set .col-2 {
    max-width: 100% !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important;
    float: none !important;
}
body.woocommerce-checkout .woocommerce-customer-details address,
body.woocommerce-account .woocommerce-customer-details address {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Order Details – styles now live in the template override:
   woocommerce/order/order-details.php (card-row layout)
   woocommerce/order/order-details-customer.php (address cards)
   This block intentionally left minimal to avoid conflicts. */

/* Keep the legacy .premium-product-cell safe if referenced from order-details-item.php */
.premium-product-cell {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.premium-product-cell .premium-order-thumb {
    border-radius: 8px;
    border: 1px solid var(--gray-200, #e5e7eb);
    width: 56px;
    height: 56px;
    min-width: 56px;
    object-fit: contain;
    background: #fafafa;
    display: block;
    flex-shrink: 0;
}
.premium-product-cell .premium-product-name {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    color: var(--black);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
}
.premium-product-cell .premium-product-name a {
    color: var(--black);
    text-decoration: none;
}
.premium-product-cell .product-quantity {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 13px;
    margin-left: 2px;
}

/* Fix WooCommerce password fields wrapping to ensure full width card inputs */
.woocommerce form .form-row span.password-input,
.woocommerce-form-row span.password-input,
.woocommerce span.password-input,
span.password-input {
    display: block !important;
    width: 100% !important;
    position: relative !important;
    flex: 1 !important;
}

/* Ensure the password input itself inside the wrapper occupies full width */
.woocommerce form .form-row span.password-input input.input-text,
.woocommerce-form-row span.password-input input,
span.password-input input {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Hide WooCommerce's own eye icon */
.woocommerce form .form-row span.password-input .show-password-input,
span.password-input .show-password-input,
.show-password-input,
.woocommerce-password-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

/* Hide browser-native password reveal eye (Edge, IE, Chrome autofill, Safari) */
input::-ms-reveal,
input::-ms-clear,
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
}

/* Password Strength Meter Premium Design */
.woocommerce-password-strength {
    display: inline-block !important;
    width: auto !important;
    margin: 5px 0 0 0 !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-align: center !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
}

.woocommerce-password-strength.short {
    background-color: #fce8e6 !important;
    color: #c5221f !important;
    border: 1px solid #fad2cf !important;
}

.woocommerce-password-strength.bad {
    background-color: #feefe3 !important;
    color: #b06000 !important;
    border: 1px solid #fde2cd !important;
}

.woocommerce-password-strength.good {
    background-color: #e8f0fe !important;
    color: #1a73e8 !important;
    border: 1px solid #d2e3fc !important;
}

.woocommerce-password-strength.strong {
    background-color: #e6f4ea !important;
    color: #137333 !important;
    border: 1px solid #ceead6 !important;
}

/* Password Hint Premium Design */
.woocommerce-password-hint {
    display: block !important;
    width: 100% !important;
    margin: 8px 0 15px 0 !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: var(--gray-600) !important;
    background-color: #f8f9fa !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.01) !important;
}

/* Premium WooCommerce blockOverlay loading indicator and backdrop styles matching shop products page */
.woocommerce .blockUI.blockOverlay::before,
.woocommerce-page .blockUI.blockOverlay::before,
body .blockUI.blockOverlay::before {
    background: none !important;
    content: "" !important;
    height: 52px !important;
    width: 52px !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    margin-left: -26px !important;
    margin-top: -26px !important;
    border: 4px solid rgba(255, 215, 0, 0.15) !important;
    border-top-color: var(--brand-yellow, #FFD700) !important;
    border-radius: 50% !important;
    animation: spin 0.8s cubic-bezier(0.6, 0.2, 0.1, 0.8) infinite !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2) !important;
    box-sizing: border-box !important;
    z-index: 100000 !important;
}

.woocommerce .blockUI.blockOverlay,
.woocommerce-page .blockUI.blockOverlay,
body .blockUI.blockOverlay {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(2px) !important;
    -webkit-backdrop-filter: blur(2px) !important;
    z-index: 99999 !important;
}

/* ==========================================================================
   11. DYNAMIC COUPON CODE CAPITALIZATION (CART & CHECKOUT)
   ========================================================================== */
.wc-block-components-totals-coupon__code,
.wc-block-components-chip__text,
.wc-block-components-chip span,
tr.cart-discount th,
tr.cart-discount td,
tr.cart-discount th span,
.woocommerce-checkout-review-order-table .cart-discount th,
.woocommerce-checkout-review-order-table .cart-discount td,
.coupon-code,
.cart-discount .coupon-code,
.wc-block-components-totals-item__description .wc-block-components-chip__text,
.wc-block-components-totals-item__description .wc-block-components-totals-item__description-value,
.wc-block-components-totals-coupon__name,
.wc-block-components-totals-coupon .wc-block-components-chip__text {
    text-transform: uppercase !important;
}

/* ==========================================================================
   12. BRAND-THEMED NOTICES & TOASTS OVERHAUL (CART & CHECKOUT)
   ========================================================================== */

/* Global Notice Card Override */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.wc-block-components-notice-banner {
    background-color: #ffffff !important;
    border: 1px solid rgba(8, 13, 22, 0.08) !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 12px !important;
    padding: 18px 24px 18px 52px !important;
    color: var(--black, #080d16) !important;
    font-family: var(--font-body, 'DM Sans', sans-serif) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    box-shadow: 0 10px 30px rgba(8, 13, 22, 0.06) !important;
    margin: 20px 0 !important;
    position: relative !important;
    text-align: left !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
}

/* Specific left border color coding */
.woocommerce-message,
.wc-block-components-notice-banner.is-success {
    border-left: 5px solid var(--brand-red, #E60000) !important;
}

.woocommerce-error,
.wc-block-components-notice-banner.is-error {
    border-left: 5px solid var(--black, #080d16) !important;
}

.woocommerce-info,
.wc-block-components-notice-banner.is-default,
.wc-block-components-notice-banner.is-info {
    border-left: 5px solid var(--brand-yellow, #FFD700) !important;
}

/* Adjust paddings for Blocks notices because they are structured with flex */
.wc-block-components-notice-banner {
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    justify-content: space-between !important;
}

/* Notice icons styling for traditional WooCommerce */
.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

.woocommerce-message::before {
    content: "✓" !important;
    background: var(--brand-red, #E60000) !important;
}

.woocommerce-error::before {
    content: "✕" !important;
    background: var(--black, #080d16) !important;
}

.woocommerce-info::before {
    content: "!" !important;
    background: var(--brand-yellow, #FFD700) !important;
    color: var(--black, #080d16) !important;
}

/* Blocks notice banner icons styling */
.wc-block-components-notice-banner .wc-block-components-notice-banner__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    color: inherit !important;
}

.wc-block-components-notice-banner.is-success .wc-block-components-notice-banner__icon svg {
    fill: var(--brand-red, #E60000) !important;
    color: var(--brand-red, #E60000) !important;
}

.wc-block-components-notice-banner.is-error .wc-block-components-notice-banner__icon svg {
    fill: var(--black, #080d16) !important;
    color: var(--black, #080d16) !important;
}

.wc-block-components-notice-banner.is-default .wc-block-components-notice-banner__icon svg,
.wc-block-components-notice-banner.is-info .wc-block-components-notice-banner__icon svg {
    fill: var(--brand-yellow, #FFD700) !important;
    color: var(--brand-yellow, #FFD700) !important;
}

/* Inner links and buttons in notices */
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button,
.wc-block-components-notice-banner a.wc-block-components-button {
    background-color: var(--black, #080d16) !important;
    color: #ffffff !important;
    border-radius: 30px !important;
    padding: 8px 18px !important;
    font-family: var(--font-display, inherit) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: var(--transition-smooth) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
    margin-left: 16px !important;
}

.woocommerce-message a.button:hover,
.woocommerce-info a.button:hover,
.woocommerce-error a.button:hover,
.wc-block-components-notice-banner a.wc-block-components-button:hover {
    background-color: var(--brand-red, #E60000) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-glow) !important;
    transform: translateY(-1px) !important;
}

/* Links inside notice text */
.woocommerce-message a:not(.button),
.woocommerce-info a:not(.button),
.woocommerce-error a:not(.button),
.wc-block-components-notice-banner__content a {
    color: var(--brand-red, #E60000) !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

.woocommerce-message a:not(.button):hover,
.woocommerce-info a:not(.button):hover,
.woocommerce-error a:not(.button):hover,
.wc-block-components-notice-banner__content a:hover {
    color: var(--brand-red-dark, #C20000) !important;
}

/* Blocks Close Button Style */
.wc-block-components-notice-banner__close {
    background: transparent !important;
    border: none !important;
    color: var(--gray-400, #9ca3af) !important;
    cursor: pointer !important;
    padding: 4px !important;
    transition: var(--transition-smooth) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wc-block-components-notice-banner__close:hover {
    color: var(--brand-red, #E60000) !important;
    transform: scale(1.1) !important;
}

/* ==========================================================================
   13. EMPTY CART & EMPTY CHECKOUT POLISH
   ========================================================================== */

/* Hide the default sad face icon and default huge cart icon */
.wc-block-cart__empty-cart__title.with-empty-cart-icon::before,
.wc-block-checkout__empty-cart svg {
    display: none !important;
}

/* Container polish */
.wc-block-checkout__empty-cart {
    background: #ffffff !important;
    border: 1px solid rgba(8, 13, 22, 0.07) !important;
    border-radius: 18px !important;
    padding: 60px 20px !important;
    text-align: center !important;
    box-shadow: 0px 8px 30px rgba(0,0,0,0.06) !important;
    max-width: 800px !important;
    margin: 40px auto !important;
}

.wp-block-woocommerce-empty-cart-block {
    text-align: center !important;
    margin: 40px auto !important;
    max-width: 1200px !important; /* Allow enough space for 4 columns */
}

/* Titles */
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title,
.wc-block-checkout__empty-cart .wc-block-checkout__empty-cart-title,
.wc-block-checkout__empty-cart h2 {
    font-family: var(--font-display, inherit) !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    color: var(--black, #080d16) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 20px !important;
}

/* Subtitle for Checkout */
.wc-block-checkout__empty-cart p {
    font-size: 16px !important;
    color: var(--gray-600, #4b5563) !important;
    margin-bottom: 30px !important;
    line-height: 1.6 !important;
}

/* Browse Store Button */
.wc-block-checkout__empty-cart .wp-block-button__link,
.wp-block-woocommerce-empty-cart-block .wp-block-button__link {
    background: var(--brand-red, #E60000) !important;
    color: #fff !important;
    padding: 16px 32px !important;
    border-radius: 8px !important;
    font-family: var(--font-display, inherit) !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 20px rgba(230,0,0,0.2) !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.wc-block-checkout__empty-cart .wp-block-button__link:hover,
.wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover {
    background: var(--brand-red-dark, #C20000) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 30px rgba(230,0,0,0.3) !important;
}

/* Add custom aesthetic icon for empty cart/checkout */
.wp-block-woocommerce-empty-cart-block::before,
.wc-block-checkout__empty-cart::before {
    content: "" !important;
    display: block !important;
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto 24px auto !important;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="%23E60000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    opacity: 0.8 !important;
}

/* NEW IN STORE section in empty cart */
.wp-block-woocommerce-empty-cart-block hr {
    display: none !important;
}
.wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title) {
    font-family: var(--font-display, inherit) !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    color: var(--black) !important;
    margin-top: 60px !important;
    margin-bottom: 30px !important;
    letter-spacing: 0.02em !important;
}

/* Fix product collection / grid in empty cart */
.wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection,
.wp-block-woocommerce-empty-cart-block ul.wc-block-grid__products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    padding: 0 !important;
    list-style: none !important;
}

@media (max-width: 992px) {
    .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection,
    .wp-block-woocommerce-empty-cart-block ul.wc-block-grid__products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 576px) {
    .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection,
    .wp-block-woocommerce-empty-cart-block ul.wc-block-grid__products {
        grid-template-columns: 1fr !important;
    }
}

/* For inner ul structure specifically if present */
.wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection > ul {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}
@media (max-width: 992px) {
    .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection > ul {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 576px) {
    .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection > ul {
        grid-template-columns: 1fr !important;
    }
}

/* Responsive adjustments for the dynamic AJAX product grid on empty cart */
@media (max-width: 768px) {
    .wp-block-woocommerce-empty-cart-block .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 10px !important;
        margin: 20px auto !important;
    }
    .wp-block-woocommerce-empty-cart-block .product-grid .product-card {
        width: 100% !important;
        max-width: 100% !important;
    }
}
@media (max-width: 480px) {
    .wp-block-woocommerce-empty-cart-block .product-grid {
        gap: 8px !important;
        padding: 0 4px !important;
    }
}

/* ==========================================================================
   14. EMPTY CART PRODUCT CARD EMULATION (.product-card)
   ========================================================================== */

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto 1fr !important;
    background: #ffffff !important;
    border: 1px solid rgba(8, 13, 22, 0.07) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease !important;
    position: relative !important;
    box-shadow: 0 2px 12px rgba(8, 13, 22, 0.04) !important;
    width: 100% !important;
    max-width: 100% !important;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(230, 0, 0, 0.18) !important;
    box-shadow: 0 18px 40px rgba(230, 0, 0, 0.07), 0 2px 8px rgba(8, 13, 22, 0.04) !important;
}

/* Link wrapper stretching across columns on Row 1 */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-link {
    grid-column: 1 / span 2 !important;
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* Image container */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image {
    height: 220px !important;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(8, 13, 22, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
    margin: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img {
    max-height: 208px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 6px 14px rgba(8, 13, 22, 0.08)) !important;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease !important;
    width: auto !important;
    margin: 0 auto !important;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product:hover .wc-block-grid__product-image img {
    transform: scale(1.04) !important;
    filter: drop-shadow(0 10px 20px rgba(8, 13, 22, 0.14)) !important;
}

/* Title Styling matching Bestsellers */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title {
    font-family: var(--font-body, sans-serif) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--black, #0a0f1a) !important;
    margin-top: 16px !important;
    margin-bottom: 12px !important;
    padding: 0 18px !important;
    text-transform: none !important;
    line-height: 1.35 !important;
    height: 41px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product:hover .wc-block-grid__product-title {
    color: var(--brand-red, #E60000) !important;
}

/* Price Styling sitting side-by-side on Row 2 Left */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price {
    grid-column: 1 !important;
    grid-row: 2 !important;
    font-family: var(--font-display, inherit) !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    color: var(--black, #0a0f1a) !important;
    letter-spacing: -0.01em !important;
    line-height: 1 !important;
    padding-left: 18px !important;
    padding-bottom: 20px !important;
    margin: 0 !important;
    align-self: center !important;
}

/* Add to Cart Container sitting side-by-side on Row 2 Right */
.wp-block-woocommerce-empty-cart-block .wp-block-button {
    grid-column: 2 !important;
    grid-row: 2 !important;
    padding-right: 18px !important;
    padding-bottom: 20px !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-self: center !important;
    width: auto !important;
}

.wp-block-woocommerce-empty-cart-block .wp-block-button__link.add_to_cart_button {
    background: var(--black, #0a0f1a) !important;
    color: #fff !important;
    font-family: var(--font-body, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    padding: 0 16px !important;
    height: 40px !important;
    border-radius: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(8, 13, 22, 0.12) !important;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    border: none !important;
    width: auto !important;
}

.wp-block-woocommerce-empty-cart-block .wp-block-button__link.add_to_cart_button:hover {
    background: var(--brand-red, #E60000) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 6px 18px rgba(230, 0, 0, 0.28) !important;
}

/* ==========================================================================
   14. MOBILE RESPONSIVE POLISH & VIEWPORT CLIPPING FIXES (Cart & Checkout)
   ========================================================================== */

/* 14.1. Checkout Order Summary Mobile Layout and Description wrapping */
@media (max-width: 991px) {
    /* Improve Order Summary mobile card padding to maximize internal horizontal width */
    body.woocommerce-checkout .wc-block-checkout__order-summary-mobile,
    body.woocommerce-checkout .wc-block-components-checkout-order-summary-mobile,
    body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
        padding: 16px 12px !important;
        margin: 0 0 20px 0 !important;
        border-radius: 12px !important;
    }

    /* Prevent squeezing in checkout item rows by using wrapping flexbox */
    body.woocommerce-checkout .wc-block-components-product-list-item {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 10px !important;
        padding: 14px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ensure product image has fixed width and never shrinks */
    body.woocommerce-checkout .wc-block-components-product-list-item__image,
    body.woocommerce-checkout .wc-block-components-product-list-item .wc-block-components-product-list-item__image {
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
        height: 52px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    /* Expand text column fully to take remaining space, allowing wrapping */
    body.woocommerce-checkout .wc-block-components-product-list-item__text,
    body.woocommerce-checkout .wc-block-components-product-list-item .wc-block-components-product-list-item__text,
    body.woocommerce-checkout .wc-block-components-product-details {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        padding: 0 4px !important;
        margin: 0 !important;
        text-align: left !important;
    }

    /* Prevent long names from clipping */
    body.woocommerce-checkout .wc-block-components-product-name,
    body.woocommerce-checkout .wc-block-components-product-list-item__name {
        font-size: 13.5px !important;
        font-weight: 800 !important;
        line-height: 1.3 !important;
        color: var(--black, #080d16) !important;
        white-space: normal !important;
        word-break: break-word !important;
        margin-bottom: 4px !important;
    }

    /* Format product metadata/descriptions as premium, full-width content underneath the title/image row */
    body.woocommerce-checkout .wc-block-components-product-list-item .wc-block-components-product-metadata,
    body.woocommerce-checkout .wc-block-components-product-list-item .wc-block-components-product-metadata__description,
    body.woocommerce-checkout .wc-block-components-product-list-item .product-short-desc,
    body.woocommerce-checkout .wc-block-components-product-list-item .wc-block-components-product-details__description {
        display: block !important;
        font-family: var(--font-body, 'DM Sans', sans-serif) !important;
        font-size: 11.5px !important;
        line-height: 1.4 !important;
        color: var(--gray-500, #6b7280) !important;
        margin-top: 6px !important;
        white-space: normal !important;
        word-break: break-word !important;
        width: 100% !important;
        clear: both !important;
        flex-basis: 100% !important; /* Forces it to span the full line */
    }

    /* Price formatting inside checkout row */
    body.woocommerce-checkout .wc-block-components-product-list-item__price,
    body.woocommerce-checkout .wc-block-components-product-list-item .wc-block-components-product-list-item__price {
        font-family: 'Bebas Neue', var(--font-heading, Impact, sans-serif) !important;
        font-size: 18px !important;
        color: var(--black, #080d16) !important;
        font-weight: 900 !important;
        text-align: right !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
        margin-left: auto !important;
    }
}

/* 14.2. Mobile Cart Page Price & Total Header Restoration at Top */
@media (max-width: 768px) {
    /* Show the main cart items list header row at the top of the mobile cart list */
    body.woocommerce-cart .wc-block-cart-items__header,
    body.woocommerce-cart .wc-block-cart-items-header,
    body.woocommerce-cart .wc-block-cart-header,
    body.woocommerce-cart .wc-block-cart__header,
    body.woocommerce-cart table.shop_table thead,
    body.woocommerce-cart table.cart thead {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        background: #ffffff !important;
        border: 1px solid var(--gray-200, #eceef2) !important;
        border-radius: 12px !important;
        padding: 14px 16px !important;
        margin: 0 0 16px 0 !important;
        box-shadow: 0 4px 15px rgba(8, 13, 22, 0.02) !important;
        box-sizing: border-box !important;
    }

    /* Style the column labels inside the header row */
    body.woocommerce-cart .wc-block-cart-items__header > *,
    body.woocommerce-cart table.shop_table thead th {
        font-family: var(--font-body, 'DM Sans', sans-serif) !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        color: var(--gray-500, #6b7280) !important;
        letter-spacing: 0.05em !important;
        display: inline-block !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Ensure specific headers display and align elegantly */
    body.woocommerce-cart .wc-block-cart-items__header-product,
    body.woocommerce-cart .wc-block-cart-items__header-price,
    body.woocommerce-cart .wc-block-cart-items__header-quantity,
    body.woocommerce-cart .wc-block-cart-items__header-total {
        display: block !important;
    }

    /* Hide the individual product level 'Price: ' and 'Total: ' prefixes */
    body.woocommerce-cart .wc-block-cart-item__price::before,
    body.woocommerce-cart .wc-block-components-product-price::before,
    body.woocommerce-cart .wc-block-cart-item__total::before,
    body.woocommerce-cart .wc-block-components-product-line-total::before,
    body.woocommerce-cart .wc-block-components-product-line-total__value::before {
        display: none !important;
        content: none !important;
    }
}

/* 14.3. Premium Lateral Spacing and Edge Clipping Prevention for Narrow Devices */
@media (max-width: 768px) {
    /* Narrow container side padding to keep cards from touching edges but maximizing text space */
    body.woocommerce-cart .generic-page-container .container,
    body.woocommerce-checkout .generic-page-container .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Maximize horizontal breathing space in nested checkout/cart interior columns */
    .wc-block-cart__main,
    .wc-block-checkout__main,
    .wc-block-cart__sidebar,
    .wc-block-checkout__sidebar,
    .wp-block-woocommerce-cart-items-block,
    .wp-block-woocommerce-cart-totals-block,
    .wc-block-checkout__form,
    .wc-block-checkout__payment,
    .wc-block-components-sidebar {
        padding: 16px 12px !important; /* Gain valuable space on sides (reduced from 24px 20px) */
    }

    /* Traditional WooCommerce tables responsive margins */
    .shop_table.cart tbody tr.cart_item {
        padding: 14px 10px !important;
    }

    /* Bulletproof page edge safety settings */
    body, html {
        overflow-x: hidden !important;
    }
    
    * {
        box-sizing: border-box !important;
    }
}

/* 14.4. My Account addresses and View Order Details responsive layouts */
@media (max-width: 768px) {
    /* Stack My Account columns (Billing & Shipping addresses) vertically */
    .woocommerce-customer-details,
    .woocommerce-columns,
    .woocommerce-columns--addresses,
    .woocommerce-columns--2,
    .u-columns,
    .woocommerce-Address,
    .woocommerce-Address-title {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
        gap: 16px !important;
    }

    .woocommerce-column,
    .woocommerce-column1,
    .woocommerce-column2,
    .col-1,
    .col-2,
    .woocommerce-column--billing-address,
    .woocommerce-column--shipping-address {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        float: none !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Style My Account address cards premiumly on mobile */
    .woocommerce-customer-details address,
    .woocommerce-customer-details .woocommerce-Address,
    .woocommerce-customer-details .woocommerce-column,
    .woocommerce-columns--addresses address,
    .woocommerce-columns--addresses .woocommerce-column {
        background: #ffffff !important;
        border: 1px solid var(--gray-200, #eceef2) !important;
        border-radius: 12px !important;
        padding: 18px 16px !important;
        box-shadow: 0 4px 15px rgba(8, 13, 22, 0.02) !important;
        margin-bottom: 0 !important;
        font-style: normal !important;
    }

    /* Stack customer addresses header and clean title alignments */
    .woocommerce-customer-details h2,
    .woocommerce-order-details h2,
    .woocommerce-customer-details h3,
    .woocommerce-order-details h3 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }

    /* My Account orders list table – allow horizontal scroll as fallback */
    table.shop_table.my_account_orders {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border: 1px solid var(--gray-200, #eceef2) !important;
        border-radius: 8px !important;
    }
    table.shop_table.my_account_orders th,
    table.shop_table.my_account_orders td {
        padding: 10px 8px !important;
        font-size: 13px !important;
    }

    /* View Order page – table is replaced by card layout (template override),
       these rules are kept as safe fallback only */
    table.shop_table.order_details {
        width: 100% !important;
        table-layout: fixed !important;
    }
    table.shop_table.order_details th,
    table.shop_table.order_details td {
        padding: 10px !important;
        font-size: 13px !important;
        word-break: break-word !important;
    }
}

/* 14.5. Hide Plugin Upgrade/Promo notices on public pages to prevent flashing */
.rank-math-notice,
.rank-math-analytics-notice,
.rank-math-upgrade-notice,
div[class*="rank-math-notice"],
div[class*="pro-notice"],
div[class*="upgrade-notice"],
.upgrade-pro-banner,
#rank-math-analytics-notice,
.analytics-notice,
.analytics-upgrade-banner {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
