/* ============================================================
   JagBuddies — Takealot-Style E-Commerce
   Light theme with blue primary (#0b79bf)
   Clean, modern, professional design
   ============================================================ */

/* --- Design Tokens --- */
:root {
    --bg-deep: #f5f5f5;
    --bg-primary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --bg-surface: #f8f9fa;
    --bg-elevated: #ffffff;
    --bg-secondary: #f0f2f5;

    --accent: #0b79bf;
    --accent-bright: #0d8ad6;
    --accent-dim: #096da8;
    --accent-glow: rgba(11, 121, 191, 0.08);
    --accent-glow-strong: rgba(11, 121, 191, 0.15);

    --deal-red: #e65163;

    --text-primary: #1a1a2e;
    --text-secondary: #444444;
    --text-muted: #6b7280;
    --text-on-accent: #ffffff;

    --border: #e0e0e0;
    --border-accent: rgba(11, 121, 191, 0.25);
    --border-hover: #ccc;

    --success: #27ae60;
    --error: #e65163;
    --info: #0b79bf;

    --radius: 6px;
    --radius-lg: 10px;
    --radius-xl: 12px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-accent: 0 4px 12px rgba(11,121,191,0.15);

    --header-h: 112px;
    --header-top-h: 64px;
    --header-nav-h: 48px;
    --max-w: 1320px;

    --font: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Barlow Condensed', 'Barlow', sans-serif;

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Accessibility --- */
.skip-link { position: absolute; top: -50px; left: 0; background: var(--accent); color: #fff; padding: 8px 16px; z-index: 10000; font-size: 0.85rem; font-weight: 600; transition: top 0.2s; }
.skip-link:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

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

body {
    font-family: var(--font);
    font-weight: 400;
    background: var(--bg-deep);
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: var(--header-h);
    font-size: 15px;
    letter-spacing: 0.01em;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

body > * { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent-bright); }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    color: var(--text-primary);
    line-height: 1.25;
    font-weight: 700;
}

h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

h1 span, h2 span, .text-accent { color: var(--accent); }

ul, ol { list-style: none; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 0; }
.section-title {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    margin-bottom: 24px;
    position: relative;
    font-weight: 700;
    color: var(--text-primary);
}
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}
.section-title.text-left::after { margin-left: 0; }

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-title-inline {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.section-title-inline::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--accent);
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 2px;
}
.view-all-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.view-all-link:hover { text-decoration: underline; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }
.btn-block { display: block; width: 100%; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    line-height: 1.2;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--accent-bright);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}

.btn-secondary, .btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover, .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 0.95rem; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #d14050; }

/* ============================================================
   HEADER — Two-tier Takealot style
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* --- Top Bar (blue) --- */
.header-top {
    background: var(--accent);
    height: var(--header-top-h);
}
.header-top-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    display: flex;
    align-items: center;
    height: 100%;
    gap: 20px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.header-logo img { height: 36px; width: auto; }
.logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.logo-text span { color: rgba(255,255,255,0.75); }

/* Search bar */
.header-search-bar {
    flex: 1;
    max-width: 560px;
    display: none;
    align-items: center;
    height: 40px;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
}
.search-category-select {
    height: 100%;
    border: none;
    background: #f0f2f5;
    padding: 0 12px;
    font-size: 0.8rem;
    font-family: var(--font);
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    border-right: 1px solid #ddd;
    min-width: 130px;
}
.header-search-bar input {
    flex: 1;
    height: 100%;
    border: none;
    padding: 0 14px;
    font-size: 0.88rem;
    font-family: var(--font);
    color: var(--text-primary);
    outline: none;
    background: transparent;
}
.header-search-bar input::placeholder { color: #999; }
.header-search-btn {
    height: 100%;
    width: 48px;
    border: none;
    background: var(--accent-dim);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.header-search-btn:hover { background: #085a8a; }

/* Barcode scan button — sits between input and search button in header & mobile search */
.header-scan-btn {
    height: 100%;
    width: 44px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
}
.header-scan-btn:hover { color: var(--accent); background: var(--bg-surface); }
.mobile-scan-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s;
}
.mobile-scan-btn:hover { color: var(--accent); }

/* Header actions */
.header-top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    flex-shrink: 0;
}

.header-account-btn {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-account-btn:hover { color: #fff !important; }
.header-account-btn svg { stroke: rgba(255,255,255,0.85); }
.header-account-btn:hover svg { stroke: #fff; }

.cart-btn {
    position: relative;
    font-size: 20px;
    color: rgba(255,255,255,0.85);
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.2s;
    line-height: 1;
}
.cart-btn:hover { color: #fff; }

.cart-badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    background: var(--deal-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    transform: scale(0);
    transition: transform 0.3s var(--ease-out);
}
.cart-badge.visible { transform: scale(1); }

/* --- Navigation Bar (white) --- */
.header-nav-bar {
    background: #fff;
    height: var(--header-nav-h);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid var(--border);
    display: none;
}
.header-nav-bar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
}

#dept-all-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 100%;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    border-right: 1px solid var(--border);
    white-space: nowrap;
}
#dept-all-btn:hover { color: var(--accent); }
#dept-all-btn svg { flex-shrink: 0; }

#header-dept-nav {
    display: flex;
    align-items: center;
    height: 100%;
    overflow: hidden;
}
#header-dept-nav a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
#header-dept-nav a:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

/* --- Mega Menu --- */
.mega-menu {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 999;
    max-height: 80vh;
}
.mega-menu.open { display: block; }
.mega-menu-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px 1fr auto;
    min-height: 300px;
}
.mega-menu-ad {
    width: 220px;
    border-left: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.mega-menu-ad > a { display: block; position: absolute; inset: 0; z-index: 1; }
.mega-menu-ad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mega-menu-ad-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 24px 14px 14px;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.85) 100%);
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}
.mega-menu-ad-content a { pointer-events: auto; }
.mega-menu-ad-title { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.mega-menu-ad-text { font-size: 0.72rem; color: rgba(255,255,255,0.85); margin-bottom: 8px; }
.mega-menu-ad-btn { display: inline-block; padding: 5px 14px; background: #fff; color: #0b79bf; font-size: 0.7rem; font-weight: 700; border-radius: 5px; text-decoration: none; }
.mega-menu-depts {
    background: #f8f9fa;
    border-right: 1px solid var(--border);
    padding: 8px 0;
    overflow-y: auto;
}
.mega-dept-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.1s;
    gap: 8px;
}
.mega-dept-item:hover,
.mega-dept-item.active {
    background: #fff;
    color: var(--accent);
    font-weight: 600;
}
.mega-dept-item a {
    color: inherit;
    flex: 1;
    text-decoration: none;
}
.mega-menu-cats {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 24px;
    align-content: start;
    overflow-y: auto;
}
.mega-cat-group h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}
.mega-cat-group h4 a { color: inherit; }
.mega-cat-group h4 a:hover { color: var(--accent); }
.mega-cat-group a {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 3px 0;
    transition: color 0.1s;
}
.mega-cat-group a:hover { color: var(--accent); }

/* Mobile menu button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 1px;
    transition: all 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-top-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    z-index: 999;
    padding: 0;
    max-height: calc(100vh - var(--header-top-h));
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(0,0,0,0.14);
}
.mobile-menu.open { display: block; animation: slideDown 0.3s var(--ease-out); }

/* User block — shown when logged in */
.mm-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.mm-user::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 65%);
    pointer-events: none;
}
.mm-user-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: var(--font-display);
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.35);
    position: relative;
}
.mm-user-info { flex: 1; min-width: 0; position: relative; }
.mm-user-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}
.mm-user-sub {
    font-size: 0.76rem;
    opacity: 0.85;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm-user-cta {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: background 0.2s, transform 0.15s;
}
.mm-user-cta:hover { background: rgba(255,255,255,0.3); transform: translateX(2px); }

/* Search row */
.mobile-search {
    position: relative;
    padding: 14px 18px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}
.mobile-search svg {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.mobile-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.mobile-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Nav sections */
.mobile-menu nav { padding: 8px 10px 22px; }
.mm-section { padding: 6px 0; }
.mm-section + .mm-section {
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 10px;
}
.mm-section-title {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    padding: 4px 12px 8px;
}
.mobile-menu nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s, transform 0.1s;
    position: relative;
    text-decoration: none;
}
.mobile-menu nav a svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.15s, transform 0.2s;
}
.mobile-menu nav a svg:first-child { width: 18px; height: 18px; }
.mobile-menu nav a > span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mobile-menu nav a:hover {
    background: var(--accent-glow);
    color: var(--accent);
}
.mobile-menu nav a:hover svg { color: var(--accent); }
.mobile-menu nav a:active { transform: scale(0.98); }
.mobile-menu nav a:hover .mm-chev { transform: translateX(3px); }

/* Variants */
.mobile-menu nav a.mm-accent {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 700;
}
.mobile-menu nav a.mm-accent svg { color: var(--accent); }
.mobile-menu nav a.mm-accent:hover {
    background: var(--accent-glow-strong);
}
.mobile-menu nav a.mm-primary {
    background: var(--accent);
    color: #fff;
    justify-content: center;
    margin: 6px 0 2px;
    box-shadow: var(--shadow-accent, 0 4px 12px rgba(11,121,191,0.22));
}
.mobile-menu nav a.mm-primary svg { color: #fff; }
.mobile-menu nav a.mm-primary:hover {
    background: var(--accent-bright);
    color: #fff;
}
.mobile-menu nav a.mm-primary:hover svg { color: #fff; }
.mobile-menu nav a.mm-danger {
    color: var(--error);
}
.mobile-menu nav a.mm-danger svg { color: var(--error); }
.mobile-menu nav a.mm-danger:hover {
    background: rgba(230,81,99,0.08);
    color: var(--error);
}
.mobile-menu nav a.mm-danger:hover svg { color: var(--error); }

/* Cart badge */
.mm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--deal-red, #e65163);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 0;
    margin-left: auto;
    flex-shrink: 0;
}
.mm-chev {
    opacity: 0.7;
    margin-left: auto;
    transition: transform 0.2s;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, #0b79bf 0%, #064d7a 100%);
    padding: 60px 0 50px;
    min-height: 340px;
    overflow: hidden;
}
.hero-content { position: relative; z-index: 2; max-width: 560px; }
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.25);
}
.hero h1 { color: #fff; margin-bottom: 12px; font-weight: 800; }
.hero h1 span { color: rgba(255,255,255,0.85); }
.hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    max-width: 480px;
    margin-bottom: 24px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--accent); }
.hero .btn-primary:hover { background: #f0f0f0; }
.hero .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.4); }
.hero .btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.hero-with-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-with-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(11,121,191,0.9) 0%, rgba(11,121,191,0.6) 50%, rgba(11,121,191,0.3) 100%);
    z-index: 1;
}
.hero-decoration { display: none; }

/* Hero Slider */
.hero-slider { position: relative; }
.hero-slide { display: none; animation: heroFadeIn 0.6s ease; }
.hero-slide.active { display: block; }
@keyframes heroFadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.hero-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.hero-slider-dot.active { background: #fff; transform: scale(1.2); }
.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.hero-slider-arrow:hover { background: rgba(255,255,255,0.4); }
.hero-slider-arrow.prev { left: 20px; }
.hero-slider-arrow.next { right: 20px; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs { padding: 16px 0; }
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.breadcrumbs li::after { content: '/'; margin-left: 6px; opacity: 0.4; }
.breadcrumbs li:last-child::after { display: none; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .current { color: var(--text-primary); font-weight: 500; }

/* ============================================================
   SHOP LAYOUT
   ============================================================ */
.shop-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 48px;
}

.shop-sidebar { display: none; }
.shop-sidebar.open {
    display: block;
    position: fixed;
    top: var(--header-top-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}

.sidebar-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
}
.sidebar-section h3 {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: var(--text-primary);
}
.sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    color: var(--text-secondary);
    font-size: 0.83rem;
    border-radius: var(--radius);
    transition: all 0.15s;
}
.sidebar-list a:hover { background: var(--accent-glow); color: var(--accent); }
.sidebar-list a.active { color: var(--accent); background: var(--accent-glow); font-weight: 600; }
.sidebar-list .count {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 2px 8px;
    border-radius: 10px;
}

.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-family: var(--font);
    outline: none;
}
.price-range input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.price-range span { color: var(--text-muted); font-size: 0.8rem; }

/* Brand filter */
.brand-filter-list { max-height: 200px; overflow-y: auto; }
.brand-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.83rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.brand-filter-item input { accent-color: var(--accent); }

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}
.result-count { font-size: 0.82rem; color: var(--text-muted); }
.filter-toggle { display: inline-flex; }

.view-btns { display: flex; gap: 4px; }
.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.view-btn.active, .view-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

#sort-select {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 9px 14px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-family: var(--font);
    cursor: pointer;
    outline: none;
}
#sort-select:focus { border-color: var(--accent); }

/* ============================================================
   PRODUCT GRID & CARDS
   ============================================================ */
.brand-header { margin-bottom: 20px; }
.brand-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.brand-header-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.brand-header-info { flex: 1; }
.brand-header-name { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.brand-header-desc { font-size: 0.85rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.brand-header-article { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s var(--ease);
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-card-image {
    display: block;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
}
.product-card-image img, .product-card-image .lazy {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.4s var(--ease);
}
.product-card:hover .product-card-image img { transform: scale(1.04); }

.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    font-size: 2.5rem;
    opacity: 0.2;
}

.product-card-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card-name { margin-bottom: 4px; }
.product-card-name a {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.product-card-name a:hover { color: var(--accent); }

.product-card-brand {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.product-brand-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
    opacity: 0.7;
}
.product-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: auto;
    margin-bottom: 10px;
}
.product-card-price .original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    margin-left: 6px;
}

.product-card .btn { width: 100%; padding: 9px; font-size: 0.78rem; }

/* Badge on product card */
.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    z-index: 5;
}
.badge-accent { background: var(--accent); color: #fff; }
.badge-deal { background: var(--deal-red); color: #fff; }
.badge-instock { background: #e8f5e9; color: #27ae60; font-size: 0.65rem; }
.badge-used { background: #fff3e0; color: #e65100; }

/* List view */
.product-grid.product-list { grid-template-columns: 1fr; }
.product-grid.product-list .product-card { flex-direction: row; max-height: 160px; }
.product-grid.product-list .product-card-image { width: 160px; flex-shrink: 0; aspect-ratio: auto; height: 160px; }
.product-grid.product-list .product-card-body { flex: 1; padding: 14px 18px; }

/* ============================================================
   DEPARTMENT GRID (Homepage)
   ============================================================ */
.department-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.dept-card {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
    text-decoration: none;
}
.dept-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.dept-card-image {
    aspect-ratio: 1;
    background: #f9f9f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dept-card-image img { width: 100%; height: 100%; object-fit: cover; }
.dept-card-image-placeholder { background: #f0f2f5; }
.dept-card-body { padding: 10px 12px 12px; }
.dept-card-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.dept-card-count { font-size: 0.72rem; color: var(--accent); font-weight: 600; }
.dept-card-cats { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.dept-card-cat-pill {
    font-size: 0.65rem;
    padding: 2px 8px;
    background: var(--accent-glow);
    border: 1px solid rgba(11,121,191,0.12);
    border-radius: 20px;
    color: var(--accent);
}
/* Legacy class compat */
.department-card { display: none; }

/* ============================================================
   DEALS SECTION
   ============================================================ */
.deals-section { background: #fff; padding: 32px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.deals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ============================================================
   BRANDS
   ============================================================ */
.brands-section { background: var(--bg-secondary); }
.brands-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.2s var(--ease);
}
.brand-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.brand-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.brand-item:hover .brand-name { color: var(--accent); }
.brand-tag { font-size: 0.72rem; color: var(--text-muted); }
.brand-logo {
    width: 100%;
    max-width: 100px;
    height: 40px;
    object-fit: contain;
    filter: grayscale(0.5);
    transition: filter 0.3s var(--ease);
}
.brand-item:hover .brand-logo { filter: grayscale(0); }

/* Brands Page */
.brands-page-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.brand-page-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease);
}
.brand-page-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.brand-page-card:hover .brand-page-name { color: var(--accent); }
.brand-page-initial {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--accent);
}
.brand-page-logo { width: 100%; max-width: 80px; height: 52px; object-fit: contain; }
.brand-page-name { font-weight: 700; font-size: 0.85rem; transition: color 0.2s; color: var(--text-primary); }
.brand-page-count { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }

/* ============================================================
   COMPETITION CARDS
   ============================================================ */
.competition-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

.competition-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s var(--ease);
    position: relative;
}
.competition-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-bright));
    z-index: 2;
}
.competition-card:hover { border-color: var(--border); box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.competition-card-image { display: block; position: relative; aspect-ratio: 16/10; overflow: hidden; background: #fff; }
.competition-card-image img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.competition-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.competition-card-body { padding: 20px; }
.competition-card-name { margin-bottom: 14px; }
.competition-card-name a { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.competition-card-name a:hover { color: var(--accent); }

.competition-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.competition-price { font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.competition-price small { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

.competition-countdown, .countdown { display: flex; gap: 6px; }
.countdown-unit {
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
    min-width: 46px;
}
.countdown-number { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); display: block; line-height: 1; }
.countdown-label { font-size: 0.58rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px; display: block; }

.progress-bar { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); border-radius: 3px; transition: width 1s var(--ease-out); }
.progress-text { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 16px; }

.competition-card .btn { width: 100%; }

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 0 48px;
}

.product-image-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }

.product-info h1 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-bottom: 8px; }
.product-info .product-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.product-info .product-sku {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.stock-status.in-stock { background: #e8f5e9; color: var(--success); }
.stock-status.out-of-stock { background: #fce4ec; color: var(--error); }

.product-description { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; margin-bottom: 24px; }

/* Product Tabs */
.pdp-tabs { border-bottom: 2px solid #eee; margin-bottom: 24px; display: flex; gap: 0; }
.pdp-tab {
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    border-left: none;
    border-top: none;
    border-right: none;
    transition: all 0.15s;
}
.pdp-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.pdp-tab:hover { color: var(--text-primary); }
.pdp-tab-panel { display: none; }
.pdp-tab-panel.active { display: block; }

.product-specs {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.product-specs .spec-row {
    display: flex;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}
.product-specs .spec-row:last-child { border-bottom: none; }
.product-specs .spec-row:nth-child(even) { background: #fafafa; }
.product-specs .spec-label {
    width: 140px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
}
.product-specs .spec-value { color: var(--text-primary); }

.qty-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.qty-controls input {
    width: 70px;
    text-align: center;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font);
    outline: none;
}
.qty-controls input:focus { border-color: var(--accent); }
.qty-controls .btn { flex: 1; }

/* ============================================================
   CART
   ============================================================ */
.cart-page { padding: 24px 0 48px; }
.cart-empty { text-align: center; padding: 48px 20px; }
.cart-empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.cart-item:hover { border-color: var(--border); }

.cart-item-image { width: 80px; height: 80px; border-radius: var(--radius); background: #fff; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid #eee; }
.cart-item-image img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cart-item-image .placeholder-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-muted); }

.cart-item-details { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cart-item-name { font-weight: 600; color: var(--text-primary); font-size: 0.92rem; line-height: 1.3; }
.cart-item-type { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-weight: 600; }
.cart-item-bottom { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cart-item-price { font-weight: 700; color: var(--text-primary); font-size: 1rem; white-space: nowrap; }
.cart-item-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.75rem; padding: 4px 8px; transition: color 0.2s; font-family: var(--font); }
.cart-item-remove:hover { color: var(--error); }

.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.qty-control button { width: 34px; height: 34px; background: transparent; border: none; color: var(--text-primary); font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.qty-control button:hover { background: var(--accent-glow); color: var(--accent); }
.qty-control input { width: 44px; text-align: center; padding: 6px 2px; background: #fff; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); color: var(--text-primary); font-size: 0.9rem; font-family: var(--font); outline: none; -moz-appearance: textfield; }
.qty-control input::-webkit-inner-spin-button, .qty-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.cart-summary {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9rem; color: var(--text-secondary); }
.cart-summary-row.total { border-top: 2px solid var(--border); margin-top: 8px; padding-top: 14px; font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.cart-summary-row.total .amount { color: var(--text-primary); }
.cart-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.cart-actions .btn { flex: 1; min-width: 160px; }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 24px 0 48px; }

.form-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.form-section h2 { font-size: 1rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #eee; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #bbb; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.radio-group { display: flex; gap: 12px; }
.radio-option { flex: 1; position: relative; }
.radio-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.radio-option input:checked + label { border-color: var(--accent); background: var(--accent-glow); color: var(--accent); }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-section { background: var(--bg-secondary); }
.newsletter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    padding: 36px 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.newsletter-content { flex: 1; }
.newsletter-content h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.newsletter-content h2 span { color: var(--accent); }
.newsletter-content p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; max-width: 440px; }
.newsletter-form { display: flex; gap: 10px; width: 100%; max-width: 420px; flex-shrink: 0; }
.newsletter-input {
    flex: 1;
    padding: 11px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}
.newsletter-input:focus { border-color: var(--accent); }
.newsletter-input::placeholder { color: #bbb; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 48px 0 0;
    margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }

.footer-section h3 { font-size: 0.88rem; margin-bottom: 14px; color: #fff; }
.footer-section p { font-size: 0.83rem; color: #999; line-height: 1.6; }

.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: #999;
    transition: all 0.2s;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-social a svg { width: 16px; height: 16px; }
.footer-payfast { margin-top: 14px; }
.payfast-badge { height: 32px; width: auto; opacity: 0.7; border-radius: 4px; }

.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { font-size: 0.83rem; color: #999; transition: all 0.15s; }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }

.footer-contact-item { display: flex; gap: 10px; margin-bottom: 10px; font-size: 0.83rem; color: #999; }
.footer-contact-item .icon { width: 20px; flex-shrink: 0; text-align: center; font-size: 0.9rem; }

.footer-newsletter-form { display: flex; gap: 8px; margin-top: 10px; }
.footer-newsletter-form input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    border-radius: var(--radius);
    font-size: 0.83rem;
    font-family: var(--font);
    outline: none;
}
.footer-newsletter-form input:focus { border-color: var(--accent); }
.footer-newsletter-form input::placeholder { color: #666; }
.footer-newsletter-form button {
    padding: 10px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.footer-newsletter-form button:hover { background: var(--accent-bright); }

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.78rem;
    color: #666;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: #666; font-size: 0.78rem; }
.footer-bottom-links a:hover { color: var(--accent); }

.powered-by { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 0 8px; margin-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.powered-by-inner { display: flex; align-items: center; gap: 10px; }
.powered-by-logo { height: 28px; width: auto; opacity: 0.5; transition: opacity 0.3s; }
.powered-by:hover .powered-by-logo { opacity: 0.8; }
.powered-by-text-block { display: flex; align-items: baseline; gap: 6px; }
.powered-by-text { font-size: 0.68rem; color: #555; }
.powered-by-brand { font-weight: 800; font-size: 0.85rem; color: var(--accent); letter-spacing: 0.04em; }
.powered-by-sub { font-size: 0.68rem; color: #555; }
.powered-by-tagline { font-size: 0.6rem; color: #444; opacity: 0.6; letter-spacing: 0.06em; text-transform: uppercase; }

/* ============================================================
   UTILITIES
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s var(--ease);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Toast */
.toast-container {
    position: fixed;
    top: calc(var(--header-top-h) + 12px);
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}
.toast.removing { animation: toastSlideOut 0.3s ease forwards; }
.toast-success, .toast.success { border-left: 3px solid var(--success); }
.toast-error, .toast.error { border-left: 3px solid var(--error); }
.toast-warning { border-left: 3px solid #f59e0b; }
.toast-info { border-left: 3px solid var(--info); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info .toast-icon { color: var(--info); }
.toast-close { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 0 0 0 8px; line-height: 1; }
.toast-close:hover { color: var(--text-primary); }
@keyframes toastSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastSlideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* Skeleton Loader */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite ease-in-out;
    border-radius: var(--radius);
}
.skeleton-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
}
.skeleton-img {
    aspect-ratio: 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite ease-in-out;
}
.skeleton-text {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite ease-in-out;
    margin-bottom: 8px;
}
.skeleton-text.w-60 { width: 60%; }
.skeleton-text.w-40 { width: 40%; }
.skeleton-text.w-80 { width: 80%; }
.skeleton-text.h-lg { height: 18px; }
.skeleton-pill {
    display: inline-block;
    width: 60px;
    height: 20px;
    border-radius: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite ease-in-out;
}

/* Spinner */
.spinner { width: 32px; height: 32px; border: 3px solid #eee; border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-sm { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(0,0,0,0.1); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }

.loading-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 48px 0; color: var(--text-muted); font-size: 0.85rem; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; padding: 24px 0; }
.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* About / Contact */
.about-section, .contact-section { padding: 36px 0; }
.about-grid, .features-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.feature-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: all 0.2s var(--ease);
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-card-icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p { font-size: 0.83rem; color: var(--text-muted); }

/* Shop Page Title */
.shop-page-title { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 700; margin-bottom: 20px; }

/* Page Hero (brands, about) */
.page-hero { background: var(--accent); padding: 36px 0; color: #fff; margin-bottom: 24px; }
.page-hero h1 { color: #fff; margin-bottom: 6px; }
.page-hero p { color: rgba(255,255,255,0.8); font-size: 0.92rem; }
.page-hero .breadcrumb, .page-hero .breadcrumbs { padding: 0; margin-bottom: 12px; }
.page-hero .breadcrumbs a { color: rgba(255,255,255,0.7); }
.page-hero .breadcrumbs .current { color: #fff; }

/* About Hero */
.about-hero { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.about-story { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; }

/* Page Content (DB-driven content blocks) */
.page-content { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; padding: 24px 0; }
.page-content h1, .page-content h2, .page-content h3 { margin: 20px 0 10px; }
.page-content p { margin-bottom: 14px; }
.page-content ul, .page-content ol { margin-bottom: 14px; padding-left: 24px; list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content a { color: var(--accent); }
.page-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.page-content table td, .page-content table th { padding: 10px 14px; border: 1px solid var(--border); font-size: 0.85rem; }

/* Feature Grid (about page) */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* Contact Page */
.contact-form { max-width: 640px; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.contact-info-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.contact-info-card h3 { margin-bottom: 16px; }
.contact-info-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: 0.88rem; color: var(--text-secondary); }
.contact-info-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-glow); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.contact-info-text { flex: 1; }

/* Checkout Page */
.checkout-page { padding: 24px 0 48px; }
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.checkout-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.checkout-section h2 { font-size: 1rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #eee; }

/* Global form classes (outside auth context) */
.form-input { width: 100%; padding: 11px 14px; background: #fff; border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius); font-size: 0.88rem; font-family: var(--font); outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: #bbb; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-select { width: 100%; padding: 11px 14px; background: #fff; border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius); font-size: 0.88rem; font-family: var(--font); outline: none; cursor: pointer; }
.form-select:focus { border-color: var(--accent); }
.form-textarea { width: 100%; padding: 11px 14px; background: #fff; border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius); font-size: 0.88rem; font-family: var(--font); outline: none; resize: vertical; min-height: 100px; }
.form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Order Summary Item */
.order-summary-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 0.88rem; color: var(--text-secondary); }
.order-summary-item .item-name { flex: 1; }
.order-summary-item .item-qty { color: var(--text-muted); margin: 0 12px; }

/* Badges */
.badge-error { background: var(--error); color: #fff; }

/* Breadcrumb singular (compat) */
.breadcrumb { padding: 16px 0; font-size: 0.8rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 4px; }

/* Featured grid */
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

/* Competition Detail */
.competition-detail { padding: 24px 0 48px; }
.competition-detail-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.competition-detail-image { border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.competition-detail-image img { width: 100%; height: auto; display: block; object-fit: contain; padding: 16px; max-height: 500px; }
.competition-detail-image .placeholder-img { min-height: 350px; display: flex; align-items: center; justify-content: center; font-size: 5rem; color: var(--text-muted); background: var(--bg-surface); }
.competition-detail-info { display: flex; flex-direction: column; }
.competition-detail-info .badge { position: static; display: inline-block; width: fit-content; margin-bottom: 12px; }
.competition-detail-info h1 { margin-bottom: 8px; }
.competition-detail-countdown { margin: 16px 0; }
.competition-detail-countdown h4 { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }

.competition-detail-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.stat-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 12px; text-align: center; }
.stat-card:hover { border-color: var(--accent); }
.stat-value { font-size: 1.2rem; font-weight: 800; color: var(--accent); display: block; line-height: 1.2; }
.stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; display: block; }

.competition-detail .progress-bar { height: 8px; margin-bottom: 6px; }
.competition-detail .progress-text { margin-bottom: 16px; }

.ticket-selector { margin-bottom: 14px; }
.ticket-selector select {
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.92rem;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.ticket-selector select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.competition-detail-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 24px 0 48px; }
.competition-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.competition-stat { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 12px; text-align: center; }
.competition-stat-value { font-size: 1.2rem; font-weight: 800; color: var(--accent); display: block; }
.competition-stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; display: block; }

.competition-rules { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-top: 20px; }
.competition-rules h3 { margin-bottom: 14px; font-size: 0.9rem; }
.competition-rules ol { padding-left: 20px; list-style: decimal; }
.competition-rules li { margin-bottom: 6px; font-size: 0.83rem; color: var(--text-muted); }

/* Order Steps */
.order-step { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.order-step-number { width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.order-step-text h4 { font-size: 0.9rem; margin-bottom: 2px; }
.order-step-text p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* Order Complete */
.order-complete { text-align: center; padding: 48px 0; max-width: 560px; margin: 0 auto; }
.order-complete .success-icon { font-size: 3.5rem; margin-bottom: 20px; }
.order-complete h1 { margin-bottom: 12px; }

/* ============================================================
   AUTH & ACCOUNT
   ============================================================ */
.auth-container { max-width: 460px; margin: 48px auto; padding: 0 20px; }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.auth-title { font-size: 1.6rem; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 28px; font-size: 0.88rem; }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form .form-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.auth-form .form-input { width: 100%; padding: 11px 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-primary); font-size: 0.88rem; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.auth-form .form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.auth-form .form-input::placeholder { color: #bbb; }
.auth-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-link:hover { text-decoration: underline; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin: 18px 0; }

.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; max-width: 1100px; margin: 32px auto; padding: 0 20px; }
.account-sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; height: fit-content; }
.account-nav-item { display: block; width: 100%; padding: 9px 14px; border-radius: var(--radius); font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); text-decoration: none; transition: all 0.15s; cursor: pointer; border: none; background: none; text-align: left; }
.account-nav-item:hover { background: var(--bg-surface); color: var(--text-primary); }
.account-nav-item.active { background: var(--accent-glow); color: var(--accent); }
.account-content { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; min-height: 360px; }
.order-history-item { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.order-history-item:hover { border-color: var(--accent); }

.header-account-btn:hover { color: #fff !important; }
.header-account-btn:hover svg { stroke: #fff; }

/* ============================================================
   RESPONSIVE — Tablet (768px+)
   ============================================================ */
@media (min-width: 768px) {
    .header-nav-bar { display: block; }
    .header-search-bar { display: flex; }
    .mobile-menu-btn { display: none; }

    .shop-layout { grid-template-columns: 220px 1fr; }
    .shop-sidebar { display: block; }
    .filter-toggle { display: none; }

    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .competition-grid { grid-template-columns: repeat(2, 1fr); }
    .product-detail { grid-template-columns: 1fr 1fr; }
    .checkout-layout { grid-template-columns: 1.2fr 0.8fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-grid { grid-template-columns: repeat(3, 1fr); }
    .about-grid, .features-grid, .feature-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-grid { grid-template-columns: 1fr 1fr; }
    .checkout-grid { grid-template-columns: 1.2fr 0.8fr; }
    .department-grid { grid-template-columns: repeat(4, 1fr); }
    .competition-detail-grid { grid-template-columns: 1fr 1fr; }
    .competition-detail-layout { grid-template-columns: 1fr 1fr; }
    .competition-detail-stats { grid-template-columns: repeat(4, 1fr); }
    .competition-stats { grid-template-columns: repeat(4, 1fr); }
    .deals-grid { grid-template-columns: repeat(3, 1fr); }
    .brands-strip { grid-template-columns: repeat(3, 1fr); }
    .brands-page-grid { grid-template-columns: repeat(3, 1fr); }

    .hero { padding: 80px 0 70px; min-height: 380px; }

    .footer-bottom { flex-direction: row; justify-content: space-between; }
    .cart-item { grid-template-columns: 100px 1fr; }

    .newsletter-box { flex-direction: row; text-align: left; padding: 40px 48px; }

    .mega-menu-cats { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   RESPONSIVE — Desktop (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
    .shop-layout { grid-template-columns: 240px 1fr; }
    .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .featured-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
    .deals-grid { grid-template-columns: repeat(6, 1fr); }
    .brands-strip { grid-template-columns: repeat(5, 1fr); }
    .brands-page-grid { grid-template-columns: repeat(4, 1fr); }
    .department-grid { grid-template-columns: repeat(6, 1fr); }

    .container { padding: 0 32px; }
    .header-search-bar { max-width: 560px; }

    .mega-menu-cats { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   RESPONSIVE — Wide (1280px+)
   ============================================================ */
@media (min-width: 1280px) {
    .container { padding: 0 40px; }
    .brands-page-grid { grid-template-columns: repeat(5, 1fr); }
    .hero { padding: 100px 0 90px; min-height: 420px; }
}

/* ============================================================
   MOBILE SEARCH BAR
   ============================================================ */
.mobile-search-bar { display: none; }

/* ============================================================
   MOBILE FILTER DRAWER
   ============================================================ */
.filter-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1001;
}
.filter-drawer-overlay.open { display: block; }
.filter-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: #fff;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.filter-drawer.open { transform: translateX(0); }
.filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.95rem;
}
.filter-drawer-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-surface);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
}
.filter-drawer-close:hover { background: #eee; }
.filter-drawer-body { padding: 12px; }

/* ============================================================
   SEARCH AUTOCOMPLETE
   ============================================================ */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1010;
    max-height: 360px;
    overflow-y: auto;
    display: none;
}
.search-autocomplete.open { display: block; }
.search-ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
    text-decoration: none;
    color: var(--text-primary);
}
.search-ac-item:hover { background: var(--bg-surface); }
.search-ac-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: contain;
    background: #f9f9f9;
    flex-shrink: 0;
}
.search-ac-info { flex: 1; min-width: 0; }
.search-ac-name { font-size: 0.83rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-ac-price { font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.search-ac-footer {
    padding: 10px 14px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
    border-top: 1px solid #eee;
    cursor: pointer;
}
.search-ac-footer:hover { background: var(--accent-glow); }

/* ============================================================
   RECENTLY VIEWED
   ============================================================ */
.recently-viewed { padding: 32px 0; background: #fff; border-top: 1px solid #eee; }
.recently-viewed-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.recently-viewed-grid::-webkit-scrollbar { height: 4px; }
.recently-viewed-grid::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.recently-viewed-grid .product-card { min-width: 180px; max-width: 200px; flex-shrink: 0; }

/* ============================================================
   WISHLIST HEART
   ============================================================ */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    transition: all 0.2s;
    color: #ccc;
    font-size: 14px;
}
.wishlist-btn:hover { color: var(--deal-red); border-color: var(--deal-red); }
.wishlist-btn.active { color: var(--deal-red); background: #fff0f0; border-color: var(--deal-red); }

/* ============================================================
   DELIVERY BANNER
   ============================================================ */
.delivery-banner {
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.delivery-banner a { color: #fff; text-decoration: underline; }

/* ============================================================
   STICKY MOBILE ADD TO CART
   ============================================================ */
.mobile-atc-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    z-index: 900;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.mobile-atc-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: var(--max-w);
    margin: 0 auto;
}
.mobile-atc-price { font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.mobile-atc-bar .btn { flex: 1; }

/* ============================================================
   RESPONSIVE — Mobile overrides
   ============================================================ */
@media (max-width: 767px) {
    :root { --header-h: 108px; --header-top-h: 56px; --header-nav-h: 0px; }
    body { padding-top: var(--header-h); }
    .header-nav-bar { display: none; }
    .header-top { height: var(--header-top-h); }
    .header-top-inner {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        gap: 12px;
    }
    .header-top-actions { gap: 8px; }
    .header-account-btn { padding: 6px; }
    .cart-btn { padding: 6px; }
    .mobile-menu-btn { margin-right: -4px; padding: 8px 4px; }
    .mega-menu { top: var(--header-h); }
    .mobile-menu {
        top: var(--header-h);
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h));
    }
    .header-account-name { display: none; }
    .newsletter-form { flex-direction: column; }
    .account-layout { grid-template-columns: 1fr; }

    /* Mobile search bar below header */
    .mobile-search-bar {
        display: block;
        position: fixed;
        top: var(--header-top-h);
        left: 0;
        right: 0;
        z-index: 999;
        background: #fff;
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
        height: 52px;
    }
    .mobile-search-bar-inner {
        display: flex;
        align-items: center;
        height: 36px;
        background: var(--bg-surface);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        overflow: hidden;
    }
    .mobile-search-bar-inner input {
        flex: 1;
        height: 100%;
        border: none;
        background: transparent;
        padding: 0 12px;
        font-size: 0.88rem;
        font-family: var(--font);
        outline: none;
        color: var(--text-primary);
    }
    .mobile-search-bar-inner input::placeholder { color: #999; }
    .mobile-search-bar-inner button {
        width: 40px;
        height: 100%;
        border: none;
        background: var(--accent);
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile sticky ATC — above footer */
    .mobile-atc-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; }
    .product-detail { padding-bottom: 80px; }
    .site-footer { padding-bottom: 70px; }

    /* Product page mobile padding */
    .container.pdp { padding: 0 16px; }

    /* Product grid 2 col tighter */
    .product-grid { gap: 8px; }
    .product-card-body { padding: 10px 10px 12px; }
    .product-card-name a { font-size: 0.78rem; }
    .product-card-price { font-size: 0.95rem; }

    /* Department cards mobile — 2 columns */
    .department-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .dept-card-body { padding: 8px 8px 10px; }
    .dept-card-name { font-size: 0.72rem; }
    .dept-card-count { font-size: 0.62rem; }
    .dept-card-cats { gap: 3px; }
    .dept-card-cat-pill { font-size: 0.55rem; padding: 1px 5px; }

    /* Recently viewed scroll */
    .recently-viewed-grid .product-card { min-width: 150px; }

    /* Back to top above ATC bar */
    .back-to-top { bottom: 76px; }

    /* Hide mega menu ad on mobile */
    .mega-menu-ad { display: none !important; }

    /* Promo tiles on mobile — 2 cols */
    .promo-tiles-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }

    /* Sidebar ad on mobile */
    .sidebar-ad { margin-top: 0 !important; }
    .sidebar-ad img { max-height: 120px; object-fit: cover; }

    /* Content banner ad on mobile — stack vertically */
    .content-banner-ad { min-height: 120px !important; }
    .content-banner-ad .banner-content { flex-direction: column !important; text-align: center !important; padding: 16px !important; gap: 10px !important; }
    .content-banner-ad .banner-content h4 { font-size: 1rem !important; }
    .content-banner-ad .banner-btn { margin-top: 4px; }
}

/* Print */
@media print {
    .site-header, .site-footer, .back-to-top, .toast-container, .mobile-menu, .mega-menu { display: none !important; }
    body { padding-top: 0; background: #fff; color: #000; }
    .product-card, .competition-card { break-inside: avoid; }
}
