/* ========================================================================
   Chrome: topbar, footer, user chip, mobile nav, home hero, cards.
   Loaded by base.css? No — loaded by partials via header.php as a second sheet.
   Actually included inline from header.php via `<link>` only when needed.
   Simplest: imported from base.css to keep one <link> on every page.
   ======================================================================== */

/* --- Topbar ----------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 14, 19, .75);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--s-5);
    height: 64px;
    display: flex;
    align-items: center;
    gap: var(--s-5);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -.01em;
    font-size: var(--fs-md);
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-name { white-space: nowrap; }

.topnav {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: center;
}
.topnav-link {
    padding: 8px 14px;
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: background .14s, color .14s;
}
.topnav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topnav-link.is-active { background: var(--accent-lo); color: var(--accent-hi); }

.topbar-actions {
    display: flex;
    gap: var(--s-2);
    align-items: center;
}

.topbar-burger {
    display: none;
    width: 40px; height: 40px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--text);
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
}
.topbar-burger svg { width: 20px; height: 20px; }

/* --- User chip -------------------------------------------------------- */
.user-chip { position: relative; }
.user-chip-btn {
    display: flex; align-items: center; gap: var(--s-2);
    padding: 5px 10px 5px 5px;
    border-radius: var(--r-pill);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--fs-sm);
    transition: background .14s;
}
.user-chip-btn:hover { background: var(--surface-2); }
.user-chip-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #10a89a);
    color: var(--accent-ink);
    display: grid; place-items: center;
    font-weight: 700;
    font-size: var(--fs-xs);
}
.user-chip-chev { width: 14px; height: 14px; color: var(--text-mute); }

.user-chip-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    padding: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .12s, transform .12s;
}
.user-chip.is-open .user-chip-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.user-chip-item {
    display: block;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    color: var(--text);
    text-decoration: none;
    font-size: var(--fs-sm);
}
.user-chip-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.user-chip-danger { color: var(--danger); }
.user-chip-danger:hover { color: var(--danger); background: var(--danger-lo); }
.user-chip-sep { height: 1px; background: var(--line-soft); margin: 4px 0; }

/* --- Mobile nav ------------------------------------------------------- */
.mobilenav {
    display: none;
    flex-direction: column;
    padding: var(--s-3) var(--s-5);
    background: var(--surface);
    border-top: 1px solid var(--line);
}
.mobilenav.is-open { display: flex; }
.mobilenav-link {
    padding: 10px 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--r-sm);
}
.mobilenav-link:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.mobilenav-sep { height: 1px; background: var(--line-soft); margin: var(--s-2) 0; }

@media (max-width: 820px) {
    .topnav, .topbar-actions { display: none; }
    .topbar-burger { display: inline-flex; margin-left: auto; }
}

/* --- Page wrapper ----------------------------------------------------- */
.page { min-height: calc(100vh - 64px); }
body.has-nav { padding-top: 0; }

/* --- Footer ----------------------------------------------------------- */
.sitefoot {
    margin-top: var(--s-8);
    border-top: 1px solid var(--line-soft);
    background: linear-gradient(180deg, transparent 0%, rgba(45,212,191,.02) 100%);
}
.sitefoot-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--s-7) var(--s-5) var(--s-5);
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: var(--s-5);
}
.sitefoot-col h4 {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-mute);
    margin-bottom: var(--s-3);
    font-weight: 600;
}
.sitefoot-col a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    padding: 4px 0;
    font-size: var(--fs-sm);
}
.sitefoot-col a:hover { color: var(--accent); text-decoration: none; }
.sitefoot-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--s-4) var(--s-5);
    border-top: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    gap: var(--s-3);
    font-size: var(--fs-xs);
    color: var(--text-mute);
    flex-wrap: wrap;
}
@media (max-width: 760px) {
    .sitefoot-inner { grid-template-columns: 1fr 1fr; }
}

/* --- Home sections ---------------------------------------------------- */
.home-hero {
    padding: var(--s-8) var(--s-5) var(--s-7);
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}
.home-hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.05;
    margin-bottom: var(--s-4);
}
.home-hero h1 em { color: var(--accent); font-style: italic; }
.home-hero .lead {
    font-size: var(--fs-lg);
    color: var(--text-dim);
    max-width: 580px;
    margin: 0 auto var(--s-5);
    line-height: 1.5;
}
.home-cta {
    display: inline-flex;
    gap: var(--s-3);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--s-4);
}

.section {
    padding: var(--s-7) var(--s-5);
    max-width: 1200px;
    margin: 0 auto;
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-4);
    margin-bottom: var(--s-5);
    flex-wrap: wrap;
}
.section-head h2 {
    margin: 0;
    font-size: var(--fs-2xl);
}
.section-head .section-link {
    color: var(--accent);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-decoration: none;
}
.section-head .section-link:hover { text-decoration: underline; }

/* --- Grids and cards -------------------------------------------------- */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--s-4);
}
.grid-cats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--s-3);
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.card:hover {
    transform: translateY(-2px);
    border-color: rgba(45,212,191,.4);
    box-shadow: var(--sh-md);
    text-decoration: none;
    color: inherit;
}
.card-media {
    aspect-ratio: 16/10;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}
.card-media img {
    width: 100%; height: 100%; object-fit: cover;
}
.card-media .ph {
    font-family: var(--serif);
    font-size: 3rem;
    color: var(--text-mute);
}
.card-body {
    padding: var(--s-4);
}
.card-body .tag {
    margin-bottom: var(--s-2);
}
.card-title {
    font-size: var(--fs-md);
    font-weight: 600;
    margin: 0 0 var(--s-2);
    line-height: 1.3;
}
.card-meta {
    color: var(--text-mute);
    font-size: var(--fs-xs);
    margin: 0 0 var(--s-2);
}
.card-price {
    color: var(--accent);
    font-weight: 600;
    font-size: var(--fs-md);
}

.cat-tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-4);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all .14s;
}
.cat-tile:hover {
    border-color: var(--accent);
    background: var(--surface-2);
    text-decoration: none;
    color: var(--text);
    transform: translateY(-1px);
}
.cat-tile-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: var(--s-2);
}
.cat-tile-label {
    font-size: var(--fs-sm);
    font-weight: 500;
}

/* --- Empty states ----------------------------------------------------- */
.empty {
    text-align: center;
    padding: var(--s-8) var(--s-5);
    color: var(--text-mute);
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--r-lg);
}
.empty-icon { font-size: 3rem; margin-bottom: var(--s-3); display: block; }
.empty h3 { color: var(--text); margin-bottom: var(--s-2); font-family: var(--serif); font-weight: 400; }
.empty p { max-width: 420px; margin: 0 auto; }

/* --- Auth pages (login, register) ------------------------------------ */
.auth-shell {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: var(--s-7) var(--s-5);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--s-6);
    box-shadow: var(--sh-md);
}
.auth-card h1 {
    font-size: var(--fs-2xl);
    margin: 0 0 var(--s-2);
}
.auth-card .sub {
    color: var(--text-dim);
    margin-bottom: var(--s-5);
    font-size: var(--fs-sm);
}
.auth-card .form .btn-primary {
    width: 100%;
    padding: 12px;
    margin-top: var(--s-3);
}
.auth-card .alt {
    text-align: center;
    margin-top: var(--s-5);
    font-size: var(--fs-sm);
    color: var(--text-mute);
}

/* --- Launch banner (temporary — remove after batch 3) ---------------- */
.launch-banner {
    background: var(--gold-lo);
    border: 1px solid rgba(240,180,41,.3);
    color: var(--gold);
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    text-align: center;
    margin-bottom: var(--s-5);
}
.launch-banner strong { color: var(--gold); }
