/* ===========================
   SUPREONIX MARKETPLACE - Main CSS
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --amazon-navy: #131921;
    --amazon-light-navy: #232f3e;
    --amazon-orange: #febd69;
    --amazon-orange-dark: #f90;
    --amazon-blue: #37475a;
    --amazon-link: #007185;
    --amazon-link-hover: #c7511f;
    --text-dark: #0f1111;
    --text-light: #565959;
    --border: #ddd;
    --bg-light: #eaeded;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: #eaeded;
    color: var(--text-dark);
    font-size: 14px;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ===========================
   HEADER
   =========================== */
header {
    background-color: var(--amazon-navy);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    gap: 16px;
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 3px;
    white-space: nowrap;
}

.logo:hover { border-color: white; }

.search-bar {
    flex-grow: 1;
    display: flex;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
}

.search-select {
    padding: 0 10px;
    background: #f3f3f3;
    border: none;
    font-size: 0.8rem;
    color: #333;
    min-width: 60px;
    max-width: 120px;
    cursor: pointer;
}

.search-input {
    flex-grow: 1;
    border: none;
    padding: 0 12px;
    font-size: 0.95rem;
    outline: none;
}

.search-btn {
    background-color: var(--amazon-orange-dark);
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #333;
    transition: background 0.2s;
}

.search-btn:hover { background: #e47911; }

.nav-tool {
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    color: white;
    line-height: 1.3;
}

.nav-tool:hover { border-color: white; }

.nav-tool span {
    display: block;
    font-size: 0.72rem;
    color: #ccc;
}

.nav-tool strong {
    font-size: 0.88rem;
    color: white;
}

.nav-tool i { color: var(--amazon-orange); }
.nav-tool i.fa-shopping-cart { color: white; }

/* Cart */
.cart-count {
    background: var(--amazon-orange-dark);
    color: #111;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0 5px;
}

/* Sub header */
.sub-header {
    background-color: var(--amazon-light-navy);
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 38px;
    gap: 5px;
    overflow: hidden;
}

.sub-header a {
    color: white;
    font-size: 0.87rem;
    padding: 0 10px;
    height: 38px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 2px;
    white-space: nowrap;
}

.sub-header a:hover { border-color: white; }

/* ===========================
   ACCOUNT DROPDOWN
   =========================== */
.account-dropdown-trigger { position: relative; }

.account-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 15px;
    color: #333;
}

.account-dropdown-trigger:hover .account-dropdown { display: block; }

.account-dropdown h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.account-dropdown a {
    display: block;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--amazon-link);
}

.account-dropdown a:hover { color: var(--amazon-link-hover); text-decoration: underline; }

/* Admin panel section inside account dropdown */
.acct-dropdown-admin-banner {
    background: linear-gradient(135deg, #131921 0%, #1a2a3a 100%);
    color: var(--amazon-orange);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.acct-dropdown-admin-link {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 6px 10px !important;
    font-size: 0.85rem !important;
    color: #1a2a3a !important;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}

.acct-dropdown-admin-link i {
    width: 16px;
    text-align: center;
    color: var(--amazon-orange-dark);
    font-size: 0.9rem;
}

.acct-dropdown-admin-link:hover {
    background: #131921 !important;
    color: var(--amazon-orange) !important;
    text-decoration: none !important;
}

.acct-dropdown-admin-link:hover i { color: var(--amazon-orange); }

/* ===========================
   CART SIDEBAR
   =========================== */
.cart-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9000;
}

.cart-sidebar-overlay.active { display: block; }

.cart-sidebar {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 500px;
    max-width: 95vw;
    max-height: 85vh;
    height: auto;
    background: white;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(0.95);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
}

.cart-sidebar.open { 
    transform: translate(-50%, -50%) scale(1); 
    visibility: visible; 
    opacity: 1; 
}

.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--amazon-navy);
    color: white;
}

.cart-sidebar-header h2 { font-size: 1.1rem; }

.cart-sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty-msg {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.cart-empty-msg i { font-size: 3rem; color: #ccc; margin-bottom: 10px; display: block; }

.cart-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 15px;
}

.btn-orange {
    display: block;
    background: var(--amazon-orange-dark);
    color: #111;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    width: 100%;
    font-size: 0.95rem;
}

.btn-orange:hover { filter: brightness(0.9); }

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 4px;
    background: #f9f9f9;
    padding: 4px;
}

.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { font-size: 0.9rem; color: #c7511f; font-weight: 700; }
.cart-item-qty { font-size: 0.8rem; color: #666; }

/* ===========================
   HERO / MAIN CONTENT
   =========================== */
main { min-height: 80vh; }

/* ===========================
   PRODUCT GRID (B2B Style)
   =========================== */
.b2b-section-header {
    max-width: 1500px;
    margin: 30px auto 16px auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--amazon-orange-dark);
    padding-bottom: 10px;
}

.b2b-section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.b2b-product-grid {
    max-width: 1500px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.b2b-product-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.2s, transform 0.2s;
}

.b2b-product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.b2b-product-img {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fafafa;
    border-radius: 4px;
}

.b2b-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.b2b-product-info { display: flex; flex-direction: column; flex-grow: 1; }

.b2b-product-title {
    font-size: 0.88rem;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    color: #222;
}

.b2b-product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #b12704;
    margin-bottom: 6px;
}

.b2b-product-meta {
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.b2b-product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--amazon-orange-dark);
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.b2b-product-rating span { color: #999; }

.b2b-product-badge {
    font-size: 0.78rem;
    color: #222;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

/* ===========================
   HERO BANNER SECTION
   =========================== */
.hero-banner-area {
    background: white;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.hero-banner-area img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

/* B2B Alibaba-style hero */
.b2b-hero-container {
    max-width: 1500px;
    margin: 20px auto;
    padding: 0 20px;
}

.b2b-hero-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
}

.b2b-hero-main {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    overflow: hidden;
    min-height: 280px;
}

.b2b-hero-intro {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.b2b-hero-intro h1 {
    font-size: 1.8rem;
    color: #0d47a1;
    line-height: 1.2;
    margin-bottom: 20px;
}

.b2b-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.b2b-stat strong {
    font-size: 1.1rem;
    color: #0d47a1;
    display: block;
}

.b2b-stat span {
    font-size: 0.72rem;
    color: #555;
    line-height: 1.2;
}

.btn-b2b-primary {
    background: #0d47a1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    width: fit-content;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-b2b-primary:hover { background: #1565c0; }

.b2b-hero-card {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    background-size: cover;
    background-position: center;
    border-left: 2px solid white;
    min-height: 280px;
}

.b2b-hero-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.b2b-hero-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.b2b-hero-card-content h3 { font-size: 1rem; margin: 0; font-weight: 600; }

.b2b-hero-card-btn {
    width: 30px;
    height: 30px;
    background: white;
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.8rem;
}

.b2b-side-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
}

.b2b-side-panel h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.b2b-side-panel a {
    display: block;
    color: #333;
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.b2b-side-panel a:hover { color: #ff6600; }

/* ===========================
   B2B SUBNAV & MEGA MENU
   =========================== */
.b2b-sub-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--amazon-navy);
    padding: 0 20px;
    height: 40px;
    border-bottom: none;
    font-size: 0.88rem;
    position: relative;
    z-index: 900;
}

.b2b-sub-nav-left, .b2b-sub-nav-right {
    display: flex;
    align-items: center;
}

.b2b-sub-nav-left {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
}

.b2b-sub-nav-left::-webkit-scrollbar { display: none; }

.b2b-sub-nav-right {
    flex-shrink: 0;
    margin-left: auto;
}

.b2b-sub-nav a {
    color: #ddd;
    text-decoration: none;
    padding: 0 14px;
    display: flex;
    align-items: center;
    height: 40px;
    transition: color 0.2s;
    white-space: nowrap;
}

.b2b-sub-nav a:hover { color: var(--amazon-orange); }

.b2b-category-trigger {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding-right: 15px;
    position: relative;
}

.b2b-category-trigger {
    color: white;
}

.b2b-category-trigger i { font-size: 1rem; color: #ccc; }

/* Mega Menu */
.b2b-mega-menu {
    position: absolute;
    top: 40px;
    left: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border: 1px solid #eee;
    border-radius: 0 0 8px 8px;
    display: none;
    width: 260px;
    min-height: 0;
    z-index: 9999;
    flex-direction: row;
}

.b2b-category-trigger:hover .b2b-mega-menu,
.b2b-mega-menu:hover {
    display: flex;
}

.mega-menu-sidebar {
    width: 260px;
    background: white;
    border-right: none;
    padding: 10px 0;
    overflow-y: auto;
    max-height: 600px;
}

.mega-menu-sidebar-item {
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #333;
    transition: background 0.15s;
    font-size: 0.88rem;
}

.mega-menu-sidebar-item:hover { background: #f8f9fa; color: #ff6600; }
.mega-menu-sidebar-item.active { background: #f8f9fa; font-weight: 600; }

.mega-menu-sidebar-item i {
    width: 20px;
    text-align: center;
    color: #666;
    font-size: 1rem;
}

/* When sidebar item is an <a> tag, reset link styles */
a.mega-menu-sidebar-item {
    text-decoration: none;
    color: #333;
    display: flex;
}

.mega-menu-content-area {
    flex-grow: 1;
    padding: 20px 30px;
    background: white;
    max-height: 600px;
    overflow-y: auto;
}

.mega-menu-pane { display: none; }
.mega-menu-pane.active { display: block; }

.mega-category-section { margin-bottom: 28px; }

.mega-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.mega-category-header h3 { font-size: 1.05rem; font-weight: 700; color: #111; margin: 0; }
.mega-category-header a { font-size: 0.82rem; color: #333; text-decoration: underline; }

.mega-items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.mega-item-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.mega-item-circle-img {
    width: 78px;
    height: 78px;
    min-height: 78px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.mega-item-circle:hover .mega-item-circle-img { transform: scale(1.05); }
.mega-item-circle-img img { width: 100%; height: 100%; object-fit: cover; }
.mega-item-circle span { font-size: 0.78rem; color: #333; }

/* ===========================
   MODAL (Location, etc.)
   =========================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-box {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 480px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #666;
}

.modal-box h3 { margin-bottom: 16px; font-size: 1.1rem; }

/* ===========================
   FOOTER
   =========================== */
footer {
    background: var(--amazon-navy);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    font-size: 0.85rem;
}

footer a { color: #aaa; margin: 0 10px; }
footer a:hover { color: white; text-decoration: underline; }

/* ===========================
   RESPONSIVE
   =========================== */

/* ── Small laptops (≤1366px) ──────────────────────────────── */
@media (max-width: 1366px) {
    body { font-size: 13px; }

    .header-main { padding: 6px 14px; gap: 12px; }
    .logo { font-size: 1.4rem; padding: 4px 6px; }

    .nav-tool { padding: 4px 6px; }
    .nav-tool span { font-size: 0.65rem; }
    .nav-tool strong { font-size: 0.8rem; }

    .search-bar { height: 36px; }
    .search-input { font-size: 0.88rem; }
    .search-select { max-width: 110px; font-size: 0.75rem; padding: 0 6px; }
    .search-btn { padding: 0 12px; font-size: 1rem; }

    .sub-header { height: 34px; }
    .sub-header a { font-size: 0.82rem; padding: 0 8px; }

    /* Reduce global text & spacing */
    .b2b-section-header { margin: 20px auto 12px; padding: 0 16px; padding-bottom: 8px; }
    .b2b-section-header h2 { font-size: 1.2rem; }
    .b2b-product-grid { padding: 0 16px; gap: 12px; }
    .b2b-product-card { padding: 12px; }
    .b2b-product-title { font-size: 0.82rem; }
    .b2b-product-price { font-size: 1.05rem; }
    .b2b-product-meta { font-size: 0.72rem; }

    /* Hero */
    .b2b-hero-container { padding: 0 16px; margin: 14px auto; }
    .b2b-hero-intro { padding: 22px; }
    .b2b-hero-intro h1 { font-size: 1.5rem; }
    .b2b-hero-card { min-height: 240px; }

    /* Cart sidebar */
    .cart-sidebar { width: 420px; }
    .cart-sidebar-header { padding: 14px 16px; }
    .cart-sidebar-header h2 { font-size: 1rem; }
    .cart-sidebar-body { padding: 14px 16px; }
    .cart-sidebar-footer { padding: 14px 16px; }
    .cart-subtotal { font-size: 0.9rem; }

    /* Account dropdown */
    .account-dropdown { min-width: 260px; padding: 12px; }
    .account-dropdown a { font-size: 0.82rem; }

    /* Footer */
    footer { padding: 20px 16px; margin-top: 30px; font-size: 0.8rem; }
}

/* ── Small laptops / large tablets (≤1200px) ─────────────── */
@media (max-width: 1200px) {
    body { font-size: 12.5px; }

    .header-main { padding: 6px 10px; gap: 8px; }
    .logo { font-size: 1.25rem; padding: 3px 5px; }

    .nav-tool span { font-size: 0.62rem; }
    .nav-tool strong { font-size: 0.78rem; }
    .nav-tool { padding: 3px 5px; }

    .search-bar { height: 34px; }
    .search-select { max-width: 90px; font-size: 0.72rem; padding: 0 5px; }
    .search-input { font-size: 0.85rem; padding: 0 8px; }
    .search-btn { padding: 0 10px; font-size: 0.95rem; }

    .sub-header { height: 32px; }
    .sub-header a { font-size: 0.78rem; padding: 0 7px; }

    .b2b-hero-grid { grid-template-columns: 1fr; }
    .b2b-hero-main { grid-template-columns: 1fr 1fr 1fr; }
    .b2b-mega-menu { width: 100vw; }

    .b2b-section-header h2 { font-size: 1.1rem; }
    .b2b-product-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
    .b2b-product-card { padding: 10px; }
    .b2b-product-title { font-size: 0.8rem; }
    .b2b-product-price { font-size: 1rem; }

    .btn-orange { font-size: 0.88rem; padding: 8px; }

    /* Products page: narrower filter sidebar */
    .products-page-wrap {
        grid-template-columns: 200px 1fr !important;
        gap: 16px !important;
        padding: 16px !important;
    }
}

/* ── Tablets / small laptops (≤1024px) ────────────────────── */
@media (max-width: 1024px) {
    .header-main {
        flex-wrap: wrap;
        padding: 8px 10px;
        gap: 8px;
    }

    /* Hide "Deliver to" on tablets to free space */
    .mobile-hidden {
        display: none !important;
    }

    .nav-tool strong { font-size: 0.8rem; }
    .nav-tool span { font-size: 0.65rem; }

    .search-bar {
        order: 10;
        flex-basis: 100%;
        min-width: 0;
    }

    .b2b-hero-main { grid-template-columns: 1fr 1fr; }
    .b2b-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    /* Products page: collapse sidebar */
    .products-page-wrap {
        grid-template-columns: 1fr !important;
        padding: 12px !important;
    }
    .products-filters {
        position: static !important;
    }

    /* Single product page: 2-col instead of 3-col */
    .single-product-wrap {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }
    .product-buy-box {
        grid-column: 1 / -1 !important;
    }

    footer .container,
    footer .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 30px 20px !important;
    }
}

/* ── Tablets portrait / large phones (≤768px) ─────────────── */
@media (max-width: 768px) {
    html, body, header, main {
        width: 100%;
        max-width: 100%;
    }

    body { min-width: 0; }
    header { overflow-x: hidden; }

    .header-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px 8px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        padding: 8px 10px;
        margin: 0;
    }

    .logo {
        grid-column: 1;
        padding: 0;
        font-size: 1.15rem;
        min-width: 0;
    }

    .mobile-hidden { display: none !important; }

    .account-dropdown-trigger {
        grid-column: 2;
        min-width: 0;
        padding: 0;
    }

    .account-dropdown-trigger > div:not(.account-dropdown) {
        display: none;
    }

    .header-main > .nav-tool:last-child {
        grid-column: 3;
        padding: 0;
    }

    .search-bar {
        grid-column: 1 / -1;
        order: initial;
        flex-basis: auto;
        width: 100%;
        min-width: 0;
        height: 38px;
    }

    .search-select {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
        padding: 0 8px;
        font-size: 0.72rem;
    }

    .search-input {
        min-width: 0;
        padding: 0 8px;
        font-size: 0.82rem;
    }

    .search-btn {
        width: 42px;
        min-width: 42px;
        padding: 0;
    }

    .b2b-category-trigger { display: none !important; }
    .b2b-mega-menu { display: none !important; }

    .b2b-sub-nav {
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 10px;
    }
    .b2b-sub-nav::-webkit-scrollbar { display: none; }
    .b2b-sub-nav-left { min-width: 0; max-width: 100%; flex-wrap: nowrap; }
    .b2b-sub-nav-right { display: none; }
    .b2b-sub-nav a { padding: 0 10px; font-size: 0.82rem; color: #ddd; }

    .b2b-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        padding: 0 12px;
    }

    .b2b-section-header { padding: 0 12px; margin: 20px auto 12px; }

    .cart-sidebar { width: 95vw; max-width: 500px; max-height: 90vh; }

    /* Single product stacks to 1 col */
    .single-product-wrap {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 0 12px !important;
        margin: 16px auto !important;
    }

    /* Products list grid for smaller screens */
    .products-list-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 10px !important;
    }

    footer .container,
    footer .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px !important;
        padding: 36px 20px !important;
        text-align: left;
    }

    footer .footer-column,
    footer .footer-column a,
    footer .footer-column h3 {
        min-width: 0;
        overflow-wrap: normal;
        word-break: normal;
    }

    footer > div[style*="border-top"] > div,
    footer > div[style*="background: #131a22"] > div {
        flex-wrap: wrap;
        gap: 10px 16px !important;
    }
}

/* ── Phones (≤480px) ──────────────────────────────────────── */
@media (max-width: 480px) {
    .header-main { padding: 6px 8px; gap: 4px 6px; }
    .logo { font-size: 1.05rem; }

    .search-select {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
        font-size: 0.68rem;
    }

    .b2b-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 8px;
    }

    .products-list-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .b2b-product-card { padding: 10px; }
    .b2b-product-title { font-size: 0.8rem; }
    .b2b-product-price { font-size: 1rem; }

    footer .container,
    footer .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px 14px !important;
        column-gap: 14px !important;
        row-gap: 24px !important;
        padding: 30px 12px !important;
        text-align: left !important;
    }

    footer .footer-column h3 {
        font-size: 0.95rem !important;
        line-height: 1.3;
    }

    footer .footer-column a {
        font-size: 0.82rem !important;
        line-height: 1.7 !important;
    }

    footer > div[style*="border-top"] { padding: 28px 16px !important; }
    footer > div[style*="background: #131a22"] { padding: 24px 16px !important; }
}

/* ===========================
   MOBILE BOTTOM NAVIGATION BAR
   =========================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 60px;
        background-color: #131921;
        border-top: 1px solid rgba(254, 189, 105, 0.3);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
        transform: none;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #ccc;
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 500;
        flex: 1;
        height: 100%;
        transition: color 0.3s;
    }

    .mobile-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 3px;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: var(--amazon-orange);
    }

    .mobile-nav-item--sell i {
        color: var(--amazon-orange);
        font-size: 1.45rem;
    }

    .mobile-nav-item--sell span {
        color: var(--amazon-orange);
        font-weight: 700;
    }

    body {
        padding-bottom: 65px;
    }
}
