@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg:      #ffffff;
    --card:    #f4f4f4;
    --text:    #0a0a0a;
    --muted:   #777;
    --border:  #e0e0e0;
    --accent:  #0a0a0a;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Mono', monospace;
    overflow-x: hidden;
}

body.dark {
    --bg:     #151515;
    --card:   #1a1a1a;
    --text:   #e1e1e1;
    --muted:  #555;
    --border: #2a2a2a;
    --accent: #f0f0f0;
}


/* ════════════════════════════════════════
   CATEGORY HERO BANNER
════════════════════════════════════════ */
.cat-hero {
    padding: 64px 40px 48px;
    border-bottom: 2px solid var(--text);
    position: relative;
    overflow: hidden;
}

.cat-hero-bg {
    position: absolute;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22vw;
    color: rgba(0, 0, 0, 0.04);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-4deg);
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
    letter-spacing: -0.02em;
    line-height: 1;
}

body.dark .cat-hero-bg {
    color: rgba(255, 255, 255, 0.04);
}

.cat-hero-inner {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cat-hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.04em;
    line-height: 0.9;
    color: var(--text);
    transform: rotate(-1deg);
    display: inline-block;
}

.cat-hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding-bottom: 8px;
}

.cat-hero-meta .count {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.cat-hero-meta .tagline {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    font-style: italic;
    letter-spacing: 0.1em;
}

/* ════════════════════════════════════════
   PRODUCT GRID
════════════════════════════════════════ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    padding: 32px 40px 80px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.cat-card:hover {
    background: var(--card);
    box-shadow: 4px 4px 0 var(--border);
}

/* Left accent */
.cat-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--text);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.25s ease;
    z-index: 2;
}

.cat-card:hover::after {
    transform: scaleY(1);
}

/* Ghost index number */
.cat-card::before {
    content: attr(data-index);
    position: absolute;
    top: 12px;
    right: 16px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.06);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

body.dark .cat-card::before {
    color: rgba(255, 255, 255, 0.05);
}


/* ── Image wrapper ── */
.cat-card-img-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--card);
    position: relative;
}

.cat-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.cat-card:nth-child(odd) .cat-card-img-wrap img {
    transform: scale(1.02) rotate(-1.5deg);
}
.cat-card:nth-child(even) .cat-card-img-wrap img {
    transform: scale(1.02) rotate(1deg);
}

.cat-card:hover .cat-card-img-wrap img {
    transform: scale(1.06) rotate(0deg) !important;
}

/* Stock badge */
.cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 4px 8px;
    background: var(--text);
    color: var(--bg);
    z-index: 1;
}

.cat-badge.sold-out {
    background: var(--muted);
}

.cat-badge.low-stock {
    background: #b04000;
    color: #fff;
}


/* ── Card link (Bild + Name, führt zur Detailseite) ── */
.cat-card-link {
    display: contents; /* Kind-Elemente verhalten sich wie direkte Kinder von .cat-card */
    text-decoration: none;
    color: inherit;
}

/* ── Card Info (Name, Meta) ── */
.cat-card-info {
    padding: 18px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.cat-card-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    line-height: 1;
    color: var(--text);
}

.cat-card-meta {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-style: italic;
}

.cat-card-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.cat-card-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cat-card-price {
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
    white-space: nowrap;
}

.cat-card-details-link {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

.cat-card-details-link:hover {
    color: var(--text);
}

.cat-card-cart-btn {
    width: 100%;
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--text);
    padding: 8px 10px;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.cat-card-cart-btn:hover {
    background: var(--text);
    color: var(--bg);
    box-shadow: none;
    transform: none;
}

.cat-card-cart-btn:hover {
    background: var(--text);
    color: var(--bg);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--muted);
}


/* ════════════════════════════════════════
   EMPTY
════════════════════════════════════════ */
.cat-empty {
    grid-column: 1 / -1;
    padding: 80px 40px;
    text-align: center;
}

.cat-empty-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.cat-empty p {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
    letter-spacing: 0.1em;
}


/* ════════════════════════════════════════
   DARK TOGGLE
════════════════════════════════════════ */
#darkToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    transform: none;
}   
#darkToggle img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
  
    transition: content 0.2s;
}
#darkToggleHover {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    transform: none;
}
#darkToggle:hover img {
  opacity: 0.8;
}



/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
    background: var(--text);
    color: var(--bg);
    padding: 28px 40px;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    border-top: 2px solid var(--text);
}

footer ul {
    list-style: none;
    display: inline-flex;
    gap: 24px;
    margin-top: 8px;
}

footer a {
    color: var(--bg);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.15s;
}

footer a:hover { opacity: 1; }


/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 700px) {
    .cat-hero { padding: 48px 20px 36px; }
    .cat-hero-inner { flex-direction: column; align-items: flex-start; }
    .cat-hero-meta { align-items: flex-start; }
    .cat-toolbar { flex-direction: column; }
    .sort-wrap { border-left: none; border-top: 1px solid var(--border); flex-wrap: wrap; }
    .cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); padding: 0 0 60px; }
}

/* ════════════════════════════════════════
   TOOLBAR  (Kategorie-Tabs + Sort)
════════════════════════════════════════ */
.cat-toolbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--card);
    border-bottom: 2px solid var(--text);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    flex-wrap: wrap;
}

/* ── Kategorie-Tabs ── */
.cat-tabs {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
}

.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
    padding: 16px 20px;
    border-right: 1px solid var(--border);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    position: relative;
}

.cat-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--text);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.cat-tab:hover { color: var(--text); background: var(--bg); }
.cat-tab:hover::after { transform: scaleX(1); }

.cat-tab.active {
    color: var(--text);
    background: var(--bg);
}
.cat-tab.active::after { transform: scaleX(1); }

/* ── Sort-Buttons ── */
.sort-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-left: 2px solid var(--text);
    flex-shrink: 0;
}

.sort-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--muted);
    white-space: nowrap;
}

.sort-buttons { display: flex; gap: 6px; }

.sort-btn {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
    padding: 6px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.1s;
    white-space: nowrap;
}

.sort-btn:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--muted);
}

.sort-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    transform: none;
    box-shadow: none;
}

/* ════════════════════════════════════════
   TOOLBAR-SUCHE (mittig)
════════════════════════════════════════ */
.toolbar-search {
    flex: 0 0 400px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-right: 2px solid var(--text);
}

.toolbar-search form {
    display: flex;
    width: 100%;
    gap: 0;
}

.toolbar-search input[type="text"] {
    flex: 1;
    background: var(--bg);
    border: 2px solid var(--text);
    border-right: none;
    color: var(--text);
    padding: 7px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    outline: none;
    border-radius: 0;
}

.toolbar-search input[type="text"]::placeholder { color: var(--muted); }
.toolbar-search input[type="text"]:focus { background: var(--card); }

.toolbar-search button {
    background: var(--text);
    color: var(--bg);
    border: 2px solid var(--text);
    padding: 7px 14px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    box-shadow: none;
}

.toolbar-search button:hover {
    background: var(--bg);
    color: var(--text);
    transform: none;
    box-shadow: none;
}