/* 
   Nasico Shop - Complete CSS Design System
   Primary Color: #DA2032
   Fonts: PeydaFaNum (Headings) & IRANSansXFaNum (Body)
*/

@font-face {
    font-family: 'PeydaFaNum';
    src: url('../fonts/PeydaWebFaNum-Regular.woff2') format('woff2'),
         url('../fonts/PeydaWebFaNum-Regular.woff') format('woff'),
         url('../fonts/PeydaFaNum-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PeydaFaNum';
    src: url('../fonts/PeydaWebFaNum-Bold.woff2') format('woff2'),
         url('../fonts/PeydaWebFaNum-Bold.woff') format('woff'),
         url('../fonts/PeydaFaNum-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/IRANSansXFaNum-Regular.woff2') format('woff2'),
         url('../fonts/IRANSansXFaNum-Regular.woff') format('woff'),
         url('../fonts/IRANSansXFaNum-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/IRANSansXFaNum-Bold.woff2') format('woff2'),
         url('../fonts/IRANSansXFaNum-Bold.woff') format('woff'),
         url('../fonts/IRANSansXFaNum-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary: #DA2032;
    --primary-hover: #b81525;
    --primary-light: #fef2f2;
    
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --font-heading: 'PeydaFaNum', system-ui, sans-serif;
    --font-body: 'IRANSansXFaNum', system-ui, sans-serif;
}

[data-theme="dark"] {
    --bg-body: #0b0f19;
    --bg-surface: #111827;
    --bg-card: #1f2937;
    --border-color: #374151;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
}

/* Global Font Override for All Inputs, Selects, Buttons */
input, select, textarea, button {
    font-family: var(--font-body) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 92% !important;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-padding {
    padding: 2rem 0;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title-row h3 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Header Design (2 Rows)
   ========================================================================== */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 9999 !important;
    box-shadow: var(--shadow-sm);
}

.header-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
    gap: 1.5rem;
}

.header-logo img {
    height: 46px;
    object-fit: contain;
}

.header-search {
    flex: 1;
    max-width: 580px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 0.7rem 2.8rem 0.7rem 1rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
}

.header-search input:focus {
    border-color: var(--primary);
}

.header-search .search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-results-dropdown {
    position: absolute;
    top: 110%;
    left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 380px;
    overflow-y: auto;
    display: none;
    z-index: 1050;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:hover {
    background: var(--primary-light);
}

.search-result-item img {
    width: 45px; height: 45px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cart-drawer-icon-btn {
    position: relative;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-weight: bold;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-drawer-icon-btn .cart-badge-count {
    background: #ffffff;
    color: var(--primary);
    width: 20px; height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.account-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.88rem;
}

.account-auth-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.header-row-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.megamenu-trigger-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: bold;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.megamenu-dropdown-box {
    position: absolute;
    top: 100%;
    right: 0;
    width: 850px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    padding: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    z-index: 999999 !important;
}

.megamenu-col h4 {
    font-size: 0.92rem;
    color: var(--primary);
    margin-bottom: 0.6rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.3rem;
}

.megamenu-col ul { list-style: none; }
.megamenu-col li { margin-bottom: 0.35rem; }
.megamenu-col li a { font-size: 0.85rem; color: var(--text-muted); }
.megamenu-col li a:hover { color: var(--primary); }

.nav-links-menu {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    list-style: none;
}

.nav-links-menu a {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-main);
}

.nav-links-menu a:hover { color: var(--primary); }

.header-row-2-right-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-special-offers {
    background: var(--primary-light);
    color: var(--primary) !important;
    font-weight: bold;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-contact-support {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.theme-toggle-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ==========================================================================
   Product Cards & Dynamic Responsive Grids
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

/* Strictly 2-Rows Responsive Product Grid */
.products-grid-2rows {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
}

@media (max-width: 1280px) {
    .products-grid-2rows {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid-2rows {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .products-grid-2rows {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Single Horizontal Row for Top Brands */
.brands-row-single {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
	padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.brand-card-flex {
    flex: 1 1 0;
    min-width: 130px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.brand-card-flex:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.brand-card-flex .brand-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(218, 32, 50, 0.25);
}

.product-card .card-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    z-index: 2;
}

.product-card .card-media {
    height: 160px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.product-card .card-media img {
    max-height: 140px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .card-media img {
    transform: scale(1.05);
}

/* Single-Line Title Truncation (...) */
.product-card .product-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    height: 1.5em;
    line-height: 1.5;
}

.product-card .price-row {
    margin-top: auto;
    display: flex;
    flex-direction: column;
}

.product-card .current-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.product-card .old-price {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: line-through;
}

.product-card .btn-floating-cart {
    position: absolute;
    bottom: 12px; left: 12px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(218, 32, 50, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.product-card .btn-floating-cart:hover {
    transform: scale(1.1);
    background: var(--primary-hover);
}

/* ==========================================================================
   Category Badges Row (Shop Page Top Slider)
   ========================================================================== */
.category-badges-row {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem 0;
}

.category-badge-item {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.category-badge-item:hover, .category-badge-item.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.category-badge-item i {
    font-size: 1.1rem;
    color: var(--primary);
}

.shop-sidebar-sticky {
    position: sticky;
    top: 90px;
    align-self: start;
    z-index: 10;
}
.shop-controls-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

/* Mobile Filter & Cart Controls (Hidden on Desktop by Default) */
.mobile-filter-trigger-btn,
.mobile-filter-close-btn,
.mobile-filter-overlay,
.mobile-cart-label,
.mobile-cart-delete-text,
.b2b-mobile-label {
    display: none !important;
}

.sort-tabs {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
}

.sort-tab-item {
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: bold;
    cursor: pointer;
}

.sort-tab-item.active {
    background: var(--primary);
    color: #ffffff;
}

/* ==========================================================================
   Single Product Layout
   ========================================================================== */
.single-product-grid {
    display: grid;
    grid-template-columns: 360px 1fr 300px;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-buy-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.floating-action-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: absolute;
    top: 15px; left: 15px;
    z-index: 10;
}

.floating-action-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.floating-action-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ==========================================================================
   Hero & Banners Layout
   ========================================================================== */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.hero-slider-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 380px;
    background: #000;
    box-shadow: var(--shadow-md);
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 2.5rem;
}

.hero-slide.active { opacity: 1; z-index: 1; }

.hero-slide-overlay {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    max-width: 460px;
    color: #ffffff;
}

.hero-slide-overlay h2 { font-size: 1.8rem; color: #fff; margin-bottom: 0.6rem; }
.hero-slide-overlay p { font-size: 0.95rem; opacity: 0.9; margin-bottom: 1.2rem; }

.slider-btn-prev, .slider-btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.slider-btn-prev { right: 15px; }
.slider-btn-next { left: 15px; }

.hero-left-banners {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 380px;
}

.left-banner-card {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
    transition: transform 0.3s ease;
}

.left-banner-card:hover { transform: translateY(-3px); }

.left-banner-content {
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    width: 100%;
    color: #ffffff;
}

.left-banner-content h4 { font-size: 1rem; color: #fff; margin-bottom: 0.3rem; }

.cta-banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.cta-banner-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 220px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.cta-banner-card:hover { transform: scale(1.01); }

.cta-banner-overlay {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.8rem;
    color: #ffffff;
    max-width: 320px;
}

.cta-banner-overlay h3 { font-size: 1.4rem; color: #fff; margin-bottom: 0.4rem; }

.special-offers-box {
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    color: #ffffff;
    margin: 2rem 0;
    overflow: hidden;
}

.special-offers-grid-wrapper {
    display: flex !important;
    align-items: stretch !important;
    gap: 1.2rem !important;
}

.special-deal-banner-card {
    flex: 0 0 210px !important;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.amazing-carousel-container {
    flex: 1 1 0% !important;
    min-width: 0 !important; /* Critical for inner flex overflow */
    position: relative;
}

.amazing-carousel-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0.6rem !important;
    padding-top: 0.2rem !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.4) transparent;
}

.amazing-carousel-track::-webkit-scrollbar {
    height: 6px;
}
.amazing-carousel-track::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 4px;
}

.amazing-carousel-track .product-card {
    flex: 0 0 210px !important;
    width: 210px !important;
    max-width: 210px !important;
    min-width: 210px !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
}

.category-badges-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1rem;
}

.category-badge-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.category-badge-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.category-badge-card i {
    font-size: 1.6rem;
    color: var(--primary);
}

.category-badge-card span {
    font-size: 0.82rem;
    font-weight: bold;
    color: var(--text-main);
}

.features-5-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.feature-badge-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.feature-badge-box i {
    font-size: 1.8rem;
    color: var(--primary);
}

.feature-badge-box strong { font-size: 0.88rem; display: block; }
.feature-badge-box span { font-size: 0.75rem; color: var(--text-muted); }

.blog-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.blog-card img {
    height: 180px; width: 100%; object-fit: cover;
}

.blog-card-content { padding: 1.2rem; }
.blog-card-content .post-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.blog-card-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.blog-card-content p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }

.drawer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: none;
}

.drawer-cart {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 2001;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.drawer-cart.open { right: 0 !important; }

.drawer-header {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-body {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
}

/* Premium Drawer Cart Item Styling */
.drawer-cart-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.8rem;
    position: relative;
    transition: background 0.2s ease;
}

.drawer-cart-item:hover {
    background: var(--bg-body);
}

.drawer-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 3px;
}

.drawer-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    overflow: hidden;
}

.drawer-cart-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.drawer-cart-item-title:hover {
    color: var(--primary);
}

.drawer-cart-item-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.drawer-cart-item-qty {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.15rem 0.5rem;
    font-weight: bold;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.drawer-cart-item-price {
    color: var(--primary);
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 0.88rem;
}

.drawer-cart-remove-btn {
    background: #fef2f2;
    color: var(--primary);
    border: 1px solid #fecaca;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.account-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.account-nav-link.active, .account-nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.drawer-footer {
    padding: 1.2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-body);
}

.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    padding: 3rem 0 1.5rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 { font-size: 0.98rem; margin-bottom: 1rem; color: var(--text-main); font-weight: bold; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col li a { color: var(--text-muted); font-size: 0.88rem; }
.footer-col li a:hover { color: var(--primary); }

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary { background: var(--primary); color: #ffffff; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-secondary { background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-main); }

/* ==========================================================================
   Master Responsive, Horizontal Touch Carousel & PWA Mobile App CSS System
   ========================================================================== */

/* ==========================================================================
   AJAX CART DRAWER SYSTEM (ALWAYS ON TOP OF EVERYTHING WITH HIGHEST Z-INDEX)
   ========================================================================== */
.drawer-overlay {
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 9999998 !important;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease !important;
}

.drawer-overlay.open {
    display: block !important;
    opacity: 1 !important;
}

.drawer-cart {
    position: fixed !important;
    top: 0 !important;
    right: -420px !important;
    bottom: 0 !important;
    width: 380px !important;
    max-width: 90vw !important;
    height: 100vh !important;
    background: var(--bg-surface) !important;
    box-shadow: -5px 0 35px rgba(0, 0, 0, 0.3) !important;
    z-index: 9999999 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.drawer-cart.open {
    right: 0 !important;
}

.drawer-header {
    padding: 1.2rem 1.4rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: var(--bg-card) !important;
}

.drawer-header h3 {
    font-size: 1.05rem !important;
    font-weight: bold !important;
    color: var(--text-main) !important;
    margin: 0 !important;
}

#closeCartDrawer {
    background: #fef2f2 !important;
    color: var(--primary) !important;
    border: 1px solid #fecaca !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease !important;
}

#closeCartDrawer:hover {
    transform: scale(1.1) !important;
}

.drawer-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1.2rem !important;
}

.drawer-footer {
    padding: 1.2rem 1.4rem !important;
    border-top: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
}

/* Mobile PWA App Bottom Navigation Bar & Mobile Sticky Buy Bar Base Styles */
.mobile-app-bottom-navbar,
.mobile-sticky-buy-bar {
    display: none;
}

@media screen and (max-width: 768px) {
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        font-size: 14px !important;
    }

    body {
        padding-bottom: 70px !important; /* Space for sticky PWA bottom navbar */
    }

    /* Container fit to screen */
    .container {
        max-width: 100% !important;
        padding: 0 0.85rem !important;
        margin-top: 20px !important;
    }

    .site-header .container {
        margin-top: 0 !important;
    }

    /* Header Row 1 Mobile Layout */
    .header-row-1 {
        flex-wrap: wrap !important;
        gap: 0.6rem !important;
        padding: 0.5rem 0 !important;
    }

    .header-logo { order: 1; }
    .header-logo img { height: 34px !important; }

    .header-actions {
        order: 2;
        gap: 0.4rem !important;
    }

    .cart-drawer-icon-btn, .account-auth-btn {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.78rem !important;
    }

    .header-search {
        order: 3;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-top: 0.1rem;
    }

    .header-search input {
        padding: 0.55rem 2.2rem 0.55rem 0.75rem !important;
        font-size: 0.82rem !important;
    }

    /* Header Row 2 Mobile Touch Scroll Navigation */
    .header-row-2 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 0.5rem 0 !important;
    }

    .header-row-2 > div:first-child {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.2rem;
        gap: 0.7rem !important;
    }

    .header-row-2-right-group {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }

    .btn-special-offers, .btn-contact-support {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    /* Hero Grid Stacking */
    .hero-grid, 
    [style*="grid-template-columns: 2fr 1fr 1fr"], 
    [style*="grid-template-columns: 2.5fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* Hero Slider Mobile Responsive Fix */
    .hero-slider-box, .hero-slider-wrapper {
        height: 250px !important;
        border-radius: var(--radius-md) !important;
    }

    .hero-slide {
        padding: 0.8rem !important;
    }

    .hero-slide-overlay {
        padding: 0.85rem 1rem !important;
        max-width: 100% !important;
        background: rgba(15, 23, 42, 0.78) !important;
        backdrop-filter: blur(6px) !important;
        border-radius: var(--radius-md) !important;
    }

    .hero-slide-overlay span {
        font-size: 0.68rem !important;
        padding: 0.15rem 0.5rem !important;
        display: inline-block !important;
        margin-bottom: 0.4rem !important;
    }

    .hero-slide-overlay h2 {
        font-size: 1.1rem !important;
        margin-bottom: 0.3rem !important;
        line-height: 1.35 !important;
        color: #ffffff !important;
    }

    .hero-slide-overlay p {
        font-size: 0.78rem !important;
        margin-bottom: 0.6rem !important;
        line-height: 1.4 !important;
        opacity: 0.95 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .hero-slide-overlay .btn {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.85rem !important;
        border-radius: var(--radius-sm) !important;
    }

    .slider-btn-prev, .slider-btn-next {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
        background: rgba(255, 255, 255, 0.9) !important;
    }

    .slider-btn-prev { right: 8px !important; }
    .slider-btn-next { left: 8px !important; }

    /* Hide CTA Banner Card in Amazing Offers on Mobile */
    .special-deal-banner-card {
        display: none !important;
    }

    .special-offers-grid-wrapper {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    /* ==========================================================================
       CONVERT ALL GRID SECTIONS TO HORIZONTAL SWIPE CAROUSELS ON MOBILE
       ========================================================================== */
    .category-badges-grid,
    .products-grid-2rows,
    .features-5-row,
    .blog-cards-grid,
    [style*="grid-template-columns: repeat(5, 1fr)"],
    [style*="grid-template-columns: repeat(6, 1fr)"],
    [style*="grid-template-columns: repeat(8, 1fr)"],
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0.75rem !important;
        padding: 0.4rem 0.85rem 0.8rem 0.85rem !important;
        margin-left: -0.85rem !important;
        margin-right: -0.85rem !important;
    }

    /* Hide scrollbar for clean app experience */
    .category-badges-grid::-webkit-scrollbar,
    .products-grid-2rows::-webkit-scrollbar,
    .features-5-row::-webkit-scrollbar,
    .blog-cards-grid::-webkit-scrollbar,
    [style*="grid-template-columns: repeat(5, 1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns: repeat(6, 1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns: repeat(8, 1fr)"]::-webkit-scrollbar,
    [style*="grid-template-columns: repeat(4, 1fr)"]::-webkit-scrollbar {
        display: none !important;
    }

    /* Fixed Proportional Width for Product Carousel Cards */
    .products-grid-2rows > *,
    [style*="grid-template-columns: repeat(5, 1fr)"] > *,
    [style*="grid-template-columns: repeat(6, 1fr)"] > *,
    [style*="grid-template-columns: repeat(8, 1fr)"] > *,
    [style*="grid-template-columns: repeat(4, 1fr)"] > * {
        flex: 0 0 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
        scroll-snap-align: start !important;
    }

    /* Blog Cards Carousel Width (Standard Size: 270px) */
    .blog-cards-grid > * {
        flex: 0 0 270px !important;
        min-width: 270px !important;
        max-width: 270px !important;
        scroll-snap-align: start !important;
    }

    .blog-card {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .blog-card img {
        height: 145px !important;
        object-fit: cover !important;
    }

    /* Features 5 Row Carousel Card Width (Standard Size: 210px) */
    .features-5-row > * {
        flex: 0 0 210px !important;
        min-width: 210px !important;
        max-width: 210px !important;
        scroll-snap-align: start !important;
        padding: 0.8rem 0.6rem !important;
    }

    .feature-badge-box {
        display: flex !important;
        align-items: center !important;
        gap: 0.6rem !important;
    }

    /* Category Badges Carousel Card Width */
    .category-badges-grid > * {
        flex: 0 0 105px !important;
        min-width: 105px !important;
        max-width: 105px !important;
        scroll-snap-align: start !important;
        padding: 0.6rem 0.3rem !important;
    }

    .category-badge-item i { font-size: 1.2rem !important; }
    .category-badge-item span { font-size: 0.72rem !important; }

    /* Product Card Optimization in Carousel */
    .product-card {
        height: auto !important;
        min-height: 280px !important;
        padding: 0.7rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .product-card .card-media img {
        height: 125px !important;
        object-fit: contain !important;
    }

    .product-title {
        font-size: 0.8rem !important;
        line-height: 1.35 !important;
        height: 2.4rem !important;
        overflow: hidden !important;
        margin: 0.3rem 0 !important;
    }

    .current-price { font-size: 0.88rem !important; }
    .old-price { font-size: 0.72rem !important; }

    /* Stacked Banners & CTA Cards */
    .cta-banners-grid, [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* Mobile Floating Filter Button & Slide-over Sidebar Drawer */
    .mobile-filter-trigger-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        background: var(--bg-card) !important;
        border: 1.5px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        font-family: var(--font-heading) !important;
        font-size: 0.88rem !important;
        font-weight: bold !important;
        color: var(--text-main) !important;
        cursor: pointer !important;
        margin-bottom: 1rem !important;
        box-shadow: var(--shadow-sm) !important;
    }

    /* Transform shop-sidebar-sticky into a sliding Drawer / Overlay on Mobile */
    .shop-sidebar-sticky {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        bottom: 0 !important;
        width: 310px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        z-index: 100000 !important;
        background: var(--bg-surface) !important;
        box-shadow: -5px 0 25px rgba(0,0,0,0.2) !important;
        overflow-y: auto !important;
        transition: right 0.3s ease-in-out !important;
        padding: 1.5rem 1.2rem 5rem 1.2rem !important;
        border-radius: 0 !important;
    }

    .shop-sidebar-sticky.active {
        right: 0 !important;
    }

    /* Mobile Filter Drawer Overlay */
    .mobile-filter-overlay {
        position: fixed !important;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99999 !important;
        display: none;
        backdrop-filter: blur(4px);
    }

    .mobile-filter-overlay.active {
        display: block !important;
    }

    /* Close Button in Mobile Sidebar Drawer */
    .mobile-filter-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: #fef2f2;
        color: var(--primary);
        border: 1px solid #fecaca;
        width: 32px; height: 32px;
        border-radius: 50%;
        font-size: 1.1rem;
        cursor: pointer;
    }

    /* PRODUCTS GRID IN SHOP & ARCHIVE PAGES: 2 EQUAL COLUMNS ON MOBILE */
    .products-grid,
    .shop-products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        overflow-x: visible !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .products-grid > *,
    .shop-products-grid > * {
        flex: unset !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    /* Shop Layout Grid Single Column on Mobile */
    .shop-layout-grid,
    [style*="grid-template-columns: 290px 1fr"] {
        display: block !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    /* Shop Controls Bar & Sort Tabs Responsive Fix */
    .shop-controls-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.6rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        padding: 0.75rem 0.85rem !important;
    }

    .sort-tabs {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-bottom: 0.3rem !important;
        gap: 0.4rem !important;
    }

    .sort-tab-item {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        font-size: 0.78rem !important;
        padding: 0.3rem 0.65rem !important;
    }

    /* Top Category Badges Row Horizontal Touch Scroll */
    .category-badges-row {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-bottom: 0.4rem !important;
    }

    /* Header Nav Links Horizontal Scroll */
    .nav-links-menu {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0.6rem !important;
        white-space: nowrap !important;
    }

    .nav-links-menu a {
        white-space: nowrap !important;
        font-size: 0.78rem !important;
    }

    /* Brands & Categories Page 2-Column Responsive Grid on Mobile */
    .brands-grid-container,
    .categories-grid-container,
    [style*="grid-template-columns:repeat(auto-fill, minmax(260px, 1fr))"],
    [style*="grid-template-columns:repeat(auto-fill, minmax(220px, 1fr))"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .brands-grid-container > *,
    .categories-grid-container > * {
        padding: 1rem 0.6rem !important;
    }

    /* Mobile Header MegaMenu Dropdown Drawer */
    .megamenu-dropdown-box {
        position: fixed !important;
        top: 60px !important;
        right: 3vw !important;
        left: 3vw !important;
        width: 94vw !important;
        max-height: 75vh !important;
        overflow-y: auto !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        z-index: 999999 !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.35) !important;
        border-radius: var(--radius-lg) !important;
        padding: 1.2rem !important;
    }

    /* Blog Page & Blog Post Responsive Mobile Layout */
    .blog-layout-grid,
    [style*="grid-template-columns: 1fr 300px"],
    [style*="grid-template-columns: 1fr 320px"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1.5rem !important;
    }

    .blog-posts-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
    }

    .blog-posts-grid > * {
        width: 100% !important;
    }

    /* Shop, Category, Product Detail & Checkout 2-Column Grids */
    [style*="grid-template-columns: 260px 1fr"], 
    [style*="grid-template-columns: 280px 1fr"],
    [style*="grid-template-columns: 290px 1fr"],
    [style*="grid-template-columns: 1fr 360px"],
    [style*="grid-template-columns: 1fr 320px"],
    .single-product-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .product-gallery-box img {
        max-height: 250px !important;
    }

    /* Footer Grid */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.4rem !important;
        text-align: center !important;
    }

    /* Mobile PWA App Bottom Navigation Bar Display */
    .mobile-app-bottom-navbar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99999 !important;
        background: var(--bg-surface) !important;
        border-top: 1px solid var(--border-color) !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 0.4rem 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1) !important;
    }

    .app-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        color: var(--text-muted) !important;
        font-size: 0.72rem !important;
        text-decoration: none !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 0.2rem 0.4rem !important;
        transition: all 0.2s ease !important;
    }

    .app-nav-item i {
        font-size: 1.25rem !important;
        margin-bottom: 0.15rem !important;
    }

    .app-nav-item.active, .app-nav-item:hover {
        color: var(--primary) !important;
    }

    .app-cart-badge {
        position: absolute !important;
        top: -6px !important;
        right: -8px !important;
        background: var(--primary) !important;
        color: #ffffff !important;
        font-size: 0.65rem !important;
        font-weight: bold !important;
        width: 17px !important;
        height: 17px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Single Product Sticky Quick Buy Bar (Above Mobile App Bottom Navbar) */
    .mobile-sticky-buy-bar {
        position: fixed !important;
        bottom: 54px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99990 !important;
        background: #ffffff !important;
        border-top: 1px solid var(--border-color) !important;
        padding: 0.6rem 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.12) !important;
        backdrop-filter: blur(10px) !important;
    }

    /* Mobile Amazing Deals Carousel Fix */
    .special-offers-grid-wrapper {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .special-deal-banner-card {
        flex: 0 0 auto !important;
        width: 100% !important;
        padding: 1rem !important;
    }

    .amazing-carousel-track .product-card {
        flex: 0 0 175px !important;
        width: 175px !important;
        max-width: 175px !important;
        min-width: 175px !important;
        padding: 0.75rem !important;
    }

    [data-theme="dark"] .mobile-sticky-buy-bar {
        background: #1e293b !important;
        border-top-color: #334155 !important;
    }

    .mobile-sticky-price-col {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .mobile-sticky-price-label {
        font-size: 0.72rem !important;
        color: var(--text-muted) !important;
        margin-bottom: 0.1rem !important;
    }

    .mobile-sticky-price-val {
        display: flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }

    .mobile-sticky-old-price {
        font-size: 0.75rem !important;
        color: #94a3b8 !important;
        text-decoration: line-through !important;
    }

    .mobile-sticky-current-price {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: var(--primary) !important;
        font-family: var(--font-heading) !important;
    }

    .mobile-sticky-add-cart-btn {
        background: linear-gradient(135deg, var(--primary) 0%, #b81525 100%) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: var(--radius-md) !important;
        padding: 0.65rem 1.25rem !important;
        font-family: var(--font-heading) !important;
        font-size: 0.88rem !important;
        font-weight: bold !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.55rem !important;
        box-shadow: 0 4px 14px rgba(218, 32, 50, 0.35) !important;
        cursor: pointer !important;
        transition: transform 0.2s ease !important;
    }

    .mobile-sticky-add-cart-btn:active {
        transform: scale(0.96) !important;
    }

    /* Cart Page Mobile Responsive System */
    .cart-layout-grid,
    [style*="grid-template-columns: 1fr 340px"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1.2rem !important;
    }

    .cart-table-card {
        padding: 0.85rem !important;
    }

    .cart-table, 
    .cart-table tbody, 
    .cart-table tr, 
    .cart-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .cart-table thead {
        display: none !important;
    }

    .cart-table tr {
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        padding: 0.85rem !important;
        margin-bottom: 0.85rem !important;
    }

    .cart-table td {
        padding: 0.4rem 0 !important;
        border-bottom: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .cart-table td.td-product {
        border-bottom: 1px dashed var(--border-color) !important;
        padding-bottom: 0.6rem !important;
        margin-bottom: 0.4rem !important;
        justify-content: flex-start !important;
    }

    .cart-table td.td-action {
        border-top: 1px dashed var(--border-color) !important;
        padding-top: 0.6rem !important;
        margin-top: 0.4rem !important;
        justify-content: flex-end !important;
    }

    .mobile-cart-label {
        display: inline-block !important;
        font-size: 0.8rem !important;
        color: var(--text-muted) !important;
    }

    .mobile-cart-delete-text {
        display: inline !important;
        font-size: 0.78rem !important;
        font-weight: bold !important;
        margin-right: 0.3rem !important;
    }

    /* Cart & Single Product Recommendation Boxes & Grids Fit 100% on Mobile */
    .cart-recs-box,
    .related-products-box {
        padding: 0.85rem 0.5rem !important;
        margin-top: 1.2rem !important;
        margin-bottom: 1.2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .cart-recs-box h3,
    .related-products-box h3 {
        font-size: 0.95rem !important;
    }

    .cart-recs-grid,
    .related-products-grid,
    [style*="grid-template-columns:repeat(auto-fill, minmax(220px, 1fr))"],
    [style*="grid-template-columns:repeat(auto-fill, minmax(280px, 1fr))"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .cart-recs-grid > .product-card,
    .related-products-grid > .product-card {
        height: auto !important;
        min-height: 275px !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Checkout Page Grid Responsiveness */
    [style*="grid-template-columns: 1fr 360px"],
    [style*="grid-template-columns:1fr 360px"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.2rem !important;
    }

    /* ==========================================================================
       Comprehensive User Account & Admin Panels Mobile Responsive System
       ========================================================================== */
    .account-header-card,
    .admin-header-card {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        padding: 1.2rem 1rem !important;
        gap: 1rem !important;
    }

    .account-header-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.6rem !important;
    }

    .account-header-actions > * {
        width: 100% !important;
    }

    /* KPI Summary Cards 2-Column Responsive Mobile Grid */
    .account-kpi-grid,
    .admin-stats-grid,
    [style*="grid-template-columns:repeat(5, 1fr)"],
    [style*="grid-template-columns: repeat(5, 1fr)"],
    [style*="grid-template-columns: repeat(4, 1fr)"],
    [style*="grid-template-columns:repeat(4, 1fr)"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
        margin-bottom: 1.5rem !important;
    }

    .account-kpi-grid > *,
    .admin-stats-grid > * {
        padding: 0.85rem 0.5rem !important;
    }

    /* Account & Admin Layout Grids Stack Vertically */
    .account-layout-grid,
    .admin-layout,
    [style*="grid-template-columns:260px 1fr"],
    [style*="grid-template-columns:280px 1fr"],
    [style*="grid-template-columns: 260px 1fr"],
    [style*="grid-template-columns: 280px 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1.2rem !important;
    }

    /* Touch-Friendly Horizontal Swipe Menu Tabs on Mobile Sidebar */
    .account-sidebar-box,
    .admin-sidebar-menu {
        width: 100% !important;
        padding: 0.6rem !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-lg) !important;
    }

    .account-sidebar-menu-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.45rem !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 0.2rem !important;
    }

    .account-sidebar-menu-list > li {
        flex: 0 0 auto !important;
    }

    .account-nav-link,
    .admin-menu-link {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
        padding: 0.55rem 0.85rem !important;
        border-radius: var(--radius-md) !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        background: var(--bg-body) !important;
    }

    .account-nav-link.active,
    .admin-menu-link.active {
        background: var(--primary) !important;
        color: #ffffff !important;
    }

    /* Table Wrappers inside Panels for Horizontal Scroll */
    .account-layout-grid table,
    .admin-layout table,
    .account-content-panel table,
    .admin-content-panel table,
    [style*="overflow-x:auto"] {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* B2B Wholesale Ordering Form Mobile Optimization System */
    .b2b-filter-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 0.85rem !important;
    }

    .b2b-filter-field {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        gap: 0.3rem !important;
    }

    .b2b-filter-btn {
        width: 100% !important;
        padding: 0.65rem !important;
        margin-top: 0.3rem !important;
    }

    /* B2B Wholesale Table transforms into clean Mobile Cards without Horizontal Scroll */
    .b2b-bulk-table,
    .b2b-bulk-table tbody,
    .b2b-bulk-table tr,
    .b2b-bulk-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
    }

    .b2b-bulk-table thead {
        display: none !important;
    }

    .b2b-bulk-row {
        background: #faf5ff !important;
        border: 1px solid #e9d5ff !important;
        border-radius: var(--radius-md) !important;
        padding: 0.85rem !important;
        margin-bottom: 0.85rem !important;
    }

    .b2b-bulk-table td {
        padding: 0.35rem 0 !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .b2b-bulk-table td.b2b-col-img {
        display: inline-block !important;
        float: right !important;
        margin-left: 0.6rem !important;
        padding: 0 !important;
    }

    .b2b-bulk-table td.b2b-col-title {
        display: block !important;
        font-size: 0.92rem !important;
        color: #581c87 !important;
        border-bottom: 1px dashed #e9d5ff !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .b2b-bulk-table td.b2b-col-qty {
        border-top: 1px dashed #e9d5ff !important;
        padding-top: 0.6rem !important;
        margin-top: 0.4rem !important;
        background: #ffffff !important;
        padding: 0.6rem !important;
        border-radius: var(--radius-sm) !important;
    }

    .b2b-mobile-label {
        display: inline-block !important;
        font-size: 0.78rem !important;
        color: #7e22ce !important;
        font-weight: normal !important;
    }

    .b2b-submit-btn-wrapper {
        position: sticky !important;
        bottom: 60px !important;
        z-index: 999 !important;
        background: var(--bg-card) !important;
        padding: 0.75rem 0 !important;
        border-top: 2px solid #c084fc !important;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.1) !important;
    }
}
