/* ============================================
   VARIABLES CSS
   ============================================ */

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-rgb: 59, 130, 246;

    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;

    --t1: #f1f5f9;
    --t2: #cbd5e1;
    --t3: #94a3b8;
    --t4: #64748b;

    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-main);
    color: var(--t1);
    line-height: 1.6;
    overflow-x: hidden;
}

.app {
    min-height: 100vh;
    position: relative;
}

.hidden {
    display: none !important;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
select {
    font-family: inherit;
    font-size: inherit;
}

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

a:hover {
    text-decoration: underline;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        var(--bg-main);
    z-index: 0;
}

.hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.hero__blob--1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary) 0%, #1565C0 100%);
    top: -250px;
    right: -100px;
    animation-delay: -5s;
}

.hero__blob--2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(225deg, #1565C0 0%, var(--primary) 100%);
    bottom: -200px;
    left: -100px;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}


.hero__actions {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 12px;
    z-index: 10;
    animation: slideDown 0.8s ease-out 0.4s backwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--t2);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hero__link:hover {
    background: rgba(30, 41, 59, 0.8);
    color: var(--t1);
    border-color: rgba(25, 118, 210, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero__link--primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1565C0 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.hero__link--primary:hover {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4);
}

.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    z-index: 0;
}

.hero__inner {
    max-width: 720px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__accent {
    background: linear-gradient(135deg, var(--primary) 0%, #1565C0 50%, #42A5F5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.hero__accent::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #1565C0 50%, #42A5F5 100%);
    border-radius: 2px;
    opacity: 0.3;
}

.hero__sub {
    text-align: center;
    font-size: 1.125rem;
    color: var(--t3);
    margin-bottom: 48px;
    font-weight: 400;
    animation: slideUp 0.8s ease-out 0.1s backwards;
}

/* ============================================
   SEARCH BAR (HERO)
   ============================================ */

.sbar {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
    transition: all 0.3s ease;
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

.sbar:hover {
    transform: translateY(-2px);
    box-shadow:
        0 30px 80px rgba(59, 130, 246, 0.2),
        0 0 0 1px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sbar__main {
    margin-bottom: 14px;
}

.sbar__field {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 14px;
    padding: 16px 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.sbar__field:focus-within {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.sbar__input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--t1);
    font-size: 1.0625rem;
    font-weight: 500;
}

.sbar__input::placeholder {
    color: var(--t4);
    font-weight: 400;
}

.sbar__btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sbar__btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.sbar__btn:active {
    transform: scale(0.98);
}

.sbar__extras {
    display: flex;
    gap: 12px;
}

.sbar__mini {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--t3);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.sbar__mini:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(59, 130, 246, 0.3);
}

.sbar__mini input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--t2);
    font-size: 0.875rem;
}

.sbar__mini input::-webkit-calendar-picker-indicator {
    display: none;
}

.sbar__mini input::-webkit-inner-spin-button,
.sbar__mini input::-webkit-outer-spin-button {
    display: none;
}

/* ============================================
   PILLS (FILTRES RAPIDES)
   ============================================ */

.pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    animation: slideUp 0.8s ease-out 0.3s backwards;
}

.pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 12px 24px;
    color: var(--t2);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pill:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.5);
    color: var(--t1);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.pill:hover::before {
    opacity: 1;
}

.pill span {
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   RESULTS VIEW
   ============================================ */

.rv {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ============================================
   TOP BAR
   ============================================ */

.top {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.top__back {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--t2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.top__back:hover {
    background: var(--bg-hover);
    color: var(--t1);
}

.top__sbar {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-main);
    border-radius: 8px;
    padding: 10px 14px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.top__sbar:focus-within {
    border-color: var(--primary);
}

.top__input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--t1);
    font-size: 0.9375rem;
}

.top__input::placeholder {
    color: var(--t4);
}

.top__filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fbtn {
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--t3);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.fbtn:hover {
    background: var(--bg-hover);
    color: var(--t2);
}

.fbtn--on {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.top__sep {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 4px;
}

.top__mini {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-main);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--t3);
    cursor: pointer;
}

.top__mini input {
    background: none;
    border: none;
    outline: none;
    color: var(--t2);
    font-size: 0.8125rem;
    width: 90px;
}

.top__mini input::-webkit-calendar-picker-indicator {
    display: none;
}

.top__mini input::-webkit-inner-spin-button,
.top__mini input::-webkit-outer-spin-button {
    display: none;
}

/* ============================================
   SPLIT VIEW (LISTE + CARTE)
   ============================================ */

.split {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.split__list {
    overflow-y: auto;
    background: var(--bg-main);
    border-right: 1px solid var(--border);
}

.split__map {
    position: relative;
    overflow: hidden;
}

.lcount {
    padding: 16px 20px;
    font-size: 0.875rem;
    color: var(--t3);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sort-pills {
    display: flex;
    gap: 8px;
}

.sort-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--t3);
    font-size: 0.75rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sort-pill:hover {
    background: var(--bg-hover);
    color: var(--t2);
}

.sort-pill--active {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
    border-color: var(--primary);
}

.sort-arrow {
    display: none;
    font-size: 11px;
    line-height: 1;
    width: 12px;
    text-align: center;
    color: var(--primary);
}

.sort-pill--asc .sort-arrow,
.sort-pill--desc .sort-arrow {
    display: inline-block;
}

.sort-pill--asc .sort-arrow::after {
    content: '↑';
}

.sort-pill--desc .sort-arrow::after {
    content: '↓';
}

@media (max-width: 768px) {
    .lcount {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-pills {
        width: 100%;
        justify-content: flex-start;
    }
}


#listCards {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--t4);
}

.empty-state p {
    margin-top: 12px;
    font-size: 1rem;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.card:hover,
.card--active {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3);
}

.card--product {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
    padding: 16px;
}

.card__thumb {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-main);
}

.card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.card__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--t1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card__meta {
    font-size: 0.875rem;
    color: var(--t3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card__meta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.card__row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.card__price {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary);
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge--green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge--red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.card--establishment {
    display: flex;
    flex-direction: column;
}

.card__cover-wrap {
    height: 160px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.card__cover-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, transparent 100%);
}

.card__cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card__info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.card__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--t2);
    font-weight: 600;
}

.card__rating svg {
    width: 14px;
    height: 14px;
    fill: #f59e0b;
}

.card__details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--t3);
}

.card__details svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================
   MAP & MARKERS
   ============================================ */

.leaflet-container {
    background: var(--bg-tertiary) !important;
}

.leaflet-tile-pane {
    filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}

.leaflet-control-zoom a {
    background: var(--surface) !important;
    color: var(--t1) !important;
    border-color: var(--border) !important;
}

.leaflet-control-attribution {
    display: none !important;
}

.custom-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border: 2.5px solid var(--bg-primary);
    border-radius: 50%;
    transition: all .25s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.custom-marker .marker__count {
    font-size: 8px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.custom-marker--active {
    width: 22px;
    height: 22px;
    background: var(--accent-light);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.15), 0 2px 8px rgba(59, 130, 246, 0.5);
}

.custom-marker--active .marker__count {
    font-size: 10px;
}

.marker-tooltip {
    background: var(--surface) !important;
    color: var(--t1) !important;
    font-size: 12px !important;
    padding: 5px 10px !important;
    border-radius: var(--r-sm) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--sh-md) !important;
}

.marker-tooltip::before {
    display: none !important;
}


.custom-marker {
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Style quand on survole ou que l'élément est actif */
.custom-marker--active {
    background-color: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
    /* C'est peut-être ce "halo" que tu voyais */
    z-index: 1000;
}

/* Petit compteur si plusieurs éléments au même endroit (clustering simple) */
.marker__count {
    color: white;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
}

/* Tooltip Leaflet customisé */
.marker-tooltip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--t1);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.leaflet-tooltip-top:before {
    border-top-color: var(--border);
}

/* ============================================
   FAB (FLOATING ACTION BUTTON)
   ============================================ */

.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary);
    color: white;
    padding: 14px 24px;
    border-radius: 28px;
    font-weight: 600;
    font-size: 0.9375rem;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
    display: none;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    z-index: 1000;
}

.fab:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.5);
}

.fab:active {
    transform: translateY(0);
}

/* ============================================
   AUTOCOMPLETE
   ============================================ */

.autocomplete-dropdown {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--bg-hover);
}

.autocomplete-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.autocomplete-text {
    color: var(--t1);
    font-size: 0.9375rem;
    font-weight: 500;
}

/* ============================================
   MODAL (GÉOLOCALISATION)
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 32px 32px 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.08) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--t1);
    margin: 0;
    letter-spacing: -0.02em;
}

.modal-body {
    padding: 32px;
    text-align: center;
}

.modal-body svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: block;
    color: var(--primary);
    filter: drop-shadow(0 4px 12px rgba(var(--primary-rgb), 0.3));
    animation: locationPulse 2s ease-in-out infinite;
}

@keyframes locationPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.modal-body p {
    color: var(--t2);
    line-height: 1.7;
    font-size: 1rem;
    margin: 0;
    max-width: 360px;
    margin: 0 auto;
}

.modal-footer {
    padding: 24px 32px 32px;
    display: flex;
    gap: 12px;
    justify-content: stretch;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-main);
    color: var(--t2);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--t1);
    border-color: var(--t4);
}


.modal {
    background-color: var(--bg-card);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE MODAL
   ============================================ */

@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .hero__actions {
        position: static;
        justify-content: center;
        margin-bottom: 32px;
        order: -1;
    }

    .hero__inner {
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        padding: 24px 24px 16px;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 24px;
    }

    .modal-body svg {
        width: 56px;
        height: 56px;
        margin-bottom: 20px;
    }

    .modal-body p {
        font-size: 0.9375rem;
    }

    .modal-footer {
        padding: 20px 24px 24px;
        flex-direction: column-reverse;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 12px 20px;
    }
}

/* ============================================
   LOADER / SPINNER
   ============================================ */

.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 10000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: var(--t2);
    font-size: 0.9375rem;
    font-weight: 500;
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .hero {
        min-height: 100vh;
        padding: 16px 16px 40px;
        overflow-x: hidden;
        position: relative;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .hero__bg {
        overflow: hidden;
        min-height: 100%;
    }

    .hero__blob--1,
    .hero__blob--2 {
        display: none;
    }

    .hero__grid {
        opacity: 0.5;
    }

    .hero__actions {
        position: absolute;
        top: 16px;
        left: 16px;
        right: 16px;
        width: auto;
        display: flex;
        gap: 8px;
        z-index: 10;
        margin-bottom: 0;
        flex-wrap: nowrap;
    }

    .hero__link {
        flex: 1;
        min-width: 0;
        justify-content: center;
        font-size: 0.75rem;
        padding: 8px 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero__link svg {
        flex-shrink: 0;
    }

    .hero__link span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero__inner {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-top: 80px;
    }

    .hero__title {
        font-size: 2rem;
        margin-bottom: 16px;
        word-wrap: break-word;
    }

    .hero__accent::after {
        bottom: -4px;
        height: 3px;
    }

    .hero__sub {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .sbar {
        padding: 14px;
        border-radius: 16px;
        margin-bottom: 24px;
        width: 100%;
        box-sizing: border-box;
    }

    .sbar__field {
        padding: 12px 16px;
        gap: 10px;
    }

    .sbar__input {
        font-size: 1rem;
    }

    .sbar__btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .sbar__extras {
        flex-direction: column;
        gap: 10px;
    }

    .sbar__mini {
        width: 100%;
        padding: 10px 14px;
    }

    .pills {
        gap: 8px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .pill {
        font-size: 0.875rem;
        padding: 8px 16px;
        flex: 0 0 auto;
    }

    .split {
        grid-template-columns: 1fr;
    }

    .split__list--hide {
        display: none;
    }

    .split__map--hide {
        display: none;
    }

    .fab {
        display: flex;
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.875rem;
    }

    .top {
        padding: 12px 14px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .top__back {
        width: 36px;
        height: 36px;
    }

    .top__sbar {
        flex: 1;
        min-width: 150px;
        order: 2;
        width: 100%;
        padding: 10px 12px;
    }

    .top__input {
        font-size: 0.875rem;
    }

    .top__filters {
        width: 100%;
        order: 3;
        gap: 6px;
        justify-content: stretch;
    }

    .fbtn {
        flex: 1;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.8125rem;
    }

    .top__sep {
        display: none;
    }

    .top__mini {
        flex: 1;
        padding: 8px 10px;
    }

    .top__mini input {
        width: 100%;
        font-size: 0.75rem;
    }

    .lcount {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .sort-pills {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 6px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .sort-pills::-webkit-scrollbar {
        height: 2px;
    }

    .sort-pills::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 2px;
    }

    .sort-pill {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    #listCards {
        padding: 12px;
        gap: 10px;
    }

    .card--product {
        grid-template-columns: 80px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .card__thumb {
        width: 80px;
        height: 80px;
        border-radius: 8px;
    }

    .card__name {
        font-size: 0.9375rem;
    }

    .card__meta {
        font-size: 0.8125rem;
    }

    .card__price {
        font-size: 1rem;
    }

    .badge {
        font-size: 0.6875rem;
        padding: 3px 8px;
    }

    .card--establishment {
        border-radius: 10px;
    }

    .card__cover-wrap {
        height: 140px;
    }

    .card__info {
        padding: 12px;
    }

    .card__rating {
        font-size: 0.8125rem;
        padding: 3px 8px;
    }

    .card__details {
        font-size: 0.8125rem;
    }

    .modal-overlay {
        padding: 16px;
    }

    .modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 16px;
    }

    .modal-header {
        padding: 24px 20px 16px;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-body svg {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .modal-body p {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    .modal-footer {
        padding: 16px 20px 20px;
        flex-direction: column-reverse;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9375rem;
    }

    .empty-state {
        padding: 40px 20px;
    }

    .empty-state p {
        font-size: 0.9375rem;
    }

    .autocomplete-dropdown {
        margin-top: 6px;
        border-radius: 10px;
        max-height: 250px;
    }

    .autocomplete-item {
        padding: 10px 14px;
    }

    .autocomplete-text {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 100vh;
        padding: 12px 12px 32px;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .hero__inner {
        margin-top: 75px;
    }

    .hero__actions {
        top: 12px;
        left: 12px;
        right: 12px;
        gap: 6px;
    }

    .hero__link {
        font-size: 0.6875rem;
        padding: 7px 8px;
        gap: 4px;
    }

    .hero__link svg {
        width: 14px;
        height: 14px;
    }

    .hero__title {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }

    .hero__sub {
        font-size: 0.9375rem;
        margin-bottom: 24px;
    }

    .sbar {
        padding: 12px;
    }

    .sbar__field {
        padding: 10px 14px;
    }

    .sbar__input {
        font-size: 0.9375rem;
    }

    .sbar__btn {
        width: 36px;
        height: 36px;
    }

    .sbar__mini {
        padding: 8px 12px;
        font-size: 0.8125rem;
    }

    .pills {
        gap: 6px;
    }

    .pill {
        font-size: 0.8125rem;
        padding: 6px 12px;
    }

    .pill span {
        font-size: 1.125rem;
    }

    .top {
        padding: 10px 12px;
    }

    .top__back {
        width: 32px;
        height: 32px;
    }

    .top__sbar {
        padding: 8px 10px;
    }

    .fbtn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .top__mini {
        padding: 6px 8px;
    }

    .top__mini input {
        font-size: 0.6875rem;
        width: 100%;
    }

    .lcount {
        padding: 10px 12px;
        font-size: 0.8125rem;
    }

    .sort-pill {
        padding: 5px 10px;
        font-size: 0.6875rem;
    }

    #listCards {
        padding: 10px;
        gap: 8px;
    }

    .card--product {
        grid-template-columns: 70px 1fr;
        gap: 10px;
        padding: 10px;
        border-radius: 10px;
    }

    .card__thumb {
        width: 70px;
        height: 70px;
        border-radius: 6px;
    }

    .card__name {
        font-size: 0.875rem;
    }

    .card__meta {
        font-size: 0.75rem;
    }

    .card__price {
        font-size: 0.9375rem;
    }

    .badge {
        font-size: 0.625rem;
        padding: 2px 6px;
    }

    .card--establishment {
        border-radius: 8px;
    }

    .card__cover-wrap {
        height: 120px;
    }

    .card__info {
        padding: 10px;
        gap: 6px;
    }

    .card__rating {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    .card__details {
        font-size: 0.75rem;
        gap: 6px;
    }

    .fab {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 0.8125rem;
        border-radius: 24px;
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header {
        padding: 20px 16px 12px;
    }

    .modal-header h3 {
        font-size: 1.125rem;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-body svg {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }

    .modal-body p {
        font-size: 0.875rem;
    }

    .modal-footer {
        padding: 12px 16px 16px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 0.875rem;
        border-radius: 10px;
    }

    .empty-state {
        padding: 30px 16px;
    }

    .empty-state span {
        font-size: 32px;
    }

    .empty-state p {
        font-size: 0.875rem;
    }

    .autocomplete-dropdown {
        border-radius: 8px;
        max-height: 200px;
    }

    .autocomplete-item {
        padding: 8px 12px;
    }

    .autocomplete-icon {
        font-size: 1.125rem;
    }

    .autocomplete-text {
        font-size: 0.8125rem;
    }
}

@media (max-width: 360px) {
    .hero {
        min-height: 100vh;
        padding: 10px 10px 28px;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .hero__inner {
        margin-top: 115px;
    }

    .hero__actions {
        flex-direction: column;
        gap: 6px;
    }

    .hero__link {
        width: 100%;
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .hero__title {
        font-size: 1.5rem;
    }

    .pill {
        flex: 1 1 auto;
        min-width: calc(50% - 4px);
        justify-content: center;
    }

    .card--product {
        grid-template-columns: 60px 1fr;
    }

    .card__thumb {
        width: 60px;
        height: 60px;
    }
}