/* Fonts - Lokal gehostet (Zero 3rd Party) */
@font-face {
    font-family: 'LocalFont';
    src: url('../fonts/LocalFont-Regular.woff2') format('woff2'),
         url('../fonts/LocalFont-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LocalFont';
    src: url('../fonts/LocalFont-Bold.woff2') format('woff2'),
         url('../fonts/LocalFont-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* CSS Variablen */
:root {
    --color-bg: #f4f4f4;
    --color-text: #333333;
    --color-primary: #E31E24; /* Roter Abholpreis / Banner */
    --color-primary-hover: #c4181f;
    --color-dark: #2c2c2c; /* Dunkler Neupreis */
    --color-dark-hover: #1a1a1a;
    --color-white: #ffffff;
    --color-gray: #777777;
    --border-radius: 6px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Reset & Basis */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Fallback Schriften, bis LocalFont geladen ist */
    font-family: 'LocalFont', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* Accessibility Focus States (WCAG 2.1 AA) */
*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.container-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-section {
    position: relative;
    width: 100%;
    margin-bottom: 3rem;
}

.hero-section.layout-boxed {
    /* Keine Breitenbeschränkung auf den Wrapper, damit der rote Header 100% bleibt */
    width: 100%;
}

/* Boxed Layout: Navigation liegt über dem Bild, nicht darin */
.hero-section.layout-boxed .hero-overlay {
    position: relative;
    background: var(--color-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border-radius: 0; /* Keine runden Ecken, soll volle Breite bleiben */
}

.hero-section.layout-boxed .hero-image {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 8px; /* Nur das Bild hat runde Ecken und 1200px Breite */
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 50vh; /* Verhindert, dass das Bild auf riesigen Monitoren endlos hoch wird */
    display: block;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: rgba(227, 30, 36, 0.95); /* Roter Hintergrund, minimal transparent */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-nav-floating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    max-height: 55px;
    width: auto;
    /* Weißer Hintergrund entfernt */
}

.page-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.page-intro h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--color-primary); /* H1 auch rot machen */
}

.page-intro p {
    font-size: 1.2rem;
    color: var(--color-gray);
    max-width: 800px;
    margin: 0 auto;
}

.btn-back {
    background: var(--color-white);
    color: var(--color-primary);
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.2s, color 0.2s;
    border: 2px solid var(--color-white);
}

.btn-back:hover {
    background: transparent;
    color: var(--color-white);
}

/* Toolbar (Filter & Sortierung) */
.kitchen-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--color-white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .kitchen-toolbar {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        padding: 1rem 1.5rem;
    }
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .toolbar-group {
        flex-direction: row;
        align-items: center;
        width: auto;
    }
}

.toolbar-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-gray);
}

.toolbar-group select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
}

.toolbar-group select:focus {
    border-color: var(--color-primary);
}

/* Grid System (Mobile First) */
.kitchen-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* Kitchen Card List Layout */
.kitchen-card.list-layout {
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kitchen-card.list-layout:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

@media (min-width: 900px) {
    .kitchen-card.list-layout {
        flex-direction: row;
        align-items: stretch;
    }
}

/* Media Section (Hauptbild + Galerie drunter) */
.card-media {
    flex: auto;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
}

@media (min-width: 900px) {
    .card-media {
        flex: 0 0 55%; /* Bild und Galerie nehmen 55% der Breite ein */
    }
}

.card-image-main {
    position: relative;
    width: 100%;
}

.card-image-main .main-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

/* VERKAUFT Banner */
.sold-banner {
    position: absolute;
    top: 25px;
    left: -35px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
    padding: 6px 45px;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1.5px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Gallery Row */
.card-image-gallery {
    padding: 10px;
}

.card-image-gallery .gallery-grid {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px; /* Platz für Scrollbar */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

@media (min-width: 900px) {
    .card-image-gallery .gallery-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.gallery-thumb {
    width: 80px; /* Auf Mobile feste Breite für Scrollen */
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: zoom-in;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: border-color 0.2s;
}

@media (min-width: 900px) {
    .gallery-thumb {
        width: 100%;
        flex: auto;
    }
}

.gallery-thumb:hover {
    border-color: var(--color-primary);
}

/* Verstecke alle Thumbnails ab dem 5. Bild, um das Karten-Layout nicht zu sprengen */
.gallery-thumb:nth-child(n+5) {
    display: none;
}

.gallery-thumb:hover {
    opacity: 0.85;
}

/* Content Section */
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-header {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-bg);
    padding-bottom: 0.75rem;
}

.category {
    font-size: 0.75rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.model {
    font-size: 1.4rem;
    color: var(--color-dark);
    margin-top: 0.25rem;
    line-height: 1.3;
}

.description {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 0.95rem;
}

.markdown-body h1 {
    font-size: 1.35rem;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--color-primary);
}

.markdown-body h2 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem 0;
    color: var(--color-dark);
}

.markdown-body strong {
    font-weight: 700;
    color: var(--color-dark);
}

.markdown-body em {
    font-style: italic;
}

.markdown-body h3 {
    font-size: 1.05rem;
    margin: 1rem 0 0.5rem 0;
    color: var(--color-dark);
}

.markdown-body p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.markdown-body ul, .markdown-body ol {
    margin: 0.5rem 0 1rem 1.5rem;
    line-height: 1.6;
}

.markdown-body li {
    margin-bottom: 0.25rem;
}

/* Price Tags (Links Dunkel, Rechts Orange Trapez) */
.price-tag-container {
    display: flex;
    align-items: stretch;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    font-weight: bold;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.price-part {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price-original {
    background: var(--color-dark);
    flex: 1;
    padding: 0.75rem 1.5rem 0.75rem 1rem;
    text-decoration: line-through;
    text-decoration-color: rgba(255,255,255,0.7);
    text-decoration-thickness: 2px;
}

.price-sale {
    background: var(--color-primary);
    flex: 1.2;
    padding: 0.75rem 1rem 0.75rem 1.5rem;
    /* Trapezoid-Schnitt auf der linken Seite */
    clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%);
    margin-left: -15px; /* Überlagerung über den linken Teil */
}

.price-part .label {
    font-size: 0.7rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.price-part .value {
    font-size: 1.3rem;
}

/* Preisvorteil Anzeige (Riesig) */
.price-advantage {
    align-self: stretch;
    text-align: center;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    background: var(--color-primary); /* Gleiches Rot wie Abholpreis */
    color: var(--color-white); /* Schrift in weiß */
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 1.5rem;
    font-weight: 300; /* Light */
    border: none; /* Gestrichelte Linie weg */
    display: block;
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.15);
}

.price-advantage strong {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-white); /* Auch die Zahl in weiß */
}

/* Contact Button */
.btn-contact {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--color-dark);
    color: var(--color-white);
    text-align: center;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.btn-contact:hover {
    background-color: var(--color-dark-hover);
}

.btn-contact[disabled] {
    background: #cccccc;
    cursor: not-allowed;
    color: #666666;
}

/* Footer Styles */
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid #ddd;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    color: var(--color-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .site-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }
}

.footer-address strong {
    color: var(--color-dark);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.footer-links a {
    color: var(--color-dark);
    text-decoration: none;
    font-weight: bold;
}

.footer-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}
