:root {
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --accent: #f97316;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ── Header ── */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo span { color: var(--accent); }

#city-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    outline: none;
}
#city-select:focus { border-color: var(--primary); }

/* ── Search ── */
.search-section {
    max-width: 1200px;
    margin: 1.25rem auto 0;
    padding: 0 1.25rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

#search-input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--surface);
    outline: none;
    color: var(--text);
}
#search-input:focus { border-color: var(--primary); }

#search-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
#search-btn:hover { background: var(--primary-dark); }

/* ── Categories ── */
#categories-list {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}
#categories-list::-webkit-scrollbar { display: none; }

.category-chip {
    flex-shrink: 0;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    color: var(--text);
}
.category-chip:hover { border-color: var(--cat-color, var(--primary)); color: var(--cat-color, var(--primary)); }
.category-chip.active { background: var(--cat-color, var(--primary)); border-color: var(--cat-color, var(--primary)); color: #fff; }

/* ── Map ── */
.map-section {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1.25rem;
}

#map {
    height: 380px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    z-index: 1;
}

.map-marker {
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 14px;
}
.map-marker > * { transform: rotate(45deg); }

.popup-content a {
    font-weight: 600;
    color: var(--primary);
    text-decoration: underline;
}

/* ── Locations Grid ── */
.locations-section {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1.25rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

#locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.location-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}
.location-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.card-image {
    height: 160px;
    background: var(--bg) center/cover no-repeat;
    position: relative;
}
.card-image.no-image { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }

.category-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-body { padding: 0.85rem 1rem 1rem; }
.card-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.card-meta span:first-child { color: #f59e0b; font-weight: 600; }

.loading, .empty-state, .error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
}
.error { color: #ef4444; }

/* ── Featured Carousel ── */
#featured-section {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 1.25rem;
}

#featured-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}
#featured-track::-webkit-scrollbar { display: none; }

.featured-card {
    flex-shrink: 0;
    width: 340px;
    height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #1e293b center/cover no-repeat;
    position: relative;
    scroll-snap-align: start;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    display: block;
}
.featured-card:hover { transform: scale(1.02); }
.featured-card.no-image { background: linear-gradient(135deg, #0891b2, #0e7490); }

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem 1.1rem;
}

.featured-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.featured-cat {
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

/* ── Footer ── */
footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.85rem;
}
footer a { color: rgba(255,255,255,0.9); text-decoration: underline; }

/* ══════════════════════════════
   DETAIL PAGE
══════════════════════════════ */

#hero {
    height: 320px;
    background: #1e293b center/cover no-repeat;
}
#hero.no-image { background: linear-gradient(135deg, #0891b2, #0e7490); }

.detail-header {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 0;
}

.detail-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

#loc-category {
    color: #fff;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

#loc-rating { color: #f59e0b; font-weight: 600; }
#loc-address { color: var(--text-muted); font-size: 0.9rem; }

.detail-section {
    max-width: 860px;
    margin: 1.5rem auto 0;
    padding: 0 1.25rem;
}

.detail-section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
}

#loc-description {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
}

#loc-phone a { color: var(--primary); font-weight: 500; }

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.social-link:hover { border-color: var(--primary); color: var(--primary); }

#hours-section table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
#hours-section td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); }
#hours-section td:first-child { font-weight: 600; width: 120px; }
.closed { color: #ef4444; }

#photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
}

.promo-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}
.promo-card p { margin: 0.4rem 0; color: var(--text-muted); font-size: 0.9rem; }
.promo-card small { color: var(--accent); font-weight: 600; }

#detail-map {
    height: 260px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .featured-card { width: 85vw; height: 180px; }
    #hero { height: 220px; }
    .detail-header h1 { font-size: 1.4rem; }
    #map { height: 280px; }
}
