/* ============================================================
   theme.css — Woodview Butchery  |  v3.0
   Loaded LAST — overrides + fills missing classes
   Sections:
     0.  Theme tokens (light/dark)
     1.  Base polish
     2.  Announcement bar
     3.  Header & navigation (all missing classes)
     4.  Mobile nav drawer
     5.  Cart drawer
     6.  Hero & homepage sections
     7.  Product cards (class-name bridge)
     8.  Footer (all missing classes)
     9.  Toasts
    10.  Misc (pagination, tables, floating buttons, map)
    11.  Dark mode surface overrides
    12.  Smooth theme transition
   ============================================================ */

/* ============================================================
   0. THEME TOKENS
   ============================================================ */
:root {
    /* readable gold for text on light surfaces */
    --gold-text:   #7A5C0A;
    --surface:     #FFFFFF;
    --surface-2:   #F7F4EC;
    --surface-3:   #EEE9DC;
    --text:        #1A1A1A;
    --text-soft:   #5A554B;
    --header-bg:   rgba(255, 255, 255, 0.96);
    --focus-ring:  0 0 0 3px rgba(201, 162, 39, 0.35);
    color-scheme:  light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --gold-text:  #E3BF4C;
    --gold-light: #3a3118;
    --white:      #1A1814;
    --off-white:  #100F0D;
    --light:      #23201A;
    --black:      #F4EFE3;
    --dark-grey:  #CFC8B8;
    --mid-grey:   #9C9586;
    --border:     #36322A;
    --surface:    #1A1814;
    --surface-2:  #23201A;
    --surface-3:  #2c2820;
    --text:       #F4EFE3;
    --text-soft:  #B9B2A2;
    --header-bg:  rgba(18, 16, 13, 0.97);
    --shadow-sm:  0 1px 4px rgba(0, 0, 0, 0.5);
    --shadow-md:  0 6px 20px rgba(0, 0, 0, 0.55);
    --shadow-lg:  0 10px 40px rgba(0, 0, 0, 0.65);
}

/* Always-dark sections: restore light-mode token values so they look right */
.announcement-bar,
.site-footer,
.hero-section,
.page-hero,
.wholesale-cta-banner,
.trust-strip,
.map-fallback-card,
.btn-primary,
.btn-secondary,
.floating-contact-btns {
    --white:     #FFFFFF;
    --off-white: #FAF8F4;
    --light:     #F3F0EA;
    --black:     #0D0D0D;
    --dark-grey: #4A4A4A;
    --border:    #E0DBD0;
}

.announcement-bar,
.site-footer,
.hero-section,
.page-hero,
.wholesale-cta-banner,
.map-fallback-card { color: #fff; }

/* ============================================================
   1. BASE POLISH
   ============================================================ */
body {
    background: var(--off-white);
    color: var(--text);
    transition: background-color .25s ease, color .25s ease;
}

a { color: var(--gold-text); }
a:hover { color: var(--gold); }

::selection { background: var(--gold); color: #0D0D0D; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.site-container { max-width: 1240px; }

/* Form controls adapt to dark mode */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #14120F;
    border-color: var(--border);
    color: var(--text);
}
html[data-theme="dark"] ::placeholder { color: #7d776a; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

/* Price colours */
.price-current { color: var(--gold-text); font-weight: 700; }
.price-sale    { color: var(--red); }
html[data-theme="dark"] .price-sale { color: #ff7a82; }

/* Button polish */
.btn { border-radius: 8px; }
.btn-primary {
    box-shadow: 0 2px 10px rgba(201,162,39,.25);
    font-weight: 700;
    letter-spacing: .2px;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201,162,39,.4);
}
.btn-outline { color: var(--gold-text); }
.hero-section .btn-outline,
.wholesale-cta-banner .btn-outline,
.map-fallback-card .btn-outline { color: #fff; border-color: rgba(255,255,255,.65); }
.hero-section .btn-outline:hover,
.wholesale-cta-banner .btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-ghost { color: var(--text-soft); }
html[data-theme="dark"] .btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 14px 32px; font-size: 1.02rem; }
.btn-sm { padding: 7px 18px; font-size: .86rem; }
.btn-full { width: 100%; }


/* ============================================================
   2. ANNOUNCEMENT BAR
   ============================================================ */
.announcement-bar {
    background: linear-gradient(90deg, #0D0D0D, #1d1708 50%, #0D0D0D);
    color: var(--gold);
    padding: 10px 16px;
    text-align: center;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .6px;
    border-bottom: 1px solid rgba(201,162,39,.25);
}
.announcement-slider {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}


/* ============================================================
   3. HEADER & NAV
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: auto;
    min-height: 72px;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.5) blur(14px);
    backdrop-filter: saturate(1.5) blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(201,162,39,.5), var(--shadow-sm);
    transition: box-shadow .3s ease;
}
.site-header.header-scrolled {
    box-shadow: 0 1px 0 rgba(201,162,39,.5), 0 8px 28px rgba(0,0,0,.12);
}

/* 3-column grid: logo | nav | utilities */
.header-container {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 10px 24px;
}

/* --- Logo --- */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    text-decoration: none;
}
.brand-logo:hover { color: var(--text); }
.brand-logo .logo-text { color: var(--text); }
.brand-logo img,
.brand-logo .logo-img { height: 48px; width: auto; }

/* --- Desktop nav (centered) --- */
.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: .93rem;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--text) !important;
    background: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color .2s, background .2s;
    text-decoration: none;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 5px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s ease;
    border-radius: 2px;
}
.nav-link:hover,
.nav-link.active { color: var(--gold-text) !important; }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* Categories dropdown wrap */
.nav-dropdown-wrap { position: relative; }
.nav-chevron { transition: transform .2s; flex-shrink: 0; }
.nav-dropdown-trigger[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translate(-50%, 10px);
    min-width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 1100;
}
.nav-dropdown-panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}
.nav-dropdown-inner { display: flex; flex-direction: column; }
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 15px;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-dropdown-item:hover,
.nav-dropdown-item.active {
    background: var(--surface-2);
    color: var(--gold-text);
}
.nav-dropdown-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}

/* --- Header Utilities (right column) --- */
.header-utilities {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Search form */
.header-search-form {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 4px;
}
.header-search-form input {
    width: 180px;
    height: 40px;
    padding: 0 44px 0 16px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: .88rem;
    transition: width .28s ease, border-color .2s, box-shadow .2s, background .2s;
}
.header-search-form input:focus {
    width: 240px;
    outline: none;
    border-color: var(--gold);
    box-shadow: var(--focus-ring);
    background: var(--surface);
}
.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold);
    color: #0D0D0D;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.search-btn:hover { background: var(--gold-hover); transform: translateY(-50%) scale(1.08); }

/* Icon buttons */
.utility-icon-link {
    position: relative;
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, color .2s, transform .2s;
}
.utility-icon-link:hover {
    background: var(--surface-2);
    color: var(--gold-text);
    transform: scale(1.05);
}
.utility-icon-link svg { display: block; }

/* Cart badge */
.cart-badge-count {
    position: absolute;
    top: 3px; right: 2px;
    min-width: 19px; height: 19px;
    padding: 0 5px;
    display: none;
    align-items: center; justify-content: center;
    background: var(--red);
    color: #fff;
    font-size: .66rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 999px;
    border: 2px solid var(--header-bg);
    pointer-events: none;
}
.cart-badge-count.visible { display: inline-flex; }

/* Theme toggle */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Account dropdown */
.user-menu-dropdown { position: relative; }
.user-menu-dropdown .dropdown-content {
    position: absolute;
    right: 0; top: calc(100% + 10px);
    min-width: 230px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .18s, transform .18s, visibility .18s;
    z-index: 1100;
}
.user-menu-dropdown:hover .dropdown-content,
.user-menu-dropdown:focus-within .dropdown-content {
    opacity: 1; visibility: visible; transform: none;
}
.dropdown-content a,
.logout-btn {
    display: block; width: 100%;
    padding: 9px 14px;
    text-align: left;
    font-size: .9rem; font-weight: 600;
    color: var(--text);
    background: none; border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.dropdown-content a:hover,
.logout-btn:hover { background: var(--surface-2); color: var(--gold-text); }
.dropdown-user-name {
    display: block; padding: 6px 14px;
    font-size: .77rem; color: var(--mid-grey);
    text-transform: uppercase; letter-spacing: .9px;
}
.dropdown-content hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* Hamburger */
.mobile-menu-toggle {
    display: none;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 42px; height: 42px;
    background: transparent; border: 0; border-radius: 50%; cursor: pointer;
    padding: 0;
}
.mobile-menu-toggle:hover { background: var(--surface-2); }
.mobile-menu-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}

/* Responsive header breakpoints */
@media (max-width: 1100px) {
    .header-search-form input { width: 140px; }
    .header-search-form input:focus { width: 190px; }
    .nav-link { padding: 9px 10px; font-size: .88rem; }
}
@media (max-width: 960px) {
    .header-container {
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 8px 16px;
    }
    .desktop-nav        { display: none; }
    .header-search-form { display: none; }
    .mobile-menu-toggle { display: inline-flex; }
}


/* ============================================================
   4. MOBILE NAV DRAWER (slides from right)
   ============================================================ */
/* Full-screen container — acts as overlay frame */
.mobile-nav-drawer {
    position: fixed; inset: 0;
    background: transparent;
    visibility: hidden;
    pointer-events: none;
    z-index: 1300;
    transition: visibility .3s;
}
.mobile-nav-drawer.open { visibility: visible; pointer-events: auto; }

/* Semi-transparent backdrop */
.mobile-nav-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 0;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.mobile-nav-drawer.open .mobile-nav-overlay { opacity: 1; pointer-events: auto; }

/* Sliding panel */
.mobile-nav-content {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 320px; max-width: 88vw;
    background: var(--surface);
    box-shadow: -6px 0 40px rgba(0,0,0,.2);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    z-index: 1;
}
.mobile-nav-drawer.open .mobile-nav-content { transform: translateX(0); }

/* Drawer header */
.mobile-nav-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.mobile-nav-brand { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.btn-close {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface-2); color: var(--text);
    border: 0; border-radius: 50%;
    font-size: 1.3rem; line-height: 1; cursor: pointer;
    transition: background .2s, color .2s;
}
.btn-close:hover { background: var(--gold); color: #0D0D0D; }

/* Drawer nav links */
.mobile-nav-links { display: flex; flex-direction: column; padding: 6px 0 24px; }
.mobile-link {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
    padding: 15px 22px;
    font-size: .98rem; font-weight: 700;
    color: var(--text);
    background: none; border: 0;
    border-bottom: 1px solid var(--border);
    text-align: left; cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.mobile-link:hover,
.mobile-link:focus { color: var(--gold-text); background: var(--surface-2); }
.mobile-link:last-child { border-bottom: 0; }

/* Categories accordion */
.mobile-cat-section { display: flex; flex-direction: column; }
.mobile-cat-list {
    max-height: 0; overflow: hidden;
    background: var(--surface-2);
    transition: max-height .3s ease;
}
.mobile-cat-list.open { max-height: 600px; }
.mobile-cat-link {
    display: block;
    padding: 12px 22px 12px 38px;
    font-size: .9rem;
    color: var(--text-soft);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: color .15s, background .15s;
}
.mobile-cat-link:hover { color: var(--gold-text); background: var(--surface-3); }
.mobile-cat-chevron { transition: transform .2s; }
.mobile-nav-divider { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }


/* ============================================================
   5. CART DRAWER (slides from right)
   ============================================================ */
/* Full-screen container */
.cart-drawer {
    position: fixed; inset: 0;
    background: transparent;
    visibility: hidden;
    pointer-events: none;
    z-index: 1500;
    transition: visibility .3s;
}
.cart-drawer.open { visibility: visible; pointer-events: auto; }

.cart-drawer .cart-drawer-overlay,
.cart-drawer-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
    z-index: 0;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.cart-drawer.open .cart-drawer-overlay,
.cart-drawer.open > .cart-drawer-overlay { opacity: 1; pointer-events: auto; }

/* Sliding panel */
.cart-drawer-content {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 440px; max-width: 100vw;
    background: var(--surface);
    display: flex; flex-direction: column;
    box-shadow: -6px 0 40px rgba(0,0,0,.2);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    z-index: 1;
}
.cart-drawer.open .cart-drawer-content { transform: translateX(0); }

/* Cart drawer internals */
.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.cart-drawer-header h3 { font-size: 1.2rem; color: var(--text); margin: 0; }
.cart-drawer-items-list {
    flex: 1; overflow-y: auto;
    padding: 16px 20px;
    display: flex; flex-direction: column; gap: 14px;
}
.cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 12px;
    flex-shrink: 0;
}
.cart-drawer-total {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 700; font-size: 1.08rem; color: var(--text);
}
.cart-drawer-total span:last-child {
    font-family: var(--font-heading);
    color: var(--gold-text);
    font-size: 1.3rem;
}
.loader-container { display: flex; justify-content: center; padding: 40px 0; }


/* ============================================================
   6. HERO & HOMEPAGE SECTIONS
   ============================================================ */
.hero-section {
    position: relative;
    min-height: 560px;
    background:
        radial-gradient(900px 420px at 85% 10%, rgba(201,162,39,.22), transparent 60%),
        radial-gradient(700px 400px at 0% 100%, rgba(179,32,42,.18), transparent 60%),
        linear-gradient(135deg, #0D0D0D 0%, #1a1409 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .4;
}
.hero-content {
    position: relative; z-index: 2;
    width: 100%;
    padding-top: 80px; padding-bottom: 80px;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5.5vw, 4.1rem);
    color: #fff;
    line-height: 1.1;
    letter-spacing: -.5px;
    margin-bottom: 18px;
}
.hero-subtitle {
    color: rgba(255,255,255,.82);
    font-size: 1.08rem;
    max-width: 500px;
    margin-bottom: 32px;
    line-height: 1.65;
}
.hero-cta-container {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Trust strip */
.trust-strip {
    background: #0D0D0D;
    border-top: 1px solid rgba(201,162,39,.3);
    border-bottom: 1px solid rgba(201,162,39,.3);
}
.trust-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.trust-item {
    padding: 24px 24px;
    border-right: 1px solid rgba(201,162,39,.15);
}
.trust-item:last-child { border-right: 0; }
.trust-item-icon { font-size: 1.8rem; margin-bottom: 8px; }
.trust-item-title { color: var(--gold); font-size: .92rem; font-weight: 700; margin-bottom: 4px; }
.trust-item-text  { color: rgba(255,255,255,.65); font-size: .82rem; line-height: 1.5; }

@media (max-width: 860px) { .trust-strip-grid { grid-template-columns: 1fr 1fr; } .trust-item { border-bottom: 1px solid rgba(201,162,39,.15); } }
@media (max-width: 480px) { .trust-strip-grid { grid-template-columns: 1fr; } }

/* Category grid */
.home-categories-section,
.featured-products-section,
.new-arrivals-section,
.how-it-works-section,
.home-faq-section,
.home-location-section { padding: 72px 0; }
.home-categories-section,
.new-arrivals-section  { background: var(--off-white); }
.how-it-works-section,
.home-location-section { background: var(--surface) !important; }
.featured-products-section,
.home-faq-section      { background: var(--light) !important; }

.section-title    { color: var(--text); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-subtitle { color: var(--text-soft); font-size: 1rem; margin-top: 8px; }
.section-header-split {
    display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    margin-bottom: 36px;
}

/* Category cards */
.category-banners-grid { gap: 20px; }
.category-card   { border-radius: 14px; box-shadow: var(--shadow-sm); }
.category-card:hover { box-shadow: var(--shadow-md); }
.category-card.no-image { background: linear-gradient(135deg, #0D0D0D 0%, #2a1c08 100%); }
.category-card-title { color: #fff; font-size: 1.15rem; }

/* Wholesale CTA */
.wholesale-cta-banner {
    background:
        radial-gradient(700px 300px at 50% 0%, rgba(201,162,39,.2), transparent 65%),
        linear-gradient(135deg, #0D0D0D, #1a1409);
    padding: 80px 0;
}
.wholesale-cta-banner h2 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 14px; }
.wholesale-cta-banner p  { color: rgba(255,255,255,.82); margin-bottom: 28px; }

/* FAQs */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { color: var(--text); font-weight: 700; }

/* Halaal badge */
.halaal-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 16px;
    background: rgba(45,122,45,.12);
    color: #2d7a2d;
    border: 1.5px solid rgba(45,122,45,.35);
    border-radius: 999px;
    font-size: .82rem; font-weight: 700; letter-spacing: .5px;
}
html[data-theme="dark"] .halaal-badge {
    background: rgba(45,122,45,.18);
    color: #5ec45e;
    border-color: rgba(45,122,45,.4);
}


/* ============================================================
   7. PRODUCT CARDS  (bridge old class names → new HTML)
   ============================================================ */
.products-grid { gap: 22px; }

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s ease, transform .25s ease;
}
.product-card:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,.14);
    transform: translateY(-4px);
}

/* Image wrapper — BOTH old and new class names */
.product-card-image-wrapper,
.product-card-img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #14120F;
    text-decoration: none;
}
.product-card-image-wrapper img,
.product-card-img-wrap img,
.product-card-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
    display: block;
}
.product-card:hover .product-card-img,
.product-card:hover .product-card-image-wrapper img,
.product-card:hover .product-card-img-wrap img { transform: scale(1.06); }

.product-card-no-image {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.product-card-no-image svg,
.product-card-no-image img { width: 100%; height: 100%; object-fit: cover; }

/* Badges (absolute top-left) */
.product-card-badges {
    position: absolute;
    top: 10px; left: 10px;
    display: flex; flex-direction: column; gap: 4px;
    z-index: 2;
}

/* Info section */
.product-card-info {
    padding: 16px 18px 18px;
    display: flex; flex-direction: column;
    gap: 5px;
    flex: 1;
}

/* Title — both old and new class names */
.product-card-title,
.product-card-name {
    font-family: var(--font-heading);
    font-size: 1.03rem; line-height: 1.3;
    min-height: 2.6em;
    font-weight: 700;
}
.product-card-title a,
.product-card-name a { color: var(--text); text-decoration: none; }
.product-card-title a:hover,
.product-card-name a:hover { color: var(--gold-text); }

.product-card-sku { font-size: .74rem; text-transform: uppercase; letter-spacing: .8px; color: var(--mid-grey); }

/* Pricing */
.product-card-pricing {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 2px;
}
.price-current { font-size: 1.1rem; font-weight: 700; color: var(--gold-text); }
.price-old     { font-size: .85rem; color: var(--mid-grey); text-decoration: line-through; }

/* CTA area inside card */
.product-card-info > div:last-child { margin-top: auto; padding-top: 14px; }

/* Sold out */
.product-card.is-sold-out .product-card-img,
.product-card.is-sold-out .product-card-image-wrapper img,
.product-card.is-sold-out .product-card-img-wrap img {
    filter: grayscale(1) brightness(.7);
}


/* ============================================================
   8. FOOTER  (all missing class definitions)
   ============================================================ */
.site-footer {
    background: linear-gradient(180deg, #0D0D0D 0%, #070707 100%);
    border-top: 3px solid var(--gold);
    padding: 64px 0 0;
    color: rgba(255,255,255,.8);
}

/* 4-column grid */
.footer-container {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
    gap: 48px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 56px;
}

.footer-column { min-width: 0; }

/* Brand column */
.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.55rem; color: var(--gold);
    margin: 0 0 14px;
}
.footer-logo-img { max-height: 56px; width: auto; margin-bottom: 16px; }
.footer-description {
    font-size: .9rem; line-height: 1.75;
    color: rgba(255,255,255,.68);
    margin-bottom: 20px; max-width: 340px;
}

/* Column heading */
.footer-title {
    font-family: var(--font-heading);
    font-size: 1rem; color: #fff;
    margin: 0 0 20px;
    padding-bottom: 10px;
    position: relative;
}
.footer-title::after {
    content: '';
    position: absolute; left: 0; bottom: 0;
    width: 36px; height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

/* Link list */
.footer-links-list {
    list-style: none !important;
    margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.footer-links-list a {
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    text-decoration: none;
    transition: color .2s, padding-left .2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.footer-links-list a:hover { color: var(--gold); padding-left: 5px; }

/* Contact list (icons + text) */
.footer-contact-list { gap: 14px !important; }
.footer-contact-list li {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: .88rem; color: rgba(255,255,255,.8); line-height: 1.5;
}
.footer-contact-list svg { flex-shrink: 0; margin-top: 3px; color: var(--gold); }
.footer-contact-list a { color: rgba(255,255,255,.8); padding-left: 0 !important; }
.footer-contact-list a:hover { color: var(--gold); }

/* Social links */
.social-links { display: flex; gap: 10px; margin-bottom: 20px; }
.social-links a {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    transition: background .2s, color .2s, transform .2s;
    text-decoration: none;
}
.social-links a:hover { background: var(--gold); color: #0D0D0D; transform: translateY(-2px); }

/* Footer bottom bar */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
}
.footer-bottom-container {
    max-width: 1240px; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.copyright { font-size: .82rem; color: rgba(255,255,255,.5); margin: 0; }
.footer-bottom a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }
.footer-bottom-meta {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; font-size: .82rem; color: rgba(255,255,255,.55);
}
.payfast-badge {
    background: rgba(255,255,255,.08);
    padding: 3px 12px;
    border-radius: 999px;
    font-size: .75rem;
    color: rgba(255,255,255,.7);
}

/* Footer responsive */
@media (max-width: 1024px) {
    .footer-container { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 600px) {
    .footer-container { grid-template-columns: 1fr; gap: 28px; padding-bottom: 40px; }
    .footer-bottom-container { flex-direction: column; text-align: center; }
}


/* ============================================================
   9. TOASTS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 90px; right: 20px;
    z-index: 2000;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 380px;
    pointer-events: none;
}
.toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    pointer-events: auto;
    animation: toastIn .3s ease, toastOut .4s ease 6s forwards;
    border-left: 4px solid var(--gold);
}
.toast-success { border-left-color: #2d7a2d; }
.toast-error   { border-left-color: var(--red); }
.toast-warning { border-left-color: #c97a00; }
.toast-content { display: flex; align-items: center; gap: 12px; flex: 1; }
.toast-icon {
    width: 28px; height: 28px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-weight: 800; font-size: .88rem;
    background: var(--gold); color: #0D0D0D;
}
.toast-success .toast-icon { background: #2d7a2d; color: #fff; }
.toast-error   .toast-icon { background: var(--red); color: #fff; }
.toast-warning .toast-icon { background: #c97a00; color: #fff; }
.toast-message { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--text); }
.toast-close-btn {
    background: none; border: 0; cursor: pointer;
    color: var(--mid-grey); font-size: 1.3rem; line-height: 1; padding: 0;
    flex-shrink: 0;
}
.toast-close-btn:hover { color: var(--text); }
@keyframes toastIn  { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateX(30px); visibility:hidden; } }


/* ============================================================
   10. MISC — pagination, tables, map, floating buttons
   ============================================================ */
/* Pagination */
.pagination-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border: 1.5px solid var(--border); border-radius: 8px;
    color: var(--text); background: var(--surface);
    text-decoration: none;
    font-size: .9rem; font-weight: 600;
    transition: background .15s, border-color .15s, color .15s;
}
.pagination-link:hover,
.pagination-link.active { background: var(--gold); border-color: var(--gold); color: #0D0D0D; }

/* Tables */
.table th { background: #0D0D0D; color: #fff; }
.table td { border-color: var(--border); color: var(--text); }
html[data-theme="dark"] .table tr:hover td { background: var(--surface-2); }

/* Map */
.map-component-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.map-iframe-wrap iframe { width: 100%; display: block; }
.map-fallback-card { background: linear-gradient(135deg, #0D0D0D 0%, #261b08 100%) !important; }

/* Announcement slider */
.announcement-slider span { display: inline-block; }

/* Floating contact FABs */
.floating-contact-btns {
    position: fixed; bottom: 24px; right: 22px;
    z-index: 500;
    display: flex; flex-direction: column; gap: 12px;
}
.whatsapp-fab,
.call-fab {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 18px rgba(0,0,0,.22);
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
}
.whatsapp-fab { background: #25D366; }
.call-fab     { background: var(--gold, #C9A227); }
.whatsapp-fab:hover,
.call-fab:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.whatsapp-fab svg { width: 28px; height: 28px; fill: #ffffff; }
.call-fab svg { width: 24px; height: 24px; stroke: #0D0D0D; fill: none; stroke-width: 2; }

/* Payfast / badges */
.payfast-badge { display: inline-flex; align-items: center; gap: 4px; }

/* Spinner */
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ============================================================
   11. DARK MODE — surface overrides
   ============================================================ */
html[data-theme="dark"] img:not([src$=".svg"]):not(.logo-img):not(.product-card-img) {
    filter: brightness(.9);
}
html[data-theme="dark"] .product-card {
    background: var(--surface);
    border-color: var(--border);
}
html[data-theme="dark"] .nav-dropdown-panel { background: var(--surface); }
html[data-theme="dark"] .mobile-nav-content { background: var(--surface); }
html[data-theme="dark"] .cart-drawer-content { background: var(--surface); }
html[data-theme="dark"] .user-menu-dropdown .dropdown-content { background: var(--surface); }

/* Badge colours in dark */
html[data-theme="dark"] .badge { filter: brightness(.88); }

/* Account / checkout surfaces */
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .checkout-section,
html[data-theme="dark"] .order-card {
    background: var(--surface);
    border-color: var(--border);
}

/* Admin panel dark mode base */
html[data-theme="dark"] .admin-layout { background: var(--off-white); }
html[data-theme="dark"] .admin-sidebar { background: #0F0E0C; border-color: var(--border); }
html[data-theme="dark"] .admin-topbar  { background: #14120F; border-color: var(--border); }
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .stat-card     { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .table-wrapper { background: var(--surface); }

/* ============================================================
   12. SMOOTH THEME TRANSITION
   ============================================================ */
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
    transition:
        background-color .28s ease,
        color .28s ease,
        border-color .28s ease !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
