/* ─── Variables ─────────────────────────────────────────────────── */
:root {
    --primary:    #E8380D;
    --primary-dk: #c22d00;
    --bg:         #F7F5F0;
    --surface:    #FFFFFF;
    --text:       #1A1A1A;
    --muted:      #6B6B6B;
    --border:     #E2DDD5;
    --radius:     12px;
    --shadow:     0 2px 16px rgba(0,0,0,.08);
    --nav-h:      64px;
}

/* ─── Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Rubik', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
}

/* ─── Navbar ────────────────────────────────────────────────────── */
#mainNav {
    background: #ffffff;
    border-bottom: 1.5px solid #e2e8f0;
    height: var(--nav-h);
}

/* Brand */
.brand-logo {
    color: #1e293b;
}

.brand-dot {
    color: var(--primary);
}

.search-form { width: 420px; max-width: 100%; }
/* Suchfeld */
.search-input {
    background: #f1f5f9;
    color: #1e293b;
    border: 1.5px solid #e2e8f0;
}
.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    background: #fff;
}
.btn-search {
    background: var(--primary);
    color: #fff;
    border-radius: 0 var(--radius) var(--radius) 0 !important;
    border: none;
    padding: .55rem 1rem;
}
.btn-search:hover { background: var(--primary-dk); color: #fff; }

.btn-create {
    background: var(--primary);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600;
    padding: .45rem 1rem;
    font-size: .875rem;
    border: none;
    transition: background .15s;
}
.btn-create:hover { background: var(--primary-dk); }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1a14 50%, #1a1a1a 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E8380D' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
}
.hero-title span { color: var(--primary); }
.hero-sub { color: #aaa; font-size: 1.1rem; }
.hero-stats { display: flex; gap: 2rem; margin-top: 1.5rem; }
.hero-stat strong { display: block; font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 800; color: #fff; }
.hero-stat span { color: #888; font-size: .85rem; }

/* ─── Category Grid ─────────────────────────────────────────────── */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }

.category-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem .8rem;
    text-align: center;
    transition: all .2s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(232,56,13,.15);
    color: var(--primary);
}
.category-card i { font-size: 1.8rem; }
.category-card span { font-size: .8rem; font-weight: 600; }

/* ─── Listing Card ──────────────────────────────────────────────── */
.listing-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .2s;
    display: flex; flex-direction: column;
    height: 100%;
}
.listing-card:hover {
    box-shadow: var(--shadow);
    border-color: #ccc;
    transform: translateY(-2px);
}
.listing-card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0ede8;
    position: relative;
}
.listing-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.listing-card:hover .listing-card-img img { transform: scale(1.04); }
.listing-card-img .no-img {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #ccc; font-size: 2.5rem;
}
.price-badge {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: .9rem;
    padding: .2rem .6rem;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}
.price-badge.free { background: var(--primary); }

.listing-card-body { padding: .9rem; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.listing-card-title {
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}
.listing-card-meta { font-size: .78rem; color: var(--muted); margin-top: auto; }

/* Condition badge */
.badge-condition {
    font-size: .7rem; padding: .15rem .45rem;
    border-radius: 4px; font-weight: 500;
    background: #f0ede8; color: var(--muted);
}

/* ─── Listing Detail ────────────────────────────────────────────── */
.detail-img-main {
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f0ede8;
    border: 1.5px solid var(--border);
}
.detail-img-main img { width: 100%; height: 100%; object-fit: cover; }
.thumb-list { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumb {
    width: 72px; height: 72px; border-radius: 8px;
    overflow: hidden; cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s;
}
.thumb.active { border-color: var(--primary); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-price {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}
.detail-price.free { color: #16a34a; }

.seller-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

/* ─── Forms ─────────────────────────────────────────────────────── */
.form-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.form-control, .form-select {
    border-color: var(--border);
    border-radius: 8px;
    padding: .6rem .9rem;
    font-size: .9rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,56,13,.12);
}
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .65rem 1.5rem;
    font-weight: 600;
    font-family: 'Syne', sans-serif;
    transition: background .15s;
    cursor: pointer;
}
.btn-primary-custom:hover { background: var(--primary-dk); color: #fff; }

/* ─── Section Titles ─────────────────────────────────────────────── */
.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex; align-items: center; gap: .5rem;
}
.section-title::after {
    content: '';
    flex: 1; height: 2px;
    background: var(--border);
    margin-left: .5rem;
}

/* ─── Pagination ────────────────────────────────────────────────── */
.page-link { color: var(--text); border-color: var(--border); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.page-link:hover { color: var(--primary); }

/* ─── Filter Sidebar ─────────────────────────────────────────────── */
.filter-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: sticky; top: calc(var(--nav-h) + 1rem);
}
.filter-title { font-weight: 700; font-size: .95rem; margin-bottom: .75rem; }

/* ─── Dashboard ─────────────────────────────────────────────────── */
.dash-stat {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}
.dash-stat .num {
    font-family: 'Syne', sans-serif;
    font-size: 2rem; font-weight: 800;
    color: var(--primary);
}

/* ─── Status Badges ─────────────────────────────────────────────── */
.status-active  { background: #dcfce7; color: #166534; }
.status-sold    { background: #fee2e2; color: #991b1b; }
.status-deact   { background: #f3f4f6; color: #6b7280; }

/* ─── Admin ──────────────────────────────────────────────────────── */
.admin-sidebar {
    background: #1a1a1a;
    min-height: calc(100vh - var(--nav-h));
    padding: 1.5rem 0;
}
.admin-sidebar .nav-link { color: #aaa; padding: .6rem 1.5rem; font-size: .9rem; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { color: #fff; background: rgba(232,56,13,.15); border-left: 3px solid var(--primary); }

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer { background: #1a1a1a; color: #aaa; }
.footer a { color: #888; font-size: .85rem; }
.footer a:hover { color: #fff; }
.footer h6 { color: #fff; font-size: .85rem; margin-bottom: .75rem; }
.brand-logo-footer { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800; color: #fff; }
.brand-logo-footer span { color: var(--primary); }

/* ─── Utilities ─────────────────────────────────────────────────── */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom   { background: var(--primary) !important; }
.rounded-custom      { border-radius: var(--radius) !important; }
.sold-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem; font-weight: 800;
    color: #fff; letter-spacing: 2px;
    transform: rotate(-20deg);
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .search-form { width: 100%; margin: .5rem 0; }
    .hero { padding: 2rem 0; }
    .hero-stats { gap: 1rem; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}


/* Nav Links */
.navbar-nav .nav-link {
    color: #64748b !important;
}

    .navbar-nav .nav-link:hover {
        color: #1e293b !important;
    }