/* ==========================================================
   Sky Nova Tech — Brand Theme
   Palette taken from the SN Technology logo:
     navy  #102A9C  (the "S")
     green #3BB25A  (the "N")
     orange #F26A38 (top arc)
     yellow #F8B723 (the dots)
     teal  #1E8A8F  (side arcs)
     slate #57627E  ("TECHNOLOGY" text)

   Themes:
     dark-blue  -> the default LIGHT brand theme (name kept so the
                   existing theme toggle in main.js keeps working)
     dark       -> dark navy version of the brand
   ========================================================== */

/* ---------- Theme variables ---------- */
:root,
[data-theme="dark-blue"],
[data-theme="light"] {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --ink: #141c3a;
    --ink-soft: #57627e;
    --line: rgba(20, 28, 58, 0.12);

    --accent: #102a9c;            /* navy */
    --accent-ink: #ffffff;
    --accent-soft: rgba(16, 42, 156, 0.09);
    --glow: rgba(16, 42, 156, 0.28);

    --accent-2: #3bb25a;          /* green */
    --accent-2-text: #1f8a45;     /* green that is readable as text */
    --accent-2-soft: rgba(59, 178, 90, 0.14);
    --accent-3: #f26a38;          /* orange */
    --accent-4: #f8b723;          /* yellow */
    --teal: #1e8a8f;

    --danger: #d0342c;
    --danger-bg: rgba(208, 52, 44, 0.1);
    --success: #1f8a45;
    --success-bg: rgba(59, 178, 90, 0.14);
    --warning: #a66300;
    --warning-bg: rgba(248, 183, 35, 0.2);

    --shadow: 0 4px 24px rgba(16, 42, 156, 0.1);

    --hero-bg: #0a1650;
    --hero-glow-1: #f26a38;
    --hero-glow-2: #3bb25a;

    --font-display: "Space Grotesk", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "IBM Plex Mono", monospace;
    --radius: 10px;
    --radius-sm: 6px;
    --max: 1120px;
}

[data-theme="dark"] {
    --bg: #0c1440;
    --surface: #18235f;
    --ink: #f4f7ff;
    --ink-soft: #aab2d9;
    --line: rgba(255, 255, 255, 0.14);

    --accent: #4cc46a;
    --accent-ink: #06210f;
    --accent-soft: rgba(76, 196, 106, 0.14);
    --glow: rgba(76, 196, 106, 0.35);

    --accent-2: #5b7cff;
    --accent-2-text: #8fa6ff;
    --accent-2-soft: rgba(91, 124, 255, 0.16);
    --accent-3: #ff8a5c;
    --accent-4: #fbc94d;
    --teal: #3fb5b9;

    --danger: #ff6b62;
    --danger-bg: rgba(255, 107, 98, 0.12);
    --success: #4cc46a;
    --success-bg: rgba(76, 196, 106, 0.14);
    --warning: #fbc94d;
    --warning-bg: rgba(251, 201, 77, 0.14);

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.6);

    --hero-bg: #040a26;
    --hero-glow-1: #f26a38;
    --hero-glow-2: #3bb25a;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 0.75rem; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

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

.eyebrow {
    font-family: var(--font-mono);
    font-size: 50px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.6rem;
}

/* ---------- Layout shells ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem 4rem; }
.section { padding: 3rem 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: none; }
.section-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

/* ---------- Navbar ---------- */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
/* thin stripe in the logo colors */
.navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: linear-gradient(90deg, #102a9c, #3bb25a 45%, #f26a38 75%, #f8b723);
    pointer-events: none;
}
.navbar-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 0.5rem; }
.brand-logo { height: 38px; width: auto; }
.brand-mark {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--accent);
    background: var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.4rem;
    letter-spacing: 0.04em;
    color: var(--accent-ink);
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links > a { font-size: 0.92rem; color: var(--ink-soft); transition: color .15s; }
.nav-links > a:hover { color: var(--ink); }
.nav-admin { color: var(--accent-3) !important; font-weight: 600; }
.nav-user { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }
.nav-divider { width: 1px; height: 20px; background: var(--line); }
.nav-toggle { display: none; }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink-soft);
    cursor: pointer;
    transition: all .15s ease;
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 12px var(--accent-soft);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .1s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.18); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); background: var(--accent-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }
.link-arrow { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.link-arrow::after { content: " \2192"; }

/* Glow button (hero) */
.btn-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--accent-ink);
    border: 1px solid var(--accent);
    box-shadow: 0 0 18px var(--glow);
    text-decoration: none;
    transition: transform .1s, filter .15s, box-shadow .15s;
}
.btn-glow:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 28px var(--glow);
    transform: translateY(-1px);
}

/* Outline light button (hero) */
.btn-outline-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-soft);
    border: 1.5px solid var(--line);
    text-decoration: none;
    transition: all .15s;
}
.btn-outline-light:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* ---------- Flash messages ---------- */
.flash-container { max-width: var(--max); margin: 1rem auto 0; padding: 0 1.5rem; }
.flash {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.9rem; padding: 0.7rem 1rem; border-radius: var(--radius-sm);
    margin-bottom: 0.6rem; border: 1px solid transparent;
}
.flash-success { background: var(--success-bg); color: var(--success); border-color: rgba(59,178,90,0.35); }
.flash-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(208,52,44,0.3); }
.flash-info, .flash-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(248,183,35,0.45); }
.flash-close { background: none; border: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: inherit; opacity: 0.6; }
.flash-close:hover { opacity: 1; }

/* ---------- Dark Hero (always dark navy, in both themes) ---------- */
.hero-dark {
    /* the hero is dark in both themes, so re-map the colors inside it */
    --ink: #ffffff;
    --ink-soft: #b9c3e6;
    --line: rgba(255, 255, 255, 0.14);
    --accent: #4cc46a;
    --accent-ink: #06210f;
    --accent-soft: rgba(76, 196, 106, 0.16);
    --glow: rgba(76, 196, 106, 0.4);

    position: relative;
    background: var(--hero-bg);
    color: var(--ink);
    overflow: hidden;
    border-radius: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 5rem 0;
}
.hero-dark-glow::before,
.hero-dark-glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.3;
}
.hero-dark-glow::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--hero-glow-1) 0%, transparent 70%);
    top: -25%;
    right: -8%;
}
.hero-dark-glow::after {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--hero-glow-2) 0%, transparent 70%);
    bottom: -30%;
    left: 5%;
    opacity: 0.22;
}

.hero-dark-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-dark .eyebrow { color: var(--accent); margin-bottom: 0.8rem; }
.hero-dark h1 {
    color: var(--ink);
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    margin-bottom: 1rem;
}
.hero-dark .hero-sub { color: var(--ink-soft); font-size: 1.05rem; max-width: 44ch; }
.hero-dark .hero-actions { display: flex; gap: 0.8rem; margin-top: 1.5rem; flex-wrap: wrap; }

.hero-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.hero-right img {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    object-fit: cover;
}
.hero-spec-dark {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 1.25rem;
    width: 100%;
    max-width: 380px;
}
.hero-spec-dark .spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.hero-spec-dark .spec-row:last-child { border-bottom: none; }
.hero-spec-dark .spec-label {
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}
.hero-spec-dark .spec-value { color: var(--ink); font-weight: 500; }

/* ---------- Image containers (keep shape even if the image is broken) ---------- */
.featured-img,
.shop-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
}
.featured-img img,
.shop-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    z-index: 1;
}

/* ---------- Featured products ---------- */
.featured-section { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.9rem;
}
.featured-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow .15s, border-color .15s;
}
.featured-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.featured-body { padding: 0.6rem 0.7rem 0.75rem; }
.featured-body h3 {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    line-height: 1.3;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-price {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}
.featured-card .btn-sm { padding: 0.35rem 0.6rem; font-size: 0.75rem; width: 100%; }

/* ---------- Cards / grids ---------- */
.card-grid, .product-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-2-text);
    display: inline-block;
    margin-bottom: 0.6rem;
}

/* ---------- Product grid (older layout) ---------- */
.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    transition: border-color .15s, transform .15s;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-card img {
    border-radius: var(--radius-sm);
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--bg);
    margin-bottom: 0.75rem;
}
.product-card h3 { font-size: 1rem; margin-bottom: 0.2rem; color: var(--ink); }
.price { font-family: var(--font-mono); font-weight: 500; color: var(--ink); }
.product-card .btn { width: 100%; margin-top: 0.75rem; }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding-top: 2.5rem;
}
.product-detail img { border-radius: var(--radius); border: 1px solid var(--line); }
.product-info h1 { margin-bottom: 0.4rem; }
.product-info .price { font-size: 1.3rem; display: block; margin-bottom: 0.75rem; }

/* ---------- Blog ---------- */
.blog-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.blog-card img { aspect-ratio: 16/9; object-fit: cover; }
.blog-card h3 { padding: 1rem 1rem 0; color: var(--ink); }
.blog-card p { padding: 0 1rem 1rem; font-size: 0.9rem; }
.blog-cover { border-radius: var(--radius); border: 1px solid var(--line); margin: 1rem 0; }
.blog-content { white-space: pre-wrap; font-size: 1rem; line-height: 1.7; margin: 1rem 0 2rem; color: var(--ink-soft); }

/* ---------- Forms ---------- */
.auth-box {
    max-width: 420px;
    margin: 3rem auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent-2);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.auth-box h2 { margin-bottom: 1.25rem; color: var(--ink); }
.auth-box p { margin-top: 1.25rem; font-size: 0.88rem; text-align: center; color: var(--ink-soft); }
.auth-box p a { color: var(--accent); font-weight: 600; }

form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 1rem;
    color: var(--ink-soft);
}
form input, form textarea, form select {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--ink);
    background: var(--bg);
    transition: border-color .15s, box-shadow .15s;
}
form input:focus, form textarea:focus, form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: var(--surface);
}
form button { margin-top: 1.25rem; width: 100%; }
.btn-row { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.btn-row .btn { flex: 1; margin-top: 0; }

input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink-soft);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color .15s;
}
input[type="file"]:hover { border-color: var(--accent); }

/* ---------- Community ---------- */
.community-form, .inline-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.community-post {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 0.9rem;
}
.community-post h3 { margin-bottom: 0.35rem; color: var(--ink); }
.community-post small { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); }

/* =========================================================
   ADMIN
   ========================================================= */

/* Section tabs (Overview / Products / Blog / ...) and status filter tabs */
.admin-subnav,
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
}
.filter-tabs { margin-top: 0.75rem; }
.admin-subnav a,
.filter-tabs a {
    padding: 0.6rem 1rem;
    color: var(--ink-soft);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-weight: 500;
    transition: color .15s;
}
.admin-subnav a:hover,
.filter-tabs a:hover { color: var(--ink); }
.admin-subnav a.active,
.filter-tabs a.active {
    color: var(--accent);
    font-weight: 600;
    border-bottom-color: var(--accent-2);
}

/* Stats */
.stats-row { display: flex; gap: 1rem; margin: 1.5rem 0 2rem; flex-wrap: wrap; }
.stat-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.75rem;
    min-width: 140px;
}
.stat-box h3 { font-family: var(--font-mono); font-size: 1.8rem; color: var(--accent); margin-bottom: 0.15rem; }
.stat-box p { font-size: 0.8rem; margin: 0; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.stat-link { text-decoration: none; border: 1px solid var(--accent); transition: background .15s; }
.stat-link:hover { background: var(--accent-soft); }

/* Card wrapper for forms */
.admin-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1rem;
}
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
}
.form-group { display: flex; flex-direction: column; }
.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-top: 0;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    margin-top: 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: var(--surface);
}
.form-group small { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.25rem; }

.admin-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}
.admin-form-actions .btn,
.admin-form-actions button { width: auto; margin-top: 0; }

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-top: 1rem;
    background: var(--surface);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    background: var(--surface);
    margin: 1rem 0 2rem;
}
.table-wrap .admin-table { margin: 0; }
.admin-table thead { background: var(--bg); }
.admin-table th {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    background: var(--bg);
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    color: var(--ink);
    text-align: left;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--accent-soft); }
.admin-table select, .admin-table input { margin-top: 0; display: inline-block; width: auto; }

.row-actions { white-space: nowrap; }
.row-actions form + form,
.row-actions .btn + form { margin-left: 0.25rem; }
.row-actions form button { width: auto; margin-top: 0; }

.inline-edit { margin-top: 0.75rem; display: grid; gap: 0.75rem; max-width: 560px; }
.inline-edit button { width: auto; margin-top: 0; }
details summary { cursor: pointer; }

.table-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--line);
    display: block;
}
.placeholder-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--ink-soft);
}

/* Badges */
.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink-soft);
    border: 1px solid var(--line);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.type-enquiry { background: var(--warning-bg); color: var(--warning); border-color: rgba(248,183,35,0.45); }
.type-order   { background: var(--success-bg); color: var(--success); border-color: rgba(59,178,90,0.4); }

/* Status */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
}
.status-dot.active   { background: var(--accent-2); box-shadow: 0 0 6px rgba(59,178,90,0.5); }
.status-dot.inactive { background: var(--ink-soft); }

.status-select {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
}
.note-form input {
    width: 140px;
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink);
}

/* Utility */
.muted { color: var(--ink-soft); font-size: 0.82rem; }
.mono { font-family: var(--font-mono); font-size: 0.8rem; }
.mono-small { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft); line-height: 1.4; }
.empty-cell {
    text-align: center;
    color: var(--ink-soft);
    padding: 2rem !important;
    font-style: italic;
}

/* =========================================================
   SHOP PAGE
   ========================================================= */
.shop-search { margin-top: 1.25rem; margin-bottom: 0.5rem; }
.shop-search .search-box { max-width: 720px; }
.shop-search .search-box input { padding: 0.9rem 1.25rem; font-size: 1.05rem; }

.search-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-box input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
}
.search-box input::placeholder { color: var(--ink-soft); opacity: 0.6; }
.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 1.1rem;
    cursor: pointer;
    transition: filter .15s;
    flex-shrink: 0;
}
.search-btn:hover { filter: brightness(1.18); }

.results-count { font-size: 0.88rem; color: var(--ink-soft); margin: 0.5rem 0 0; }
.results-count strong { color: var(--ink); font-weight: 600; }

/* ---------- Shop filters ---------- */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}
.shop-filters {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
}
.filter-group { margin-bottom: 1.25rem; }
.filter-group:last-of-type { margin-bottom: 1rem; }
.filter-group h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    margin: 0 0 0.6rem;
}
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--ink);
    padding: 0.3rem 0;
    cursor: pointer;
}
.filter-checkbox input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.price-range-inputs { display: flex; align-items: center; gap: 0.5rem; }
.price-range-inputs input {
    width: 100%;
    min-width: 0;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink);
    font-size: 0.85rem;
}
.filter-group select {
    width: 100%;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--ink);
    font-size: 0.85rem;
}
.filter-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-actions .btn { width: 100%; }
.filter-toggle-btn { display: none; margin-bottom: 1rem; }

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}
.shop-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow .15s, border-color .15s;
}
.shop-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.shop-body { padding: 0.7rem 0.85rem 0.9rem; }
.shop-body h3 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-2-text);
    background: var(--accent-2-soft);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-bottom: 0.35rem;
}
.shop-price {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--ink);
    font-size: 0.92rem;
    margin-bottom: 0.6rem;
}
.shop-card .btn-sm { width: 100%; padding: 0.4rem 0.6rem; font-size: 0.78rem; }
.empty-shop { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }

/* =========================================================
   PRODUCT DETAIL PAGE
   ========================================================= */
.product-detail-section { padding-top: 2rem; }
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}
.product-image-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}
.product-image-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }

.product-info-card { display: flex; flex-direction: column; gap: 0.75rem; }
.product-category {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-2-text);
    background: var(--accent-2-soft);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    width: fit-content;
}
.product-info-card h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.25rem; }
.product-price {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0;
}
.stock-badge {
    font-size: 0.85rem;
    font-weight: 500;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    margin: 0;
}
.stock-badge.in-stock  { background: var(--success-bg); color: var(--success); }
.stock-badge.out-stock { background: var(--danger-bg);  color: var(--danger); }

.product-desc { color: var(--ink-soft); line-height: 1.7; margin: 0.5rem 0; }
.product-desc p { margin: 0; }

.enquiry-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1rem;
}
.enquiry-box h3 { font-size: 1.05rem; margin-bottom: 1rem; color: var(--ink); }
.enquiry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.enquiry-grid .form-group { display: flex; flex-direction: column; }
.enquiry-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.enquiry-actions .btn { flex: 1; padding: 0.75rem 1.25rem; margin-top: 0; }

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-grid-reverse { grid-template-columns: 1fr 1.3fr; }
.about-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent-2);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.about-card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; color: var(--ink); }
.about-card p { font-size: 0.92rem; margin: 0; color: var(--ink-soft); }
.about-quote {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding: 0 1.5rem;
}
.about-quote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -0.5rem;
    font-size: 3rem;
    color: var(--accent-3);
    opacity: 0.6;
    line-height: 1;
}

/* =========================================================
   CONTACT PAGE + MAP
   ========================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.info-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color .15s;
}
.info-card:hover { border-color: var(--accent-2); }
.info-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.info-card h3 { font-size: 1rem; margin-bottom: 0.4rem; color: var(--ink); }
.info-card p { font-size: 0.88rem; color: var(--ink-soft); margin: 0; line-height: 1.6; }
.contact-form-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
}

.map-wrap {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    margin-top: 1rem;
    position: relative;
}
.map-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: grayscale(0.3) contrast(1.1);
    transition: filter 0.3s;
}
.map-wrap:hover iframe { filter: grayscale(0) contrast(1); }

.contact-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.contact-cta-row .btn { flex: 1 1 150px; }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: transform 0.15s ease;
    color: #fff;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 3rem; background: var(--surface); }
.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.5rem; }
.footer-links { display: flex; gap: 1.25rem; font-size: 0.85rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.78rem; color: var(--ink-soft); margin: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
    .hero-dark-inner { grid-template-columns: 1fr; }
    .hero-spec-dark { max-width: 400px; }
    .section-split { grid-template-columns: 1fr; gap: 2rem; }
    .product-detail { grid-template-columns: 1fr; gap: 1.5rem; }
    .featured-header { flex-direction: column; align-items: flex-start; }

    .about-grid,
    .about-grid-reverse { grid-template-columns: 1fr; gap: 2rem; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-info { flex-direction: row; flex-wrap: wrap; }
    .info-card { flex: 1 1 200px; }

    .product-detail-grid { grid-template-columns: 1fr; }
    .product-image-wrap {
        aspect-ratio: 4 / 3;
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }
    .enquiry-grid { grid-template-columns: 1fr; }
    .enquiry-actions { flex-direction: column; }

    .shop-layout { grid-template-columns: 1fr; }
    .filter-toggle-btn { display: inline-flex; }
    .shop-filters { display: none; position: static; }
    .shop-filters.open { display: block; margin-bottom: 1rem; }
}
.footer-logo { height: 32px; width: auto; }

@media (max-width: 720px) {
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        cursor: pointer;
    }
    .nav-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem 1.5rem;
        gap: 0.9rem;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-divider { display: none; }
}

@media (max-width: 640px) {
    .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .featured-header { flex-direction: row; align-items: center; }
    .featured-header h2 { font-size: 1.1rem; }
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .search-box { max-width: 100%; }
    .map-wrap { height: 280px; }
    .wa-float { width: 50px; height: 50px; bottom: 1rem; right: 1rem; }
    .wa-float svg { width: 26px; height: 26px; }
    .contact-cta-row { flex-direction: column; }
    .contact-cta-row .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}