.page-businesses { background: #fff; }
.page-businesses .site-header { position: relative; background: linear-gradient(112deg, #fff0f0, #fff9ee 55%, #ffeff3); box-shadow: 0 8px 30px rgba(47,31,37,.05); }
.page-businesses .navbar { padding-block: 1rem; }

.directory-page { min-height: 100vh; }
.directory-layout { display: grid; grid-template-columns: minmax(0, 60%) minmax(420px, 40%); align-items: start; width: 100%; border-top: 1px solid rgba(23,20,26,.07); }
.directory-content { min-width: 0; padding: 2rem clamp(1.25rem, 2vw, 2.5rem) 6rem; }

.directory-filter-panel { padding: 1.35rem; border: 1px solid rgba(23,20,26,.11); border-radius: 1.3rem; background: #fff; box-shadow: 0 16px 42px rgba(46,32,37,.055); }
.directory-main-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.directory-field { display: grid; gap: .42rem; min-width: 0; }
.directory-field > span:first-child { margin-left: .2rem; color: #5f565c; font-size: .78rem; font-weight: 800; }
.directory-input-wrap { position: relative; display: block; }
.directory-input-wrap > svg { position: absolute; z-index: 2; left: .85rem; top: 50%; width: 17px; transform: translateY(-50%); fill: none; stroke: var(--brand); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; pointer-events: none; }
.directory-input-wrap input,
.directory-input-wrap select { width: 100%; height: 54px; padding: 0 2.4rem 0 2.6rem; border: 1px solid rgba(23,20,26,.11); border-radius: .72rem; outline: 0; color: var(--ink); background: #fff; font-size: .9rem; font-weight: 650; transition: .2s ease; }
.directory-input-wrap input:focus,
.directory-input-wrap select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(244,33,69,.08); }
.directory-input-wrap input::placeholder { color: #a39aa0; }
.directory-input-wrap select { appearance: none; cursor: pointer; }
.select-wrap::after { content: "⌄"; position: absolute; right: .9rem; top: 50%; color: var(--ink); font-size: .9rem; transform: translateY(-56%); pointer-events: none; }

.radius-control { margin-top: 1.15rem; }
.radius-control > div { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; color: #5f565c; font-size: .8rem; font-weight: 700; }
.radius-control strong { color: var(--ink); }
.radius-control input { width: 100%; height: 5px; appearance: none; border-radius: 5px; outline: 0; background: linear-gradient(90deg, var(--brand) 0 20%, #ffd5dc 20% 100%); }
.radius-control input::-webkit-slider-thumb { width: 18px; height: 18px; appearance: none; border: 4px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 3px 10px rgba(244,33,69,.28); cursor: pointer; }
.radius-control input::-moz-range-thumb { width: 11px; height: 11px; border: 4px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 3px 10px rgba(244,33,69,.28); cursor: pointer; }

.directory-labels { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; margin: 1.2rem 0 0; padding: 1rem 0 0; border: 0; border-top: 1px solid rgba(23,20,26,.08); }
.directory-labels legend { float: none; width: 100%; margin: 0 0 .25rem; color: #5f565c; font-size: .8rem; font-weight: 800; }
.directory-labels label { display: inline-flex; gap: .45rem; align-items: center; cursor: pointer; }
.directory-labels input { width: 16px; height: 16px; margin: 0; appearance: none; border: 1px solid rgba(23,20,26,.16); border-radius: .3rem; background: #fff; cursor: pointer; transition: .2s ease; }
.directory-labels input:checked { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px #fff; }
.directory-labels span { color: #766d72; font-size: .78rem; font-weight: 650; }
.directory-labels input:checked + span { color: var(--brand); }

.directory-filter-actions { display: flex; gap: .7rem; margin-top: 1.2rem; }
.directory-search-button { display: flex; flex: 1; height: 52px; gap: .6rem; align-items: center; justify-content: center; border: 0; border-radius: .72rem; color: #fff; background: var(--brand); box-shadow: 0 10px 24px rgba(244,33,69,.2); font-size: .88rem; font-weight: 800; transition: .2s ease; }
.directory-search-button:hover { background: var(--brand-dark); transform: translateY(-2px); }
.directory-search-button svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.directory-reset-button { padding: 0 1.2rem; border: 1px solid rgba(23,20,26,.12); border-radius: .72rem; color: #6d646a; background: #fff; font-size: .8rem; font-weight: 750; }
.directory-reset-button:hover { color: var(--brand); border-color: rgba(244,33,69,.2); background: var(--blush); }

.results-toolbar { display: flex; gap: 1rem; align-items: flex-end; justify-content: space-between; margin: 2.2rem 0 1rem; }
.results-kicker { margin: 0 0 .3rem; color: var(--brand); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.results-toolbar h2 { margin: 0; font-size: 1.25rem; font-weight: 650; }
.results-toolbar h2 strong { font-weight: 800; }
.sort-control { display: grid; gap: .35rem; }
.sort-control span { margin-left: .15rem; color: #756c71; font-size: .72rem; font-weight: 800; }
.sort-control select { min-width: 190px; height: 48px; padding: 0 2.2rem 0 .9rem; appearance: none; border: 1px solid rgba(23,20,26,.12); border-radius: .7rem; outline: 0; color: var(--ink); background: #fff; font-size: .85rem; font-weight: 700; }

.directory-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.15rem; }
.directory-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(23,20,26,.1); border-radius: 1.1rem; background: #fff; box-shadow: 0 14px 38px rgba(46,32,37,.06); transition: opacity .22s ease, transform .28s ease, box-shadow .25s ease; }
.directory-card:hover { box-shadow: 0 22px 50px rgba(46,32,37,.12); transform: translateY(-5px); }
.directory-card.is-filtering-out { opacity: 0; transform: scale(.97); }
.directory-card[hidden] { display: none; }
.directory-card-photo { position: relative; display: block; height: 190px; background-repeat: no-repeat; background-position: center; background-size: cover; }
.directory-card-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15,11,14,.03), rgba(15,11,14,.3)); }
.directory-card-category,
.directory-card-distance { position: absolute; z-index: 2; top: .7rem; padding: .45rem .65rem; border-radius: .5rem; font-size: .7rem; font-weight: 800; backdrop-filter: blur(8px); }
.directory-card-category { left: .7rem; color: var(--ink); background: rgba(255,255,255,.93); }
.directory-card-distance { right: .7rem; color: #fff; background: rgba(23,20,26,.45); }
.directory-save { position: absolute; z-index: 4; right: .75rem; top: 154px; display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 4px solid #fff; border-radius: 50%; color: #fff; background: var(--teal); font-size: 1.2rem; line-height: 1; transition: .2s ease; }
.directory-save:hover,
.directory-save[aria-pressed="true"] { background: var(--brand); transform: scale(1.06); }
.directory-card-body { padding: 1rem; }
.directory-card-heading { display: flex; gap: .7rem; align-items: center; justify-content: space-between; }
.directory-card-heading h3 { min-width: 0; margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -.03em; }
.directory-card-heading h3 a { display: block; overflow: hidden; color: var(--ink); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.directory-card-heading h3 a:hover { color: var(--brand); }
.directory-card-heading > span { flex: 0 0 auto; color: #7c7378; font-size: .75rem; font-weight: 750; }
.directory-card-heading b { color: #dfa524; }
.directory-card-address { margin: .55rem 0 0; color: #8e858a; font-size: .78rem; }
.directory-card-copy { min-height: 3.2em; margin: .62rem 0 .75rem; color: #6d646a; font-size: .8rem; line-height: 1.6; }
.directory-card-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.directory-card-tags span { padding: .35rem .55rem; border-radius: 2rem; color: #6d646a; background: #f6f2f0; font-size: .65rem; font-weight: 700; }
.directory-card-tags span:first-child { color: var(--teal); background: #e9f5f2; }
.photo-offset { background-position: center 70%; }
.photo-boutique { filter: hue-rotate(-8deg) saturate(.88); }
.photo-curry { background-position: center 34%; filter: saturate(1.08); }

.directory-empty { padding: 4rem 1rem; text-align: center; }
.directory-empty > span { display: block; color: var(--brand); font-size: 3rem; }
.directory-empty h3 { margin: .6rem 0 0; font-size: 1.3rem; font-weight: 800; }
.directory-empty p { margin: .55rem 0 1rem; color: var(--muted); font-size: .72rem; }
.directory-empty button { padding: .7rem 1rem; border: 0; border-radius: 2rem; color: #fff; background: var(--brand); font-size: .65rem; font-weight: 800; }

.directory-map { position: sticky; top: 0; height: 100vh; min-height: 680px; overflow: hidden; background: #eeeae5; }
.map-toolbar { position: absolute; z-index: 8; inset: 1rem 1rem auto; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.map-toolbar > div,
.map-toolbar > button { overflow: hidden; border: 1px solid rgba(23,20,26,.1); border-radius: .65rem; background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(40,32,34,.1); pointer-events: auto; }
.map-toolbar button { height: 42px; padding: 0 .9rem; border: 0; color: #6e666b; background: transparent; font-size: .78rem; font-weight: 750; }
.map-toolbar button.active { color: var(--ink); background: #fff; box-shadow: inset 0 -2px var(--brand); }
.directory-map-canvas { position: absolute; inset: 0; overflow: hidden; background-color: #eeeae5; background-image: linear-gradient(rgba(255,255,255,.62) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.62) 1px, transparent 1px); background-size: 34px 34px; }
.directory-map-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-major-road { fill: none; stroke: #fff; stroke-width: 22; stroke-linecap: round; filter: drop-shadow(0 1px 0 rgba(90,80,82,.14)); }
.map-minor-road { fill: none; stroke: rgba(255,255,255,.84); stroke-width: 10; stroke-linecap: round; }
.map-river { fill: none; stroke: #b7ddea; stroke-width: 48; opacity: .8; }
.map-district { position: absolute; z-index: 2; color: rgba(50,44,47,.48); font-size: .58rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.district-one { left: 43%; top: 43%; }.district-two { right: 11%; top: 26%; }.district-three { left: 17%; bottom: 20%; }.district-four { left: 14%; top: 16%; }
.directory-map-pin { position: absolute; z-index: 5; display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 4px solid #fff; border-radius: 50% 50% 50% 10px; color: #fff; background: var(--ink); box-shadow: 0 8px 20px rgba(30,24,26,.28); transform: rotate(-45deg); transition: opacity .25s ease, transform .25s ease, background .2s ease; }
.directory-map-pin span { font-size: .55rem; font-weight: 800; transform: rotate(45deg); }
.directory-map-pin:hover,
.directory-map-pin.active { z-index: 6; background: var(--brand); transform: rotate(-45deg) scale(1.15); }
.directory-map-pin[hidden] { display: none; }
.pin-a { left: 48%; top: 52%; }.pin-b { left: 29%; top: 44%; }.pin-c { right: 18%; top: 38%; }.pin-d { left: 19%; top: 65%; }.pin-e { left: 57%; top: 33%; }.pin-f { right: 13%; bottom: 24%; }.pin-g { left: 38%; bottom: 18%; }.pin-h { right: 29%; top: 59%; }.pin-i { left: 13%; top: 32%; }
.map-result-note { position: absolute; z-index: 8; right: 1rem; bottom: 1rem; left: 1rem; display: flex; align-items: center; justify-content: space-between; padding: .7rem .8rem; border: 1px solid rgba(255,255,255,.8); border-radius: .75rem; background: rgba(255,255,255,.9); box-shadow: 0 10px 28px rgba(40,32,34,.12); backdrop-filter: blur(10px); }
.map-result-note > span { display: flex; gap: .45rem; align-items: center; color: #60575d; font-size: .76rem; font-weight: 700; }
.map-result-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(23,107,112,.12); }
.map-result-note button { border: 0; color: var(--brand); background: transparent; font-size: .74rem; font-weight: 800; }

@media (max-width: 1199.98px) {
    .directory-layout { grid-template-columns: minmax(0, 62%) minmax(360px, 38%); }
    .directory-main-fields { grid-template-columns: 1fr 1fr; }
    .directory-main-fields .directory-field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 991.98px) {
    .directory-layout { display: flex; flex-direction: column; }
    .directory-content { order: 2; width: 100%; padding: 1.25rem 2.2rem 5rem; }
    .directory-map { position: relative; order: 1; width: 100%; height: 420px; min-height: 0; }
    .directory-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .directory-content { padding: 1rem 1.15rem 4rem; }
    .directory-map { height: 340px; }
    .directory-filter-panel { padding: 1rem; }
    .directory-main-fields { grid-template-columns: 1fr; }
    .directory-main-fields .directory-field:last-child { grid-column: auto; }
    .directory-labels { gap: .7rem 1rem; }
    .directory-filter-actions { flex-direction: column; }
    .directory-search-button { flex: 0 0 48px; }
    .directory-reset-button { height: 42px; }
    .results-toolbar { align-items: end; }
    .sort-control select { min-width: 145px; }
    .directory-results { grid-template-columns: 1fr; max-width: 470px; margin-inline: auto; }
    .directory-card-photo { height: 225px; }
    .directory-save { top: 189px; }
}

@media (max-width: 420px) {
    .directory-map { height: 310px; }
    .map-toolbar { inset: .65rem .65rem auto; }
    .map-result-note { right: .65rem; bottom: .65rem; left: .65rem; }
    .results-toolbar { display: grid; }
    .sort-control { width: 100%; }
    .sort-control select { width: 100%; }
}
