/* Buy Applesauce — Applesauce Design System */
:root {
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

[data-theme="warm"] {
    --bg: #F2F0EB;
    --bg-card: rgba(255, 255, 255, 0.7);
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --accent: #C2654E;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: rgba(0, 0, 0, 0.06);
    --glass: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] {
    --bg: #111117;
    --bg-card: rgba(30, 30, 40, 0.7);
    --text: #e8e8e8;
    --text-muted: #8b8b9b;
    --accent: #a78bfa;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.3);
    --glass: rgba(30, 30, 40, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
}

/* Nav */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    backdrop-filter: blur(12px);
    background: var(--glass);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
}

.theme-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px;
    flex: 1;
}

/* Hero */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Listings */
.listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 16px 0;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
}

/* Card */
.listing-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}

.listing-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.listing-card .card-body {
    padding: 16px;
}

.listing-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.listing-card .card-price {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}
