:root {
    --primary: #e63312;
    --primary-dark: #c82a0e;
    --primary-light: #fff1f0;
    --secondary: #1a1a2e;
    --accent: #ff9900;
    --accent-dark: #e68a00;
    --green: #00a651;
    --green-dark: #008c44;
    --green-light: #e6f7ee;
    --text: #1a1a1a;
    --text-mid: #444;
    --text-light: #666;
    --text-muted: #999;
    --bg: #fff;
    --bg-light: #f5f5f5;
    --bg-alt: #f0f0f0;
    --bg-dark: #1a1a2e;
    --bg-darker: #111122;
    --border: #ddd;
    --border-light: #eee;
    --danger: #d32f2f;
    --success: #2e7d32;
    --warning: #ed6c02;
    --max-width: 1340px;
    --transition: 0.15s ease;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --radius: 4px;
    --radius-sm: 3px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.5;
    min-height: 100vh;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 15px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--bg-darker);
    color: #aaa;
    font-size: 12px;
    padding: 0;
    line-height: 32px;
}
.top-bar-content { display: flex; justify-content: space-between; align-items: center; }
.top-bar-text { display: flex; align-items: center; gap: 20px; }
.top-bar-text span { color: #ccc; }
.top-bar-links { display: flex; gap: 3px; align-items: center; }
.top-bar-links a { color: #ccc; padding: 0 8px; font-size: 12px; }
.top-bar-links a:hover { color: #fff; text-decoration: none; }
.top-bar-divider { width: 1px; height: 12px; background: #444; }

/* ===== MAIN HEADER ===== */
.main-header {
    background: var(--bg-dark);
    padding: 12px 0;
}
.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    color: #fff;
    flex-shrink: 0;
    text-decoration: none;
}
.logo:hover { color: #fff; text-decoration: none; opacity: 0.9; }
.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* ===== SEARCH BAR ===== */
.search-bar {
    flex: 1;
    max-width: 580px;
    display: flex;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
}
.search-bar:focus-within { border-color: var(--primary); }
.search-bar input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
}
.search-bar input::placeholder { color: #999; }
.search-bar button {
    padding: 10px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.search-bar button:hover { background: var(--primary-dark); }

/* ===== HEADER ACTIONS ===== */
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.header-action-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #bbb;
    font-size: 11px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: var(--radius);
    text-decoration: none;
}
.header-action-link:hover { color: #fff; text-decoration: none; }
.header-action-link svg { opacity: 0.8; }

.cart-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    background: var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
    position: relative;
    text-decoration: none;
}
.cart-link:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.cart-count {
    background: var(--accent);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -3px;
    right: -3px;
}
.cart-label { font-weight: 600; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid #555;
    border-radius: var(--radius);
    cursor: pointer;
    padding: 6px;
    color: #fff;
}

/* ===== NAV BAR ===== */
.nav-bar {
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 1000;
}
.nav-bar-inner {
    display: flex;
    align-items: center;
    gap: 0;
}
.mega-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.mega-menu-btn:hover { background: #c42a0e; }
.mega-chevron { transition: transform 0.2s; }
.mega-menu-trigger.open .mega-chevron { transform: rotate(180deg); }
.nav-quick-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}
.nav-quick-links li a {
    display: block;
    padding: 11px 16px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.nav-quick-links li a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.nav-deals-link { color: #ff6b4a !important; font-weight: 700 !important; }
.nav-deals-link:hover { color: #ff8a6a !important; }

/* ===== MEGA MENU ===== */
.mega-menu-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
}
.mega-menu-overlay.open { display: block; }
.mega-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: -1;
}
.mega-menu-panel {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 1100px;
    display: flex;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    border-radius: 0 0 6px 6px;
    max-height: 75vh;
    overflow: hidden;
}
.mega-menu-categories {
    width: 260px;
    min-width: 260px;
    background: #f8f9fa;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 6px 0;
}
.mega-cat-item {
    display: flex;
    align-items: center;
    padding: 9px 16px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
    border-left: 3px solid transparent;
    gap: 6px;
}
.mega-cat-item:hover,
.mega-cat-item.active {
    background: #fff;
    color: var(--primary);
    border-left-color: var(--primary);
    text-decoration: none;
}
.mega-cat-name { flex: 1; }
.mega-cat-count {
    font-size: 11px;
    color: var(--text-lighter);
    font-weight: 400;
}
.mega-cat-item.active .mega-cat-count,
.mega-cat-item:hover .mega-cat-count { color: var(--text-muted); }
.mega-arrow { color: var(--text-lighter); flex-shrink: 0; }
.mega-cat-item:hover .mega-arrow,
.mega-cat-item.active .mega-arrow { color: var(--primary); }
.mega-cat-all {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 12px;
    font-weight: 600;
    color: var(--primary);
}
.mega-menu-subcats {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    position: relative;
}
.mega-sub-panel { display: none; }
.mega-sub-panel.active { display: block; }
.mega-sub-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}
.mega-sub-header a {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.mega-sub-header a:hover { color: var(--primary); }
.mega-sub-total {
    font-size: 12px;
    color: var(--text-muted);
}
.mega-sub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px 20px;
}
.mega-sub-link {
    display: block;
    padding: 6px 8px;
    color: var(--text-mid);
    font-size: 13px;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.1s, color 0.1s;
}
.mega-sub-link:hover {
    background: var(--bg-light);
    color: var(--primary);
    text-decoration: none;
}
.mega-sub-count {
    font-size: 11px;
    color: var(--text-lighter);
    margin-left: 2px;
}
.mega-sub-empty {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}
.mega-view-all {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.mega-view-all:hover { text-decoration: underline; }
.mega-menu-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.mega-menu-close:hover { color: var(--text); }

/* ===== ALERTS ===== */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    margin: 10px 0;
    font-size: 13px;
    font-weight: 500;
}
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.alert-error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.alert-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }
.alert-info { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }

main { min-height: 60vh; }

/* ===== PROMO STRIP ===== */
.promo-strip {
    background: linear-gradient(90deg, var(--primary) 0%, #ff4422 50%, var(--primary) 100%);
    background-size: 200% 100%;
    animation: promoShimmer 8s ease infinite;
    color: #fff;
    text-align: center;
    padding: 9px 15px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
@keyframes promoShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.promo-strip a { color: #fff; text-decoration: underline; font-weight: 700; }

/* ===== HOME SPOTLIGHT ===== */
.home-spotlight { background: var(--bg-dark); padding: 0; }
.spotlight-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5e 40%, #4a1942 100%);
    padding: 50px 55px;
    display: flex;
    align-items: center;
    gap: 50px;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}
.spotlight-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230,51,18,0.10) 0%, transparent 70%);
    pointer-events: none;
}
.spotlight-hero-logo {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spotlight-logo {
    height: 140px;
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
}
.spotlight-hero-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}
.spotlight-banner h1 { font-size: 34px; font-weight: 800; margin-bottom: 10px; line-height: 1.15; letter-spacing: -0.3px; }
.spotlight-banner p { font-size: 15px; opacity: 0.75; margin-bottom: 24px; line-height: 1.6; }
.spotlight-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.spotlight-deals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 2px;
}
.spotlight-deal-card {
    background: #22223a;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}
.spotlight-deal-card:hover { background: #2a2a48; text-decoration: none; border-bottom-color: var(--primary); }
.spotlight-deal-image { width: 70px; height: 70px; background: #fff; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 6px; }
.spotlight-deal-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.spotlight-deal-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.spotlight-deal-name { font-size: 12px; color: #ccc; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spotlight-deal-price { font-size: 18px; font-weight: 700; color: #fff; }
.spotlight-deal-save { font-size: 11px; font-weight: 700; color: var(--green); background: rgba(0,166,81,0.15); display: inline-block; padding: 1px 6px; align-self: flex-start; }

/* ===== HOME CATEGORIES ===== */
.category-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
}
.category-tile {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--secondary);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-decoration: none;
    text-align: left;
    transition: all 0.2s ease;
}
.category-tile:hover { border-left-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-decoration: none; transform: translateY(-1px); }
.category-tile-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; }
.category-tile:hover .category-tile-name { color: var(--primary); }
.category-tile-count { font-size: 11px; color: var(--text-muted); }

/* ===== DEALS SECTION ===== */
.section-deals {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1520 100%);
    padding: 35px 0;
}
.deals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}
.deals-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.deals-fire { font-size: 36px; line-height: 1; }
.deals-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.3px;
}
.deals-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin: 2px 0 0;
}
.section-deals .product-card {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.section-deals .product-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--primary);
}
.section-deals .product-card-body { color: #fff; }
.section-deals .price-current { color: #fff; }
.section-deals .price-save { color: #ff6b6b; }
.section-deals .price-rrp { color: rgba(255,255,255,0.4); }
.section-deals .price-gst { color: rgba(255,255,255,0.4); }
.section-deals .product-card-name a { color: #ddd; }
.section-deals .product-card-name a:hover { color: #fff; }
.section-deals .product-card-brand { color: rgba(255,255,255,0.5); }

/* ===== BRANDS GRID ===== */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}
.brand-tile {
    background: #fff;
    border: 1px solid var(--border);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}
.brand-tile:hover { border-color: var(--primary); text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,0.06); transform: translateY(-1px); }
.brand-name { font-size: 13px; font-weight: 700; color: var(--text); }
.brand-tile:hover .brand-name { color: var(--primary); }
.brand-count { font-size: 10px; color: var(--text-muted); background: var(--bg-light); padding: 1px 8px; border-radius: 10px; }

/* ===== HOME PRODUCT GRID ===== */
.product-grid-home { grid-template-columns: repeat(6, 1fr); }

/* ===== CAROUSEL ===== */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
}
.carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 8px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-card {
    flex: 0 0 calc((100% - 60px) / 6);
    scroll-snap-align: start;
    min-width: 180px;
}
.carousel-card .product-card {
    height: 100%;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.95);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.carousel-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.carousel-prev { left: 4px; }
.carousel-next { right: 4px; }
.section-deals .carousel-btn {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.section-deals .carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== SUBCATEGORY GRID ===== */
.subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}
.subcat-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}
.subcat-tile:hover {
    border-color: var(--primary);
    background: var(--bg-light);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.subcat-name { font-size: 13px; font-weight: 600; color: var(--text); }
.subcat-tile:hover .subcat-name { color: var(--primary); }
.subcat-count { font-size: 11px; color: var(--text-muted); background: var(--bg-light); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }

/* ===== SIDEBAR SCROLL ===== */
.sidebar-scroll { max-height: 350px; overflow-y: auto; }

/* ===== FILTER TAGS ===== */
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text);
}
.filter-tag a {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    line-height: 1;
}
.filter-tag a:hover { color: var(--primary-dark); }

/* ===== TRUST BAR ===== */
.trust-bar {
    background: #fff;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.trust-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-mid);
}
.trust-icon {
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.trust-text { display: flex; flex-direction: column; }
.trust-title { font-weight: 600; font-size: 13px; color: var(--text); }
.trust-desc { font-size: 11px; color: var(--text-muted); }

/* ===== SECTIONS ===== */
.section { padding: 30px 0; }
.section-alt { background: #fff; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    position: relative;
    padding-left: 12px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    background: var(--primary);
}
.section-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    transition: color var(--transition);
}
.section-link:hover { text-decoration: underline; }

/* ===== CATEGORY CARDS ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 8px;
}
.category-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 14px 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.category-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}
.category-card-icon {
    font-size: 24px;
    line-height: 1;
}
.category-card-name { font-weight: 600; font-size: 12px; line-height: 1.3; }

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.product-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: #fff;
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}
.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.product-card-image {
    aspect-ratio: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}
.product-card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.product-card-image .no-image { color: #ccc; }
.product-badges { position: absolute; top: 6px; left: 6px; display: flex; flex-direction: column; gap: 3px; z-index: 2; }
.product-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-sale { background: var(--primary); color: #fff; }
.badge-featured { background: var(--accent); color: #000; }
.badge-new { background: var(--green); color: #fff; }
.badge-low-stock { background: var(--warning); color: #fff; }

.product-card-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 2;
}
.product-card:hover .product-card-actions { opacity: 1; }
.product-card-action-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
}
.product-card-action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.product-card-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.product-card-brand { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px; }
.product-card-name {
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    min-height: 2.4em;
    line-height: 1.4;
}
.product-card-name a { color: inherit; }
.product-card-name a:hover { color: var(--primary); }

.product-card-stock { font-size: 11px; margin-bottom: 6px; }
.stock-in { color: var(--green); font-weight: 600; }
.stock-low { color: var(--warning); font-weight: 600; }
.stock-out { color: var(--danger); font-weight: 600; }

.product-card-pricing { margin-top: auto; }
.product-card-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.price-current { font-size: 20px; font-weight: 700; color: var(--primary); }
.price-rrp { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.price-save { font-size: 11px; color: var(--primary); font-weight: 700; }
.price-gst { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; display: block; }

.product-card-footer { margin-top: 6px; }
.add-to-cart-btn {
    width: 100%;
    padding: 9px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.add-to-cart-btn:hover { background: var(--green-dark); box-shadow: 0 2px 6px rgba(0,166,81,0.3); }
.add-to-cart-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--accent); color: #000; }
.btn-secondary:hover { background: var(--accent-dark); color: #000; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-dark); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c62828; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-mid); }
.btn-ghost:hover { background: var(--bg-light); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 10px 0;
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 5px; color: var(--text-muted); font-size: 10px; }

/* ===== PRODUCT DETAIL PAGE ===== */
.product-detail { padding: 0 0 30px; background: #fff; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.product-images {
    background: #fff;
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: sticky;
    top: 80px;
}
.product-info h1 { font-size: 20px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.product-sku { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

.product-price-box {
    background: var(--bg-light);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.product-price-main { font-size: 28px; font-weight: 700; color: var(--primary); }
.product-price-gst { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.product-stock { margin-bottom: 12px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stock-dot-in { background: var(--green); }
.stock-dot-low { background: var(--warning); }
.stock-dot-out { background: var(--danger); }
.in-stock { color: var(--green); font-weight: 600; }
.out-of-stock { color: var(--danger); font-weight: 600; }

.product-add-form { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.qty-input {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 14px;
    font-family: var(--font);
}
.qty-input:focus { border-color: var(--primary); outline: none; }

.product-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
    padding: 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
}
.product-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-mid);
}
.product-feature-icon { font-size: 14px; color: var(--green); }

.product-tabs { margin-top: 24px; }
.tab-nav { display: flex; border-bottom: 1px solid var(--border); gap: 0; }
.tab-btn {
    padding: 10px 20px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-bottom: none;
    margin-bottom: -1px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    font-family: var(--font);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { background: #fff; color: var(--primary); border-bottom: 1px solid #fff; }
.tab-content { padding: 16px 0; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.product-specs h3 { font-size: 15px; margin-bottom: 10px; font-weight: 600; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr:nth-child(even) { background: var(--bg-light); }
.specs-table td { padding: 7px 10px; border: 1px solid var(--border-light); font-size: 13px; }
.specs-table td:first-child { font-weight: 600; width: 35%; color: var(--text-mid); background: var(--bg-light); }

.product-description { line-height: 1.7; color: var(--text-mid); font-size: 13px; }
.product-description h2 { font-size: 16px; margin-bottom: 8px; color: var(--text); }

/* ===== PRODUCTS PAGE ===== */
.products-layout { display: flex; gap: 20px; padding: 0 0 30px; }
.products-main { flex: 1; min-width: 0; }

.category-sidebar { width: 240px; flex-shrink: 0; }

.cat-page-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}
.cat-page-header h1 { margin: 0; font-size: 22px; }
.cat-product-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.active-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.filter-bar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.15s;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.filter-chip span { color: var(--text-muted); font-weight: 700; }
.filter-clear-all {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: auto;
}
.filter-clear-all:hover { text-decoration: underline; }

.sidebar-section {
    background: #fff;
    border: 1px solid var(--border);
    margin-bottom: 8px;
    border-radius: var(--radius);
    overflow: hidden;
}
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.sidebar-toggle:hover { background: var(--bg-light); }
.sidebar-toggle svg { transition: transform 0.2s; }
.sidebar-section.collapsed .sidebar-toggle svg { transform: rotate(-90deg); }
.sidebar-section.collapsed .sidebar-content { display: none; }
.sidebar-content { padding: 4px 0; }

.filter-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    color: var(--text-mid);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}
.filter-item:hover { background: var(--bg-light); color: var(--primary); text-decoration: none; }
.filter-item.active { color: var(--primary); font-weight: 600; background: var(--primary-light); }
.filter-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-count { font-size: 11px; color: var(--text-lighter); margin-left: 6px; flex-shrink: 0; }
.filter-show-more a {
    display: block;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.filter-show-more a:hover { text-decoration: underline; }

.price-range-info {
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 12px 0;
}
.price-filter-form { padding: 8px 12px; }
.price-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.price-inputs input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font);
    width: 0;
}
.price-dash { color: var(--text-lighter); }

.sidebar-categories { }
.sidebar-categories .sidebar-section.collapsed .sidebar-content { display: none; }

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 13px;
}
.products-count { color: var(--text-mid); }
.products-sort { display: flex; align-items: center; gap: 6px; }
.products-sort label { font-size: 12px; color: var(--text-light); }
.products-sort select {
    padding: 4px 8px;
    border: 1px solid var(--border);
    font-size: 13px;
    font-family: var(--font);
}

.view-toggle { display: flex; gap: 2px; }
.view-toggle button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    color: var(--text-muted);
}
.view-toggle button.active, .view-toggle button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 2px; justify-content: center; margin-top: 20px; }
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    color: var(--text-mid);
    font-size: 13px;
    background: #fff;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-dots { display: flex; align-items: center; padding: 0 6px; color: var(--text-muted); }

/* ===== CART ===== */
.cart-page { padding: 20px 0; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.cart-items-section { background: #fff; border: 1px solid var(--border); overflow: hidden; }
.cart-items-header { padding: 10px 14px; background: var(--bg-light); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }

.cart-item { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border-light); align-items: center; }
.cart-item:last-child { border-bottom: none; }
.cart-item-image { width: 80px; height: 80px; background: #fff; border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-item-image img { max-height: 70px; max-width: 70px; object-fit: contain; }
.cart-item-details { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.cart-item-name a { color: var(--text); }
.cart-item-name a:hover { color: var(--primary); }
.cart-item-sku { font-size: 11px; color: var(--text-muted); }
.cart-item-price { font-weight: 700; font-size: 14px; text-align: right; min-width: 90px; color: var(--primary); }
.cart-qty-form { display: flex; align-items: center; gap: 4px; }
.cart-qty-input {
    width: 50px;
    padding: 4px;
    text-align: center;
    border: 1px solid var(--border);
    font-size: 13px;
    font-family: var(--font);
}
.cart-remove {
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 6px;
    font-family: var(--font);
}
.cart-remove:hover { color: var(--danger); }

.cart-summary {
    background: #fff;
    border: 1px solid var(--border);
    padding: 16px;
    position: sticky;
    top: 80px;
    height: fit-content;
}
.cart-summary h3 { font-size: 15px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.cart-summary-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.cart-summary-total {
    font-weight: 700;
    font-size: 18px;
    border-top: 2px solid var(--text);
    padding-top: 10px;
    margin-top: 8px;
    color: var(--primary);
}
.cart-trust { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.cart-trust-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-light); }

/* ===== LEGACY CART TABLE ===== */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--border); font-size: 12px; color: var(--text-light); text-transform: uppercase; font-weight: 600; }
.cart-table td { padding: 10px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.cart-product { display: flex; align-items: center; gap: 10px; }
.cart-product-image { width: 60px; height: 60px; background: #fff; border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-product-name { font-weight: 600; font-size: 13px; }
.cart-product-sku { font-size: 11px; color: var(--text-muted); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    background: #fff;
    color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--danger); font-size: 12px; margin-top: 3px; }
.form-help { color: var(--text-light); font-size: 12px; margin-top: 3px; }

/* ===== AUTH PAGES ===== */
.auth-page { padding: 30px 0; display: flex; justify-content: center; }
.auth-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 30px;
}
.auth-box h1 { font-size: 20px; text-align: center; margin-bottom: 20px; font-weight: 600; }
.auth-footer { text-align: center; margin-top: 14px; font-size: 13px; color: var(--text-light); }

/* ===== CHECKOUT ===== */
.checkout-page { padding: 20px 0; }
.checkout-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.checkout-section { margin-bottom: 16px; background: #fff; border: 1px solid var(--border); padding: 18px; }
.checkout-section h2 { font-size: 15px; font-weight: 600; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }

.order-summary-box {
    background: #fff;
    border: 1px solid var(--border);
    padding: 16px;
    position: sticky;
    top: 80px;
}
.order-summary-item { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.order-summary-item-name { flex: 1; }
.order-summary-item-qty { color: var(--text-light); margin: 0 6px; }

/* ===== ACCOUNT ===== */
.account-page { padding: 20px 0; }
.account-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.account-nav { list-style: none; background: #fff; border: 1px solid var(--border); padding: 0; }
.account-nav li a {
    display: block;
    padding: 10px 14px;
    color: var(--text-mid);
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
}
.account-nav li a:hover { background: var(--bg-light); text-decoration: none; }
.account-nav li a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-dark);
    color: #999;
    padding: 35px 0 0;
    margin-top: 0;
    font-size: 13px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 25px; }
.footer-col h3 { color: #fff; font-size: 14px; margin-bottom: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col p { font-size: 13px; line-height: 1.6; color: #888; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a { color: #888; font-size: 13px; }
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
.footer-abn { font-size: 12px; margin-top: 10px; color: #666; }

.footer-trust-badges { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.footer-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.05);
    font-size: 11px;
    color: #888;
    border: 1px solid rgba(255,255,255,0.08);
}

.footer-newsletter { margin-top: 12px; }
.footer-newsletter-form { display: flex; gap: 0; margin-top: 6px; }
.footer-newsletter-form input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #333;
    background: #222;
    color: #ccc;
    font-size: 13px;
    font-family: var(--font);
}
.footer-newsletter-form input::placeholder { color: #666; }
.footer-newsletter-form button {
    padding: 8px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
}
.footer-newsletter-form button:hover { background: var(--primary-dark); }

.footer-bottom {
    border-top: 1px solid #333;
    padding: 14px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
    color: #666;
}
.footer-legal { display: flex; gap: 15px; }
.footer-legal a { color: #888; }
.footer-legal a:hover { color: #fff; }
.footer-payments { display: flex; align-items: center; gap: 4px; }
.footer-payments span { background: #333; padding: 3px 8px; font-size: 11px; color: #aaa; font-weight: 600; }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.hidden { display: none; }

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
}
.empty-state h2 { font-size: 18px; margin-bottom: 6px; color: var(--text); }
.empty-state p { margin-bottom: 14px; font-size: 14px; }

.page-header { padding: 14px 0; margin-bottom: 0; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header p { color: var(--text-light); margin-top: 3px; font-size: 13px; }

/* ===== FEATURES GRID ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 20px 16px;
    text-align: center;
}
.feature-card:hover { border-color: var(--primary); }
.feature-card-icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}
.feature-card h3 { font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.feature-card p { font-size: 12px; color: var(--text-light); line-height: 1.5; }

/* ===== COMPARE ===== */
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th { padding: 8px 10px; text-align: left; background: var(--bg-light); border: 1px solid var(--border); font-weight: 600; width: 140px; }
.compare-table td { padding: 8px 10px; border: 1px solid var(--border); vertical-align: top; }
.compare-table img { max-height: 120px; margin: 0 auto; }

/* ===== WISHLIST ===== */
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .product-grid-5, .product-grid-home { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .checkout-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .spotlight-banner { padding: 35px 30px; gap: 30px; }
    .spotlight-logo { height: 110px; }
    .spotlight-deals { grid-template-columns: repeat(3, 1fr); }
    .carousel-card { flex: 0 0 calc((100% - 24px) / 4); }
    .subcat-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

@media (max-width: 768px) {
    body { font-size: 13px; }
    .container { padding: 0 10px; }
    .top-bar-text { display: none; }
    .header-action-link { display: none; }
    .mobile-menu-btn { display: flex; }
    .search-bar { max-width: none; }
    .nav-quick-links { display: none; }
    .mega-menu-btn { font-size: 12px; padding: 9px 14px; }
    .mega-menu-panel { flex-direction: column; max-height: 85vh; }
    .mega-menu-categories { width: 100%; min-width: auto; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--border); }
    .mega-menu-subcats { max-height: 45vh; }
    .mega-sub-grid { grid-template-columns: 1fr; }
    .spotlight-banner { padding: 24px 20px; flex-direction: column; gap: 15px; text-align: center; }
    .spotlight-logo { height: 80px; }
    .spotlight-banner h1 { font-size: 22px; }
    .spotlight-actions { justify-content: center; }
    .spotlight-deals { grid-template-columns: 1fr; }
    .product-grid-home { grid-template-columns: repeat(2, 1fr); }
    .category-grid-home { grid-template-columns: repeat(3, 1fr); }
    .brands-grid { grid-template-columns: repeat(3, 1fr); }
    .trust-grid { flex-wrap: wrap; gap: 10px; }
    .trust-item { flex: 1 1 45%; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid, .product-grid-5 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-detail-grid { grid-template-columns: 1fr; }
    .products-layout { flex-direction: column; }
    .category-sidebar { width: 100%; }
    .cart-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .account-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .product-card-actions { opacity: 1; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 5px; }
    .carousel-card { flex: 0 0 calc((100% - 12px) / 2.3); min-width: 160px; }
    .deals-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .subcat-grid { grid-template-columns: repeat(2, 1fr); }
    .products-toolbar { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid, .product-grid-5 { grid-template-columns: 1fr 1fr; gap: 6px; }
    .product-card-body { padding: 8px; }
    .price-current { font-size: 16px; }
    .spotlight-banner h1 { font-size: 20px; }
    .spotlight-logo { height: 60px; }
    .category-grid-home { grid-template-columns: repeat(2, 1fr); }
    .brands-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== ADMIN ===== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px;
    background: var(--bg-dark);
    color: #ccc;
    padding: 20px 0;
    flex-shrink: 0;
}
.admin-sidebar h2 { color: #fff; font-size: 15px; padding: 0 16px 16px; border-bottom: 1px solid #333; margin-bottom: 10px; }
.admin-nav { list-style: none; }
.admin-nav li a {
    display: block;
    padding: 10px 16px;
    color: #aaa;
    font-size: 13px;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.admin-nav li a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-nav li a.active { color: #fff; background: rgba(255,255,255,0.08); border-left-color: var(--primary); }
.admin-main { flex: 1; padding: 20px 30px; background: var(--bg-light); min-width: 0; }
.admin-main h1 { font-size: 22px; margin-bottom: 16px; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.admin-stat-card { background: #fff; border: 1px solid var(--border); padding: 16px; }
.admin-stat-card h3 { font-size: 12px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.admin-stat-card .stat-value { font-size: 24px; font-weight: 700; color: var(--text); }

.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); }
.admin-table th { text-align: left; padding: 10px 12px; background: var(--bg-light); border-bottom: 2px solid var(--border); font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text-light); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); font-size: 13px; vertical-align: middle; }
.admin-table tr:hover { background: var(--bg-light); }

.admin-actions { display: flex; gap: 4px; }
.admin-actions a, .admin-actions button { font-size: 12px; padding: 4px 8px; border-radius: var(--radius); text-decoration: none; }
.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius);
}
.admin-badge-success { background: var(--green-light); color: var(--green); }
.admin-badge-warning { background: #fff8e1; color: var(--warning); }
.admin-badge-danger { background: #ffebee; color: var(--danger); }
.admin-badge-info { background: #e3f2fd; color: #1565c0; }
