/**
 * shops.css
 * Bezugsquellen / Shop-Verzeichnis (public/shops.php, Phase 1).
 * Nutzt die --gb-Variablen aus pages.css; Stil konsistent zum übrigen
 * (kantig/neutral, Gold-Akzent, Bordeaux-Karten). Konzept: concepts/shops-konzept.md.
 */

.shop-intro {
    margin: 0 0 16px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* ── Kategorie-Chips ──────────────────────────────────────────────────────── */
.shop-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.shop-chip {
    background: #333330;
    color: #d8d2c4;
    border: 1px solid rgba(200, 168, 122, 0.30);
    border-radius: 5px;
    padding: 3px 10px;
    font-size: 0.76em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.shop-chip:hover { background: #3d3d39; border-color: rgba(200, 168, 122, 0.50); }
.shop-chip--local { border-color: rgba(200, 168, 122, 0.55); color: #e8d4b0; }
.shop-chip.is-active {
    background: rgba(200, 168, 122, 0.90);
    border-color: rgba(200, 168, 122, 0.90);
    color: #1c1c1a;
    font-weight: 600;
}

/* ── Header-Werkzeuge (Suche + Ansicht-Umschalter) ─────────────────────────── */
.page-header__tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Suche ────────────────────────────────────────────────────────────────── */
.shop-search__input {
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.9em;
    min-width: 200px;
}
.shop-search__input:focus { outline: none; border-color: rgba(200, 168, 122, 0.55); }

.shop-count { font-size: 0.8em; color: rgba(255, 255, 255, 0.45); margin-bottom: 10px; }

/* ── Grid + Karten ────────────────────────────────────────────────────────── */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--gb-gap, 14px);
}
.shop-card {
    display: flex;
    flex-direction: column;
    background: var(--gb-card-bg, rgba(37, 15, 17, 0.75));
    border: 1px solid var(--gb-card-border, rgba(200, 168, 122, 0.20));
    border-radius: var(--gb-radius-card, 8px);
    padding: 12px 14px;
    transition: border-color 0.18s, background 0.18s;
}
.shop-card:hover {
    background: var(--gb-card-bg-hover, rgba(37, 15, 17, 0.92));
    border-color: var(--gb-card-border-hover, rgba(200, 168, 122, 0.45));
}
/* Lokale Läden: dezent kräftigerer Gold-Rahmen — die Hervorhebung trägt v. a. das Badge. */
.shop-card--local { border-color: rgba(200, 168, 122, 0.40); }

.shop-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.shop-card__name { font-weight: 600; color: #f0e9da; font-size: 1.02em; }
.shop-card__desc { margin: 0 0 8px; font-size: 0.85em; color: rgba(255, 255, 255, 0.62); line-height: 1.45; }
.shop-card__loc { font-size: 0.8em; color: #d8c4a0; margin-bottom: 10px; }
.shop-card__more { color: rgba(200, 168, 122, 0.75); font-size: 0.92em; }

/* ── „Lokal"-Badge (prominent, etwas größer als die Chips) ─────────────────── */
.shop-badge--local {
    flex-shrink: 0;
    background: linear-gradient(180deg, #d8b888, #c8a87a);
    color: #2a1a10;
    font-weight: 700;
    font-size: 0.8em;
    letter-spacing: 0.03em;
    padding: 3px 11px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.shop-badge--legend { font-size: 0.72em; padding: 1px 8px; vertical-align: middle; }

/* ── Kategorie-Tags ───────────────────────────────────────────────────────── */
.shop-card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.shop-tag {
    font-size: 0.72em;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 4px;
    padding: 2px 7px;
}
.shop-tag--store { color: #d8c4a0; border-color: rgba(200, 168, 122, 0.30); background: rgba(200, 168, 122, 0.10); }

/* ── Fuß / Link ───────────────────────────────────────────────────────────── */
.shop-card__foot { margin-top: auto; }
.shop-link {
    display: inline-block;
    background: #333330;
    color: #e8dcc8;
    border: 1px solid rgba(200, 168, 122, 0.30);
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 0.82em;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.shop-link:hover { background: #3d3d39; border-color: rgba(200, 168, 122, 0.50); color: #fff; }
.shop-link--none {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.45);
    cursor: default;
}
.shop-link--none:hover { background: transparent; border-color: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.45); }

.shop-empty { color: rgba(255, 255, 255, 0.5); font-style: italic; text-align: center; padding: 30px 0; }

/* ══════════════════════════════════════════════════════════════════════════
   Phase 2 — Geo-Karte (Leaflet + OSM). Karte lädt erst nach Consent.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Ansicht-Umschalter (Liste ⇄ Karte) ───────────────────────────────────── */
.view-toggle { display: inline-flex; gap: 4px; }
.view-toggle-btn {
    background: #333330;
    color: #d8d2c4;
    border: 1px solid rgba(200, 168, 122, 0.30);
    border-radius: 5px;
    padding: 4px 12px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.view-toggle-btn:hover { background: #3d3d39; border-color: rgba(200, 168, 122, 0.50); }
.view-toggle-btn.is-active {
    background: rgba(200, 168, 122, 0.90);
    border-color: rgba(200, 168, 122, 0.90);
    color: #1c1c1a;
    font-weight: 600;
}

/* ── Karten-Ansicht ────────────────────────────────────────────────────────── */
#shop-map-view { margin-top: 4px; }
.shop-map-shell { position: relative; }
#shop-map {
    height: 520px;
    width: 100%;
    border-radius: var(--gb-radius-card, 8px);
    border: 1px solid rgba(200, 168, 122, 0.20);
    background: #1c1c1a;
    z-index: 0;
}

/* ── Consent-Overlay (2-Klick-DSGVO) ──────────────────────────────────────── */
.shop-consent {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 24px;
    background: rgba(22, 22, 20, 0.92);
    border-radius: var(--gb-radius-card, 8px);
    border: 1px solid rgba(200, 168, 122, 0.20);
}
/* display:flex überschreibt sonst das [hidden]-Attribut → explizit ausblenden. */
.shop-consent[hidden] { display: none; }
.shop-consent__title { font-weight: 700; color: #f0e9da; font-size: 1.05em; }
.shop-consent__note {
    max-width: 520px;
    font-size: 0.82em;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}
.shop-consent__note a { color: #d8c4a0; }
.shop-consent__geo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82em;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}
#shop-consent-load {
    background: linear-gradient(180deg, #d8b888, #c8a87a);
    color: #2a1a10;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    padding: 9px 22px;
    font-size: 0.92em;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
#shop-consent-load:hover { filter: brightness(1.05); }
#shop-consent-load:disabled { opacity: 0.6; cursor: default; }

/* ── Steuerleiste (Adress-/PLZ-Suche + Standort) ──────────────────────────── */
.shop-map-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
#shop-loc-form { display: flex; gap: 6px; flex: 1 1 auto; min-width: 220px; }
#shop-loc-input {
    flex: 1 1 auto;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.9em;
}
#shop-loc-input:focus { outline: none; border-color: rgba(200, 168, 122, 0.55); }
.shop-map-controls button {
    background: #333330;
    color: #e8dcc8;
    border: 1px solid rgba(200, 168, 122, 0.30);
    border-radius: 5px;
    padding: 6px 14px;
    font-size: 0.82em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.shop-map-controls button:hover { background: #3d3d39; border-color: rgba(200, 168, 122, 0.50); color: #fff; }
#shop-loc-status { font-size: 0.78em; color: rgba(255, 255, 255, 0.55); min-height: 1em; margin: 2px 0 8px; }

/* ── Umkreis-Liste ────────────────────────────────────────────────────────── */
.shop-near { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.shop-near[hidden] { display: none; }   /* display:grid überschreibt sonst [hidden] */
.shop-near__item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 10px;
    background: var(--gb-card-bg, rgba(37, 15, 17, 0.75));
    border: 1px solid rgba(200, 168, 122, 0.18);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.82em;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.shop-near__item:hover { background: var(--gb-card-bg-hover, rgba(37, 15, 17, 0.92)); border-color: rgba(200, 168, 122, 0.45); }
.shop-near__dist { color: #d8c4a0; font-weight: 600; }
.shop-near__name { color: #f0e9da; }
.shop-near__ort { color: rgba(255, 255, 255, 0.55); text-align: right; }
.shop-near__local {
    background: linear-gradient(180deg, #d8b888, #c8a87a);
    color: #2a1a10; font-weight: 700; font-size: 0.82em;
    padding: 0 6px; border-radius: 4px;
}

/* ── Marker-Pins (divIcon — keine Bild-Assets nötig) ──────────────────────── */
.shop-pin {
    background: #5A7F7A;
    border: 2px solid #f0e9da;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.shop-pin--local { background: #c8a87a; }

/* ── Leaflet-Popups ans Dark-Theme angleichen ─────────────────────────────── */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #25201c !important;
    color: #f0e9da !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}
.leaflet-popup-content-wrapper { border: 1px solid rgba(200, 168, 122, 0.35) !important; }
.leaflet-container a.leaflet-popup-close-button { color: rgba(255, 255, 255, 0.6) !important; }
.shop-popup { font-size: 0.9em; line-height: 1.45; min-width: 150px; }
.shop-popup__name { display: inline; color: #f0e9da; font-size: 1.02em; }
.shop-popup__badge {
    display: inline-block; margin-left: 6px;
    background: linear-gradient(180deg, #d8b888, #c8a87a);
    color: #2a1a10; font-weight: 700; font-size: 0.72em;
    padding: 1px 7px; border-radius: 4px;
}
.shop-popup__label { color: rgba(255, 255, 255, 0.7); font-size: 0.85em; margin-top: 3px; }
.shop-popup__addr { color: rgba(255, 255, 255, 0.78); font-size: 0.85em; margin-top: 5px; }
.shop-popup__link {
    display: inline-block; margin-top: 8px;
    color: #d8c4a0; font-size: 0.85em; font-weight: 600; text-decoration: none;
}
.shop-popup__link:hover { color: #fff; text-decoration: underline; }
.leaflet-container { font-family: inherit; }
