﻿/* =============================================================
   Gamers Kenya â€” Main Stylesheet
   Dark gaming aesthetic Â· Mobile-first Â· Light/dark theme
   ============================================================= */

/* ----------------------------------------------------------------
   0. SVG Icon System
   ---------------------------------------------------------------- */
/* Base: icons inherit font size and colour from their parent */
.icon      { width: 1em;    height: 1em;    display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }
.icon-xs   { width: .85rem; height: .85rem; }
.icon-sm   { width: 1rem;   height: 1rem;   }
.icon-md   { width: 1.25rem;height: 1.25rem;}
.icon-lg   { width: 1.5rem; height: 1.5rem; }
.icon-xl   { width: 2rem;   height: 2rem;   }
.icon-2xl  { width: 2.8rem; height: 2.8rem; }
/* For .module-icon replacement (was font-size:2.8rem emoji) */
.icon-module { width: 3rem; height: 3rem; display: block; margin: 0 auto 1rem; }
/* Coloured variants */
.icon-accent  { color: var(--accent);  }
.icon-muted   { color: var(--text-muted); }
.icon-success { color: var(--success); }
.icon-error   { color: var(--error);   }

/* ----------------------------------------------------------------
   0b. Admin WhatsApp Contact Widget
   ---------------------------------------------------------------- */
.admin-contact-box { display: flex; align-items: center; }
.admin-contact-btn {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .65rem 1.25rem;
    background: #25d366; color: #fff;
    border-radius: var(--radius); border: none;
    font-weight: 600; font-size: .92rem; text-decoration: none;
    transition: background .18s, transform .1s;
    cursor: pointer;
}
.admin-contact-btn:hover { background: #1ebe5d; color: #fff; transform: translateY(-1px); }
.admin-contact-icon { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }

/* ----------------------------------------------------------------
   1. CSS Custom Properties (tokens)
   ---------------------------------------------------------------- */
:root {
    /* Dark slate theme (Esports Pro) */
    --bg-primary:    #0e1620;
    --bg-secondary:  #121b26;
    --bg-card:       #16212e;
    --bg-card-hover: #1c2938;
    --bg-input:      #14202c;

    --border:        #26374a;
    --border-focus:  #f5b301;

    --accent:        #f5b301;   /* championship gold */
    --accent-dark:   #c79102;
    --accent-dim:    rgba(245, 179, 1, 0.16);
    --accent2:       #ffd34d;   /* gold highlight */
    --success:       #10b981;
    --warning:       #f59e0b;
    --error:         #ef4444;

    --text:          #f1f5f9;
    --text-muted:    #94a3b8;
    --text-dim:      #64748b;

    --glow:          rgba(245, 179, 1, 0.22);
    --glow-lg:       rgba(245, 179, 1, 0.38);

    /* Sizes */
    --radius-sm:     6px;
    --radius:        10px;
    --radius-lg:     16px;
    --radius-pill:   999px;

    /* Elevation scale â€” layered ambient + key shadows */
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .35), 0 1px 6px rgba(0, 0, 0, .18);
    --shadow-md:     0 2px 6px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .28);
    --shadow-lg:     0 4px 12px rgba(0, 0, 0, .40), 0 16px 48px rgba(0, 0, 0, .35);
    /* Hairline top-light â€” makes dark surfaces read as physical panels */
    --surface-edge:  inset 0 1px 0 rgba(255, 255, 255, .04);

    /* Fonts */
    --font-heading:  'Rajdhani', 'Sora', 'Segoe UI', sans-serif;
    --font-body:     'Sora', 'Segoe UI', sans-serif;
    --glow-text:     rgba(245, 179, 1, 0.45);

    /* Motion */
    --ease:          cubic-bezier(0.22, 1, 0.36, 1);
    --dur:           0.2s;
    --transition:    all 0.2s var(--ease);
}

/* Light theme overrides */
[data-theme="light"] {
    --bg-primary:    #f0f0f8;
    --bg-secondary:  #e8e8f5;
    --bg-card:       #ffffff;
    --bg-card-hover: #f4f4fc;
    --bg-input:      #ffffff;

    --border:        #d8d8ee;
    --border-focus:  #f5b301;

    --accent-dim:    rgba(245, 179, 1, 0.10);

    --text:          #0f0f1e;
    --text-muted:    #4a4a6a;
    --text-dim:      #8888aa;

    --glow:          rgba(245, 179, 1, 0.18);
    --glow-lg:       rgba(245, 179, 1, 0.30);

    --shadow-sm:     0 1px 2px rgba(15, 15, 30, .08), 0 1px 6px rgba(15, 15, 30, .05);
    --shadow-md:     0 2px 6px rgba(15, 15, 30, .10), 0 8px 24px rgba(15, 15, 30, .08);
    --shadow-lg:     0 4px 12px rgba(15, 15, 30, .12), 0 16px 48px rgba(15, 15, 30, .10);
    --surface-edge:  inset 0 1px 0 rgba(255, 255, 255, .65);
}

/* ----------------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    /* Subtle grid lines for gaming texture */
    background-image:
        linear-gradient(rgba(245, 179, 1,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 179, 1,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent2); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ----------------------------------------------------------------
   3. Custom Scrollbar (Webkit)
   ---------------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent2); }

/* ----------------------------------------------------------------
   4. Layout
   ---------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.main-content {
    min-height: calc(100vh - 64px - 200px);
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }

/* ----------------------------------------------------------------
   5. Typography
   ---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.04em;
    color: var(--text);
}

h1 { font-size: clamp(2rem,   5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); }
h4 { font-size: 1.15rem; }

.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-accent2{ color: var(--accent2); }
.text-success{ color: var(--success); }
.text-error  { color: var(--error); }
.text-center { text-align: center; }
.text-sm     { font-size: 0.85rem; }

/* ----------------------------------------------------------------
   6. Buttons
   ---------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(#ffd34d, var(--accent));
    color: #1a1206;
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 0 14px rgba(245, 179, 1, 0.22);
    transition: filter 0.2s ease, box-shadow 0.28s ease, transform 0.2s ease;
}
.btn-primary:hover {
    filter: brightness(1.08);
    background: linear-gradient(#ffd34d, var(--accent));
    color: #1a1206;
    border-color: var(--accent);
    box-shadow: 0 0 26px rgba(245, 179, 1, 0.45), 0 4px 20px rgba(245, 179, 1, 0.22);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent-dim);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger {
    background: var(--error);
    color: #fff;
    border-color: transparent;
}
.btn-danger:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ----------------------------------------------------------------
   7. Forms
   ---------------------------------------------------------------- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-control::placeholder { color: var(--text-dim); }

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-hint { font-size: 0.78rem; color: var(--text-dim); }
.form-error { font-size: 0.8rem; color: var(--error); }

.form-control.is-invalid { border-color: var(--error); }
.form-control.is-valid   { border-color: var(--success); }

/* Checkbox */
.check-group {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.check-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--accent);
    margin-top: 2px;
}

/* File input */
.file-upload-wrap {
    position: relative;
    display: block;
}
.file-upload-wrap input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.file-upload-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}
.file-upload-wrap:hover .file-upload-label {
    border-color: var(--accent);
    color: var(--accent);
}

/* ----------------------------------------------------------------
   8. Cards
   ---------------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}
.card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 32px var(--glow), 0 12px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(-4px);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

/* ----------------------------------------------------------------
   9. Badges & Chips
   ---------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-accent   { background: var(--accent-dim);  color: var(--accent); }
.badge-success  { background: rgba(16,185,129,.15); color: var(--success); }
.badge-warning  { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-error    { background: rgba(239,68,68,.15);  color: var(--error); }
.badge-muted    { background: var(--bg-secondary); color: var(--text-muted); }


/* ----------------------------------------------------------------
   10. Flash Messages
   ---------------------------------------------------------------- */
.flash {
    padding: 0.85rem 0;
    border-left: 4px solid;
    margin-bottom: 0;
    animation: slideDown 0.3s ease;
}
.flash .container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    padding: 0 0.25rem;
}
.flash-close:hover { opacity: 1; }

.flash-success { background: rgba(16,185,129,.12); border-color: var(--success); color: var(--success); }
.flash-error   { background: rgba(239,68,68,.12);  border-color: var(--error);   color: var(--error); }
.flash-warning { background: rgba(245,158,11,.12); border-color: var(--warning); color: var(--warning); }
.flash-info    { background: var(--accent-dim);    border-color: var(--accent);  color: var(--accent); }

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

/* ----------------------------------------------------------------
   11. Navigation
   ---------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 64px;
}
[data-theme="light"] .site-header {
    background: rgba(240, 240, 248, 0.88);
}

.navbar {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 1rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-img {
    height: 42px; width: auto; display: block; flex-shrink: 0;
    object-fit: contain;
    background: transparent; border: 0; padding: 0; border-radius: 0; box-shadow: none;
    clip-path: none;
}
@media (max-width: 680px) { .logo-img { height: 36px; } }
.logo-icon { font-size: 1.4rem; }
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #f1f5f9 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="light"] .logo-text {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-text span { color: var(--accent); }

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    list-style: none;
    flex-wrap: nowrap;
}
.nav-link {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    color: var(--text);
    background: var(--accent-dim);
}
.nav-link.active { color: var(--accent); }

/* Theme toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text);
}
.theme-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.4rem;
    background: none;
    border: none;
    margin-left: auto;
    color: var(--text);
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ----------------------------------------------------------------
   12. Hero Section (index.php)
   ---------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 5rem 0;
}

/* Atmospheric radial glow behind hero text */
.hero::before {
    content: '';
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85vw;
    height: 72vh;
    background: radial-gradient(ellipse, rgba(245, 179, 1,0.24) 0%, rgba(6,182,212,0.07) 50%, transparent 72%);
    pointer-events: none;
}

/* Grunge torn-edge at bottom of main hero */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 48px;
    background: var(--bg-primary);
    clip-path: polygon(
        0% 60%, 2% 28%, 4% 55%, 7% 18%, 9% 48%, 12% 30%, 14% 60%,
        17% 78%, 19% 38%, 22% 65%, 25% 20%, 27% 52%, 30% 25%, 32% 58%,
        35% 75%, 37% 35%, 40% 62%, 43% 20%, 45% 50%, 48% 28%, 50% 58%,
        52% 75%, 55% 35%, 57% 62%, 60% 22%, 62% 52%, 65% 30%, 67% 60%,
        70% 78%, 72% 35%, 75% 62%, 78% 20%, 80% 50%, 83% 28%, 85% 58%,
        88% 72%, 90% 32%, 93% 60%, 96% 22%, 98% 48%, 100% 55%,
        100% 100%, 0% 100%
    );
    z-index: 5;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 720px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: var(--accent-dim);
    border: 1px solid rgba(245, 179, 1,0.4);
    border-radius: var(--radius-pill);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    margin-bottom: 1.25rem;
    line-height: 1.08;
    text-shadow: 0 0 60px rgba(245, 179, 1, 0.35);
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ----------------------------------------------------------------
   13. Features / Modules Section (index + dashboard)
   ---------------------------------------------------------------- */
.section {
    padding: 5rem 0;
}
.section-sm {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header p {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0.75rem auto 0;
    font-size: 1.05rem;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.module-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    opacity: 0;
    transition: var(--transition);
}
.module-card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 36px var(--glow-lg), 0 12px 40px rgba(0,0,0,.4); transform: translateY(-5px); }
.module-card:hover::before { opacity: 1; }

.module-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    display: block;
}
.module-card h3 { margin-bottom: 0.5rem; }
.module-card p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.25rem; }

.module-card.locked {
    opacity: 0.7;
}
.module-card.locked:hover { opacity: 1; }

/* Module cards backed by section-banner media */
.module-card--media::before {
    z-index: 3; /* keep accent bar above media + overlay on hover */
}
.mc-bg-video,
.mc-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    display: block;
}
.mc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,.78) 100%);
    z-index: 1;
    pointer-events: none;
}
.mc-content {
    position: relative;
    z-index: 2;
}
.module-card--media h3,
.module-card--media .module-icon {
    color: #fff;
    text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.module-card--media p {
    color: rgba(255,255,255,.82) !important;
    text-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.module-card--media .btn-outline {
    color: #fff !important;
    border-color: rgba(255,255,255,.5) !important;
}
.module-card--media .btn-outline:hover {
    background: rgba(255,255,255,.12) !important;
}
/* Mobile: hide video, fall back to poster/image via CSS custom property */
@media (max-width: 768px) {
    .module-card--media .mc-bg-video { display: none; }
    .module-card--media { background-image: var(--mc-poster); background-size: cover; background-position: center; }
}
@media (prefers-reduced-motion: reduce) {
    .mc-bg-video { display: none; }
    .module-card--media { background-image: var(--mc-poster); background-size: cover; background-position: center; }
}

/* ----------------------------------------------------------------
   14. Stats Bar
   ---------------------------------------------------------------- */
.stats-bar {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.35rem;
}

/* ----------------------------------------------------------------
   15. Auth Pages (login.php, register.php)
   ---------------------------------------------------------------- */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

/* Hero-background variant â€” mosaic tiles fill the page */
.auth-hero-bg {
    position: relative;
    overflow: hidden;
    /* Align card to top when content exceeds viewport height (register form) */
    align-items: flex-start;
}
/* The mosaic and overlay (hero-mosaic / hero-overlay) are reused.
   Ensure the container and card sit above them. */
.auth-hero-bg .container {
    position: relative;
    z-index: 2;
}
/* Mosaic fills the full page height (register.php can be taller than viewport) */
.auth-hero-bg .hero-mosaic {
    position: fixed;  /* fixed so it covers the whole viewport even when scrolling */
}
/* Slightly darker overlay for auth pages â€” form must stay crisp */
.auth-hero-bg .hero-overlay {
    position: fixed;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.30) 0%, rgba(0,0,0,.78) 100%),
        linear-gradient(to bottom, rgba(0,0,0,.40) 0%, rgba(0,0,0,.86) 100%);
}
/* Frosted-glass card sits over the mosaic */
.auth-hero-bg .auth-card {
    background: rgba(8, 8, 20, 0.78);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    border-color: rgba(245, 179, 1, 0.28);
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 179, 1, 0.10);
}

/* Static-image variant â€” single admin-uploaded background */
.auth-static-bg {
    position: relative;
    overflow: hidden;
    align-items: flex-start;
}
.auth-static-bg .container {
    position: relative;
    z-index: 2;
}
.auth-static-bg-img {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}
.auth-static-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.80) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.88) 100%);
}
.auth-static-bg .auth-card {
    background: rgba(8, 8, 20, 0.78);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    border-color: rgba(245, 179, 1, 0.28);
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 179, 1, 0.10);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
    padding: 2.5rem;
}
.auth-card-wide {
    max-width: 680px;
}
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-header .auth-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}
.auth-header h1 { font-size: 1.9rem; margin-bottom: 0.4rem; }
.auth-header p  { color: var(--text-muted); font-size: 0.95rem; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-dim);
    font-size: 0.82rem;
    margin: 1.25rem 0;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Password strength meter */
.pw-strength {
    display: flex;
    gap: 4px;
    margin-top: 0.4rem;
}
.pw-bar {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: var(--border);
    transition: background 0.3s ease;
}
.pw-bar.weak   { background: var(--error); }
.pw-bar.fair   { background: var(--warning); }
.pw-bar.strong { background: var(--success); }

/* ----------------------------------------------------------------
   16. Dashboard
   ---------------------------------------------------------------- */
.dashboard-hero {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 0;
}
.dashboard-welcome {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.dashboard-welcome-text h2 { margin-bottom: 0.25rem; }
.dashboard-welcome-text p  { color: var(--text-muted); }

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.dash-stat {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.dash-stat-icon { font-size: 1.8rem; }
.dash-stat-val  { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.dash-stat-lbl  { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; }

/* ----------------------------------------------------------------
   17. Profile Page
   ---------------------------------------------------------------- */
.profile-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0 2rem;
}
.profile-header-inner {
    display: flex;
    align-items: flex-end;
    gap: 1.75rem;
    flex-wrap: wrap;
}
.profile-info h2 { margin-bottom: 0.25rem; }
.profile-username { color: var(--text-muted); font-size: 1rem; margin-bottom: 0.5rem; }
.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.profile-meta span { display: flex; align-items: center; gap: 0.3rem; }

.profile-body {
    padding: 2.5rem 0;
}
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

/* ----------------------------------------------------------------
   18. Avatar Component
   ---------------------------------------------------------------- */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--border);
    transition: var(--transition);
}
.avatar:hover { border-color: var(--accent); }
.avatar-sm  { width: 40px;  height: 40px;  font-size: 0.85rem; }
.avatar-md  { width: 80px;  height: 80px;  font-size: 1.5rem;  }
.avatar-lg  { width: 120px; height: 120px; font-size: 2.2rem;  }
.avatar-xl  { width: 150px; height: 150px; font-size: 2.8rem;  }

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* ----------------------------------------------------------------
   19. Stars / Rating
   ---------------------------------------------------------------- */
.stars { display: inline-flex; gap: 2px; align-items: center; }
.stars .star { display: inline-flex; }
.star-svg { width: .95em; height: .95em; display: block; }
.star-full  { color: var(--warning); }
.star-half  { color: var(--warning); position: relative; }
.star-half .star-half-fill {
    position: absolute; top: 0; left: 0;
    clip-path: inset(0 50% 0 0);
}
.star-empty { color: var(--text-dim); }

/* ----------------------------------------------------------------
   20. Edit Profile
   ---------------------------------------------------------------- */
.edit-profile-page {
    padding: 3rem 0;
}
.edit-profile-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}
.edit-profile-sidebar {
    position: sticky;
    top: 80px;
}
.avatar-upload-box {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}
.avatar-preview {
    margin: 0 auto 1rem;
}
.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}
.form-section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* ----------------------------------------------------------------
   21. Footer
   ---------------------------------------------------------------- */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 0.85rem 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.site-footer p { margin: 0; }

/* ----------------------------------------------------------------
   22. Page Section Helpers
   ---------------------------------------------------------------- */
.page-hero {
    background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-secondary) 60%, var(--bg-primary) 100%);
    border-bottom: none;
    padding: 1.6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero .container {
    position: relative;
    z-index: 10;
}
.page-hero h1 { margin-bottom: 0.5rem; }
.page-hero p  { color: var(--text-muted); }
/* Left-aligned header variant (matches marketplace section-page style) */
.page-hero--left { text-align: left; }

/* Grunge torn-edge bottom on plain page heroes */
.page-hero:not(.page-hero--banner):not(.page-hero--video)::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 44px;
    background: var(--bg-primary);
    clip-path: polygon(
        0% 55%, 2% 22%, 5% 52%, 7% 18%, 10% 45%, 13% 25%, 15% 55%,
        18% 74%, 20% 35%, 23% 60%, 26% 18%, 28% 48%, 31% 22%, 33% 55%,
        36% 72%, 38% 32%, 41% 58%, 44% 18%, 46% 48%, 49% 25%, 51% 55%,
        54% 72%, 56% 32%, 59% 58%, 62% 20%, 64% 50%, 67% 28%, 69% 58%,
        72% 76%, 74% 32%, 77% 58%, 80% 18%, 82% 48%, 85% 26%, 87% 56%,
        90% 70%, 92% 30%, 95% 58%, 97% 22%, 99% 45%, 100% 55%,
        100% 100%, 0% 100%
    );
    z-index: 5;
    pointer-events: none;
}

/* Banner variant â€” admin-uploaded background image behind the header band */
.page-hero--banner {
    position: relative;
    overflow: hidden;
    min-height: 0;
    border-bottom-color: transparent;
}
/* Background <img> absolutely fills the band â€” same pattern as .banner-video */
.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    display: block;
    filter: saturate(0.72) brightness(0.78);
}
/* Content sits above media (z:0), overlay (z:1), and grunge (z:5) */
.page-hero--banner .container {
    position: relative;
    z-index: 10;
}
.page-hero--banner h1 {
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,.72), 0 0 60px rgba(245, 179, 1,0.40);
}

/* Grunge torn-edge at bottom of banner hero */
.page-hero--banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 48px;
    background: var(--bg-primary);
    clip-path: polygon(
        0% 60%, 2% 28%, 4% 55%, 7% 18%, 9% 48%, 12% 30%, 14% 60%,
        17% 78%, 19% 38%, 22% 65%, 25% 20%, 27% 52%, 30% 25%, 32% 58%,
        35% 75%, 37% 35%, 40% 62%, 43% 20%, 45% 50%, 48% 28%, 50% 58%,
        52% 75%, 55% 35%, 57% 62%, 60% 22%, 62% 52%, 65% 30%, 67% 60%,
        70% 78%, 72% 35%, 75% 62%, 78% 20%, 80% 50%, 83% 28%, 85% 58%,
        88% 72%, 90% 32%, 93% 60%, 96% 22%, 98% 48%, 100% 55%,
        100% 100%, 0% 100%
    );
    z-index: 5;
    pointer-events: none;
}
.page-hero--banner p {
    color: rgba(255,255,255,.82) !important;
    text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
/* Outline buttons remain readable over photos */
.page-hero--banner .btn-outline {
    color: #fff !important;
    border-color: rgba(255,255,255,.5) !important;
}
.page-hero--banner .btn-outline:hover {
    background: rgba(255,255,255,.12) !important;
}

/* Video banner variant â€” looping muted video fills the header band */
.page-hero--video {
    position: relative;
    overflow: hidden;
    min-height: 0;
    border-bottom-color: transparent;
}
/* The <video> element covers the full band */
.banner-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: block;
    filter: saturate(0.72) brightness(0.78);
}
/* Cinematic dark overlay with side vignette */
.banner-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0,0,0,.32) 0%, rgba(0,0,0,.68) 65%, rgba(0,0,0,.88) 100%),
        radial-gradient(ellipse at center, transparent 38%, rgba(0,0,0,.52) 100%);
    z-index: 1;
    pointer-events: none;
}
/* Content floats above video, overlay, and grunge */
.page-hero--video .container {
    position: relative;
    z-index: 10;
}
.page-hero--video h1 {
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,.72), 0 0 60px rgba(245, 179, 1,0.40);
}

/* Grunge torn-edge at bottom of video hero */
.page-hero--video::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 48px;
    background: var(--bg-primary);
    clip-path: polygon(
        0% 58%, 2% 24%, 5% 52%, 7% 16%, 9% 46%, 12% 28%, 14% 58%,
        17% 76%, 19% 36%, 22% 63%, 25% 18%, 27% 50%, 30% 23%, 32% 56%,
        35% 73%, 37% 33%, 40% 60%, 43% 18%, 45% 48%, 48% 26%, 50% 56%,
        52% 73%, 55% 33%, 57% 60%, 60% 20%, 62% 50%, 65% 28%, 67% 58%,
        70% 76%, 72% 33%, 75% 60%, 78% 18%, 80% 48%, 83% 26%, 85% 56%,
        88% 70%, 90% 30%, 93% 58%, 96% 20%, 98% 46%, 100% 53%,
        100% 100%, 0% 100%
    );
    z-index: 5;
    pointer-events: none;
}
.page-hero--video p {
    color: rgba(255,255,255,.82) !important;
    text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.page-hero--video .btn-outline {
    color: #fff !important;
    border-color: rgba(255,255,255,.5) !important;
}
.page-hero--video .btn-outline:hover {
    background: rgba(255,255,255,.12) !important;
}
/* On mobile: skip the video download entirely â€” show poster as a bg instead */
@media (max-width: 768px) {
    .page-hero--video .banner-video { display: none; }
    .page-hero--video {
        background-image: var(--banner-poster);
        background-size: cover;
        background-position: center;
    }
}
/* Respect motion-sensitive users */
@media (prefers-reduced-motion: reduce) {
    .banner-video { display: none; }
    .page-hero--video {
        background-image: var(--banner-poster);
        background-size: cover;
        background-position: center;
    }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.empty-state h3 { color: var(--text-muted); margin-bottom: 0.5rem; }

/* ----------------------------------------------------------------
   23. Responsive
   ---------------------------------------------------------------- */

/* Tablet â‰¤ 900px */
@media (max-width: 900px) {
    .profile-grid   { grid-template-columns: 1fr; }
    .edit-profile-grid { grid-template-columns: 1fr; }
    .edit-profile-sidebar { position: static; }
}

/* Mobile â‰¤ 680px */
@media (max-width: 680px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        gap: 0.25rem;
        z-index: 199;
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-link, .btn { width: 100%; justify-content: center; }

    .form-row { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; }
    .auth-card { padding: 1.75rem 1.25rem; }

    .dashboard-welcome { flex-direction: column; align-items: flex-start; }
    .profile-header-inner { flex-direction: column; align-items: flex-start; }
}

/* Small mobile â‰¤ 400px */
@media (max-width: 400px) {
    h1 { font-size: 1.9rem; }
    .hero h1 { font-size: 2rem; }
}

/* ----------------------------------------------------------------
   24. Utility Classes
   ---------------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-0  { padding: 0; }

.d-flex         { display: flex; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-100 { width: 100%; }
.flex-wrap { flex-wrap: wrap; }

.divider {
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

/* ================================================================
   Phase 2 â€” Marketplace
   ================================================================ */

/* ---- Condition badges ---- */
.badge-cond-new      { background: rgba(16,185,129,.15);  color: #10b981; }
.badge-cond-like-new { background: rgba(6,182,212,.15);   color: #06b6d4; }
.badge-cond-good     { background: rgba(245, 179, 1,.15);  color: #f5b301; }
.badge-cond-fair     { background: rgba(245,158,11,.15);  color: #f59e0b; }
.badge-cond-parts    { background: rgba(239,68,68,.15);   color: #ef4444; }

/* ---- Filter bar ---- */
.filter-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: .9rem 0;
    position: sticky;
    top: 64px;
    z-index: 100;
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}
.filter-search { flex: 1 1 220px; }
.filter-select { flex: 1 1 160px; }
.filter-price  {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex: 1 1 180px;
}
.filter-price input { flex: 1; min-width: 0; }

/* ---- Listings grid ---- */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
}

/* ---- Listing card ---- */
.listing-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}
.listing-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-3px);
    color: var(--text);
}
.listing-card-img {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-secondary);
    overflow: hidden;
}
.listing-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.listing-card:hover .listing-card-img img { transform: scale(1.04); }
.listing-card-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: var(--text-dim);
}
.listing-card-badge {
    position: absolute;
    top: .6rem;
    left: .6rem;
    font-size: .7rem;
    font-weight: 700;
    padding: .2em .55em;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.listing-card-body {
    padding: .9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1;
}
.listing-card-cat  { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.listing-card-title{ font-family: var(--font-heading); font-size: 1rem; font-weight: 600; line-height: 1.3; }
.listing-card-price{ font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.listing-card-meta { font-size: .78rem; color: var(--text-dim); margin-top: auto; padding-top: .4rem; }

/* ---- Pagination ---- */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 2.5rem;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: .88rem;
    text-decoration: none;
    transition: var(--transition);
}
.page-btn:hover, .page-btn-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* ---- Create / Edit listing form ---- */
.listing-form-wrap { max-width: 780px; margin: 0 auto; }

/* Photo preview strip */
.photo-preview-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .75rem;
}
.photo-preview-thumb {
    position: relative;
    width: 100px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
}
.photo-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-primary-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(245, 179, 1,.85);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    text-align: center;
    padding: .15rem 0;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ---- Listing detail page ---- */
.listing-detail {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    padding: 2rem 1.25rem 3rem;
    align-items: start;
}

/* Gallery */
.gallery-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 4/3;
    border: 1px solid var(--border);
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-secondary);
}
.gallery-no-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--text-dim);
    gap: .5rem;
}
.gallery-thumbs {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}
.gallery-thumb {
    width: 70px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    cursor: pointer;
    opacity: .7;
    transition: var(--transition);
}
.gallery-thumb:hover, .gallery-thumb.active {
    border-color: var(--accent);
    opacity: 1;
}

/* Info panel */
.listing-info-header { margin-bottom: 1rem; }
.listing-title { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: .5rem; }
.listing-price { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.listing-meta  { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .88rem; color: var(--text-muted); margin: .9rem 0 1rem; }

.listing-owner-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.25rem; }

.listing-description { margin-bottom: 1.5rem; }
.listing-description h4 { font-family: var(--font-heading); font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); margin-bottom: .5rem; }
.listing-description p  { color: var(--text-muted); line-height: 1.7; white-space: pre-line; }

/* Seller card */
.seller-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.seller-card-title {
    font-family: var(--font-heading);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--accent);
    margin-bottom: .75rem;
}
.seller-card-body {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    margin-bottom: .85rem;
}
.seller-name {
    font-weight: 600;
    color: var(--text);
    font-size: .95rem;
}
.seller-name:hover { color: var(--accent); }
.seller-contact {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .6rem .85rem;
    margin: .75rem 0;
    font-size: .88rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
}

/* Breadcrumb */
.breadcrumb {
    font-size: .82rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2rem;
    margin-bottom: .5rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---- My Listings ---- */
.my-listings-list { display: flex; flex-direction: column; gap: 1px; }
.my-listing-row {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: .75rem;
    transition: var(--transition);
}
.my-listing-row:hover { border-color: var(--accent); }
.my-listing-row--dim  { opacity: .7; }

.my-listing-thumb { flex-shrink: 0; }
.my-listing-thumb img,
.my-listing-no-img {
    width: 80px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-dim);
}
.my-listing-title {
    font-weight: 600;
    color: var(--text);
    font-size: .95rem;
    display: block;
    margin-bottom: .3rem;
}
.my-listing-title:hover { color: var(--accent); }
.my-listing-meta  { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .8rem; }
.my-listing-price { text-align: right; white-space: nowrap; }
.my-listing-price strong { display: block; font-family: var(--font-heading); font-size: 1.05rem; color: var(--accent); }
.my-listing-actions { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; }

/* ---- Edit listing â€” existing photos grid ---- */
.existing-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.existing-photo-thumb {
    position: relative;
    width: 120px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-secondary);
}
.existing-photo-thumb img { width: 100%; height: 90px; object-fit: cover; display: block; }
.remove-photo-check {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    padding: .25rem .4rem;
    cursor: pointer;
    color: var(--text-muted);
}
.remove-photo-check input { accent-color: var(--error); }

/* ---- Responsive overrides ---- */
@media (max-width: 900px) {
    .listing-detail { grid-template-columns: 1fr; }
    .seller-card    { margin-top: 0; }
}
@media (max-width: 680px) {
    .filter-form    { flex-direction: column; align-items: stretch; }
    .filter-search,
    .filter-select,
    .filter-price   { flex: none; width: 100%; }
    .listings-grid  { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .my-listing-row { grid-template-columns: 64px 1fr; }
    .my-listing-price, .my-listing-actions { grid-column: 2; }
}

/* ============================================================
   PHASE 3: GAMESWAP
   ============================================================ */

/* Nav badge â€” pending swap count bubble */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: var(--accent);
    color: #1a1206;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

/* ---- Tab bar (game add form) ---- */
.tab-bar { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tab-btn {
    padding: .45rem 1rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: .88rem;
    transition: background .15s, color .15s, border-color .15s;
}
.tab-btn.active,
.tab-btn:hover   { background: var(--accent); color: #1a1206; border-color: var(--accent); }

/* ---- Game cover portrait image ---- */
.game-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-alt);
    display: block;
}
.game-cover-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border-radius: var(--radius);
    font-size: 2rem;
    color: var(--text-dim);
}

/* ---- Library grid ---- */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}
.library-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.library-card:hover        { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.library-card-cover        { position: relative; width: 100%; }
.library-card-body         { padding: .875rem; }
.library-card-title        { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--text); line-height: 1.3; }
.library-card-meta         { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.library-card-actions      { display: flex; flex-direction: column; gap: .5rem; }

/* Library entry status badges */
.badge-status-available { background: rgba(16,185,129,.15); color: #10b981; border-color: rgba(16,185,129,.3); }
.badge-status-pending   { background: rgba(245,158,11,.15);  color: #f59e0b; border-color: rgba(245,158,11,.3); }
.badge-status-swapped   { background: rgba(99,102,241,.15);  color: #6366f1; border-color: rgba(99,102,241,.3); }

/* ---- Swap status badges (on swap cards) ---- */
.badge-swap-pending   { background: rgba(245,158,11,.15);  color: #f59e0b; }
.badge-swap-accepted  { background: rgba(16,185,129,.15);  color: #10b981; }
.badge-swap-declined  { background: rgba(239,68,68,.15);   color: #ef4444; }
.badge-swap-cancelled { background: rgba(107,114,128,.15); color: #9ca3af; }
.badge-swap-completed { background: rgba(99,102,241,.15);  color: #6366f1; }

/* ---- Match grid ---- */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 1.5rem;
}
.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color .15s;
}
.match-card:hover        { border-color: var(--accent); }
.match-header            { display: flex; align-items: center; gap: .75rem; }
.match-partner-name      { font-weight: 600; color: var(--text); font-size: .95rem; }
.match-partner-meta      { font-size: .8rem; color: var(--text-dim); display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .15rem; }
.match-games             { display: flex; align-items: stretch; gap: .75rem; }
.match-game {
    flex: 1;
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: .75rem;
}
.match-game-cover        { width: 52px; flex-shrink: 0; }
.match-game-info         { flex: 1; min-width: 0; }
.match-label             { font-size: .68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2rem; }
.match-game-title        { font-size: .88rem; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: .3rem; }
.match-game-meta         { display: flex; flex-wrap: wrap; gap: .3rem; }
.match-arrow             { font-size: 1.4rem; color: var(--accent); display: flex; align-items: center; flex-shrink: 0; }
.match-footer            { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; border-top: 1px solid var(--border); padding-top: .75rem; }

/* ---- Swap cards ---- */
.swap-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 2rem 0 .875rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.swap-list               { display: flex; flex-direction: column; gap: 1rem; }
.swap-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}
.swap-card-games {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    min-width: 260px;
    flex-wrap: wrap;
}
.swap-game-chip {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: .5rem .75rem;
    font-size: .85rem;
    flex: 1;
    min-width: 130px;
}
.swap-game-chip img      { width: 32px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.swap-card-meta          { font-size: .8rem; color: var(--text-dim); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.swap-card-actions       { display: flex; gap: .5rem; flex-wrap: wrap; align-self: flex-end; }

/* ---- Browse swaps ---- */
.gs-filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}
.gs-filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }
.gs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
}
.gs-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.gs-card:hover             { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.gs-card-cover             { position: relative; width: 100%; }
.gs-card-body              { padding: .875rem; }
.gs-card-title             { font-weight: 600; font-size: .92rem; color: var(--text); margin-bottom: .35rem; line-height: 1.3; }
.gs-card-meta              { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.gs-card-owner             { display: flex; align-items: center; gap: .5rem; font-size: .82rem; }

/* ---- Responsive overrides for Phase 3 ---- */
@media (max-width: 680px) {
    .match-grid  { grid-template-columns: 1fr; }
    .match-games { flex-direction: column; }
    .match-arrow { transform: rotate(90deg); align-self: center; }
    .library-grid,
    .gs-grid     { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* =============================================================
   Phase 4 â€” Arena
   ============================================================= */

/* ---- Status badges ---- */
.badge-arena-open       { background: rgba(16,185,129,.18); color: #10b981; border: 1px solid rgba(16,185,129,.35); }
.badge-arena-progress   { background: rgba(245,158,11,.18); color: #f59e0b; border: 1px solid rgba(245,158,11,.35); }
.badge-arena-completed  { background: rgba(245, 179, 1,.18); color: #ffd34d; border: 1px solid rgba(245, 179, 1,.35); }
.badge-arena-cancelled  { background: rgba(239,68,68,.18);  color: #f87171; border: 1px solid rgba(239,68,68,.35); }

/* ---- Arena browse grid ---- */
.arena-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* ---- Tournament card (browse) ---- */
.tournament-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tournament-card:hover         { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.3); border-color: var(--accent); }
.tournament-card-head          { padding: 1.25rem 1.25rem .75rem; }
.tournament-card-title         { font-size: 1.05rem; font-weight: 700; margin: .25rem 0 .2rem; font-family: var(--font-heading); }
.tournament-card-title a       { color: var(--text); text-decoration: none; }
.tournament-card-title a:hover { color: var(--accent); }
.tournament-card-game          { font-size: .85rem; color: var(--text-dim); margin: 0; }
.tournament-card-body          { padding: 0 1.25rem .75rem; flex: 1; }
.tournament-card-meta          { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .82rem; color: var(--text-dim); }
.tournament-card-foot          { padding: .75rem 1.25rem 1.25rem; }

/* ---- Tournament list (my_tournaments) ---- */
.tournament-list               { display: flex; flex-direction: column; gap: .75rem; }
.tournament-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .15s;
    flex-wrap: wrap;
}
.tournament-row:hover          { border-color: var(--accent); }
.tournament-row-info           { flex: 1; min-width: 0; }
.tournament-row-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: .35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tournament-row-name:hover     { color: var(--accent); }
.tournament-row-meta           { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tournament-row-actions        { display: flex; gap: .5rem; flex-shrink: 0; }

/* ---- Tournament detail page layout ---- */
.tournament-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 1.5rem;
    align-items: start;
}
.tournament-main               { min-width: 0; }
.tournament-sidebar            { position: sticky; top: 80px; }

/* ---- Bracket ---- */
.bracket-round {
    margin-bottom: 2rem;
}
.bracket-round-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--border);
}
.bracket-match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    transition: border-color .15s;
}
.bracket-match-card:hover      { border-color: var(--accent); }
.bracket-match--done           { opacity: .85; }
.bracket-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}
.bracket-players {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.bracket-player {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .4rem .6rem;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    font-size: .9rem;
}
.bracket-player--tbd           { color: var(--text-dim); font-style: italic; }
.bracket-player--winner        { background: rgba(245, 179, 1,.18); border: 1px solid rgba(245, 179, 1,.4); }
.bracket-score {
    margin-left: auto;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
}
.bracket-vs {
    font-size: .75rem;
    color: var(--text-dim);
    text-align: center;
    font-style: italic;
}

/* ---- Score submission form ---- */
.match-report-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ---- Leaderboard ---- */
.leaderboard-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.lb-header {
    background: var(--bg-secondary);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}
.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 90px 70px 60px;
    align-items: center;
    padding: .75rem 1.25rem;
    gap: .75rem;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
.lb-row:last-child             { border-bottom: none; }
.lb-row:not(.lb-header):hover  { background: var(--bg-card-hover); }
.lb-row--top                   { background: rgba(245, 179, 1,.07); }
.lb-rank     { font-weight: 700; font-size: 1rem; text-align: center; }
.lb-player   { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.lb-pts      { text-align: right; }
.lb-stat     { text-align: center; color: var(--text-muted); }

/* ---- Responsive overrides for Phase 4 ---- */
@media (max-width: 900px) {
    .tournament-layout          { grid-template-columns: 1fr; }
    .tournament-sidebar         { position: static; }
}
@media (max-width: 680px) {
    .arena-grid                 { grid-template-columns: 1fr; }
    .lb-row {
        grid-template-columns: 40px 1fr 70px;
    }
    .lb-stat                    { display: none; }
    .bracket-player             { font-size: .82rem; }
}

/* =============================================================
   Phase 5 â€” M-Pesa Payments
   ============================================================= */

/* ---- Transaction status badges ---- */
.badge-pay-pending   { background: rgba(245,158,11,.18);  color: #f59e0b; border: 1px solid rgba(245,158,11,.35); }
.badge-pay-confirmed { background: rgba(16,185,129,.18);  color: #10b981; border: 1px solid rgba(16,185,129,.35); }
.badge-pay-rejected  { background: rgba(239,68,68,.18);   color: #f87171; border: 1px solid rgba(239,68,68,.35); }

/* ---- Payment box widget ---- */
.payment-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
}
.payment-box-header {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.payment-box-icon    { font-size: 1.75rem; flex-shrink: 0; }
.payment-box-title   { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; margin: 0 0 .1rem; }

/* ---- Till details block ---- */
.payment-box-till {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.payment-till-row    { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.payment-till-label  { font-size: .82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.payment-till-value  { font-weight: 600; }
.payment-till-number {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .1em;
}
.payment-till-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #10b981;
}

/* ---- Step-by-step instructions ---- */
.payment-steps {
    margin: 0 0 1.25rem 1.25rem;
    padding: 0;
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.8;
}
.payment-steps li    { margin-bottom: .2rem; }
.payment-steps strong { color: var(--text); }

/* ---- Payment form ---- */
.payment-form        { margin-top: .5rem; }
.payment-code-input  { font-family: 'Courier New', monospace; letter-spacing: .12em; font-weight: 600; }

/* ---- Notice at bottom of payment box ---- */
.payment-box-notice {
    margin: 1rem 0 0;
    padding: .75rem 1rem;
    background: rgba(245,158,11,.1);
    border: 1px solid rgba(245,158,11,.25);
    border-radius: var(--radius);
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.payment-box-notice a { color: var(--accent2); }

/* ---- Pay via Till collapsible on listing page ---- */
.pay-via-till-details {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.pay-via-till-summary {
    padding: .75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    background: var(--bg-secondary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    user-select: none;
}
.pay-via-till-summary::-webkit-details-marker { display: none; }
.pay-via-till-details[open] .pay-via-till-summary { border-bottom: 1px solid var(--border); }
.pay-via-till-details .payment-box { margin: 0; border-radius: 0; border: none; border-left: 4px solid var(--accent); }

/* ---- Swap deposit collapsible ---- */
.deposit-details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: .5rem;
    overflow: hidden;
}
.deposit-summary {
    padding: .6rem 1rem;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    background: var(--bg-secondary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    user-select: none;
}
.deposit-summary::-webkit-details-marker  { display: none; }
.deposit-details[open] .deposit-summary   { border-bottom: 1px solid var(--border); }
.deposit-details .payment-box             { margin: 0; border-radius: 0; border: none; border-left: 4px solid var(--accent); }

/* ---- Transaction table (transactions.php + admin_transactions.php) ---- */
.txn-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.txn-row {
    display: grid;
    grid-template-columns: 130px 1fr 110px 130px 110px 110px;
    align-items: center;
    padding: .75rem 1rem;
    gap: .75rem;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
.txn-row:last-child                    { border-bottom: none; }
.txn-row--header {
    background: var(--bg-secondary);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-dim);
}
.txn-row--pending                      { background: rgba(245,158,11,.04); }
.txn-row--confirmed                    { background: rgba(16,185,129,.04); }
.txn-row--rejected                     { background: rgba(239,68,68,.04); opacity: .8; }
.txn-row:not(.txn-row--header):hover   { background: var(--bg-card-hover); }

/* Admin table has an extra actions column */
.txn-col-actions  { display: flex; flex-wrap: wrap; gap: .35rem; align-items: flex-start; }

/* ---- Admin reject form (inline <details>) ---- */
.admin-reject-form {
    padding: .75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: .35rem;
    min-width: 240px;
}

/* ---- Responsive overrides for Phase 5 ---- */
@media (max-width: 900px) {
    .txn-row {
        grid-template-columns: 110px 1fr 90px 100px 90px;
    }
    .txn-col-date   { display: none; }
}
@media (max-width: 640px) {
    .txn-row {
        grid-template-columns: 1fr 80px;
        grid-template-rows: auto auto auto;
    }
    .txn-col-type   { grid-column: 1; }
    .txn-col-status { grid-column: 2; text-align: right; }
    .txn-col-ref    { grid-column: 1 / -1; font-size: .88rem; }
    .txn-col-amount { grid-column: 1; font-size: .95rem; }
    .txn-col-code   { grid-column: 2; text-align: right; font-size: .82rem; }
    .txn-col-date, .txn-col-actions { display: none; }
    .txn-row--header { display: none; }
    .payment-till-number { font-size: 1.2rem; }
}

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

/* Layout: sidebar + content */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 64px);
    align-items: flex-start;
}

.admin-sidebar {
    width: 220px;
    min-width: 220px;
    background: var(--surface-2);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    flex-shrink: 0;
}

.admin-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: .75rem 0 1rem;
}

.admin-sidebar-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: .25rem 1.1rem .75rem;
}

.admin-main {
    flex: 1;
    min-width: 0;
    overflow: auto;
}

/* Nav links */
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem 1.1rem;
    font-size: .875rem;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}
.admin-nav-link:hover {
    background: var(--surface-3);
    color: var(--text);
}
.admin-nav-link.active {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}
.admin-nav-icon { font-size: 1rem; line-height: 1; }

/* Nav badge (pending count) */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .35rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    background: var(--accent);
    color: #1a1206;
    line-height: 1;
}

/* nav-link--admin in site header */
.nav-link--admin {
    color: var(--accent) !important;
    font-weight: 600;
}

/* Overview cards (dashboard) */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.overview-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.overview-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--glow);
}
.overview-card--alert {
    border-color: var(--warning);
}
.overview-card-icon  { font-size: 1.5rem; line-height: 1; margin-bottom: .25rem; }
.overview-card-val   { font-size: 1.75rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.overview-card-lbl   { font-size: .78rem; color: var(--text-muted); font-weight: 500; }
.overview-card-note  { font-size: .72rem; color: var(--text-dim); margin-top: .1rem; }

/* Admin data table */
.admin-table {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.admin-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--border);
    gap: .75rem;
    font-size: .875rem;
}
.admin-row:last-child { border-bottom: none; }
.admin-row--header {
    background: var(--surface-2);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: .5rem 1rem;
}
.admin-row--muted { opacity: .6; }
.admin-row--muted:hover { opacity: 1; }

/* Responsive: collapse admin sidebar on mobile */
@media (max-width: 768px) {
    .admin-layout    { flex-direction: column; }
    .admin-sidebar   { width: 100%; min-width: 0; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
    .admin-sidebar-inner { flex-direction: row; flex-wrap: wrap; padding: .5rem; gap: .25rem; }
    .admin-sidebar-title { display: none; }
    .admin-nav-link  { border-left: none; border-bottom: 3px solid transparent; padding: .45rem .65rem; font-size: .8rem; }
    .admin-nav-link.active { border-bottom-color: var(--accent); border-left: none; }
    .admin-row { gap: .4rem; padding: .5rem .65rem; }
}

/* ============================================================
   HOMEPAGE HERO â€” mosaic photo-wall
   ============================================================ */

/*
 * Tile entrance: each mosaic tile fades in from slightly scaled-up.
 * animation-delay is set inline per-tile (PHP: $i * 0.05s) so tiles
 * cascade in left-to-right, top-to-bottom for a cinematic page-load feel.
 * No JS required â€” pure CSS.
 */
@keyframes heroTileFadeIn {
    from { opacity: 0; transform: scale(1.04); }
    to   { opacity: 1; transform: scale(1); }
}

/*
 * Per-tile subtle drift: a very slow, barely perceptible zoom gives the
 * mosaic a sense of life without being distracting.
 */
@keyframes heroTileDrift {
    from { transform: scale(1); }
    to   { transform: scale(1.07); }
}

/* Section wrapper â€” fills the viewport below the nav bar */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Solid dark fallback shown while images load or when none are uploaded */
    background: linear-gradient(135deg, #0d0d1a 0%, #1a0030 50%, #001a30 100%);
}

/*
 * Mosaic grid â€” absolutely fills the hero behind the overlay.
 *
 * grid-auto-rows: 1fr distributes the container's height equally across
 * however many rows the tile count produces, so tiles always cover the
 * full hero height regardless of viewport size.
 *
 * overflow: hidden silently clips tiles that overflow below the hero,
 * which happens on smaller breakpoints where fewer columns = more rows.
 */
.hero-mosaic {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 3px;
    overflow: hidden;
    z-index: 0;
}

/* Single mosaic tile */
.hero-mosaic-tile {
    overflow: hidden;
    /* Entrance animation; delay applied inline per-tile */
    animation: heroTileFadeIn 0.8s ease-out both;
}

/* Tile image â€” fills cell, cinematic desaturation, slow drift */
.hero-mosaic-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.65) brightness(0.82);
    animation: heroTileDrift 16s ease-out forwards;
}

/* Dark gradient overlay between image grid and text */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 45%, transparent 12%, rgba(0,0,0,.70) 100%),
        linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,.80) 100%);
    z-index: 1;
}

/* Grunge torn-edge at bottom of homepage hero */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 48px;
    background: var(--bg-primary);
    clip-path: polygon(
        0% 60%, 2% 28%, 4% 55%, 7% 18%, 9% 48%, 12% 30%, 14% 60%,
        17% 78%, 19% 38%, 22% 65%, 25% 20%, 27% 52%, 30% 25%, 32% 58%,
        35% 75%, 37% 35%, 40% 62%, 43% 20%, 45% 50%, 48% 28%, 50% 58%,
        52% 75%, 55% 35%, 57% 62%, 60% 22%, 62% 52%, 65% 30%, 67% 60%,
        70% 78%, 72% 35%, 75% 62%, 78% 20%, 80% 50%, 83% 28%, 85% 58%,
        88% 72%, 90% 32%, 93% 60%, 96% 22%, 98% 48%, 100% 55%,
        100% 100%, 0% 100%
    );
    z-index: 5;
    pointer-events: none;
}

/* Hero text â€” centered above the overlay and grunge edge */
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 680px;
    padding: 5rem 1.5rem 6rem;
}

/* Site name â€” display treatment above the headline */
.hero-site-name {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.95);
    margin-bottom: .5rem;
    text-shadow: 0 0 30px rgba(245, 179, 1,.6), 0 1px 12px rgba(0,0,0,.5);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--font-body);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .85rem;
    padding: .3rem .8rem;
    border: 1px solid rgba(245, 179, 1,.35);
    border-radius: 2px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5.5vw, 4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: .75rem;
    text-shadow: 0 2px 32px rgba(0,0,0,.7), 0 0 60px rgba(245, 179, 1,.35);
}

.hero-subtitle {
    font-size: clamp(.88rem, 2vw, 1.05rem);
    color: rgba(255,255,255,.8);
    margin-bottom: 2.25rem;
    line-height: 1.65;
    text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

.hero-cta-row {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Ghost CTA â€” white outline legible over any background image */
.hero-btn-ghost {
    color: #fff !important;
    border-color: rgba(255,255,255,.45) !important;
}
.hero-btn-ghost:hover {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.8) !important;
}

/* Responsive mosaic columns */
@media (max-width: 900px) {
    .hero-mosaic { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .hero-mosaic { grid-template-columns: repeat(2, 1fr); gap: 2px; }
    .hero-content { padding: 3.5rem 1.25rem 4.5rem; }
}

/* ---- Module card styles (kept for other pages that may use them) ---- */
.module-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    padding: 2.5rem 0;
}
.module-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    background: var(--surface-2);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
}
.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--glow);
    border-color: var(--accent);
}
.module-card-img {
    width: 100%;
    aspect-ratio: 8/5;
    object-fit: cover;
    display: block;
    background: var(--surface-3);
}
.module-card-img-placeholder {
    width: 100%;
    aspect-ratio: 8/5;
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}
.module-card-body {
    padding: 1.1rem 1.2rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.module-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}
.module-card-desc {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex: 1;
}
.module-card-action {
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: .5rem;
}

/* Stats strip (kept in case used elsewhere) */
.stats-strip {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}
.stat-item  { text-align: center; }
.stat-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.stat-lbl {
    font-size: .75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: .2rem;
}

/* ================================================================
   ATMOSPHERIC RESTYLE â€” Premium Gaming Theme
   Scroll reveal, extra hover polish, motion
   ================================================================ */

/* ---- Scroll Reveal ---- */
.js-ready .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .js-ready .reveal,
    .js-ready .reveal.is-visible {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Stagger grid children â€” works when parent is not .reveal but children are */
.js-ready .reveal:nth-child(2) { transition-delay: 0.08s; }
.js-ready .reveal:nth-child(3) { transition-delay: 0.16s; }
.js-ready .reveal:nth-child(4) { transition-delay: 0.24s; }
.js-ready .reveal:nth-child(5) { transition-delay: 0.32s; }

/* ---- Section header glow accent ---- */
.section-header h2 {
    position: relative;
}
.section-header h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    margin: 0.6rem auto 0;
    box-shadow: 0 0 12px var(--glow);
}

/* ---- Listing card hover ---- */
.listing-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 28px var(--glow), 0 8px 32px rgba(0,0,0,.35);
    transform: translateY(-4px);
}

/* ---- Nav active link glow ---- */
.nav-link.active {
    color: var(--accent);
    text-shadow: 0 0 16px rgba(245, 179, 1,0.45);
}

/* ---- Stat numbers pulse ---- */
.stat-number,
.stat-val {
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

/* ---- Page hero plain heading glow ---- */
.page-hero:not(.page-hero--banner):not(.page-hero--video) h1 {
    text-shadow: 0 0 40px rgba(245, 179, 1, 0.30);
}

/* ---- Banner outline button on dark hero ---- */
.page-hero--banner .btn-primary,
.page-hero--video .btn-primary {
    color: #fff;
    border-color: rgba(255,255,255,0.65);
    box-shadow: 0 0 14px rgba(255,255,255,0.1);
}
.page-hero--banner .btn-primary:hover,
.page-hero--video .btn-primary:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 24px rgba(255,255,255,0.22);
}

/* =====================================================================
   MARKETPLACE v2
   ===================================================================== */

/* WhatsApp sell button */
.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.25rem;
    background: #25d366;
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .88rem;
    font-family: var(--font-body);
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-wa:hover {
    background: #1fba59;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37,211,102,.32);
}
.btn-wa-icon { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* Hero */
.mp-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0e0a1a 0%, #18082e 100%);
    border-bottom: 1px solid var(--border);
}
.mp-hero-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
}
.mp-hero-banner-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
    filter: saturate(.6) brightness(.65);
}
.mp-hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(245, 179, 1,.22) 0%, transparent 60%),
        linear-gradient(to right, rgba(0,0,0,.82) 0%, rgba(0,0,0,.38) 100%);
}
.mp-hero-inner {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
    padding-top: 1.6rem; padding-bottom: 1.6rem;
}
.mp-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #fff;
    margin: 0 0 .25rem;
    display: flex; align-items: center; gap: .5rem;
    text-shadow: 0 0 30px rgba(245, 179, 1,.4);
    line-height: 1.1;
}
.mp-hero-sub {
    color: rgba(255,255,255,.55);
    font-size: .85rem;
    margin: 0;
}
.mp-hero-right { flex-shrink: 0; }

/* Category chips bar */
.mp-chips-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: .55rem 0;
}
.mp-chips-scroll {
    display: flex; gap: .4rem;
    overflow-x: auto; scrollbar-width: none;
    padding-bottom: 1px;
    -webkit-overflow-scrolling: touch;
    align-items: center;
}
.mp-chips-scroll::-webkit-scrollbar { display: none; }
.mp-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .3rem .85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: .78rem; font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap; text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
    line-height: 1.4;
}
.mp-chip:hover { border-color: var(--accent); color: var(--accent); }
.mp-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1206;
    font-weight: 600;
}

/* Filter toolbar */
.mp-toolbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: .65rem 0 .6rem;
    position: sticky; top: 64px; z-index: 90;
}
.mp-filters {
    display: flex; flex-wrap: wrap;
    align-items: center; gap: .45rem;
}

/* Search */
.mp-search-wrap {
    position: relative;
    flex: 2 1 220px;
    min-width: 180px;
}
.mp-search-icon {
    position: absolute; left: .75rem; top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim); pointer-events: none;
    display: flex; align-items: center;
}
.mp-search-input {
    width: 100%;
    padding: .52rem .85rem .52rem 2.35rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text); font-size: .875rem;
    font-family: var(--font-body);
    transition: border-color .2s, box-shadow .2s;
}
.mp-search-input::placeholder { color: var(--text-dim); }
.mp-search-input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow);
}

/* Custom category dropdown */
.mp-cat-picker { position: relative; flex: 1 1 170px; min-width: 150px; }
.mp-cat-trigger {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    gap: .4rem; padding: .52rem .85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text); font-size: .875rem;
    font-family: var(--font-body);
    cursor: pointer; text-align: left;
    transition: border-color .2s, box-shadow .2s;
}
.mp-cat-trigger:hover,
.mp-cat-trigger[aria-expanded="true"] { border-color: var(--accent); }
.mp-cat-trigger[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--glow); }
.mp-cat-chevron {
    width: 1rem; height: 1rem; flex-shrink: 0;
    color: var(--text-dim);
    transition: transform .2s ease;
}
.mp-cat-trigger[aria-expanded="true"] .mp-cat-chevron { transform: rotate(180deg); }
.mp-cat-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.mp-cat-menu {
    position: absolute; top: calc(100% + 5px); left: 0; right: 0;
    min-width: 220px; max-height: 300px;
    overflow-y: auto; overflow-x: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(245, 179, 1,.15);
    z-index: 200; padding: .35rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.mp-cat-menu::-webkit-scrollbar { width: 4px; }
.mp-cat-menu::-webkit-scrollbar-track { background: transparent; }
.mp-cat-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.mp-cat-option {
    display: flex; align-items: center; gap: .65rem;
    padding: .55rem 1rem; font-size: .875rem;
    color: var(--text); cursor: pointer;
    transition: background .12s; white-space: nowrap;
    user-select: none;
}
.mp-cat-option:hover { background: var(--bg-secondary); }
.mp-cat-option.is-selected { color: var(--accent); font-weight: 600; background: rgba(245, 179, 1,.09); }
.mp-cat-emoji { font-size: 1.15em; line-height: 1; flex-shrink: 0; }

/* Selects */
.mp-select {
    flex: 1 1 145px; min-width: 130px;
    padding: .52rem .85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text); font-size: .875rem;
    font-family: var(--font-body);
    cursor: pointer; transition: border-color .2s, box-shadow .2s;
    appearance: auto;
}
.mp-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.mp-select--sort { flex: 0 1 auto; min-width: 165px; }

/* Price range */
.mp-price-range { display: flex; align-items: center; gap: .3rem; flex: 1 1 175px; min-width: 160px; }
.mp-price-input {
    flex: 1; min-width: 0;
    padding: .52rem .65rem;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: .875rem;
    font-family: var(--font-body); transition: border-color .2s, box-shadow .2s;
}
.mp-price-input::placeholder { color: var(--text-dim); }
.mp-price-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.mp-price-dash { color: var(--text-dim); flex-shrink: 0; font-size: .9rem; }

/* View toggle */
.mp-view-toggle { display: flex; gap: .2rem; flex-shrink: 0; }
.mp-view-btn {
    display: flex; align-items: center; justify-content: center;
    width: 35px; height: 35px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-dim); cursor: pointer;
    transition: var(--transition); padding: 0;
}
.mp-view-btn:hover { border-color: var(--accent); color: var(--accent); }
.mp-view-btn.is-active { background: var(--accent); border-color: var(--accent); color: #1a1206; }

/* Active filter chips */
.mp-active-chips {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: .35rem; padding-top: .55rem;
}
.mp-active-label { font-size: .78rem; color: var(--text-dim); }
.mp-filter-chip {
    display: inline-flex; align-items: center; gap: .28rem;
    padding: .22rem .6rem;
    background: rgba(245, 179, 1,.1); border: 1px solid rgba(245, 179, 1,.28);
    border-radius: var(--radius-pill); font-size: .76rem; font-weight: 500;
    color: var(--accent); text-decoration: none; transition: background .15s;
}
.mp-filter-chip:hover { background: rgba(245, 179, 1,.2); }
.mp-chip-x { opacity: .55; font-size: 1em; line-height: 1; }
.mp-clear-all {
    font-size: .76rem; color: var(--text-dim); text-decoration: underline;
    transition: color .15s;
}
.mp-clear-all:hover { color: var(--text); }

/* Results wrapper */
.mp-results { padding: 1.5rem 1.25rem 3.5rem; }
.mp-results-meta { display: flex; align-items: baseline; gap: .6rem; margin-bottom: 1.25rem; font-size: .875rem; color: var(--text-muted); }
.mp-count strong { color: var(--text); font-size: 1rem; }
.mp-count em { font-style: normal; color: var(--accent); }

/* ---------------------------------------------------------------------
   Storefront layout â€” category sidebar (left) + item grid (right)
   Desktop: 2-col grid. Mobile: sidebar becomes a horizontal scroll row.
   --------------------------------------------------------------------- */
.mp-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
    /* Flush the sidebar to the far-left edge: cancel .container centering + left padding */
    max-width: none;
    margin-left: 0;
    padding: 1.75rem 1.25rem 3.5rem 0;
}

/* Sidebar */
.mp-sidebar { position: sticky; top: 84px; align-self: start; min-width: 0; }
.mp-sidebar-title {
    font-family: var(--font-heading);
    font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-dim); margin: 0 0 .6rem .3rem;
}
.mp-cat-list {
    display: flex; flex-direction: column; gap: .2rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: .45rem;
}
.mp-cat-item {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    padding: .6rem .75rem; border-radius: var(--radius);
    text-decoration: none; color: var(--text-muted);
    font-size: .9rem; font-weight: 500; line-height: 1.2;
    transition: background .18s, color .18s, box-shadow .18s;
}
.mp-cat-item:hover { background: var(--bg-secondary); color: var(--text); }
.mp-cat-item.is-active {
    background: linear-gradient(135deg, rgba(245, 179, 1,.20), rgba(245, 179, 1,.07));
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(245, 179, 1,.38);
}
.mp-cat-item-name {
    min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mp-cat-item-count {
    flex-shrink: 0; font-size: .72rem; font-weight: 700;
    color: var(--text-dim); background: var(--bg-secondary);
    padding: .12rem .5rem; border-radius: var(--radius-pill);
    min-width: 1.6rem; text-align: center;
}
.mp-cat-item.is-active .mp-cat-item-count { color: var(--accent); background: rgba(245, 179, 1,.16); }

/* Main column */
.mp-main { min-width: 0; }
.mp-main .mp-results-meta { justify-content: space-between; margin-bottom: 1.1rem; }
.mp-main-heading { font-family: var(--font-heading); font-size: 1.25rem; margin: 0; }
.mp-main .mp-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); }

/* Mobile: single column; category list becomes a horizontal scroll strip. */
@media (max-width: 860px) {
    .mp-layout { grid-template-columns: 1fr; gap: 1rem; padding: 1.25rem 1.25rem 3.5rem; }
    .mp-sidebar { position: static; }
    .mp-sidebar-title { display: none; }
    .mp-cat-list {
        flex-direction: row; flex-wrap: nowrap;
        overflow-x: auto; gap: .45rem; padding: .5rem;
        -webkit-overflow-scrolling: touch; scrollbar-width: thin;
    }
    .mp-cat-item {
        flex: 0 0 auto;                 /* keep width; scroll instead of wrap */
    }
    .mp-cat-item-name { white-space: nowrap; }
}

/* Product grid */
.mp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    align-items: start;
}

/* Product card */
.mp-card {
    display: flex; flex-direction: column;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    text-decoration: none; color: var(--text);
    transition: border-color .25s, box-shadow .25s, transform .25s;
    height: 100%;
}
.mp-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 28px var(--glow), 0 10px 36px rgba(0,0,0,.32);
    transform: translateY(-4px);
    color: var(--text);
}

/* Card image */
.mp-card-img {
    position: relative; aspect-ratio: 4/3;
    background: var(--bg-secondary); overflow: hidden; flex-shrink: 0;
}
.mp-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
    display: block;
}
.mp-card:hover .mp-card-img img { transform: scale(1.05); }
.mp-card-no-img {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 2.8rem; color: var(--text-dim);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(245, 179, 1,.06) 100%);
}

/* Condition badge */
.mp-cond-badge {
    position: absolute; top: .5rem; left: .5rem;
    font-size: .67rem; font-weight: 700;
    padding: .18em .52em; border-radius: var(--radius-pill);
    text-transform: uppercase; letter-spacing: .5px;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}

/* Card body */
.mp-card-body { padding: .8rem .95rem .9rem; display: flex; flex-direction: column; gap: .28rem; flex: 1; }
.mp-card-cat {
    font-size: .7rem; font-weight: 600;
    color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px;
    display: flex; align-items: center; gap: .28rem;
}
.mp-card-title {
    font-family: var(--font-heading);
    font-size: .95rem; font-weight: 600; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin: 0;
}
.mp-card-price {
    font-family: var(--font-heading);
    font-size: 1.15rem; font-weight: 700;
    color: var(--accent); letter-spacing: .01em;
    margin-top: .1rem;
}
.mp-card-meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: .45rem; margin-top: auto; padding-top: .5rem;
    font-size: .73rem; color: var(--text-dim); border-top: 1px solid var(--border);
}
.mp-meta-loc { display: flex; align-items: center; gap: .2rem; }

/* List view variant */
.mp-view-list { grid-template-columns: 1fr !important; gap: .5rem; }
.mp-view-list .mp-card { flex-direction: row; min-height: 100px; }
.mp-view-list .mp-card-img {
    width: 160px; aspect-ratio: unset; height: auto; flex-shrink: 0;
    border-radius: 0; min-height: 110px;
}
.mp-view-list .mp-card-body {
    flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: .4rem .75rem; padding: .75rem 1rem;
}
.mp-view-list .mp-card-cat  { order: 1; flex-basis: 100%; }
.mp-view-list .mp-card-title { order: 2; flex: 1 1 200px; -webkit-line-clamp: 1; font-size: .925rem; }
.mp-view-list .mp-card-price { order: 3; flex-shrink: 0; margin: 0; font-size: 1rem; }
.mp-view-list .mp-card-meta  { order: 4; flex-basis: 100%; padding-top: .25rem; border: none; }

/* Responsive grid breakpoints */
@media (max-width: 1200px) {
    .mp-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    .mp-grid { grid-template-columns: repeat(2, 1fr); }
    .mp-view-toggle { display: none; }
}
@media (max-width: 640px) {
    .mp-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .mp-select--sort, .mp-price-range { display: none; }
    .mp-card-body { padding: .65rem .7rem .75rem; }
    .mp-card-price { font-size: 1rem; }
    .mp-hero-inner { padding-top: 1.1rem; padding-bottom: 1.1rem; }
    .mp-hero-title { font-size: 1.35rem; }
    .mp-view-list .mp-card-img { width: 100px; }
}

/* Admin categories row highlight */
.admin-row--highlighted { background: rgba(245, 179, 1,.06); border-left: 3px solid var(--accent); }

/* ================================================================
   REALISM PASS â€” depth, texture, micro-interactions, consistency
   ================================================================ */

/* ---- 1. Selection & focus ---- */
::selection { background: rgba(245, 179, 1, .40); color: #fff; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
.btn:focus-visible, .form-control:focus-visible, .nav-link:focus-visible {
    outline-offset: 1px;
}

/* ---- 2. Custom scrollbar ---- */
html {
    scrollbar-width: thin;
    scrollbar-color: #34345c var(--bg-primary);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #34345c, #26264a);
    border-radius: 6px;
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }
[data-theme="light"] html { scrollbar-color: #c4c4e0 var(--bg-primary); }
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c4c4e0;
    border-color: var(--bg-primary);
}

/* ---- 3. Film grain on large dark surfaces ----
   A fixed, near-invisible fractal-noise layer stops flat digital black.
   pointer-events: none keeps it purely decorative. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 160px 160px;
    mix-blend-mode: overlay;
}
[data-theme="light"] body::after { display: none; }

/* ---- 4. Surface depth â€” cards feel like physical panels ----
   Subtle top-light hairline + vertical sheen + ambient shadow. */
.card,
.mp-card,
.listing-card,
.module-card,
.overview-card,
.dash-stat,
.gs-card,
.auth-card,
.admin-sidebar-inner,
.admin-table,
.mp-toolbar,
.leaderboard-table {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .022) 0%, rgba(255, 255, 255, 0) 42%);
    box-shadow: var(--shadow-sm), var(--surface-edge);
}
[data-theme="light"] .card,
[data-theme="light"] .mp-card,
[data-theme="light"] .listing-card,
[data-theme="light"] .module-card,
[data-theme="light"] .overview-card,
[data-theme="light"] .dash-stat,
[data-theme="light"] .gs-card,
[data-theme="light"] .auth-card {
    background-image: none;
}

/* Hover elevation â€” restate the glow ring on top of the resting shadow */
.card:hover {
    box-shadow: 0 0 0 1px var(--accent), 0 0 32px var(--glow), var(--shadow-lg), var(--surface-edge);
}
.mp-card:hover,
.listing-card:hover {
    box-shadow: 0 0 0 1px var(--accent), 0 0 28px var(--glow), var(--shadow-lg), var(--surface-edge);
}
.module-card:hover {
    box-shadow: 0 12px 40px var(--glow), var(--shadow-lg), var(--surface-edge);
}

/* ---- 5. Header â€” deepen the glass ---- */
.site-header {
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 8px 32px rgba(0, 0, 0, .35);
}
[data-theme="light"] .site-header {
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 8px 32px rgba(15, 15, 30, .08);
}

/* ---- 6. Buttons â€” unified motion, brighten on hover ---- */
.btn {
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
                border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                transform var(--dur) var(--ease), filter var(--dur) var(--ease);
    cursor: pointer;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost:hover {
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-danger:hover { opacity: 1; filter: brightness(1.12); box-shadow: 0 4px 18px rgba(239, 68, 68, .35); }
.btn-wa { transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }

/* ---- 7. Links â€” animated underline (content links) ---- */
.empty-state a,
p a:not(.btn):not(.btn-wa) {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}
.empty-state a:hover,
p a:not(.btn):not(.btn-wa):hover {
    background-size: 100% 1px;
}

/* Interactive icons glow gently on hover */
a:hover > .icon,
button:hover > .icon,
.btn:hover .icon {
    filter: drop-shadow(0 0 6px var(--glow-text));
}
.icon, .star-svg { transition: filter var(--dur) var(--ease); }

/* ---- 8. Image system â€” shimmer while loading, fade in, text gradient ---- */

/* Shimmer placeholder behind every image slot */
.mp-card-img,
.my-listing-thumb,
.gallery-main,
.gs-card-cover {
    background: linear-gradient(110deg, var(--bg-secondary) 8%, var(--bg-card-hover) 18%, var(--bg-secondary) 33%);
    background-size: 200% 100%;
    animation: imgShimmer 1.6s linear infinite;
}
@keyframes imgShimmer {
    to { background-position: -200% 0; }
}
/* Static placeholder tone for slots with their own animations */
.hero-mosaic-tile { background: var(--bg-secondary); }

/* Fade-in when the file finishes loading (class added by footer JS) */
.js-ready img.img-fade { opacity: 0; transition: opacity .5s ease; }
.js-ready img.img-fade.is-loaded { opacity: 1; }

/* Bottom gradient on card imagery so overlaid text/badges always read */
.mp-card-img::after,
.gs-card-cover::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(6, 6, 16, .55), transparent);
    pointer-events: none;
    z-index: 1;
}
.mp-card-img { position: relative; }
.gs-card-cover { position: relative; overflow: hidden; }
.mp-cond-badge { z-index: 2; }

/* Empty image slots â€” gradient + faint controller watermark, never a broken icon */
.mp-card-no-img,
.my-listing-no-img,
.game-cover-placeholder,
.module-card-img-placeholder {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(245, 179, 1, .10), transparent 65%),
        linear-gradient(160deg, var(--bg-secondary) 0%, #101024 100%);
    color: rgba(148, 163, 184, .35);
    animation: none;
}
.mp-card-no-img .icon-module,
.my-listing-no-img .icon-module,
.game-cover-placeholder .icon-module {
    opacity: .5;
    filter: drop-shadow(0 2px 12px rgba(245, 179, 1, .25));
}

/* ---- 9. Skeleton loaders ---- */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .045), transparent);
    animation: skeletonSweep 1.4s ease infinite;
}
@keyframes skeletonSweep {
    to { transform: translateX(100%); }
}

/* ---- 10. Empty states â€” designed, not default ---- */
.empty-state {
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(245, 179, 1, .06), transparent 60%),
        var(--bg-card);
    padding: 3rem 1.5rem;
    text-align: center;
}
.empty-state .empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 1rem;
    border-radius: 50%;
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 0 1px rgba(245, 179, 1, .25), 0 0 32px var(--glow);
}
.empty-state h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ---- 11. Forms â€” consistent hover affordance ---- */
.form-control:hover:not(:focus) { border-color: #3a3a62; }
[data-theme="light"] .form-control:hover:not(:focus) { border-color: #b8b8dc; }

/* ---- 12. Tables & admin rows ---- */
.admin-row { transition: background var(--dur) var(--ease); }
.admin-row:hover:not(.admin-row--header) { background: rgba(245, 179, 1, .04); }

/* ---- 12b. Logo mark â€” proper size + subtle glow (header & footer) ---- */
.logo-icon {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--glow-text));
}
.logo-icon .icon-module {
    width: 1.6em;
    height: 1.6em;
    margin: 0;
    display: block;
}

/* ---- 13. Global motion sanity ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .js-ready img.img-fade { opacity: 1; }
}

/* ====================================================================
   Repair technicians / providers directory (repairs.php)
   ==================================================================== */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    align-items: start;
}
.provider-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.provider-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 24px var(--glow), 0 10px 30px rgba(0,0,0,.3);
    transform: translateY(-3px);
}
.provider-card-link { text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.provider-photo {
    aspect-ratio: 16 / 10;
    background: var(--bg-secondary);
    overflow: hidden;
}
.provider-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.provider-card:hover .provider-photo img { transform: scale(1.04); }
.provider-photo-none {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; color: var(--text-dim);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(245, 179, 1,.06) 100%);
}
.provider-body { padding: .85rem .95rem .5rem; display: flex; flex-direction: column; gap: .35rem; }
.provider-name {
    font-family: var(--font-heading);
    font-size: 1.02rem; font-weight: 600; line-height: 1.25; margin: 0;
}
.provider-region {
    display: flex; align-items: center; gap: .3rem;
    font-size: .8rem; color: var(--text-muted);
}
.provider-desc {
    font-size: .82rem; color: var(--text-dim); margin: .1rem 0 0; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.provider-actions {
    display: flex; gap: .5rem; padding: .5rem .95rem 1rem; margin-top: auto;
}
.provider-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }

@media (max-width: 640px) {
    .provider-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
    .provider-actions { flex-direction: column; }
}

/* ===== Esports Pro sample â€” arena.php ONLY (scoped to .es-hero/.es-layout) ===== */
.es-hero, .es-layout{ --slate:#0e1620; --slate2:#16212e; --line:#26374a; --gold:#f5b301; --gold-hi:#ffd34d; --ink:#e8eef5; --muted:#93a4b6; }
.es-hero{ background:linear-gradient(120deg,#0c141d,#16212e 72%); border-bottom:1px solid var(--line); }
.es-hero::after{ content:none !important; }
.es-title{ margin:0; font-family:var(--font-heading); font-style:italic; font-weight:800; text-transform:uppercase; font-size:clamp(1.9rem,4.6vw,2.9rem); line-height:.95; color:var(--ink); }
.es-title span{ position:relative; display:inline-block; padding-left:.15em; }
.es-title span::before{ content:""; position:absolute; left:-.5rem; top:12%; bottom:12%; width:.42rem; background:linear-gradient(var(--gold),var(--gold-hi)); transform:skewX(-12deg); }
.es-hero .es-sub{ color:var(--muted); }
.es-btn{ background:linear-gradient(var(--gold-hi),var(--gold)); color:#1a1206; font-weight:700; border:none; }
.es-btn:hover{ filter:brightness(1.08); color:#1a1206; }
.es-btn-ghost{ border:1px solid var(--line); color:var(--ink); background:transparent; }
.es-btn-ghost:hover{ border-color:var(--gold); color:var(--gold-hi); }

.es-layout{ background:var(--slate); }
.es-layout .mp-sidebar-title{ font-family:var(--font-heading); font-style:italic; text-transform:uppercase; color:var(--muted); }
.es-layout .mp-cat-list{ background:var(--slate2); border-color:var(--line); }
.es-layout .mp-cat-item{ color:var(--muted); border-radius:0; }
.es-layout .mp-cat-item:hover{ background:#1c2938; color:var(--ink); box-shadow:none; }
.es-layout .mp-cat-item.is-active{ background:linear-gradient(90deg,rgba(245,179,1,.20),rgba(245,179,1,.04)); color:var(--ink); box-shadow:none; position:relative; clip-path:polygon(0 0,100% 0,calc(100% - 12px) 100%,0 100%); }
.es-layout .mp-cat-item.is-active::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:.34rem; background:linear-gradient(var(--gold),var(--gold-hi)); transform:skewX(-10deg); }
.es-layout .mp-cat-item-count{ background:#0e1822; color:var(--muted); }
.es-layout .mp-cat-item.is-active .mp-cat-item-count{ background:var(--gold); color:#1a1206; }
.es-layout .mp-main-heading{ font-family:var(--font-heading); font-style:italic; text-transform:uppercase; color:var(--ink); }
.es-layout .mp-count strong{ color:var(--ink); }
.es-layout .mp-results-meta{ color:var(--muted); }

.es-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1.1rem; }
.es-card{ position:relative; background:linear-gradient(180deg,#182534,#121b26); border:1px solid var(--line); padding:1rem; display:flex; flex-direction:column; gap:.7rem; clip-path:polygon(0 0,100% 0,100% calc(100% - 16px),calc(100% - 16px) 100%,0 100%); transition:border-color .2s,transform .2s; }
.es-card:hover{ border-color:var(--gold); transform:translateY(-3px); }
.es-card-labels{ display:flex; gap:.4rem; flex-wrap:wrap; }
.es-chip{ font-family:var(--font-heading); font-style:italic; font-weight:700; text-transform:uppercase; font-size:.66rem; letter-spacing:.03em; padding:.18rem .5rem; background:#0e1822; color:var(--muted); border:1px solid var(--line); }
.es-chip--mode.is-physical{ color:var(--gold-hi); border-color:var(--gold); }
.es-chip.es-status-open{ color:#5fd08a; border-color:#2f5c42; }
.es-card-title{ margin:0; font-family:var(--font-heading); font-style:italic; font-weight:800; text-transform:uppercase; font-size:1.15rem; line-height:1.05; }
.es-card-title a{ color:var(--ink); text-decoration:none; }
.es-card-title a:hover{ color:var(--gold-hi); }
.es-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:.4rem; border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:.6rem 0; }
.es-stat{ display:flex; flex-direction:column; gap:.1rem; }
.es-stat-num{ font-family:var(--font-heading); font-style:italic; font-weight:800; font-size:1.5rem; line-height:1; color:var(--ink); }
.es-stat-num small{ font-size:.8rem; color:var(--muted); font-weight:600; }
.es-stat--gold .es-stat-num{ color:var(--gold-hi); }
.es-stat-lbl{ font-size:.6rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.es-meta{ display:flex; flex-wrap:wrap; gap:.35rem .9rem; font-size:.78rem; color:var(--muted); }
.es-meta span{ display:inline-flex; align-items:center; gap:.25rem; }
.es-card-cta{ margin-top:auto; text-align:center; font-family:var(--font-heading); font-style:italic; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:.6rem; background:linear-gradient(var(--gold-hi),var(--gold)); color:#1a1206; text-decoration:none; clip-path:polygon(0 0,100% 0,100% 100%,12px 100%); }
.es-card-cta:hover{ filter:brightness(1.08); color:#1a1206; }



/* ===== Esports Pro — global rollout ===== */
/* Broadcast display headings: bold italic condensed, uppercase */
h1, h2, h3,
.card-title, .mp-main-heading, .form-section-title, .mp-hero-title,
.admin-sidebar-title, .tournament-card-title, .provider-name, .mp-card-title {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}
/* Gold accent bar on page titles (arena keeps its own .es-title bar) */
.page-hero h1:not(.es-title), .mp-hero-title {
    position: relative;
    padding-left: .65rem;
    display: inline-block;
}
.page-hero h1:not(.es-title)::before, .mp-hero-title::before {
    content: "";
    position: absolute;
    left: 0; top: 12%; bottom: 12%;
    width: .38rem;
    background: linear-gradient(var(--accent), #ffd34d);
    transform: skewX(-12deg);
}
/* Clipped card corners, arena proportions */
.mp-card, .provider-card, .tournament-card, .module-card, .card, .auth-card {
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}
/* Sidebar active item: slanted gold stripe + clipped corner (all mp-layout pages) */
.mp-cat-item { border-radius: 0; }
.mp-cat-item.is-active {
    position: relative;
    box-shadow: none;
    clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.mp-cat-item.is-active::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: .34rem;
    background: linear-gradient(var(--accent), #ffd34d);
    transform: skewX(-10deg);
}
.mp-cat-item.is-active .mp-cat-item-count { background: var(--accent); color: #1a1206; }
/* Slanted divider under section heroes */
.page-hero:not(.page-hero--banner):not(.page-hero--video)::after { content: none; }
.page-hero { border-bottom: 1px solid var(--border); }
/* Selection + reduced motion guard */
::selection { background: rgba(245, 179, 1, .35); color: var(--text); }
@media (prefers-reduced-motion: reduce) {
    .btn-primary, .mp-card, .provider-card, .es-card { transition: none; transform: none; }
}

/* ===== PWA install banner ===== */
.pwa-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem 1rem; padding-bottom: calc(.7rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #16212e, #0e1620);
    border-top: 2px solid var(--accent);
    box-shadow: 0 -6px 24px rgba(0,0,0,.4);
}
.pwa-banner-icon { width: 38px; height: 38px; flex-shrink: 0; }
.pwa-banner-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.pwa-banner-txt strong { font-family: var(--font-heading); font-style: italic; text-transform: uppercase; color: var(--text); font-size: .95rem; }
.pwa-banner-txt span { color: var(--text-muted); font-size: .8rem; }
.pwa-banner .btn { flex-shrink: 0; }
.pwa-banner-x { background: none; border: 0; color: var(--text-dim); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .2rem; flex-shrink: 0; }
.pwa-banner-x:hover { color: var(--text); }
@media (max-width: 480px) { .pwa-banner-txt span { display: none; } }
