/**
 * Recipe App — Stylesheet v2
 *
 * Design: Editorial Weinsammlung
 * Fonts: Cormorant Garamond (Display, self-hosted), Inter (Body, self-hosted)
 * Leaflet: self-hosted, CSS via @import eingebunden (damit immer im Render-Kontext verfuegbar)
 * DSGVO: Keine externen Ressourcen
 */

/* Leaflet CSS — immer verfuegbar, verhindert leere Map-Container */
@import url('/assets/js/vendor/leaflet/leaflet.css');

/* ============================================================
   Fonts — self-hosted, DSGVO-konform
   ============================================================ */
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/assets/fonts/cormorant-garamond.woff2') format('woff2');
    font-weight: 300 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/assets/fonts/cormorant-garamond-italic.woff2') format('woff2');
    font-weight: 300 600;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-latin.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
    --ink:          #12100E;
    --ink-soft:     #3D342C;
    --wine:         #6B1A1A;
    --wine-mid:     #8B2C2C;
    --wine-pale:    #F7F0EE;
    --gold:         #B8954A;
    --gold-pale:    #FBF6EE;
    --cream:        #F9F7F4;
    --surface:      #FFFFFF;
    --border:       #E4DDD6;
    --border-soft:  #EDE8E3;
    --muted:        #8A7D74;
    --muted-light:  #B5AAA2;

    --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;

    --radius-sm:    6px;
    --radius-md:    12px;
    --radius-lg:    18px;
    --shadow-sm:    0 1px 4px rgba(18,16,14,.06), 0 1px 2px rgba(18,16,14,.04);
    --shadow-md:    0 4px 20px rgba(18,16,14,.09), 0 1px 4px rgba(18,16,14,.05);
    --shadow-lg:    0 16px 48px rgba(18,16,14,.14);

    --header-h:     64px;
    --max-w:        1160px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body.recipe-app {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   Header
   ============================================================ */
.ra-header {
    position: sticky; top: 0; z-index: 200;
    height: var(--header-h);
    background: rgba(249,247,244,.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.ra-header__inner {
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 32px; height: 100%;
    display: flex; align-items: center; gap: 0;
}
.ra-header__logo {
    font-family: var(--font-display);
    font-size: 19px; font-weight: 400; letter-spacing: .02em;
    color: var(--ink); white-space: nowrap;
    display: flex; align-items: center; gap: 14px;
    margin-right: 40px;
    text-decoration: none;
}
.ra-header__logo-rule {
    width: 1px; height: 22px; background: var(--border);
}
.ra-header__logo-sub {
    font-family: var(--font-body);
    font-size: 11px; font-weight: 500; letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted);
}

/* Nav-Tabs */
.ra-header__tabs {
    display: flex; gap: 2px;
}
.ra-tab {
    padding: 8px 18px;
    font-size: 13px; font-weight: 500; letter-spacing: .01em;
    color: var(--muted);
    border-radius: 100px;
    cursor: pointer; transition: all .18s;
    text-decoration: none;
    display: flex; align-items: center; gap: 6px;
}
.ra-tab:hover { background: var(--border-soft); color: var(--ink); }
.ra-tab--active { background: var(--ink); color: #fff; }
.ra-tab__emoji { font-size: 14px; }

/* Suche */
.ra-header__search {
    margin-left: auto; position: relative;
}
.ra-search-input {
    width: 220px; padding: 9px 16px 9px 38px;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    font-family: var(--font-body); font-size: 13px;
    background: var(--surface); color: var(--ink);
    outline: none; transition: border-color .18s, width .25s;
}
.ra-search-input::placeholder { color: var(--muted-light); }
.ra-search-input:focus { border-color: var(--wine); width: 280px; }
.ra-header__search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--muted-light); pointer-events: none;
}

/* Hamburger (Mobile) */
.ra-header__hamburger {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 36px; height: 36px;
    background: none; border: none; cursor: pointer;
    margin-left: 12px; padding: 4px;
}
.ra-header__hamburger span {
    display: block; height: 2px; background: var(--ink);
    border-radius: 2px; transition: all .2s;
}

/* Live-Suchergebnisse */
.ra-search-results {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 360px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    box-shadow: var(--shadow-md); z-index: 300;
    overflow: hidden;
}
.ra-search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; text-decoration: none; color: var(--ink);
    border-bottom: 1px solid var(--border-soft); transition: background .15s;
}
.ra-search-item:last-child { border-bottom: none; }
.ra-search-item:hover { background: var(--cream); }
.ra-search-item__img {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    object-fit: cover; background: var(--border-soft); flex-shrink: 0;
}
.ra-search-item__icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    background: var(--border-soft); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.ra-search-item__info { flex: 1; min-width: 0; }
.ra-search-item__title { font-size: 14px; font-weight: 500; }
.ra-search-item__meta { font-size: 12px; color: var(--muted); }
.ra-search-item__snippet { font-size: 12px; color: var(--muted); }
.ra-search-item__snippet mark { background: rgba(184,149,74,.3); color: var(--ink); }
.ra-search-no-results { padding: 20px 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* ============================================================
   Page Wrapper
   ============================================================ */
.ra-main {
    max-width: var(--max-w); margin: 0 auto;
    padding: 48px 32px 100px;
}

/* ============================================================
   Intro Banner (Startseite)
   ============================================================ */
.ra-intro {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    margin-bottom: 72px; background: var(--surface);
}
.ra-intro__text {
    padding: 56px 52px;
    display: flex; flex-direction: column; justify-content: center;
}
.ra-intro__kicker {
    font-family: var(--font-body);
    font-size: 11px; font-weight: 600; letter-spacing: .16em;
    text-transform: uppercase; color: var(--wine);
    margin-bottom: 18px;
}
.ra-intro__title {
    font-family: var(--font-display);
    font-size: 48px; font-weight: 300; line-height: 1.1;
    color: var(--ink); margin-bottom: 20px;
}
.ra-intro__title em { font-style: italic; color: var(--wine-mid); }
.ra-intro__body {
    font-size: 15px; color: var(--muted); line-height: 1.75; max-width: 380px;
    margin-bottom: 32px;
}
.ra-intro__cta {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 26px;
    background: var(--wine); color: #fff;
    border-radius: 100px; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: background .18s;
    width: fit-content; text-decoration: none;
}
.ra-intro__cta:hover { background: var(--wine-mid); }
.ra-intro__cta-arrow { font-size: 16px; transition: transform .18s; display: inline-block; }
.ra-intro__cta:hover .ra-intro__cta-arrow { transform: translateX(3px); }
.ra-intro__visual {
    background: linear-gradient(160deg, #2A0A0A 0%, #4A1515 40%, #6B1A1A 100%);
    min-height: 360px;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 40px 44px;
    position: relative; overflow: hidden;
    cursor: pointer; text-decoration: none;
}
.ra-intro__visual::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(184,149,74,.12) 0%, transparent 60%);
}
.ra-intro__visual-bg {
    font-family: var(--font-display);
    font-size: 88px; font-weight: 300;
    color: rgba(255,255,255,.05);
    position: absolute; top: -12px; right: -8px;
    line-height: 1; pointer-events: none;
    font-style: italic;
}
.ra-intro__wine-name {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 300; font-style: italic;
    color: rgba(255,255,255,.95); line-height: 1.2;
    margin-bottom: 8px; position: relative;
}
.ra-intro__wine-sub {
    font-size: 12px; font-weight: 400; letter-spacing: .1em;
    text-transform: uppercase; color: var(--gold);
    position: relative;
}

/* ============================================================
   Section Headings
   ============================================================ */
.ra-section-head {
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 32px;
}
.ra-section-head__title {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 300; letter-spacing: .01em;
    white-space: nowrap;
}
.ra-section-head__rule {
    flex: 1; height: 1px; background: var(--border);
}
.ra-section-head__count {
    font-size: 12px; color: var(--muted); font-weight: 400;
    letter-spacing: .06em; white-space: nowrap;
}

/* ============================================================
   Wine Grid
   ============================================================ */
.ra-wine-section { margin-bottom: 80px; }
.ra-wine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Wine Card */
.ra-wine-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden; cursor: pointer;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
}
.ra-wine-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--wine-mid);
}
.ra-wine-card__header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--border-soft);
}
.ra-wine-card__type {
    font-size: 10px; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--wine);
    margin-bottom: 10px; display: block;
}
.ra-wine-card__name {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 400; line-height: 1.25;
    margin-bottom: 6px; color: var(--ink);
}
.ra-wine-card__producer {
    font-size: 12px; color: var(--muted); letter-spacing: .02em;
}
.ra-wine-card__body { padding: 20px 28px 24px; flex: 1; }
.ra-wine-card__desc {
    font-size: 13.5px; color: var(--ink-soft); line-height: 1.65;
    margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.ra-wine-card__meta {
    display: flex; gap: 20px; flex-wrap: wrap;
}
.ra-wine-card__meta-label {
    font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted-light); font-weight: 500; display: block; margin-bottom: 2px;
}
.ra-wine-card__meta-value {
    font-size: 13px; font-weight: 500; color: var(--ink);
}
.ra-wine-card__footer {
    padding: 14px 28px;
    border-top: 1px solid var(--border-soft);
    background: var(--cream);
    display: flex; align-items: center; justify-content: space-between;
}
.ra-wine-card__region {
    font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted); font-weight: 500;
}
.ra-wine-card__grape {
    font-size: 11px; color: var(--muted-light);
    font-style: italic; font-family: var(--font-display);
}

/* Featured wine (spans 2 columns) */
.ra-wine-card--featured {
    grid-column: span 2;
}
.ra-wine-card--featured .ra-wine-card__header {
    background: linear-gradient(135deg, #1E0606 0%, #3D1010 50%, #6B1A1A 100%);
    padding: 40px 36px 32px;
    border-bottom: none;
}
.ra-wine-card--featured .ra-wine-card__type { color: var(--gold); }
.ra-wine-card--featured .ra-wine-card__name {
    font-size: 34px; color: rgba(255,255,255,.95);
}
.ra-wine-card--featured .ra-wine-card__producer { color: rgba(255,255,255,.5); }
.ra-wine-card--featured:hover { border-color: var(--wine); }

/* Tasted Badge auf Wine Card */
.ra-wine-card__tasted {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10px; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--gold);
    background: rgba(184,149,74,.12);
    border: 1px solid rgba(184,149,74,.3);
    border-radius: 100px; padding: 4px 10px;
    margin-top: 10px;
}

/* ============================================================
   Recipe Grid (Speisen)
   ============================================================ */
.ra-food-section { margin-bottom: 80px; }
.ra-food-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Food Card */
.ra-food-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden; cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
}
.ra-food-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ra-food-card__img {
    aspect-ratio: 3/2;
    background: linear-gradient(135deg, #EDE4DC, #D4C5B5);
    position: relative; overflow: hidden;
}
.ra-food-card__img img {
    width: 100%; height: 100%; object-fit: cover;
}
.ra-food-card__img-bg {
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
}
.ra-food-card__img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-style: italic;
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted-light);
    background: linear-gradient(135deg, #EDE4DC, #D4C5B5);
}
.ra-food-card__tasted {
    position: absolute; top: 10px; right: 10px;
    background: rgba(184,149,74,.9);
    color: #fff; border-radius: 100px;
    font-size: 10px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; padding: 4px 10px;
}
.ra-food-card__body { padding: 16px 18px 20px; flex: 1; }
.ra-food-card__cat {
    font-size: 10px; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--gold);
    margin-bottom: 8px; display: block;
}
.ra-food-card__name {
    font-family: var(--font-display);
    font-size: 17px; font-weight: 400; line-height: 1.3;
    color: var(--ink); margin-bottom: 8px;
}
.ra-food-card__meta {
    font-size: 11.5px; color: var(--muted);
    display: flex; gap: 12px; flex-wrap: wrap;
}

/* ============================================================
   Editor Bar
   ============================================================ */
.ra-editor-bar {
    margin-bottom: 20px;
    display: flex; gap: 10px;
}

/* ============================================================
   Filter Info
   ============================================================ */
.ra-filter-info {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 32px;
    padding: 14px 20px;
    background: var(--wine-pale);
    border: 1px solid rgba(107,26,26,.12);
    border-radius: var(--radius-sm);
    font-size: 14px; color: var(--ink-soft);
}
.ra-filter-info__clear {
    font-size: 13px; font-weight: 500; color: var(--wine);
    text-decoration: none;
}
.ra-filter-info__clear:hover { text-decoration: underline; }
.ra-empty {
    padding: 60px 20px; text-align: center;
    color: var(--muted); font-size: 15px;
}
.ra-empty p { margin-bottom: 16px; }

/* ============================================================
   Detail — Hero
   ============================================================ */
.ra-detail {
    max-width: 900px; margin: 0 auto;
}

.ra-detail-hero {
    background: linear-gradient(160deg, #120404 0%, #3A0E0E 45%, #6B1A1A 100%);
    padding: 52px 56px 44px;
    position: relative; overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-bottom: 0;
}
.ra-detail-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 80% 50%, rgba(184,149,74,.1) 0%, transparent 55%);
    pointer-events: none;
}
/* Hero mit Foto */
.ra-detail-hero--photo {
    min-height: 320px;
    display: flex; flex-direction: column; justify-content: flex-end;
    background-size: cover; background-position: center;
}
.ra-detail-hero--photo::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(18,4,4,.92) 0%, rgba(18,4,4,.4) 60%, transparent 100%);
}
.ra-detail-hero__type {
    font-size: 10px; font-weight: 600; letter-spacing: .18em;
    text-transform: uppercase; color: var(--gold);
    margin-bottom: 14px; display: block; position: relative; z-index: 1;
}
.ra-detail-hero__title {
    font-family: var(--font-display);
    font-size: 44px; font-weight: 300; font-style: italic;
    color: rgba(255,255,255,.95); line-height: 1.1;
    margin-bottom: 10px; position: relative; z-index: 1;
}
.ra-detail-hero__sub {
    font-size: 13px; color: rgba(255,255,255,.45);
    letter-spacing: .06em; position: relative; z-index: 1;
}
.ra-detail-hero__sub strong { color: rgba(255,255,255,.7); font-weight: 400; }

/* Detail Bar (Temperatur, Karaffieren etc.) */
.ra-detail-bar {
    display: flex;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
}
.ra-detail-bar__item {
    flex: 1; padding: 18px 24px;
    border-right: 1px solid var(--border-soft);
}
.ra-detail-bar__item:last-child { border-right: none; }
.ra-detail-bar__label {
    font-size: 10px; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted-light); margin-bottom: 4px;
}
.ra-detail-bar__value {
    font-size: 15px; font-weight: 500; color: var(--ink);
}

/* Detail Body */
.ra-detail-body {
    background: var(--surface);
    padding: 44px 56px 52px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border: 1px solid var(--border); border-top: none;
}

/* Hervorgehobene Beschreibung */
.ra-detail-char {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 300; font-style: italic;
    color: var(--ink-soft); line-height: 1.6;
    padding-bottom: 28px; margin-bottom: 36px;
    border-bottom: 1px solid var(--border-soft);
}

/* Tasted Note */
.ra-detail-tasted {
    background: var(--wine-pale);
    border-left: 2px solid var(--wine);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 16px 22px; margin-bottom: 36px;
    font-size: 14px; color: var(--ink-soft); line-height: 1.65;
}
.ra-detail-tasted strong { color: var(--wine-mid); font-weight: 600; }

/* Detail Grid (2-spaltig: Links + Rechts) */
.ra-detail-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
    margin-bottom: 40px;
}
.ra-detail-section__label {
    font-size: 10px; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--muted-light);
    margin-bottom: 14px; display: block;
}

/* Aroma Tags */
.ra-aroma-list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.ra-aroma-tag {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12.5px; font-weight: 400;
    color: var(--ink-soft);
    background: var(--cream);
    font-family: var(--font-display); font-style: italic;
}

/* Zutaten-Liste */
.ra-detail-ing-list { list-style: none; }
.ra-detail-ing-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px; color: var(--ink-soft);
    display: flex; align-items: center; gap: 10px;
}
.ra-detail-ing-list li:last-child { border-bottom: none; }
.ra-detail-ing-dot {
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--wine); flex-shrink: 0;
}
.ra-detail-ing-group {
    font-size: 11px; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--muted-light);
    margin: 16px 0 8px;
}
.ra-detail-ing-amount {
    color: var(--muted); font-size: 13px; min-width: 70px;
}

/* Prose (Markdown-Body) */
.ra-prose { font-size: 15px; color: var(--ink-soft); line-height: 1.75; }
.ra-prose h2 { font-family: var(--font-display); font-size: 22px; font-weight: 400; margin: 28px 0 12px; color: var(--ink); }
.ra-prose h3 { font-family: var(--font-display); font-size: 18px; font-weight: 400; margin: 20px 0 10px; color: var(--ink); }
.ra-prose p { margin-bottom: 14px; }
.ra-prose ul, .ra-prose ol { padding-left: 20px; margin-bottom: 14px; }
.ra-prose li { margin-bottom: 6px; }
.ra-prose strong { font-weight: 600; color: var(--ink); }

/* Origin Bar (Herkunft kompakt) */
.ra-detail-origin {
    display: flex; gap: 32px; align-items: center;
    padding: 20px 24px; background: var(--cream);
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    margin-bottom: 32px; flex-wrap: wrap;
}
.ra-detail-origin__label {
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--muted-light); font-weight: 600; margin-bottom: 3px;
}
.ra-detail-origin__value { font-size: 14px; font-weight: 500; color: var(--ink); }

/* Tags */
.ra-detail-tags {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; margin-bottom: 8px;
}
.ra-dtag {
    padding: 4px 12px;
    background: var(--border-soft); border-radius: 100px;
    font-size: 11.5px; color: var(--muted); font-weight: 400;
    text-decoration: none; transition: background .15s;
}
.ra-dtag:hover { background: var(--border); }

/* ============================================================
   Detail — Paired Recipes / Drinks
   ============================================================ */
.ra-detail-pairings {
    border-top: 1px solid var(--border-soft); padding-top: 36px; margin-top: 40px;
}
.ra-detail-pairings__heading {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 300; margin-bottom: 20px;
}
.ra-detail-pairings__grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.ra-pairing-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 18px;
    background: var(--cream); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer;
    transition: border-color .18s, background .18s;
    text-decoration: none; color: inherit;
}
.ra-pairing-item:hover { border-color: var(--wine-mid); background: var(--wine-pale); }
.ra-pairing-item__img {
    width: 52px; height: 52px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #DDD0C4, #C8B8A8);
    flex-shrink: 0; object-fit: cover;
}
.ra-pairing-item__icon {
    width: 52px; height: 52px; border-radius: var(--radius-sm);
    background: var(--border-soft); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.ra-pairing-item__cat {
    font-size: 10px; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 4px;
}
.ra-pairing-item__name {
    font-family: var(--font-display); font-size: 15px; font-weight: 400;
    line-height: 1.3; color: var(--ink);
}

/* ============================================================
   Detail — Leaflet Map (Herkunftskarte)
   ============================================================ */
.ra-detail-map { margin-bottom: 32px; }
.ra-wine-map {
    width: 100%; height: 300px;
    border-radius: var(--radius-sm); overflow: hidden;
    border: 1px solid var(--border); position: relative; z-index: 0;
}
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
}
.leaflet-popup-content {
    font-family: var(--font-body) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}
.ra-map-popup__title {
    font-family: var(--font-display);
    font-weight: 600; font-size: 15px; color: var(--wine);
    margin-bottom: 4px;
}
.ra-map-popup__meta {
    color: var(--muted); font-size: 12px;
    display: flex; flex-direction: column; gap: 2px;
}
.leaflet-control-attribution { font-size: 10px !important; }

/* ============================================================
   Detail — Rating
   ============================================================ */
.ra-detail-rating {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 0; margin-top: 20px;
    border-top: 1px solid var(--border-soft);
    font-size: 13px; color: var(--muted);
}
.ra-rating__btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    background: none; cursor: pointer; font-size: 13px;
    color: var(--muted); transition: all .18s;
}
.ra-rating__btn:hover { border-color: var(--wine); color: var(--wine); }
.ra-rating__btn--active { background: var(--wine); color: #fff; border-color: var(--wine); }

/* Back Link */
.ra-detail-back {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 32px; font-size: 13px; font-weight: 500;
    color: var(--wine); text-decoration: none;
    transition: gap .18s;
}
.ra-detail-back:hover { gap: 10px; }

/* Editor Actions on Detail */
.ra-detail-editor-actions {
    margin-top: 32px; padding-top: 24px;
    border-top: 2px dashed var(--border);
    display: flex; gap: 12px; flex-wrap: wrap;
}

/* ============================================================
   Footer
   ============================================================ */
.ra-footer {
    background: var(--ink); color: rgba(255,255,255,.85);
    margin-top: 0;
}
.ra-footer__inner {
    max-width: var(--max-w); margin: 0 auto;
    padding: 60px 32px 40px;
    display: grid; grid-template-columns: 1fr auto auto; gap: 60px;
}
.ra-footer__brand-name {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 300; letter-spacing: .02em;
    color: #fff; margin-bottom: 12px;
}
.ra-footer__brand-desc {
    font-size: 13px; color: rgba(255,255,255,.4); line-height: 1.7; max-width: 240px;
}
.ra-footer__nav h4 {
    font-size: 10px; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: rgba(255,255,255,.3);
    margin-bottom: 16px;
}
.ra-footer__nav a {
    display: block; font-size: 13.5px; color: rgba(255,255,255,.6);
    padding: 5px 0; transition: color .18s; text-decoration: none;
}
.ra-footer__nav a:hover { color: #fff; }
.ra-footer__copy {
    grid-column: 1/-1; padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex; justify-content: space-between;
    font-size: 11.5px; color: rgba(255,255,255,.3);
}

/* ============================================================
   Error / Empty States
   ============================================================ */
.ra-error {
    background: #FEF2F2; border: 1px solid #FECACA;
    border-radius: var(--radius-sm); padding: 16px 20px;
    color: #991B1B; margin-bottom: 24px; font-size: 14px;
}

/* ============================================================
   Buttons (shared, also used by editor)
   ============================================================ */
.ra-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px;
    background: var(--ink); color: #fff;
    border: none; border-radius: 100px;
    font-family: var(--font-body); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: opacity .18s; text-decoration: none;
}
.ra-btn:hover { opacity: .85; }
.ra-btn--ghost {
    background: none; color: var(--wine);
    border: 1.5px solid var(--border);
}
.ra-btn--ghost:hover { border-color: var(--wine); background: var(--wine-pale); opacity: 1; }
.ra-btn--primary {
    background: var(--wine);
}
.ra-btn--danger { background: #DC2626; }
.ra-btn--ai {
    background: #7C3AED;
    gap: 8px;
}
.ra-btn--small {
    padding: 6px 14px; font-size: 12px;
}

/* ============================================================
   Editor (Modal, Forms) — erhalten fuer Kompatibilitaet
   ============================================================ */
.ra-editor-modal-open { overflow: hidden; }

dialog.ra-dialog,
dialog.ra-editor-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: min(900px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0;
    background: var(--surface);
}
dialog.ra-dialog::backdrop,
dialog.ra-editor-dialog::backdrop {
    background: rgba(18,16,14,.6);
    backdrop-filter: blur(4px);
}
.ra-editor,
.ra-editor-form { font-family: var(--font-body); }

.ra-editor__header,
.ra-editor-form__header {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--surface); z-index: 10;
}
.ra-editor-form__header h2 {
    font-size: 16px; font-weight: 600; color: var(--ink); margin: 0;
    font-family: var(--font-body);
}
.ra-editor-form__actions {
    display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.ra-editor__title { font-size: 16px; font-weight: 600; color: var(--ink); }

.ra-editor__close,
.ra-editor-form__close {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--cream); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--muted); transition: background .15s;
}
.ra-editor__close:hover,
.ra-editor-form__close:hover { background: var(--border); }

.ra-editor__body,
.ra-editor-form__body { padding: 24px 28px; }

.ra-editor__footer,
.ra-editor-form__footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border);
    display: flex; gap: 10px; justify-content: flex-end;
    position: sticky; bottom: 0; background: var(--surface);
}
.ra-field { margin-bottom: 18px; }
.ra-field label {
    display: block; font-size: 12px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 6px;
}
.ra-field input, .ra-field textarea, .ra-field select {
    width: 100%; padding: 9px 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 14px; color: var(--ink);
    background: var(--surface); outline: none; transition: border-color .15s;
}
.ra-field input:focus, .ra-field textarea:focus, .ra-field select:focus {
    border-color: var(--wine);
}
.ra-field textarea { resize: vertical; min-height: 120px; }
.ra-form-row,
.ra-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ra-form-row-3,
.ra-field-row--3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.ra-field-row--4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
.ra-field-row--full { grid-column: 1 / -1; }
.ra-tasted-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.ra-tasted-label input { width: auto; }
.ra-pairing-option {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: var(--cream);
    border-radius: var(--radius-sm); font-size: 13px; cursor: pointer;
}
.ra-pairing-option input { width: auto; margin: 0; }
.ra-pairing-option__cat { color: var(--muted); font-size: 11px; }
.ra-pairing-checkboxes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 220px; overflow-y: auto; padding: 4px 0; }
.ra-section-title {
    font-size: 13px; font-weight: 600; color: var(--ink);
    margin: 24px 0 14px; padding-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
}
.ra-ing-header {
    display: grid; grid-template-columns: 120px 1fr 70px 1.5fr 28px;
    gap: 8px; margin-bottom: 6px;
    font-size: 10px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--muted-light);
}
.ra-ing-row {
    display: grid; grid-template-columns: 120px 1fr 70px 1.5fr 28px;
    gap: 8px; margin-bottom: 6px; align-items: center;
}
.ra-ing-row .ra-ing-group { grid-column: 1 / -2; }
.ra-ing-remove {
    width: 28px; height: 28px; border: none;
    background: none; cursor: pointer; color: #c0392b;
    font-size: 1rem; padding: .25rem;
}
.ra-image-upload { margin-top: 6px; }
.ra-image-upload__dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm); padding: 32px 20px;
    text-align: center; cursor: pointer; transition: border-color .18s, background .18s;
    color: var(--muted); font-size: 14px; user-select: none;
}
.ra-image-upload__dropzone:active { background: var(--cream); }
.ra-image-upload__dropzone:hover { border-color: var(--wine); }
.ra-image-upload__progress { height: 4px; background: var(--border-soft); border-radius: 2px; margin-top: 8px; }
.ra-image-upload__bar { height: 100%; background: var(--wine); border-radius: 2px; transition: width .2s; }
.ra-image-upload__preview img { max-width: 100%; max-height: 200px; border-radius: var(--radius-sm); }
.ra-image-upload__remove {
    display: block; margin-top: 8px;
    background: none; border: none; color: #c0392b; cursor: pointer; font-size: 13px;
}
.ra-ai-import, .ra-ai-pairings { margin-top: 12px; padding: 16px; background: #F5F3FF; border-radius: var(--radius-sm); border: 1px solid #DDD6FE; }
.ra-ai-import__title, .ra-ai-pairings__title { font-size: 13px; font-weight: 600; color: #5B21B6; margin-bottom: 10px; }
.ra-ai-suggestion { padding: 10px 14px; background: #fff; border: 1px solid #DDD6FE; border-radius: var(--radius-sm); margin-bottom: 8px; }
.ra-ai-suggestion__name { font-weight: 600; font-size: 13px; color: var(--ink); }
.ra-ai-suggestion__info { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ra-pairings-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 240px; overflow-y: auto; }
.ra-pairing-check { display: flex; align-items: center; gap: 8px; padding: 8px; background: var(--cream); border-radius: var(--radius-sm); font-size: 13px; }
.ra-wine-fields { padding: 12px; background: var(--cream); border-radius: var(--radius-sm); border: 1px solid var(--border-soft); margin-top: 8px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .ra-food-grid { grid-template-columns: repeat(3, 1fr); }
    .ra-wine-grid { grid-template-columns: repeat(2, 1fr); }
    .ra-wine-card--featured { grid-column: span 2; }
}

@media (max-width: 860px) {
    .ra-main { padding: 32px 20px 80px; }
    .ra-intro { grid-template-columns: 1fr; }
    .ra-intro__visual { min-height: 200px; }
    .ra-intro__text { padding: 36px 32px; }
    .ra-intro__title { font-size: 36px; }
    .ra-wine-grid { grid-template-columns: 1fr; }
    .ra-wine-card--featured { grid-column: span 1; }
    .ra-food-grid { grid-template-columns: repeat(2, 1fr); }
    .ra-detail-body { padding: 28px 28px 36px; }
    .ra-detail-hero { padding: 36px 28px 28px; }
    .ra-detail-grid { grid-template-columns: 1fr; gap: 28px; }
    .ra-detail-pairings__grid { grid-template-columns: 1fr; }
    .ra-footer__inner { grid-template-columns: 1fr; gap: 32px; }
    .ra-header__tabs { display: none; }
    .ra-header__hamburger { display: flex; }
}

@media (max-width: 580px) {
    .ra-food-grid { grid-template-columns: repeat(2, 1fr); }
    .ra-header__search { max-width: 160px; }
    .ra-detail-hero__title { font-size: 32px; }
    .ra-detail-bar { flex-wrap: wrap; }
    .ra-detail-bar__item { min-width: 50%; border-bottom: 1px solid var(--border-soft); }
}
