/* ========================================
   PRODUCTS PAGE STYLES
   Navigation, categories, filters,
   product grid/cards, catalog modal
   ======================================== */

/* === PRODUCTS PAGE HEADER === */
.products-page-header {
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-50) 50%, var(--primary-100) 100%);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    text-align: center;
}
.products-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1E3A5F;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}
.products-page-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-500);
}
@media (max-width: 767px) {
    .products-page-header { padding: 1.25rem 0; }
    .products-page-title { font-size: 1.375rem; }
    .products-page-subtitle { font-size: 0.8125rem; }
}

/* === NAVIGATION === */
.nav { background: var(--white); border-bottom: 1px solid var(--border-subtle); padding: var(--space-3) 0; }
.nav-content { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.nav-links { display: flex; list-style: none; gap: var(--space-1); flex-wrap: wrap; }
.nav-link {
    padding: var(--space-2) var(--space-3); color: var(--gray-600);
    text-decoration: none; font-size: var(--font-size-sm); font-weight: 500;
    border-radius: var(--radius-md); transition: all var(--transition-fast);
    min-height: 44px; display: flex; align-items: center;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-50); }

/* === SEARCH (Products page context) === */
.search-container { position: relative; flex-shrink: 0; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: var(--font-size-sm); }
.search-input {
    width: 220px; padding: var(--space-2) var(--space-3) var(--space-2) 36px;
    border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    font-size: var(--font-size-sm); outline: none; transition: all var(--transition-fast);
}
.search-input:focus { border-color: var(--primary); width: 280px; }
.search-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    z-index: 100; max-height: 400px; overflow-y: auto; margin-top: 4px;
}
.search-result-item {
    display: flex; align-items: center; padding: var(--space-3);
    border-bottom: 1px solid var(--gray-100); cursor: pointer;
    transition: background var(--transition-fast);
}
.search-result-item:hover { background: var(--primary-50); }
.search-result-info { flex: 1; }
.search-result-name { font-weight: 600; font-size: var(--font-size-sm); color: var(--gray-900); }
.search-result-details { font-size: var(--font-size-xs); color: var(--gray-500); }
.search-result-price { font-weight: 600; color: var(--primary); font-size: var(--font-size-sm); }

/* === CATEGORIES === */
.categories { padding: var(--space-4) 0; background: var(--white); border-bottom: 1px solid var(--border-subtle); }
.category-grid { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.category-btn {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-4); background: var(--gray-50);
    border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    cursor: pointer; font-size: var(--font-size-sm); font-weight: 500;
    color: var(--gray-700); transition: all var(--transition-fast);
    min-height: 44px;
}
.category-btn:hover { border-color: var(--primary); color: var(--primary); }
.category-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.category-icon { font-size: var(--font-size-base); }

/* === FILTERS === */
.filters { padding: var(--space-3) 0; background: var(--surface-sunken); border-bottom: 1px solid var(--border-subtle); overflow-x: hidden; }
.filters-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }
.filters-left { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.filter-group { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.filter-btn {
    padding: var(--space-1) var(--space-3); background: var(--white);
    border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    cursor: pointer; font-size: var(--font-size-xs); font-weight: 500;
    color: var(--gray-600); transition: all var(--transition-fast);
    min-height: 40px; display: inline-flex; align-items: center;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.sort-select {
    padding: var(--space-1) var(--space-3); border: 1px solid var(--gray-200);
    border-radius: var(--radius-md); font-size: var(--font-size-xs); color: var(--gray-700);
    background: var(--white); cursor: pointer; outline: none;
    min-height: 40px;
}
.product-count { font-size: var(--font-size-sm); color: var(--gray-500); }

/* === PRODUCTS GRID === */
.products-section { padding: var(--space-6) 0; }
.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4); margin-bottom: var(--space-6);
}

/* === PRODUCT CARD === */
.product-card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    opacity: 0; transform: translateY(10px);
    min-height: 280px;
}
.product-card.fade-in { opacity: 1; transform: translateY(0); }
.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 12px 32px rgba(13, 148, 136, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Product header */
.product-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-3) var(--space-4); background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    overflow: hidden; position: relative;
}
.product-header img { transition: transform 0.4s ease; }
.product-card:hover .product-header img { transform: scale(1.05); }
.product-code { font-family: monospace; font-size: var(--font-size-xs); font-weight: 600; color: var(--primary); }

/* Badges */
.product-badges { display: flex; gap: var(--space-1); }
.product-badge {
    padding: 2px 8px; border-radius: 100px; font-size: 0.65rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-tested { background: var(--primary-50); color: var(--primary); }
.badge-popular { background: #fef3c7; color: #92400e; position: relative; }
.badge-new { background: #ede9fe; color: #6d28d9; }
.badge-best-value { background: #ecfdf5; color: #059669; }

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}
.badge-popular { animation: badgePulse 2.5s ease-in-out infinite; }

/* Product body */
.product-body { padding: var(--space-4); }
.product-name { font-size: var(--font-size-base); font-weight: 600; color: var(--gray-900); margin-bottom: var(--space-2); }
.product-spec { font-size: var(--font-size-xs); color: var(--gray-500); margin-bottom: var(--space-3); line-height: 1.5; }
.spec-highlight { color: var(--primary); font-weight: 600; }

/* Product pricing */
.product-pricing {
    margin-bottom: var(--space-3); background: var(--gray-50);
    border: 1px solid var(--gray-100); border-radius: var(--radius-md);
    padding: var(--space-3);
}
.price-display { display: flex; justify-content: space-between; align-items: baseline; }
.price-label { font-size: var(--font-size-xs); color: var(--gray-500); }
.price-value { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); letter-spacing: -0.02em; }
.price-value .price-currency { font-size: 1rem; font-weight: 700; color: var(--gray-600); }
.bulk-pricing { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px dashed var(--gray-200); }
.bulk-tier {
    font-size: var(--font-size-xs); color: var(--primary-dark); background: var(--primary-50);
    padding: 3px 10px; border-radius: var(--radius-sm); display: inline-flex;
    align-items: center; gap: 4px; font-weight: 600;
}
.bulk-tier::before { content: ''; display: inline-block; width: 4px; height: 4px; background: var(--primary); border-radius: 50%; }
.price-save {
    font-size: 0.6875rem; color: var(--success-green); font-weight: 600;
    display: block; margin-top: 2px;
}

/* Product actions */
.product-actions { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--gray-100); display: flex; flex-direction: column; gap: var(--space-2); }
.quantity-selector { display: flex; align-items: center; gap: var(--space-2); }
.qty-btn {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
    cursor: pointer; font-size: var(--font-size-xs); color: var(--gray-700);
    transition: all var(--transition-fast);
}
.qty-btn:hover { background: var(--gray-100); border-color: var(--gray-300); }
.qty-input {
    width: 50px; height: 32px; text-align: center; border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm); font-size: var(--font-size-sm); outline: none;
}
.qty-input:focus { border-color: var(--primary); }

/* Add to cart button */
.add-to-cart-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-4); background: var(--primary);
    color: var(--white); border: none; border-radius: var(--radius-md);
    cursor: pointer; font-size: var(--font-size-sm); font-weight: 500;
    transition: all 0.2s ease; position: relative; overflow: hidden;
    min-height: 44px;
}
.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}
.add-to-cart-btn:active { transform: translateY(0); box-shadow: none; }

/* Test report link */
.view-test-report-btn {
    display: flex; align-items: center; justify-content: center; gap: var(--space-2);
    padding: var(--space-2); background: var(--primary-50); color: var(--primary-dark);
    border: 1px solid var(--primary-100); border-radius: var(--radius-md);
    text-decoration: none; font-size: var(--font-size-xs); font-weight: 500;
    transition: all var(--transition-fast);
    min-height: 44px;
}
.view-test-report-btn:hover { background: var(--primary-100); }
.view-product-btn {
    display: flex; align-items: center; justify-content: center; gap: var(--space-2);
    padding: var(--space-2); background: #1E3A5F; color: #fff;
    border: none; border-radius: var(--radius-md);
    text-decoration: none; font-size: var(--font-size-xs); font-weight: 600;
    transition: all var(--transition-fast);
    min-height: 44px;
}
.view-product-btn:hover { background: #0f2942; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(30,58,95,0.25); }
.janoshik-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; background: linear-gradient(135deg, #f0fdfa, #ccfbf1); color: #0d9488;
    text-decoration: none; font-weight: 600; font-size: 0.8rem;
    border: 1.5px solid #99f6e4; border-radius: 8px;
    transition: all 0.15s ease; width: 100%; box-sizing: border-box; text-align: center;
}
.janoshik-link:hover { background: linear-gradient(135deg, #ccfbf1, #99f6e4); border-color: #5eead4; color: #0f766e; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(13,148,136,0.15); }
button.janoshik-link { cursor: pointer; font-family: inherit; }

/* COA column in catalog */
.cat-coa-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
    color: #0d9488;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.cat-coa-btn:hover { background: linear-gradient(135deg, #ccfbf1, #99f6e4); border-color: #5eead4; color: #0f766e; }

/* Loading / spinner */
.loading { text-align: center; padding: var(--space-8); color: var(--gray-500); }
.loading-spinner {
    width: 40px; height: 40px; border: 3px solid var(--gray-200);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto var(--space-4);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === FULL CATALOG MODAL === */
.catalog-modal .modal-content { max-width: 1100px; max-height: 95vh; }
.catalog-header {
    padding: 1.25rem 1.5rem; background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 2;
}
.catalog-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.catalog-search {
    flex: 1; min-width: 200px; padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    font-size: 0.8125rem; outline: none; background: var(--white);
}
.catalog-search:focus { border-color: var(--primary); }
.catalog-search-wrap { position: relative; flex: 1; min-width: 200px; }
.catalog-search-wrap i {
    position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
    color: var(--gray-400); font-size: 0.75rem;
}
.catalog-tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.catalog-tab {
    padding: 0.375rem 0.875rem; border: 1px solid var(--gray-200);
    border-radius: 100px; font-size: 0.6875rem; font-weight: 600;
    color: var(--gray-600); background: var(--white); cursor: pointer;
    transition: all 0.15s ease; text-transform: uppercase; letter-spacing: 0.04em;
}
.catalog-tab:hover { border-color: var(--primary); color: var(--primary); }
.catalog-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.catalog-count { font-size: 0.6875rem; color: var(--gray-400); font-weight: 500; white-space: nowrap; }
.catalog-body { padding: 0; }
.catalog-category { border-bottom: 1px solid var(--gray-200); }
.catalog-category:last-child { border-bottom: none; }
.catalog-cat-header {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.875rem 1.5rem; background: var(--primary-50);
    border-bottom: 1px solid var(--primary-100);
    position: sticky; top: 0; z-index: 1;
}
.catalog-cat-icon {
    width: 28px; height: 28px; border-radius: var(--radius-md);
    background: var(--primary); color: #fff; display: flex;
    align-items: center; justify-content: center; font-size: 0.75rem;
}
.catalog-cat-name { font-size: 0.875rem; font-weight: 700; color: var(--primary-darker); }
.catalog-cat-count {
    font-size: 0.6875rem; color: var(--primary-dark);
    background: var(--white); padding: 0.125rem 0.5rem;
    border-radius: 100px; border: 1px solid var(--primary-100);
}
.catalog-subcat {
    padding: 0.5rem 1.5rem 0.25rem;
    font-size: 0.6875rem; font-weight: 600; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.06em;
    background: var(--gray-50); border-bottom: 1px solid var(--gray-100);
}
.catalog-table { width: 100%; border-collapse: collapse; }
.catalog-table th {
    padding: 0.5rem 1rem; font-size: 0.625rem; font-weight: 700;
    color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em;
    text-align: left; background: var(--gray-50); border-bottom: 1px solid var(--gray-100);
    position: sticky; top: 0;
}
.catalog-table th:last-child { text-align: right; }
.catalog-table td {
    padding: 0.5rem 1rem; font-size: 0.8125rem; color: var(--gray-700);
    border-bottom: 1px solid var(--gray-50); vertical-align: middle;
}
.catalog-table tr:hover td { background: #fafafa; }
.catalog-table .cat-code {
    font-family: monospace; font-size: 0.75rem; font-weight: 600;
    color: var(--primary); white-space: nowrap;
}
.catalog-table .cat-name { font-weight: 500; color: var(--gray-900); }
.catalog-table .cat-spec { font-size: 0.75rem; color: var(--gray-500); }
.catalog-table .cat-price {
    text-align: right; font-weight: 700; font-size: 0.875rem;
    color: var(--gray-900); white-space: nowrap;
}


/* ==========================================
   PRODUCTS PAGE — RESPONSIVE
   ========================================== */

/* --- 640px breakpoint --- */
@media (max-width: 640px) {
    .products-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 0; }
    .nav-link { padding: var(--space-1) var(--space-2); font-size: var(--font-size-xs); }
    .search-input { width: 160px; }
    .search-input:focus { width: 200px; }
}

/* --- 767px breakpoint --- */
@media (max-width: 767px) {
    /* Mobile typography for product elements */
    .product-spec,
    .product-code,
    .bulk-tier,
    .price-label,
    .price-save,
    .product-badge,
    .filter-btn,
    .sort-select,
    .catalog-count,
    .catalog-tab {
        font-size: 0.8125rem;
    }
    .product-name {
        font-size: 1.0625rem;
        font-weight: 700;
        line-height: 1.4;
    }
    .product-body {
        padding: var(--space-4) var(--space-4) var(--space-3);
    }

    /* Touch targets */
    .nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .category-btn {
        padding: 0.625rem 1rem;
        min-height: 44px;
        font-size: 0.875rem;
    }
    .filter-btn {
        padding: 0.5rem 0.875rem;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }
    .sort-select {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    .add-to-cart-btn {
        padding: 0.75rem 1rem;
        min-height: 48px;
        font-size: 0.9375rem;
        font-weight: 600;
    }
    .qty-btn {
        width: 44px;
        height: 44px;
        font-size: 0.875rem;
    }
    .qty-input {
        width: 56px;
        height: 44px;
        font-size: 1rem;
    }
    .view-test-report-btn {
        padding: 0.625rem;
        min-height: 44px;
        font-size: 0.8125rem;
    }
    .catalog-tab {
        padding: 0.5rem 1rem;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    /* Nav row responsive */
    .nav {
        padding: var(--space-2) 0;
    }
    .nav-content {
        flex-direction: column;
        gap: var(--space-2);
    }
    .nav-links {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .search-container { width: 100%; }
    .search-input { width: 100%; }
    .search-input:focus { width: 100%; }

    /* Product grid: 2-col on tablets */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .product-header { min-height: 48px; }
    .product-header img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
    .product-card { font-size: 0.875rem; }
    .product-actions { padding: var(--space-3); }
    .quantity-selector { flex-wrap: wrap; gap: var(--space-2); }
    .product-card:hover { transform: translateY(-2px); }

    /* Categories & filters: horizontal scroll */
    .category-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        padding-bottom: 4px;
        gap: var(--space-2);
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 24px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 24px), transparent 100%);
    }
    .category-grid::-webkit-scrollbar { display: none; }
    .category-btn { flex-shrink: 0; white-space: nowrap; }

    .filters-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-2);
    }
    .filters-left {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        gap: var(--space-2);
    }
    .filters-left::-webkit-scrollbar { display: none; }
    .filter-group { flex-wrap: nowrap; flex-shrink: 0; }
    .filter-btn { flex-shrink: 0; white-space: nowrap; }

    /* Catalog tabs scroll */
    .catalog-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: var(--space-2);
    }
    .catalog-tabs::-webkit-scrollbar { display: none; }
    .catalog-tab { flex-shrink: 0; white-space: nowrap; }

    /* Catalog modal full-width */
    .catalog-modal .modal-content {
        max-width: 100%;
        max-height: 95vh;
    }

    /* Sticky category tabs on mobile */
    .categories {
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    /* Sections overflow */
    .products-section,
    .categories,
    .filters {
        overflow-x: hidden;
        overflow-y: visible;
    }

    /* Improve text contrast */
    .product-spec { color: var(--gray-600); }

    /* Visibility: larger icons */
    .product-header i { font-size: 1.125em; }
    .category-icon { font-size: 1.125em; }

    /* Bolder key text */
    .price-value { font-weight: 800; }

    /* Mobile search dropdown */
    .mobile-search-input {
        min-height: 48px;
        font-size: 1rem;
    }

    /* Performance: disable hover effects on mobile */
    .product-card { will-change: auto; }
    .product-card:hover .product-header img { transform: none; }
    .badge-popular { animation: none; }
}

/* --- 479px breakpoint --- */
@media (max-width: 479px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    .product-header { padding: var(--space-3) var(--space-4); }
    .product-body { padding: var(--space-4); }
    .product-name { font-size: 1.0625rem; }
    .product-pricing { padding: var(--space-3); }
    .price-value { font-size: 1.375rem; }
    .search-input { width: 100%; min-height: 44px; }
    .search-input:focus { width: 100%; }
    .sort-select { width: 100%; min-height: 44px; }
}

/* --- Small phones (< 360px) --- */
@media (max-width: 359px) {
    .product-name { font-size: 0.9375rem; }
    .price-value { font-size: 1.25rem; }
    .product-header { padding: var(--space-2) var(--space-3); }
    .product-body { padding: var(--space-3); }
    .product-actions { padding: var(--space-2); }
    .add-to-cart-btn { min-height: 40px; padding: 0.5rem 0.75rem; font-size: 0.8125rem; }
    .qty-btn { width: 40px; height: 40px; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .badge-popular { animation: none; }
    .product-card:hover { transform: none; }
    .add-to-cart-btn:hover { transform: none; }
}

/* --- Search dropdown positioning on mobile --- */
@media (max-width: 767px) {
    .search-dropdown {
        position: fixed;
        left: 0;
        right: 0;
        top: 120px; /* Fallback; overridden by JS for exact positioning */
        margin: 0;
        border-radius: 0 0 8px 8px;
        max-height: 50vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 10000;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    }

    /* Catalog table scrollable on mobile */
    .catalog-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .catalog-table { min-width: 500px; }
    .catalog-cat-header { padding: 0.75rem 1rem; }
    .catalog-cat-name { font-size: 0.8125rem; }
    .catalog-table td { padding: 0.5rem 0.75rem; font-size: 0.8125rem; }
    .catalog-table th { padding: 0.5rem 0.75rem; }
    .view-product-btn { width: 100%; }
    .add-to-cart-btn { width: 100%; }
}

/* --- Extra small phones product grid --- */
@media (max-width: 359px) {
    .products-grid { gap: 0.75rem; }
    .product-card { min-height: auto; }
    .category-btn { padding: 0.5rem 0.75rem; font-size: 0.75rem; min-height: 40px; }
    .filter-btn { padding: 0.375rem 0.625rem; font-size: 0.75rem; min-height: 36px; }
}
