@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

[data-bs-theme=light] {
    --bs-app-bg-color: #f5f8fa;
    --bs-app-blank-bg-color: #f5f8fa;
}

body, p, h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: #333;
}

    body::-webkit-scrollbar, div::-webkit-scrollbar {
        width: 5px;
        background-color: #f9f9f9;
    }

    body::-webkit-scrollbar-track, div::-webkit-scrollbar-track {
        background: transparent;
    }

    body::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb {
        background-color: #dddddd;
        border-radius: 20px;
        border: 2px solid #e5e3e3;
    }

ul {
    list-style-type: none;
}

.breadcrumb-item a,
.breadcrumb-item span {
    margin-top: 3px;
}

.btn:hover {
    transform: none !important;
}

.nav-link {
    padding: 0.7rem 0.7rem !important;
    font-weight: 500;
    color: rgb(52, 63, 82);
    font-size: .75rem;
}

.nav-item .dropdown-item {
    font-weight: 500 !important;
}

@media (min-width: 992px) {
    .navbar-expand-lg[class*="navbar-bg-"]:not(.fancy):not(.extended):not(.fixed) .navbar-collapse .nav-link {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .navbar .logout {
        display: none;
    }
}

.shopping-cart-uwrap {
    height: calc(100vh - 280px);
    overflow-y: auto;
}

.tx-qty {
    max-width: 70px;
}

.shop-box label {
    margin-top: 4px;
    cursor: pointer;
}

.shop-box .items-wrp {
    max-height: 270px;
    overflow-y: auto;
}

.shop-filters .filter-item {
    margin-bottom: 1rem;
    border-radius: 12px;
    padding: 3px 10px
}

.shop-filters label {
    line-height: 1rem;
    margin-right: 2px;
}

.shop-filters .btn-close:before {
    font-size: .75rem;
    width: 1rem;
    height: 1rem;
    line-height: 1rem;
}

.shop-filters #bt_clear_filters {
    padding: 1px 13px;
}

.item figure .item-cart, .swiper-slide figure .item-cart,
.item figure .item-cart:hover, .swiper-slide figure .item-cart:hover {
    background: #f5f5f6;
}

.item-like.active {
    background-color: #E0245E !important;
}

    .item-like.active i {
        color: white !important;
    }

.ws-shop .ws-shop-items {
    height: calc(100vh - 220px);
    overflow-y: auto;
}

.ws-shop .ws-shop-item-action {
    height: 43px;
    max-width: 55% !important;
}

.ws-shop .ws-shop-item-desc span {
    margin-right: 0px;
}

.ws-shop .ws-shop-cart {
    height: calc(100vh - 300px);
    overflow-y: auto;
}

.w-17 {
    width: 4rem !important
}

.flex-fill {
    flex: 1 1 auto !important;
    width: 45%;
}

#toast-container > div,
#toast-container > div:hover {
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

button.toast-close-button {
    font-weight: 300;
    font-size: 25px;
}

.toast-success {
    background-color: #40c174;
}

.toast-info {
    background-color: #0b82cb;
}

.toast-warning {
    background-color: #df8b38;
}

.toast-error {
    background-color: #e94242;
}

.toast-message {
    font-size: 14px;
    line-height: 1rem;
}

.editor-container {
    background-color: #F9F9F9;
    border-color: #F9F9F9;
    color: #4B5675;
    transition: color .2s ease;
    height: 100%;
    padding: 10px;
    border-radius: 5px;
}

@media screen and (max-width: 600px) {
    .item figure .item-cart, .swiper-slide figure .item-cart {
        opacity: 1;
        position: absolute;
        bottom: -2rem;
        padding: 0rem;
        margin: 0;
        left: 0;
        width: 100%;
        height: auto;
        color: var(--bs-white);
        background: transparent;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        text-align: center;
        transition: all .3s ease-in-out;
        font-size: .85rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        bottom: 0px;
    }

        .item figure .item-cart, .swiper-slide figure .item-cart, .item figure .item-cart:hover, .swiper-slide figure .item-cart:hover {
            background: transparent;
        }

    .mx-1 {
        margin-right: .15rem !important;
        margin-left: .15rem !important
    }

    .form-control-sm {
        min-height: calc(1.7em + .8rem + 2px);
        padding: .2rem .4rem;
        font-size: .6rem;
        border-radius: .4rem;
    }

    .item figure .item-like, .item figure .item-link, .item figure .item-view, .swiper-slide figure .item-like, .swiper-slide figure .item-link, .swiper-slide figure .item-view {
        opacity: 0;
        position: absolute;
        right: 0;
        bottom: 1rem;
        width: 1.5rem;
        height: 1.5rem;
        line-height: 2.2rem;
        z-index: 1;
        transition: all .3s ease-in-out;
        opacity: 0;
        color: #343f52;
        background: rgba(var(--bs-white-rgb), .7);
        box-shadow: 0 0.25rem 0.75rem rgba(30,34,40,.02);
        font-size: 1rem;
        border-radius: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .text-md-end {
        text-align: right !important
    }

    .flex-fill {
        flex: 1 1 auto !important;
        width: 55%;
    }

    .width-10 {
        min-width: 10rem;
    }

    .width-13 {
        min-width: 13rem;
    }

    .width-135 {
        min-width: 13.5rem;
    }

    .width-20 {
        min-width: 20rem;
    }
}

@media screen and (min-width: 601px) and (max-width: 1024px) {

    .item figure .item-cart, .swiper-slide figure .item-cart {
        opacity: 1;
        position: absolute;
        bottom: -2rem;
        padding: 0rem;
        margin: 0;
        left: 0;
        width: 100%;
        height: auto;
        color: var(--bs-white);
        background: transparent;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        text-align: center;
        transition: all .3s ease-in-out;
        font-size: .85rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        bottom: 0px;
    }

        .item figure .item-cart, .swiper-slide figure .item-cart, .item figure .item-cart:hover, .swiper-slide figure .item-cart:hover {
            background: transparent;
        }

    .mx-1 {
        margin-right: .15rem !important;
        margin-left: .15rem !important
    }

    .form-control-sm {
        min-height: calc(1.7em + .8rem + 2px);
        padding: .2rem .4rem;
        font-size: .6rem;
        border-radius: .4rem;
    }

    .item figure .item-like, .item figure .item-link, .item figure .item-view, .swiper-slide figure .item-like, .swiper-slide figure .item-link, .swiper-slide figure .item-view {
        opacity: 0;
        position: absolute;
        right: 0;
        bottom: 1rem;
        width: 1.5rem;
        height: 1.5rem;
        line-height: 2.2rem;
        z-index: 1;
        transition: all .3s ease-in-out;
        opacity: 0;
        color: #343f52;
        background: rgba(var(--bs-white-rgb), .7);
        box-shadow: 0 0.25rem 0.75rem rgba(30,34,40,.02);
        font-size: 1rem;
        border-radius: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .text-md-end {
        text-align: right !important
    }

    .flex-fill {
        flex: 1 1 auto !important;
        width: 45%;
    }
}



table.quickgrid {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 5px !important;
}

    .data-item, table.quickgrid tbody tr,
    .data-item, table.quickgrid tfoot tr {
        /*cursor: pointer;*/
        background: #fff;
        border: none;
        border-radius: 5px;
        /*display: table-row;*/
        border-spacing: 2px;
    }

    .data-item, table.quickgrid thead tr th {
        border: none !important;
        border-style: none !important;
        border-bottom-width: 0;
        width: auto !important;
        padding: 5px 0px 5px 14px !important;
    }

        .data-item, table.quickgrid thead tr th button,
        .data-item, table.quickgrid thead tr th button:hover,
        .data-item, table.quickgrid thead tr th button:active {
            border: none !important;
            background: transparent !important;
        }

    table.quickgrid.no-header thead {
        display: none !important;
    }

    .data-item, table.quickgrid tbody tr td,
    .data-item, table.quickgrid tfoot tr td,
    .data-item, table.quickgrid tfoot tr th {
        border: none !important;
        border-style: none !important;
        border-radius: 2px;
        padding: 15px 20px !important;
        white-space: normal !important;
    }

    .data-item, table.quickgrid tbody tr td {
        font-weight: 500 !important;
    }

    .data-item, table.quickgrid tfoot tr td,
    .data-item, table.quickgrid tfoot tr th {
        padding: 10px 20px !important;
    }

    table.quickgrid tfoot tr th {
        font-weight: 700 !important;
    }

    .data-item, table.quickgrid tbody tr td.slim-td {
        padding: 10px !important;
    }

    table.quickgrid thead th {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
    }

    table.quickgrid tbody th {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
    }

    table.quickgrid thead th:first-child {
        left: 0;
        z-index: 2;
    }

    /* Removed empty rule: table.quickgrid thead th:last-child */

    table.quickgrid thead th,
    table.quickgrid thead th button {
        background: #fff;
        z-index: 1;
    }

        table.quickgrid thead th button:hover,
        table.quickgrid thead th button:active {
            background: #fff !important;
        }

    table.quickgrid tr th:first-child,
    table.quickgrid tr td:first-child {
        border-radius: 4px 0px 0px 4px;
    }

    table.quickgrid tr th:last-child,
    table.quickgrid tr td:last-child {
        border-radius: 0px 4px 4px 0px;
    }

    table.quickgrid tr:empty {
        display: none !important;
    }

body.dark .data-item,
body.dark table.quickgrid thead th,
body.dark table.quickgrid tbody tr,
body.dark table.quickgrid thead th button {
    background: #1A1D1F;
    color: #ddd;
}

.tab-each {
    min-height: 50px !important;
    padding: 0 1.25rem !important;
}

/* Removed empty rule: .accordion-new-body */

.accordion-new-item {
    color: var(--bs-accordion-color);
    /* background-color: var(--bs-accordion-bg); */
    border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
}

.image-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.image-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 30%;
}

.image-title {
    width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 5px;
}

.image-checkbox {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 20px;
    height: 25px;
    border-radius: 50%;
    z-index: 1;
}

.image-name.full {
    max-height: none;
}

.button-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.picker label {
    inline-size: inherit !important;
    margin-right: .3rem !important;
}

/* Cart Delete Button Styles */
.bt-cart-remove {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
}

.bt-cart-remove:hover {
    transform: scale(1.1);
    color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.bt-cart-remove:focus {
    box-shadow: none !important;
    color: #dc3545 !important;
}

 #dynamicAccountDetails .simple-payment-card {
        border-color: #e9ecef !important;
        border-radius: 12px !important;
        box-shadow: none !important; /* no extra shadow on desktop */
        background: transparent !important; /* use general background */
    }
    #dynamicAccountDetails .simple-payment-card .spc-icon {
        width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
        background: #eef2ff; color: #3b82f6; font-size: 16px;
    }
    #dynamicAccountDetails .simple-payment-card .spc-title { font-size: 0.95rem; }
    #dynamicAccountDetails .simple-payment-card .spc-note { font-size: 0.78rem; line-height: 1.3; }
    #dynamicAccountDetails .simple-payment-card .spc-sep { border-top: 1px dashed #e5e7eb; opacity: 1; }
    #dynamicAccountDetails .simple-payment-card .spc-row { font-size: 0.9rem; }
    #dynamicAccountDetails .simple-payment-card .btn-sm { font-size: 0.75rem; }
    #dynamicAccountDetails .simple-payment-card .spc-hint { font-size: 0.78rem; }
    #dynamicAccountDetails .simple-payment-card .spc-copy-icon {
        width: 28px; height: 28px; display:inline-flex; align-items:center; justify-content:center;
        border-radius: 50%; border: 0 !important; background: transparent !important; color: #2563eb;
        padding: 0; line-height: 1; cursor: pointer; vertical-align: middle;
        appearance: none; -webkit-appearance: none; box-shadow: none !important; outline: none !important;
    }
    #dynamicAccountDetails .simple-payment-card .spc-copy-icon:hover { background: rgba(0,0,0,0.05) !important; color: #1d4ed8; }
    #dynamicAccountDetails .simple-payment-card .spc-copy-icon i { font-size: 16px; }

    /* Ensure rows align neatly on desktop */
    #dynamicAccountDetails .simple-payment-card .spc-row { gap: 8px; }
    #dynamicAccountDetails .simple-payment-card .spc-row i { width: 18px; text-align: center; }

/* Mobile specific delete button styles */
@media (max-width: 767.98px) {
    .bt-cart-remove {
        position: relative;
        right: -5px;
        top: -5px;
    }
}

/* Sticky header */
header.wrapper.bg-light {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef;
}

/* Reduce header height on mobile */
@media (max-width: 767.98px) {
    header.wrapper.bg-light {
        padding: 0.5rem 0;
    }
    
    header.wrapper.bg-light .navbar {
        min-height: auto;
    }
    
    header.wrapper.bg-light .navbar-brand img {
        max-height: 32px !important;
    }
    
    header.wrapper.bg-light .navbar .btn,
    header.wrapper.bg-light .navbar .nav-link {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.875rem;
    }
}

/* ===================================
   MOBILE CART OPTIMIZATIONS
   Clean POS-Style Design
   =================================== */

@media (max-width: 767.98px) {
    /* Page background */
    .wrapper.bg-light {
        background: #f8f9fa !important;
    }
    
    .wrapper.bg-light .container {
        /* padding: 0 !important; */
    }
    
    .wrapper.bg-light .container.pt-3 {
        padding-top: 0 !important;
    }
    
    /* Hide back button */
    .wrapper.bg-light .container.pt-3 > a,
    .wrapper.bg-light .container > a {
        display: none !important;
    }
    
    /* Cart items container */
    .d-md-none {
        background: #f8f9fa !important;
        padding: 12px !important;
        padding-bottom: 12px !important;
    }
    
    /* Cart item cards */
    .d-md-none .card {
        border: none !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
        background: white !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    }
    
    .d-md-none .card:last-child {
        margin-bottom: 0 !important;
    }
    
    .d-md-none .card-body {
        padding: 14px 16px !important;
    }
    
    /* Product image */
    .d-md-none figure {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        border: 1px solid #e9ecef !important;
        border-radius: 8px !important;
        background: #f8f9fa !important;
        margin-right: 12px !important;
        overflow: hidden !important;
    }
    
    .d-md-none figure img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }
    
    /* Product title */
    .d-md-none .card-body h3 {
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        color: #212529 !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }
    
    /* Category text */
    .d-md-none .card-body div[style*="font-size: 0.75rem"] {
        font-size: 0.75rem !important;
        color: #6c757d !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
    }
    
    /* Hide available stock */
    .d-md-none .card-body div[style*="Available"] {
        display: none !important;
    }
    
    /* Price section */
    .d-md-none .card-body > div > div:first-child {
        min-width: 85px !important;
    }
    
    /* Unit price */
    .d-md-none .card-body strong {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        color: #212529 !important;
    }
    
    /* Quantity controls */
    .d-md-none .d-flex.align-items-center[style*="gap"] {
        gap: 2px !important;
        background: #f8f9fa !important;
        border-radius: 6px !important;
        padding: 3px !important;
        border: 1px solid #e9ecef !important;
    }
    
    .d-md-none .bt-cart-deductCart,
    .d-md-none .bt-cart-updateCart {
        width: 30px !important;
        height: 30px !important;
        background: white !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 5px !important;
        color: #495057 !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.15s ease !important;
    }
    
    .d-md-none .bt-cart-deductCart:active,
    .d-md-none .bt-cart-updateCart:active {
        background: #e9ecef !important;
    }
    
    .d-md-none input.tx-qty {
        width: 42px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        border: none !important;
        background: transparent !important;
        color: #212529 !important;
        text-align: center !important;
    }
    
    /* Total price */
    .d-md-none .card-body > div > div:last-child strong {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #212529 !important;
    }
    
    /* Delete button */
    .d-md-none .bt-cart-remove {
        width: 32px !important;
        height: 32px !important;
        border-radius: 6px !important;
        transition: all 0.15s ease !important;
    }
    
    .d-md-none .bt-cart-remove:active {
        background: #fee !important;
    }
    
    .d-md-none .bt-cart-remove i {
        font-size: 18px !important;
        color: #dc3545 !important;
    }
    
    /* Order summary section */
    .col-lg-4 {
        margin-top: 12px !important;
    }
    
    .col-lg-4 .card {
        border-radius: 16px 16px 0 0 !important;
        border: none !important;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06) !important;
        /* margin: 0 !important; */
        background: white !important;
    }
    
    .col-lg-4 .card-body {
        padding: 20px 18px !important;
    }
    
    /* Promo code section */
    .col-lg-4 h5 {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        color: #6c757d !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 10px !important;
    }
    
    .col-lg-4 .input-group {
        height: 46px !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }
    
    .col-lg-4 .input-group .form-control {
        border: none !important;
        font-size: 0.85rem !important;
        padding: 0 12px !important;
    }
    
    .col-lg-4 .input-group .form-control:focus {
        box-shadow: none !important;
    }
    
    .col-lg-4 .input-group .btn {
        border: none !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        padding: 0 18px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Order summary title */
    .col-lg-4 h4 {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #212529 !important;
        margin-top: 20px !important;
        margin-bottom: 14px !important;
        text-transform: none !important;
    }
    
    /* Summary table */
    .table-order tbody tr td {
        padding: 10px 0 !important;
        font-size: 0.85rem !important;
        color: #6c757d !important;
        border: none !important;
    }
    
    .table-order tbody tr td:first-child {
        font-weight: 500 !important;
    }
    
    .table-order tbody tr td:last-child {
        text-align: right !important;
        color: #212529 !important;
        font-weight: 600 !important;
    }
    
    /* Total row */
    .table-order tbody tr:last-child td {
        padding-top: 14px !important;
        padding-bottom: 0 !important;
        border-top: 2px solid #e9ecef !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: #212529 !important;
    }
    
    /* Checkout button */
    .col-lg-4 .btn-primary.w-100 {
        height: 52px !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        border-radius: 10px !important;
        text-transform: none !important;
        margin-top: 18px !important;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25) !important;
    }
    
    /* Continue shopping button */
    .col-lg-4 .btn.w-100:not(.btn-primary) {
        height: 48px !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        border: 1.5px solid #dee2e6 !important;
        color: #6c757d !important;
        margin-top: 10px !important;
        background: white !important;
    }
}

    
    /* Cart Card - Ultra Compact Design */
    .card.mb-3 {
        border-radius: 8px !important;
        box-shadow: none !important;
        border: 1px solid #e8e8e8 !important;
        margin-bottom: 8px !important;
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
        overflow: hidden;
        transition: all 0.15s ease;
        background: #fff !important;
    }
    
    .card.mb-3:active {
        background: #f9f9f9 !important;
    }
    
    /* Removed malformed ultra-compact cart block with CSS errors to restore parsing */
    
    /* Order Summary Table - Compact */
    .table-order {
        margin-bottom: 0 !important;
        margin-top: 8px !important;
    }
    
    .table-order tbody tr td {
        padding: 0.35rem 0 !important;
        border: none !important;
        font-size: 0.75rem !important;
        vertical-align: middle !important;
    }
    
    .table-order tbody tr td strong {
        font-weight: 600 !important;
        color: #666 !important;
    }
    
    .table-order tbody tr:last-child td {
        padding-top: 8px !important;
        padding-bottom: 4px !important;
        border-top: 1px solid #e8e8e8 !important;
        font-size: 0.85rem !important;
    }
    /* Checkout Button - Compact */
    /* .col-lg-4 .btn.btn-primary.rounded-pill.w-100 {
        padding: 0.6rem 1rem !important;
        font-weight: 700 !important;
        font-size: 0.85rem !important;
        border-radius: 6px !important;
        margin-top: 10px !important;
        box-shadow: none !important;
        border: none !important;
        transition: all 0.15s ease !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        height: 42px !important;
    } */
    
    /* .col-lg-4 .btn.btn-primary.rounded-pill.w-100:active {
        transform: scale(0.96) !important;
        opacity: 0.9 !important;
    } */
    
    /* Continue Shopping Button - Compact */
    /* .col-lg-4 .btn.rounded-pill.w-100.mt-4,
    .col-lg-4 a.btn.rounded-pill.w-100.mt-4 {
        padding: 0.55rem 1rem !important;
        font-weight: 600 !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
        border: 1px solid #ddd !important;
        background: #fff !important;
        color: #666 !important;
        margin-top: 8px !important;
        height: 38px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
    } */
    
    /* Reduce spacing throughout */
    .col-lg-4 .mb-7 {
        margin-bottom: 10px !important;
    }
    
    .col-lg-4 .mt-4 {
        margin-top: 8px !important;
    }
    
    /* Back button - smaller */
    .uil.uil-angle-left-b {
        font-size: 1.5rem !important;
        color: #333 !important;
    }
    
    /* Text overflow fix */
    .card-body .h6,
    .card-body .post-title {
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }
    
    /* Breadcrumb - smaller */
    .wrapper.bg-gray .container {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }
    
    .breadcrumb {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        font-size: 0.7rem !important;
        padding: 0 0.3rem !important;
    }
    
    /* Reduce all card gaps */
    .row.gx-md-8 {
        --bs-gutter-x: 0.5rem !important;
    }
    
    .row.gy-12 {
        --bs-gutter-y: 0.5rem !important;
    }

    .table-order .text-dark.fw-bold {
        font-size: 1.15rem !important;
        color: #1a1a1a !important;
    }
    
    /* Checkout Button */
    /* .btn.btn-primary.rounded-pill.w-100 {
        padding: 0.85rem 1.5rem !important;
        font-weight: 600 !important;
        font-size: 1rem !important;
        border-radius: 14px !important;
        margin-top: 1rem !important;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
        border: none;
        transition: all 0.2s ease;
    } */
    
    .btn.btn-primary.rounded-pill.w-100:active {
        transform: scale(0.97);
    }
    
    /* Continue Shopping Button */
    /* .btn.rounded-pill.w-100.mt-4 {
        padding: 0.75rem 1.5rem !important;
        font-weight: 500 !important;
        font-size: 0.95rem !important;
        border-radius: 14px !important;
        border: 1px solid #dee2e6 !important;
        background: #fff !important;
        color: #495057 !important;
    } */
    
    /* Empty spacing improvements (duplicate removed) */

/* ===================================
   CHECKOUT PAGE MOBILE OPTIMIZATIONS
   Matching Cart Page Style - Clean & Modern
   =================================== */

@media (max-width: 767.98px) {
    /* Page background (checkout only) */
    #checkoutWrapper {
        background: #f8f9fa !important;
    }
    
    /* Checkout container (scope to checkout only) */
    #checkoutWrapper .container {
        padding: 0 !important;
    }
    
    #checkoutWrapper .container.pt-3 {
        padding-top: 0 !important;
    }
    
    #checkoutWrapper .col-lg-8.mx-auto {
        padding: 0 !important;
        max-width: 100% !important;
    }
    
    .t-body-responsive-confirm {
        padding: 0 12px !important;
    }
    
    /* Hide back button (checkout only) */
    #checkoutWrapper .container.pt-3 > a,
    #checkoutWrapper .container > a[href="/cart"] {
        display: none !important;
    }
    
    /* Step indicators */
    .step-number {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
        background: #e9ecef !important;
        color: #6c757d !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .step-number.active {
        background: #0d6efd !important;
        color: white !important;
    }
    
    .d-flex.align-items-center.mb-3 {
        margin-bottom: 12px !important;
        padding: 0 !important;
    }
    
    /* Section headings (checkout only) */
    #checkoutWrapper h2.fw-semibold,
    #checkoutWrapper .fw-semibold.mb-1,
    #addressSectionTitle,
    .collapse-toggle p {
        font-size: 1rem !important;
        font-weight: 700 !important;
        margin: 0 0 4px 0 !important;
        color: #212529 !important;
    }
    
    /* Delivery options section - remove global negative margins on .mb-4 to avoid asymmetry */
    /* intentionally left unstyled here to prevent collateral layout shifts */
    
    /* Delivery options - extend to both edges with equal side padding (checkout only) */
    #checkoutWrapper .d-flex.flex-column.flex-sm-row.gap-2.mb-3 {
        gap: 10px !important;
        margin-bottom: 16px !important;
        /* cancel parent horizontal padding (12px) and reapply it evenly */
        /* margin-left: -12px !important;
        margin-right: -12px !important;
        padding-left: 12px !important;
        padding-right: 12px !important; */
        width: 100% !important;
    }
    
    button.delivery-option {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 16px !important;
        background: white !important;
        border: 2px solid #e9ecef !important;
        border-radius: 12px !important; /* match desktop rounded look */
        transition: all 0.15s ease !important;
        box-shadow: none !important;
        max-width: none !important;
        width: 100% !important; /* ensure full width per row on mobile */
    }
    
    .delivery-option:active {
        transform: scale(0.98) !important;
    }
    
    .delivery-option.selected,
    .delivery-option.border-primary {
        border-color: #0d6efd !important;
        background: #f0f7ff !important;
        box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15) !important;
    }
    
    .option-icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 8px !important;
        font-size: 20px !important;
        flex-shrink: 0 !important;
        background: #f8f9fa !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #6c757d !important;
    }
    
    .delivery-option.selected .option-icon,
    .delivery-option.border-primary .option-icon {
        background: #0d6efd !important;
        color: white !important;
    }
    
    .delivery-option .text-start {
        flex: 1 !important;
    }
    
    .delivery-option p {
        font-size: 0.85rem !important; /* slightly smaller to match other labels */
        font-weight: 600 !important;
        margin: 0 !important;
        color: #212529 !important;
    }
    
    .delivery-option small {
        font-size: 0.75rem !important;
        color: #6c757d !important;
    }
    
    /* Address cards - compact style */
    .card.mb-4 {
        border-radius: 10px !important;
        border: none !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
        margin-bottom: 10px !important;
        background: white !important;
    }
    
    .card.mb-4:active {
        background: #f8f9fa !important;
    }
    
    .card.mb-4 .card-body {
        padding: 8px 12px !important; /* tighter to reduce extra whitespace */
    }
    
    /* Address info layout - compact and inline */
    .author-info.d-md-flex {
        display: flex !important;
        flex-direction: row !important; /* inline on mobile for compactness */
        align-items: flex-start !important;
        gap: 12px !important;
    }
    /* Reduce the extra space added by the utility class on mobile */
    .author-info.mb-3 {
        margin-bottom: 6px !important;
    }
    
    .author-info .d-flex.align-items-center {
        width: auto !important;
        gap: 10px !important;
        align-items: flex-start !important;
        flex: 1 1 auto !important;
        flex-wrap: nowrap !important; /* keep icon and text on one row */
        justify-content: flex-start !important;
    }
    
    /* Force text to align left right beside the icon */
    .author-info .d-flex.align-items-center > div {
        text-align: left !important;
        flex: 1 1 auto !important;
    }
    .author-info h6,
    .author-info .post-meta {
        text-align: left !important;
        margin-left: 0 !important;
    }
    .author-info figure.user-avatar {
        margin: 0 8px 0 0 !important;
    }
    /* Hide the address icon on mobile to reclaim space */
    .author-info .user-avatar {
        display: none !important;
    }
    
    .user-avatar img {
        width: 32px !important;
        height: 32px !important;
        border-radius: 6px !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .author-info h6 {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        margin-bottom: 2px !important;
        color: #212529 !important;
        line-height: 1.3 !important;
    }
    
    .author-info .post-meta {
        font-size: 0.78rem !important;
        line-height: 1.35 !important;
        color: #6c757d !important;
        margin-bottom: 2px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .author-info .mt-3.mt-md-0.ms-auto {
        margin: 0 0 0 auto !important; /* push button to the right */
        width: auto !important;
    }
    
    /* Use Address button - compact, inline, pill */
    .use-address-btn {
        width: auto !important;
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        border-radius: 9999px !important; /* pill like desktop */
        border-width: 1.5px !important;
        min-height: 34px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        transition: all 0.15s ease !important;
        white-space: nowrap !important;
    }
    
    .use-address-btn:active {
        transform: scale(0.98) !important;
    }
    
    .use-address-btn i,
    .btn i {
        font-size: 0.9rem !important;
        line-height: 1 !important;
    }
    
    /* Selected address display card - compact */
    .card.shadow-0.border {
        border-radius: 10px !important;
        border: none !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
        margin-bottom: 12px !important;
        background: white !important;
    }
    
    .card.shadow-0.border .card-body {
        padding: 12px !important;
    }
    
    .card.shadow-0.border .card-body.p-5 {
        padding: 12px !important;
    }
    
    .card.shadow-0.border h5 {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        margin-bottom: 6px !important;
        color: #212529 !important;
    }
    
    .card.shadow-0.border p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0 !important;
    }
    
    .card.shadow-0.border .btn-outline-primary {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        min-height: 34px !important;
        border-radius: 8px !important;
    }

    /* Selected address: force left alignment of details */
    #shippingAddressCardContent .card.shadow-0.border .card-body,
    #shippingAddressCardContent .card.shadow-0.border h5,
    #shippingAddressCardContent .card.shadow-0.border p,
    #shippingAddressCardContent .card.shadow-0.border .fw-medium,
    #shippingAddressCardContent .card.shadow-0.border .text-center {
        text-align: left !important;
    }
    #shippingAddressCardContent .card.shadow-0.border .d-flex.justify-content-between {
        align-items: flex-start !important;
    }
    
    .card.shadow-0.border .d-flex.justify-content-between {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .card.shadow-0.border .d-flex.justify-content-between > div:last-child {
        width: 100% !important;
    }    .card.shadow-0.border .d-flex.justify-content-between {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .card.shadow-0.border h5 {
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        color: #666 !important;
        margin-bottom: 6px !important;
    }
    
    .card.shadow-0.border p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        /* color: #333 !important; */
        margin-bottom: 0 !important;
    }
    
    .card.shadow-0.border .fw-medium {
        font-weight: 700 !important;
        color: #1a1a1a !important;
    }
    
    .card.shadow-0.border .btn {
        width: 100% !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.8rem !important;
        border-radius: 6px !important;
        min-height: 38px !important;
    }
    
    /* Enter New Address - refined button look */
    .nav-tabs.nav-tabs-bg {
        border-radius: 12px !important;
        border: none !important;
        background: transparent !important;
        margin: 8px 0 !important;
        /* padding: 0 0.5rem !important; */
    }
    
    .nav-tabs .nav-link {
        width: 100% !important;
        padding: 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        border: 2px solid #e9ecef !important;
        border-radius: 12px !important;
        background: #fff !important;
    }
    
    .nav-tabs .nav-link img {
        width: 28px !important;
        height: 28px !important;
    }
    
    .nav-tabs .nav-link h4 {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        margin: 0 !important;
        color: #333 !important;
    }
    
    /* Payment accordion - compact */
    .accordion.accordion-wrapper {
        margin-top: 12px !important; /* add breathing space between sections on mobile */
        /* margin-left: 0.5rem; margin-right: 0.5rem; */
    }
    
    .accordion.accordion-wrapper .card,
    .accordion-item.icon {
        border-radius: 8px !important;
        border: 1px solid #e8e8e8 !important;
        margin-bottom: 12px !important; /* a touch more space between payment items */
    }
    
    .accordion .card-header {
        padding: 0 !important;
    }
    
    .accordion .card-header button {
        padding: 12px !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
        border: 2px solid #e9ecef !important;
        border-radius: 12px !important;
        background: #fff !important;
        text-align: left !important;
    }
    
    .accordion .card-header button span {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        position: static !important; /* ensure not absolutely positioned by theme */
        margin-right: 2px !important;
    }
    .accordion .card-header button span i {
        font-size: 1.1rem !important;
        color: #666 !important;
        line-height: 1 !important;
        position: static !important; /* prevent overlay */
    }

    .accordion .card-header button[aria-expanded="true"] {
        border-color: #0d6efd !important;
        box-shadow: 0 0 0 2px rgba(13,110,253,.15) inset !important;
    }
    
    .accordion .card-body {
        padding: 12px !important;
    }
    
    .accordion .card-body h4 {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        margin-bottom: 8px !important;
    }
    
    .accordion .card-body p {
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
        margin-bottom: 10px !important;
    }
    
    /* Bank details */
    /* Neutralize the outer alert wrapper so the card sits cleanly */
    #dynamicAccountDetails {
        background: transparent !important;
        border: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    #dynamicAccountDetails .card {
        border-radius: 8px !important;
        border: 1px solid #e8e8e8 !important;
    }
    
    #dynamicAccountDetails .card-body {
        padding: 8px !important; /* tighter on mobile */
    }
    
    #dynamicAccountDetails h4 {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        margin-bottom: 10px !important;
    }
    
    #dynamicAccountDetails .text-secondary {
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        margin-bottom: 4px !important;
    }
    
    #dynamicAccountDetails .text-dark {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
    }
    
    #dynamicAccountDetails .bg-light {
        border-radius: 6px !important;
        padding: 8px !important; /* reduce inner padding */
        margin-bottom: 8px !important; /* shrink vertical gaps */
    }
    
    #dynamicAccountDetails .font-monospace {
        font-size: 1.1rem !important;
        letter-spacing: 1.5px !important;
    }
    
    #dynamicAccountDetails .btn {
        padding: 0.4rem 0.85rem !important;
        font-size: 0.75rem !important;
        border-radius: 9999px !important; /* pill */
        min-height: 32px !important;
    }
    
    #dynamicAccountDetails .row.g-0 {
        margin-bottom: 10px !important;
    }
    
    #dynamicAccountDetails .alert {
        font-size: 0.74rem !important;
        padding: 6px !important;
        margin-bottom: 8px !important;
    }

    /* Shrink utility margins inside the payment card to compact height */
    #dynamicAccountDetails .mb-3 { margin-bottom: 10px !important; }
    #dynamicAccountDetails .mb-md-4 { margin-bottom: 14px !important; }
    #dynamicAccountDetails .pd-header { margin-bottom: 6px !important; }

    /* Reduce Bootstrap row gutters inside this grid for tighter layout */
    #dynamicAccountDetails .payment-details-grid .row {
        --bs-gutter-x: 0.5rem !important; /* 8px */
        --bs-gutter-y: 0.5rem !important; /* 8px */
    }

    /* Payment details responsive grid */
    #dynamicAccountDetails .payment-details-grid {
        display: block;
    }
    #dynamicAccountDetails .pd-right {
        margin-top: 6px;
    }

    @media (min-width: 768px) {
        /* Ensure the outer alert wrapper is also neutralized on tablet/desktop */
        #dynamicAccountDetails {
            background: transparent !important;
            border: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
            box-shadow: none !important;
        }
        #dynamicAccountDetails .card-body {
            padding: 16px !important; /* a bit more space on tablet/desktop */
        }
        #dynamicAccountDetails h4 {
            font-size: 1rem !important;
        }
        #dynamicAccountDetails .payment-details-grid {
            display: grid;
            grid-template-columns: 1.2fr 0.8fr;
            grid-template-rows: auto 1fr;
            grid-template-areas:
                "header header"
                "left right";
            column-gap: 12px;
            row-gap: 6px;
            align-items: start;
        }
        #dynamicAccountDetails .pd-header { grid-area: header; margin-bottom: 8px !important; }
        #dynamicAccountDetails .pd-left { grid-area: left; }
        #dynamicAccountDetails .pd-right { grid-area: right; margin-top: 0; }
        #dynamicAccountDetails .font-monospace { font-size: 1.25rem !important; }
        #dynamicAccountDetails .btn.copy-btn { min-height: 36px !important; }
    }

    @media (min-width: 992px) {
        #dynamicAccountDetails .card-body { padding: 18px !important; }
        #dynamicAccountDetails .font-monospace { font-size: 1.5rem !important; letter-spacing: 1.2px !important; }
    }
    
    /* Order summary */
    #orderSummaryContainer .card {
        border-radius: 8px !important;
        border: 1px solid #e8e8e8 !important;
        margin: 0 0.5rem 12px 0.5rem !important;
    }
    
    #orderSummaryContainer .card-body {
        padding: 12px !important;
    }
    
    #orderSummaryContainer .table-order tbody tr td {
        padding: 0.4rem 0 !important;
        font-size: 0.8rem !important;
        border: none !important;
    }
    
    #orderSummaryContainer .table-order tbody tr:last-child td {
        padding-top: 10px !important;
        border-top: 1px solid #e8e8e8 !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
    }
    
    /* Complete order button - not too big */
    .complete-order-btn,
    button[type="submit"].btn-primary {
        width: 100% !important;
        padding: 0.7rem 1.2rem !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        border-radius: 6px !important;
        min-height: 42px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Form inputs */
    .form-control,
    .form-select {
        /* height: 42px !important; */
        /* padding: 0.6rem 0.75rem !important; */
        /* font-size: 0.85rem !important; */
        border-radius: 6px !important;
    }
    
    /* General spacing */
    .mb-3 { margin-bottom: 8px !important; }
    .mb-4 { margin-bottom: 10px !important; }
    .mb-5 { margin-bottom: 12px !important; }
    .mb-7 { margin-bottom: 10px !important; }
    
    .mt-3 { margin-top: 8px !important; }
    .mt-4 { margin-top: 10px !important; }
    
    .pt-3 { padding-top: 8px !important; }
    .pb-3 { padding-bottom: 8px !important; }
    
    /* Alert boxes - compact */
    .alert {
        border-radius: 6px !important;
        padding: 0.6rem 0.75rem !important;
        font-size: 0.75rem !important;
        margin-bottom: 8px !important;
    }
    
    .alert i,
    .alert .uil {
        font-size: 1rem !important;
    }
    
    /* Loading spinner overlay */
    #spinnerOverlay {
        backdrop-filter: blur(3px);
    }
    
    #spinnerOverlay .spinner-border {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    #spinnerOverlay p {
        font-size: 0.8rem !important;
    }
    
    /* List groups - compact */
    .list-group-item {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
        margin-bottom: 6px !important;
    }
    
    /* Collapse sections */
    .collapse-toggle {
        font-size: 0.85rem !important;
    }
    
    /* Tab content */
    .tab-content {
        padding-top: 8px !important;
    }
    
    /* HR separators */
    hr {
        margin: 10px 0 !important;
    }

    /* Alert boxes */
    .alert {
        border-radius: 12px !important;
        padding: 0.85rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Loading spinner overlay */
    #spinnerOverlay {
        backdrop-filter: blur(4px);
    }
    
    #spinnerOverlay .spinner-border {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    /* Promo code input improvements */
    #promo_code,
    #code_promo {
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.3px !important;
        text-transform: uppercase !important;
    }
    
    #promocode_input .input-group {
        box-shadow: none !important;
    }
    
    #add_promo,
    #remove__promo {
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        padding: 0.4rem 0.8rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Discount highlight */
    .text-red {
        color: #ff4757 !important;
        font-weight: 600 !important;
    }
    
    /* Mobile-friendly touch targets */
    button,
    .btn,
    a.btn {
        min-height: 38px !important;
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }
    
    /* Card hover effects */
    .card {
        transition: all 0.15s ease-in-out;
    }
    
    /* Improved spacing for small screens */
    .row.gx-md-8 {
        --bs-gutter-x: 0.5rem !important;
    }
    
    /* Better visual hierarchy */
    .fw-bold {
        font-weight: 700 !important;
    }
    
    .fw-semibold {
        font-weight: 600 !important;
    }
    
    /* Improved loading states */
    .spinner-border {
        border-width: 2.5px !important;
    }
    
    /* Better button states */
    .btn:disabled,
    .btn.disabled {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
    }
    
    /* Prescription upload section */
    .form-group input[type="file"] {
        padding: 0.6rem !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
    }
    
    /* Small text improvements */
    small,
    .small {
        font-size: 0.7rem !important;
    }
    
    /* Price formatting */
    .amount {
        font-variant-numeric: tabular-nums;
    }
}

/* ===================================
   GENERAL MOBILE IMPROVEMENTS
   Ultra-Compact Layout
   =================================== */

@media (max-width: 767.98px) {
    /* Typography - smaller everywhere */
    h1, .h1 { font-size: 1.4rem !important; }
    h2, .h2 { font-size: 1rem !important; }
    h3, .h3 { font-size: 1rem !important; }
    h4, .h4 { font-size: 0.9rem !important; }
    h5, .h5 { font-size: 0.85rem !important; }
    h6, .h6 { font-size: 0.8rem !important; }
    
    body,
    p {
        font-size: 0.8rem !important;
    }
    
    /* Discount highlight - keep red on mobile */
    .text-red,
    .price.text-red,
    p.text-red,
    td .text-red {
        color: #ff4757 !important;
        font-weight: 600 !important;
    }
    
    /* Container adjustments */
    .container {
        max-width: 100% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Better spacing - ultra compact */
    .py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
    .py-3 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
    .pt-3 { padding-top: 0.5rem !important; }
    .pb-14 { padding-bottom: 1rem !important; }
    .pb-md-6 { padding-bottom: 0.75rem !important; }
    
    /* Gap adjustments */
    .gap-3 { gap: 0.5rem !important; }
    
    /* Grid adjustments */
    .col-lg-8,
    .col-lg-4 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: .5rem !important;
    }
    
    /* Section backgrounds */
    .wrapper.bg-light {
        background: #fafafa !important;
    }
    
    .wrapper.bg-gray {
        background: #f5f5f5 !important;
    }
    
    /* Better shadows - minimal */
    .shadow-sm {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    }
    
    /* Border radius consistency */
    .rounded {
        border-radius: 6px !important;
    }
    
    .rounded-3 {
        border-radius: 8px !important;
    }
    
    .rounded-pill {
        border-radius: 50rem !important;
    }
    
    /* Focus states - subtle */
    button:focus,
    .btn:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15) !important;
    }
    
    /* Link styles */
    a {
        text-decoration: none !important;
    }
    
    /* Icon sizes */
    .uil,
    .fas,
    .far {
        vertical-align: middle;
    }
    
    /* Badge improvements */
    .badge {
        font-weight: 600 !important;
        padding: 0.25em 0.5em !important;
        border-radius: 4px !important;
        font-size: 0.7rem !important;
    }
    
    /* Toast notifications - compact */
    #toast-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
    }
    
    #toast-container > div {
        border-radius: 6px !important;
        padding: 0.75rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        font-size: 0.8rem !important;
    }
    
    /* Modal improvements */
    .modal-content {
        border-radius: 12px !important;
        border: none !important;
    }
    
    .modal-header,
    .modal-footer {
        border: none !important;
        padding: 12px !important;
    }
    
    .modal-body {
        padding: 12px !important;
    }
    
    /* Collapse improvements */
    .collapse {
        transition: height 0.25s ease-in-out;
    }
    
    /* Empty states */
    .text-center.text-muted {
        padding: 1.5rem 1rem !important;
        font-size: 0.8rem !important;
    }
    
    .text-center.text-muted i {
        opacity: 0.3;
        font-size: 2.5rem !important;
    }
}

/* ===================================
   PERFORMANCE & ACCESSIBILITY
   =================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support preparation */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed in the future */
}

/* Print styles */
@media print {
    .bt-cart-remove,
    .btn,
    nav,
    .breadcrumb {
        display: none !important;
    }
}

/* Reset margins on larger screens - desktop/tablet */
@media (min-width: 768px) {
    .col-lg-4.mt-2 {
        margin-top: 0 !important;
    }
    
    .col-lg-4 .card.mx-2 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    /* Cart table */
    .shopping-cart td {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .w-17 {
        width: 60px !important;
    }
    
    .tx-qty {
        max-width: 50px;
    }
    
    /* Cart cards for tablet */
    .card {
        border-radius: 14px !important;
    }
    
    /* Order summary */
    .col-lg-4 .card {
        position: sticky;
        top: 15px;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.9rem !important;
    }
    
    /* Checkout delivery options */
    .delivery-option {
        padding: 1.25rem !important;
    }
}

/* Ensure smooth transitions */
.card {
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* ===================================
   CART LOGIN CONFIRMATION MODAL
   =================================== */
#cartLoginModal .modal-content {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
}

#cartLoginModal .modal-header {
    padding: 1.5rem 1.5rem 0.5rem;
}

#cartLoginModal .modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
}

#cartLoginModal .modal-body {
    padding: 2rem 1.5rem;
}

#cartLoginModal .modal-body .display-1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#cartLoginModal .modal-body p {
    font-size: 1rem;
    color: #6c757d;
    line-height: 1.6;
}

#cartLoginModal .modal-footer {
    padding: 0.75rem 1.5rem 1.5rem;
    gap: 0.75rem;
}

#cartLoginModal .btn {
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

#cartLoginModal .btn-primary {
    min-width: 120px;
}

#cartLoginModal .btn-outline-primary {
    min-width: 160px;
}

#cartLoginModal .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

#cartLoginModal .btn-outline-primary:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* Mobile responsive adjustments for cart login modal */
@media (max-width: 767.98px) {
    #cartLoginModal .modal-dialog {
        margin: 1rem;
    }
    
    #cartLoginModal .modal-body .display-1 {
        font-size: 3rem;
    }
    
    #cartLoginModal .modal-body p {
        font-size: 0.9rem;
    }
    
    #cartLoginModal .modal-footer {
        flex-direction: column;
    }
    
    #cartLoginModal .btn {
        width: 100%;
        min-width: unset;
    }
}

/* ===================================
   PRODUCT CARD - FIX PRICE/CATEGORY OVERLAP
   =================================== */

/* Product card category and price container */
.item .post-header .d-flex.flex-row.align-items-center.justify-content-between {
    gap: 0.5rem;
}

/* Category text - allow wrapping and set max width */
.item .post-header .post-category {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Price - prevent shrinking and wrapping */
.item .post-header .price {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: auto;
}

/* Mobile-specific adjustments for product cards */
@media (max-width: 575.98px) {
    /* Stack category and price vertically on very small screens */
    .item .post-header .d-flex.flex-row.align-items-center.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem;
    }
    
    .item .post-header .post-category {
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .item .post-header .price {
        width: 100%;
        text-align: left;
        margin-left: 0;
        font-size: 0.95rem;
    }
}

/* Tablet and small desktop adjustments */
@media (min-width: 576px) and (max-width: 991.98px) {
    .item .post-header .d-flex.flex-row.align-items-center.justify-content-between {
        gap: 0.75rem;
    }
    
    .item .post-header .post-category {
        max-width: 55%;
    }
    
    .item .post-header .price {
        font-size: 0.9rem;
    }
}

/* ===================================
   OUT OF STOCK BADGE - CART ITEMS
   =================================== */

/* Out of stock badge styling */
.badge.bg-danger {
    animation: pulseWarning 2s ease-in-out infinite;
}

@keyframes pulseWarning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Desktop cart item out of stock badge */
.shopping-cart .badge.bg-danger,
table.shopping-cart .badge.bg-danger {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Mobile cart item out of stock badge */
@media (max-width: 767.98px) {
    .card .badge.bg-danger {
        display: inline-flex;
        align-items: center;
        font-weight: 600;
        white-space: nowrap;
    }
}