/* Custom styles */

/* ================================
   Discount Offer Slider Dots
   ================================ */
.offer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.offer-dot.active {
    background: #16a34a;
    transform: scale(1.3);
}

/* ================================
   Discount Offer Slider - All Screens
   ================================ */
/* Section header — arrow | title | arrow */
.offer-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 18px;
}
.offer-slider-header .offer-title {
    flex: 1;
    text-align: center;
    font-weight: 800;
    font-size: 20px;
    color: #16a34a;
    letter-spacing: 0.4px;
    position: relative;
    padding-bottom: 10px;
}
.offer-slider-header .offer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 3px;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    border-radius: 2px;
}

/* Slider track */
.desktop-only-offers .container {
    overflow: hidden;
    position: relative;
}
.desktop-only-offers .row.g-4 {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 20px !important;
    margin: 0 !important;
    padding: 4px 0 12px !important;
    --bs-gutter-x: 0 !important;
    --bs-gutter-y: 0 !important;
    align-items: stretch;
}
.desktop-only-offers .row.g-4::-webkit-scrollbar { display: none; }

/* Desktop: 2 cards per view */
.desktop-only-offers .col-lg-6 {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    scroll-snap-align: start !important;
    display: flex !important;
    padding: 0 !important;
}
.desktop-only-offers .col-lg-6 > a.d-flex {
    flex: 1;
    min-height: 180px;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 3px 16px rgba(0,0,0,.08) !important;
    background: #fff !important;
    border: none !important;
    transition: box-shadow 0.2s;
}
.desktop-only-offers .col-lg-6 > a.d-flex:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.13) !important;
}
.desktop-only-offers .col-lg-6 img.img-fluid {
    width: 180px !important;
    height: 160px !important;
    object-fit: contain !important;
    flex-shrink: 0;
}

/* Slider control buttons (prev/next) */
.offer-slider-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #16a34a;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 13px;
    flex-shrink: 0;
}
.offer-slider-btn:hover {
    background: #16a34a;
    color: #fff;
}

/* Dots + footer row */
.offer-slider-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 12px;
}
.offer-slider-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.btn-md-square {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Override Bootstrap styles */
.dropdown-toggle::after {
    margin-left: 0.5em;
}

/* Custom topbar styles */
.topbar-link {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s;
}

.topbar-link:hover {
    color: var(--bs-primary);
}

/* Topbar text colors - improve visibility */
.text-muted {
    color: #495057 !important;
}

.text-dark {
    color: #212529 !important;
}

/* Search bar customization */
.search-form {
    position: relative;
}

.search-form .form-control:focus {
    box-shadow: none;
    border-color: #0d6efd;
}

/* Harmonize padding/height of search select and button */
.search-form .form-select {
    padding: 0.75rem 1rem !important;
    /* match input py-3 */
    min-width: 180px;
    border-left: 1px solid #e9ecef !important;
}

.search-form .btn {
    padding: 0.75rem 1.25rem !important;
}

.search-form .form-control {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Cart icon customization */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Theme overrides: switch to green palette */
:root {
    --bs-primary: #16a34a;
    /* emerald-600 */
    --bs-primary-rgb: 22, 163, 74;
    --bs-secondary: #065f46;
    /* emerald-900 */
    --bs-secondary-rgb: 6, 95, 70;
}

/* Ensure links follow primary color rather than template’s orange */
a {
    color: var(--bs-primary) !important;
}

a:hover {
    color: #15803d !important;
}

/* Utility: primary border/text helpers when inline styles used */
.border-primary {
    border-color: var(--bs-primary) !important;
}

.text-primary {
    color: var(--bs-primary) !important;
}

.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-primary:hover {
    background-color: #15803d !important;
    border-color: #15803d !important;
}

/* Override Bootstrap’s hard-coded bg utilities in bundled theme */
.bg-primary {
    background-color: var(--bs-primary) !important;
}

.bg-secondary {
    background-color: var(--bs-secondary) !important;
}

.text-secondary {
    color: var(--bs-secondary) !important;
}

/* Navbar on primary background: ensure white links/icons */
.nav-bar .navbar.bg-primary .navbar-nav .nav-link {
    color: #fff !important;
}

.nav-bar .navbar.bg-primary .navbar-nav .nav-link:hover,
.nav-bar .navbar.bg-primary .navbar-nav .nav-link.active {
    color: #fff !important;
    opacity: 0.9;
}

.nav-bar .navbar.bg-primary .navbar-brand {
    color: #fff !important;
}

.nav-bar .navbar.bg-primary .navbar-brand .text-secondary {
    color: #fff !important;
}

.nav-bar .navbar .navbar-toggler {
    color: #fff !important;
    border-color: rgba(255, 255, 255, .35) !important;
}

.nav-bar .navbar .navbar-toggler .fa {
    color: #fff !important;
}

.nav-bar .navbar .navbar-toggler h4,
.nav-bar .navbar .navbar-toggler h4 i {
    color: #fff !important;
}

/* Ensure dropdown menu items are readable */
.dropdown-menu .dropdown-item {
    color: #212529 !important;
}

.dropdown-menu .dropdown-item:hover {
    background-color: rgba(22, 163, 74, 0.1) !important;
    color: var(--bs-primary) !important;
}

/* Category dropdown styles */
.categories-bars .categories-bars-item a {
    color: #212529 !important;
}

.categories-bars .categories-bars-item a:hover {
    color: var(--bs-primary) !important;
}

.categories-bars .categories-bars-item span {
    color: #6c757d !important;
}

/* Icon links in topbar - ensure visibility */
.btn-md-square {
    color: #495057 !important;
    border-color: #dee2e6 !important;
}

.btn-md-square:hover {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-md-square i {
    color: inherit !important;
}

/* Search button text should be white */
.btn-primary {
    color: #fff !important;
}

/* Phone button text should be white */
.btn-secondary {
    color: #fff !important;
}

/* ================================
   Pagination Styles - Fix for Bootstrap 5
   ================================ */
.pagination {
    display: flex !important;
    flex-wrap: wrap;
    padding-left: 0;
    list-style: none;
    justify-content: center;
    margin: 0;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    color: #212529 !important;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #212529 !important;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d !important;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
}

/* Fix pagination nav wrapper alignment */
nav[aria-label="Pagination Navigation"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

nav[aria-label="Pagination Navigation"]>div {
    width: 100%;
}

nav[aria-label="Pagination Navigation"] .d-none.flex-sm-fill {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 576px) {
    nav[aria-label="Pagination Navigation"] .d-none.flex-sm-fill {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Hide mobile pagination on larger screens */
nav[aria-label="Pagination Navigation"] .d-flex.d-sm-none {
    display: none !important;
}

@media (max-width: 575.98px) {
    nav[aria-label="Pagination Navigation"] .d-flex.d-sm-none {
        display: flex !important;
    }

    nav[aria-label="Pagination Navigation"] .d-none.flex-sm-fill {
        display: none !important;
    }
}

/* ================================
   Mobile Shop Page Styles
   ================================ */

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a472a;
    z-index: 9999;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.mobile-bottom-nav .nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: #fff !important;
    padding: 5px 10px;
    transition: 0.3s;
    min-width: 60px;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item.active {
    color: #fff !important;
    opacity: 0.9;
}

.mobile-bottom-nav .nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    color: #fff !important;
}

.mobile-bottom-nav .nav-item span {
    font-size: 11px;
    font-weight: 500;
    color: #fff !important;
}

/* Mobile shop header */
.mobile-shop-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-shop-header .logo img {
    height: 40px;
}

.mobile-shop-header .header-icons {
    display: flex;
    gap: 15px;
}

.mobile-shop-header .header-icons>a {
    color: #333 !important;
    font-size: 20px;
    position: relative;
    text-decoration: none !important;
}

.mobile-shop-header .header-icons .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--bs-primary);
    color: #fff !important;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile search bar */
.mobile-search-bar {
    display: none;
    padding: 10px 15px;
    background: #fff;
}

.mobile-search-bar .search-input-wrapper {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.mobile-search-bar input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 14px;
    outline: none;
}

.mobile-search-bar button {
    background: #f5f5f5;
    border: none;
    padding: 12px 20px;
    color: #666;
    cursor: pointer;
}

/* Floating cart button */
.mobile-floating-cart {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: var(--bs-primary);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 998;
    text-decoration: none !important;
}

.mobile-floating-cart:hover {
    color: #fff !important;
    background: #15803d;
}

.mobile-floating-cart .cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: var(--bs-primary) !important;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Categories Drawer/Modal for Mobile */
.mobile-categories-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.mobile-categories-drawer.active {
    display: block;
}

.mobile-categories-drawer .drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mobile-categories-drawer .drawer-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-categories-drawer.active .drawer-content {
    transform: translateY(0);
}

.mobile-categories-drawer .drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-categories-drawer .drawer-header h5 {
    margin: 0;
    font-weight: 600;
    color: #333 !important;
}

.mobile-categories-drawer .drawer-header .close-drawer {
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    line-height: 1;
}

.mobile-categories-drawer .category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none !important;
    color: #333 !important;
}

.mobile-categories-drawer .category-item:last-child {
    border-bottom: none;
}

.mobile-categories-drawer .category-item span {
    color: #333 !important;
}

.mobile-categories-drawer .category-item span:last-child {
    color: #888 !important;
    font-size: 14px;
}

/* Mobile Add to Cart button */
.mobile-add-cart {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bs-primary);
    background: transparent;
    color: var(--bs-primary) !important;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
}

.mobile-add-cart:hover {
    background: var(--bs-primary);
    color: #fff !important;
}

/* Mobile product icons */
.mobile-product-icons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.mobile-product-icons a,
.mobile-product-icons button {
    width: 32px;
    height: 32px;
    background: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333 !important;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    text-decoration: none !important;
}

/* Stock info styling */
.stock-info {
    color: var(--bs-primary) !important;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
}

/* ================================
   Mobile Responsive - Max 768px
   ================================ */
@media (max-width: 768px) {

    /* Show mobile elements */
    .mobile-bottom-nav {
        display: block !important;
    }

    .mobile-shop-header {
        display: flex !important;
    }

    .mobile-search-bar {
        display: block !important;
    }

    .mobile-floating-cart {
        display: flex !important;
    }

    .mobile-product-icons {
        display: flex !important;
    }

    /* Add padding to body for bottom nav */
    body.shop-page,
    body.home-page {
        padding-bottom: 60px !important;
        min-height: 100vh;
    }

    /* Hide elements on mobile for shop page */
    body.shop-page .nav-bar,
    body.shop-page .container-fluid.nav-bar,
    body.shop-page .topbar,
    body.shop-page .container-fluid.page-header,
    body.shop-page .page-header,
    body.shop-page .services,
    body.shop-page div.services,
    body.shop-page .products-offer-section,
    body.shop-page div.products-offer-section,
    body.shop-page .shop-sidebar-mobile-hide,
    body.shop-page .shop-banner-mobile-hide,
    body.shop-page .desktop-only-topbar,
    body.shop-page .desktop-only-navbar,
    body.shop-page .desktop-only-header,
    body.shop-page .desktop-only-services,
    body.shop-page .desktop-only-offers,
    body.shop-page .footer,
    body.shop-page .copyright {
        display: none !important;
    }

    /* Hide elements on mobile for home page */
    body.home-page .desktop-only-topbar,
    body.home-page .desktop-only-navbar,
    body.home-page .desktop-only-carousel,
    body.home-page .desktop-only-services,
    body.home-page .desktop-only-footer,
    body.home-page .footer,
    body.home-page .copyright {
        display: none !important;
    }

    /* ================================
       Mobile Discount Slider Overrides
       ================================ */
    body.home-page .desktop-only-offers {
        display: block !important;
    }

    /* Mobile header: hide arrows, keep title centred */
    body.home-page .desktop-only-offers .offer-slider-header {
        justify-content: center;
        padding: 4px 0 18px;
    }
    body.home-page .desktop-only-offers .offer-slider-btn {
        display: none !important;
    }

    /* Full-viewport card width on mobile */
    body.home-page .desktop-only-offers .col-lg-6 {
        flex: 0 0 calc(100vw - 48px) !important;
        max-width: calc(100vw - 48px) !important;
    }
    /* Remove container padding so cards go edge-to-edge */
    body.home-page .desktop-only-offers .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }
    body.home-page .desktop-only-offers .row.g-4 {
        padding: 4px 16px 12px !important;
        gap: 12px !important;
    }
    /* Smaller text on mobile */
    body.home-page .desktop-only-offers .display-3 {
        font-size: 2.4rem !important;
        line-height: 1.1 !important;
    }
    body.home-page .desktop-only-offers h3.text-primary {
        font-size: 1rem !important;
    }
    body.home-page .desktop-only-offers p.text-muted {
        font-size: 0.75rem !important;
    }
    /* Smaller image on mobile */
    body.home-page .desktop-only-offers img.img-fluid {
        width: 100px !important;
        height: 90px !important;
    }

    /* ================================
       Home Page Products Grid Mobile
       ================================ */
    /* Products section mobile layout */
    body.home-page .container-fluid.py-5:not(.bg-light) .row.g-4 {
        margin: 0 -5px;
    }

    body.home-page .container-fluid.py-5:not(.bg-light) .row.g-4>[class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 5px !important;
        display: flex !important;
    }

    /* Product cards uniform height */
    body.home-page .product-item {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
    }

    body.home-page .product-item>div:first-child {
        height: 120px !important;
    }

    body.home-page .product-item>div:first-child img {
        height: 100% !important;
        object-fit: cover;
    }

    body.home-page .product-item .p-4 {
        padding: 10px !important;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    body.home-page .product-item h5 {
        font-size: 12px !important;
        min-height: 32px !important;
        margin-bottom: 5px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Hide badges and meta on mobile */
    body.home-page .product-item .position-absolute.top-0,
    body.home-page .product-item .product-overlay,
    body.home-page .product-item .d-flex.justify-content-between.align-items-center.mb-3 {
        display: none !important;
    }

    /* Price and button alignment */
    body.home-page .product-item .d-flex.justify-content-between.align-items-center:last-child {
        margin-top: auto !important;
        flex-direction: column;
        gap: 8px;
    }

    body.home-page .product-item h4 {
        font-size: 14px !important;
        margin-bottom: 0 !important;
    }

    body.home-page .product-item button.btn {
        width: 100%;
        padding: 8px !important;
        font-size: 11px !important;
        border-radius: 5px !important;
    }

    /* Section headers smaller on mobile */
    body.home-page .display-5 {
        font-size: 1.5rem !important;
    }

    body.home-page .text-center.mb-5 p {
        font-size: 13px;
    }

    /* Hide View All buttons on mobile - REMOVED to show buttons as requested */
    /* body.home-page .text-center.mt-5 {
        display: none !important;
    } */

    /* ================================
       Home Page Categories Grid Mobile
       ================================ */
    body.home-page .category-card-home {
        height: 100%;
    }

    body.home-page .category-image-home {
        height: 100px !important;
    }

    body.home-page .category-info-home {
        padding: 10px !important;
    }

    body.home-page .category-name-home {
        font-size: 12px !important;
        margin-bottom: 3px !important;
    }

    body.home-page .category-action-home {
        font-size: 10px !important;
    }

    body.home-page .category-count-badge {
        font-size: 9px !important;
        padding: 4px 8px !important;
        top: 8px !important;
        right: 8px !important;
    }

    body.home-page .category-overlay-home {
        display: none !important;
    }

    /* Hide desktop search bar row */
    body.shop-page .row.g-4.d-none.d-md-flex {
        display: none !important;
    }

    /* Hide desktop sort and view toggle */
    body.shop-page .sort-mobile-hide,
    body.shop-page .view-toggle-mobile-hide {
        display: none !important;
    }

    /* Container adjustments */
    body.shop-page .shop.py-5 {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    body.shop-page .shop .container.py-5 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Full width product grid */
    body.shop-page .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 10px;
    }

    /* Hide sidebar column */
    body.shop-page .row.g-4>.col-lg-3.shop-sidebar-mobile-hide {
        display: none !important;
    }

    /* Mobile product grid - 2 columns */
    body.shop-page .product .col-lg-4.col-6,
    body.shop-page .product .col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 5px !important;
        display: flex !important;
    }

    body.shop-page .product .product-item {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    body.shop-page .product .product-item-inner {
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Fixed height for product image */
    body.shop-page .product .product-item-inner .product-item-inner-item {
        height: 140px;
        overflow: hidden;
    }

    body.shop-page .product .product-item-inner .product-item-inner-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Product details section with flexbox */
    body.shop-page .product .product-item-inner .text-center {
        padding: 10px 8px !important;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    /* Category name - single line */
    body.shop-page .product .product-item-inner .text-center a.d-block.mb-2 {
        font-size: 10px;
        margin-bottom: 3px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Product name - fixed 2 lines */
    body.shop-page .product .product-item-inner .text-center a.h4 {
        font-size: 12px !important;
        line-height: 1.3;
        margin-bottom: 5px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 32px;
        /* 2 lines * line-height */
    }

    /* Stock info */
    body.shop-page .product .stock-info {
        font-size: 11px;
        margin-bottom: 3px !important;
    }

    /* Price */
    body.shop-page .product .product-item-inner .text-center .text-primary.fs-5 {
        font-size: 15px !important;
        font-weight: 600;
    }

    /* Add to cart button - pushed to bottom */
    body.shop-page .product .mobile-add-cart {
        margin-top: auto !important;
        padding: 8px !important;
        font-size: 12px !important;
    }

    /* Hide hover effects on mobile */
    body.shop-page .product .product-item:hover .product-item-add {
        opacity: 0 !important;
        margin-bottom: 0 !important;
    }

    body.shop-page .product .product-item .product-details {
        display: none !important;
    }

    /* Hide desktop add to cart section */
    body.shop-page .product .product-item-add.d-none.d-md-block {
        display: none !important;
    }

    /* Smaller New badge on mobile */
    body.shop-page .product .product-new {
        width: 40px !important;
        height: 40px !important;
        font-size: 10px;
        top: 10px !important;
        right: 10px !important;
    }

    /* Back to top button adjustment for mobile */
    body.shop-page .back-to-top {
        bottom: 80px !important;
        right: 15px !important;
    }

    /* Hide list view on mobile */
    body.shop-page #tab-list {
        display: none !important;
    }

    /* Pagination adjustments for mobile */
    body.shop-page .pagination {
        padding-bottom: 20px;
    }

    /* ================================
       Checkout Page Mobile Styles
       ================================ */
    /* Hide desktop elements on checkout page */
    body.checkout-page .desktop-only-topbar,
    body.checkout-page .desktop-only-navbar,
    body.checkout-page .desktop-only-page-header,
    body.checkout-page .desktop-only-services,
    body.checkout-page .desktop-only-footer,
    body.checkout-page .footer,
    body.checkout-page .copyright {
        display: none !important;
    }

    /* Show mobile elements */
    body.checkout-page .mobile-checkout-header {
        display: flex !important;
    }

    body.checkout-page .mobile-order-summary {
        display: block !important;
    }

    body.checkout-page .mobile-checkout-footer {
        display: block !important;
    }

    /* Body padding for fixed footer */
    body.checkout-page {
        padding-bottom: 120px !important;
        background: #f5f5f5 !important;
    }

    /* Hide desktop title and button */
    body.checkout-page .desktop-only-title {
        display: none !important;
    }

    body.checkout-page .desktop-place-order-btn {
        display: none !important;
    }

    /* Show mobile title */
    body.checkout-page .mobile-checkout-title {
        display: block !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #333 !important;
        margin-bottom: 20px !important;
        padding-bottom: 10px;
        border-bottom: 2px solid #16a34a;
    }

    /* Form layout adjustments */
    body.checkout-page .container-fluid.py-5 {
        padding: 0 !important;
        background: #f5f5f5 !important;
    }

    body.checkout-page .container.py-5 {
        padding: 20px 15px !important;
        padding-bottom: 120px !important;
    }

    /* Form item card styling */
    body.checkout-page .form-item {
        margin-bottom: 15px !important;
        background: #fff;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    /* Form labels */
    body.checkout-page .form-label {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #555 !important;
        margin-bottom: 8px !important;
        margin-top: 0 !important;
    }

    /* Make form fields larger for touch */
    body.checkout-page .form-control,
    body.checkout-page .form-select {
        padding: 14px 16px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
        border: 1px solid #e0e0e0 !important;
        background: #fafafa !important;
    }

    body.checkout-page .form-control:focus,
    body.checkout-page .form-select:focus {
        border-color: #16a34a !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1) !important;
    }

    /* Helper text */
    body.checkout-page .text-muted,
    body.checkout-page small.text-muted {
        font-size: 11px !important;
        color: #888 !important;
    }

    body.checkout-page .text-info {
        font-size: 12px !important;
        background: #e8f5e9;
        padding: 10px 12px;
        border-radius: 8px;
        margin-top: 10px;
    }

    /* Single column layout on mobile */
    body.checkout-page .row.g-5>.col-md-12.col-lg-6.col-xl-7,
    body.checkout-page .row.g-5>.col-md-12.col-lg-6.col-xl-5 {
        padding: 0 !important;
    }

    /* Billing form row adjustments */
    body.checkout-page .col-md-12.col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Hide desktop cart table on mobile */
    body.checkout-page .table-responsive {
        display: none !important;
    }

    /* Delivery schedule section */
    body.checkout-page .delivery-schedule-section {
        margin-top: 15px !important;
        padding: 15px !important;
        background: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        border: none !important;
    }

    body.checkout-page .delivery-schedule-section h5 {
        font-size: 15px !important;
    }

    body.checkout-page .delivery-schedule-section .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    body.checkout-page .delivery-schedule-section .form-item {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* Bank transfer section */
    body.checkout-page #bank_transfer_section .alert {
        padding: 15px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }

    body.checkout-page #bank_transfer_section .alert h5 {
        font-size: 15px !important;
    }

    /* Free shipping progress */
    body.checkout-page .free-shipping-card {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    body.checkout-page .truck-icon {
        font-size: 22px !important;
    }

    body.checkout-page .progress-title {
        font-size: 14px !important;
    }

    /* Select2 mobile adjustments */
    body.checkout-page .select2-container {
        width: 100% !important;
    }

    body.checkout-page .select2-container .select2-selection--single {
        height: 50px !important;
        padding: 12px 16px !important;
        border-radius: 10px !important;
        border: 1px solid #e0e0e0 !important;
        background: #fafafa !important;
    }

    body.checkout-page .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 24px !important;
        color: #333 !important;
        padding-left: 0 !important;
    }

    body.checkout-page .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 48px !important;
        right: 10px !important;
    }

    /* ================================
       Categories Page Mobile Styles
       ================================ */
    /* Hide desktop elements on categories page */
    body.categories-page .desktop-only-topbar,
    body.categories-page .desktop-only-navbar,
    body.categories-page .desktop-only-footer,
    body.categories-page .footer,
    body.categories-page .copyright {
        display: none !important;
    }

    /* Show mobile elements */
    body.categories-page .mobile-bottom-nav {
        display: block !important;
    }

    body.categories-page .mobile-shop-header {
        display: flex !important;
    }

    body.categories-page .mobile-search-bar {
        display: block !important;
    }

    body.categories-page .mobile-floating-cart {
        display: flex !important;
    }

    /* Body padding for bottom nav */
    body.categories-page {
        padding-bottom: 60px !important;
        min-height: 100vh;
    }

    /* Categories grid - 2 columns on mobile */
    body.categories-page .container-fluid.py-5 {
        padding: 20px 10px !important;
    }

    body.categories-page .row.g-4 {
        margin: 0 -5px;
    }

    body.categories-page .row.g-4>[class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 5px !important;
    }

    /* Category cards mobile sizing */
    body.categories-page .category-card {
        border-radius: 10px;
    }

    body.categories-page .category-image {
        height: 120px !important;
    }

    body.categories-page .category-info {
        padding: 10px !important;
    }

    body.categories-page .category-name {
        font-size: 12px !important;
        margin-bottom: 5px !important;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 32px;
    }

    body.categories-page .category-count {
        font-size: 10px !important;
    }

    body.categories-page .category-count i {
        font-size: 10px !important;
    }

    body.categories-page .category-button {
        font-size: 11px !important;
        padding: 8px !important;
        margin: 0 10px 10px 10px !important;
    }

    /* Hide overlay on mobile */
    body.categories-page .category-overlay {
        display: none !important;
    }

    /* Page header mobile */
    body.categories-page .page-header {
        margin-top: 10px !important;
        margin-bottom: 20px !important;
    }

    body.categories-page .page-title {
        font-size: 1.5rem !important;
    }

    body.categories-page .page-subtitle {
        font-size: 13px !important;
    }

    /* Pagination mobile */
    body.categories-page .pagination {
        padding-bottom: 20px;
    }

    /* ================================
       Individual Category Page Mobile Styles
       ================================ */
    /* Hide desktop elements on category page */
    body.category-page .desktop-only-topbar,
    body.category-page .desktop-only-navbar,
    body.category-page .desktop-only-page-header,
    body.category-page .page-header,
    body.category-page .desktop-only-footer,
    body.category-page .footer,
    body.category-page .copyright {
        display: none !important;
    }

    /* Show mobile elements */
    body.category-page .mobile-bottom-nav {
        display: block !important;
    }

    body.category-page .mobile-shop-header {
        display: flex !important;
    }

    body.category-page .mobile-search-bar {
        display: block !important;
    }

    body.category-page .mobile-floating-cart {
        display: flex !important;
    }

    /* Body padding for bottom nav */
    body.category-page {
        padding-bottom: 60px !important;
        min-height: 100vh;
    }

    /* Container adjustments */
    body.category-page .container-fluid.py-5 {
        padding: 20px 10px !important;
    }

    body.category-page .container.py-5 {
        padding: 0 !important;
    }

    /* Products grid - 2 columns on mobile */
    body.category-page .row.g-4 {
        margin: 0 -5px;
    }

    body.category-page .row.g-4>[class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 5px !important;
    }

    /* Product cards mobile sizing */
    body.category-page .product-item {
        border-radius: 10px !important;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    body.category-page .product-item>div:first-child {
        height: 120px !important;
    }

    body.category-page .product-item img {
        height: 100% !important;
        object-fit: cover;
    }

    body.category-page .product-item .p-4 {
        padding: 10px !important;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    body.category-page .product-item h5 {
        font-size: 12px !important;
        min-height: 32px !important;
        margin-bottom: 5px !important;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Hide badges and overlays on mobile */
    body.category-page .product-item .position-absolute.top-0,
    body.category-page .product-item .product-overlay {
        display: none !important;
    }

    /* Hide product meta on mobile */
    body.category-page .product-item .d-flex.justify-content-between.align-items-center.mb-3 {
        display: none !important;
    }

    /* Price and button alignment */
    body.category-page .product-item .d-flex.justify-content-between.align-items-center:last-child {
        margin-top: auto !important;
        flex-direction: column;
        gap: 8px;
    }

    body.category-page .product-item h4 {
        font-size: 14px !important;
        margin-bottom: 0 !important;
    }

    body.category-page .product-item button.btn {
        width: 100%;
        padding: 8px !important;
        font-size: 11px !important;
        border-radius: 5px !important;
    }

    /* Page title mobile */
    body.category-page .display-5 {
        font-size: 1.5rem !important;
    }

    body.category-page .text-muted {
        font-size: 13px !important;
    }

    /* "Browse Other Categories" section mobile */
    body.category-page .d-flex.flex-wrap.gap-2 {
        gap: 8px !important;
    }

    body.category-page .d-flex.flex-wrap.gap-2 .btn {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }

    /* Pagination mobile */
    body.category-page .pagination {
        padding-bottom: 20px;
    }


    /* Mobile order summary styles */
    body.checkout-page .mobile-order-summary {
        background: #fff;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        margin-bottom: 15px;
    }

    body.checkout-page .mobile-order-item {
        display: flex;
        align-items: center;
        padding: 12px;
        background: #f9f9f9;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    body.checkout-page .mobile-order-item img {
        width: 55px;
        height: 55px;
        object-fit: cover;
        border-radius: 8px;
    }

    body.checkout-page .mobile-order-item-info {
        flex: 1;
        margin-left: 12px;
    }

    body.checkout-page .mobile-order-item-name {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        margin-bottom: 3px;
    }

    body.checkout-page .mobile-order-item-qty {
        font-size: 12px;
        color: #888;
    }

    body.checkout-page .mobile-order-item-price {
        font-weight: 700;
        color: #16a34a;
        font-size: 14px;
    }

    /* Mobile order summary totals */
    body.checkout-page .mobile-order-totals {
        background: #f0fdf4;
        padding: 15px;
        border-radius: 10px;
        margin-top: 15px;
        border: 1px solid #dcfce7;
    }

    body.checkout-page .mobile-order-totals-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #e0e0e0;
        font-size: 14px;
    }

    body.checkout-page .mobile-order-totals-row:last-child {
        border-bottom: none;
        padding-top: 12px;
        font-weight: 700;
        font-size: 16px;
        color: #16a34a;
    }

    /* Alert messages */
    body.checkout-page .alert {
        border-radius: 10px !important;
        font-size: 13px;
    }
}

/* ================================
   Featured Products Sidebar Styles
   ================================ */
.featured-product {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.featured-product h4 {
    color: #333 !important;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bs-primary);
}

.featured-product-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.featured-product-item:hover {
    background: rgba(22, 163, 74, 0.05);
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 8px;
}

.featured-product-item:last-child {
    border-bottom: none;
}

.featured-product-item>div:first-child {
    flex-shrink: 0;
    margin-right: 15px;
}

.featured-product-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.featured-product-item h6 {
    color: #333 !important;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.featured-product-item h5 {
    color: var(--bs-primary) !important;
    font-size: 16px;
}

/* ================================
   Single Product Page Mobile Styles
   ================================ */
@media (max-width: 767px) {

    /* Hide desktop elements on single product page */
    body.single-product-page .desktop-only-topbar,
    body.single-product-page .desktop-only-navbar,
    body.single-product-page .desktop-only-page-header,
    body.single-product-page .page-header,
    body.single-product-page .desktop-only-sidebar {
        display: none !important;
    }

    /* Show footer on mobile for single product page */
    body.single-product-page .desktop-only-footer {
        display: block !important;
    }

    /* Adjust product display to full width */
    body.single-product-page .col-xl-9,
    body.single-product-page .col-lg-7 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Reduce padding on single product container */
    body.single-product-page .container-fluid.shop {
        padding: 20px 0 !important;
    }

    body.single-product-page .container.py-5 {
        padding: 10px !important;
    }

    /* Product images carousel adjustments */
    body.single-product-page .product-image-carousel {
        margin-bottom: 15px;
    }

    /* Product info section adjustments */
    body.single-product-page .product-info {
        padding: 15px 10px;
    }

    /* Related products section */
    body.single-product-page .related-products-section {
        padding: 20px 10px;
    }

    body.single-product-page .related-products-section h2,
    body.single-product-page .related-products-section h3 {
        font-size: 1.3rem !important;
        margin-bottom: 15px;
    }

    /* Adjust related product cards to 2 columns */
    body.single-product-page .related-products-section .row>div[class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 5px !important;
    }
}