/* Businesses directory (pages/businesses.php), prefix bd-. Mobile first: one card per row on phones,
   two on tablets, three on desktop. */

.bd {
    --bd-navy: #021A54;
    --bd-navy-2: #0b2f86;
    --bd-orange: #f97316;
    --bd-ink: #0f172a;
    --bd-muted: #64748b;
    --bd-line: #e2e8f0;
    --bd-soft: #f1f5f9;
    --bd-green: #16a34a;
    background: #f5f7fb;
    min-height: 70vh;
    padding-bottom: 40px;
}

.bd *,
.bd *::before,
.bd *::after {
    box-sizing: border-box;
}

.bd-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Hero + search ---------- */
.bd-hero {
    background: linear-gradient(135deg, var(--bd-navy) 0%, var(--bd-navy-2) 100%);
    color: #fff;
    padding: 22px 0 64px;
    position: relative;
    overflow: hidden;
}

.bd-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, .35), transparent 70%);
    pointer-events: none;
}

.bd-hero h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
}

.bd-hero p {
    margin: 4px 0 0;
    color: #cbd5e1;
    font-size: 14px;
}

.bd-search {
    position: relative;
    z-index: 1;
    margin-top: -44px;
}

.bd-search__box {
    display: flex;
    gap: 8px;
    background: #fff;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(2, 26, 84, .14);
}

.bd-search__field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    min-width: 0;
}

.bd-search__field i {
    color: var(--bd-muted);
}

.bd-search__field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 15px;
    padding: 10px 0;
    background: transparent;
    color: var(--bd-ink);
}

.bd-filter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--bd-line);
    border-radius: 12px;
    background: #fff;
    color: var(--bd-navy);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.bd-filter-btn__count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--bd-orange);
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
    padding: 0 5px;
}

.bd-go {
    height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--bd-orange);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* ---------- Category chips + active filters ---------- */
.bd-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 0 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.bd-chips::-webkit-scrollbar {
    display: none;
}

.bd-chip {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--bd-line);
    background: #fff;
    color: var(--bd-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.bd-chip.is-on {
    background: var(--bd-navy);
    border-color: var(--bd-navy);
    color: #fff;
}

.bd-active {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.bd-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.bd-pill i {
    font-size: 11px;
}

.bd-results {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 16px 0 10px;
}

.bd-results h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--bd-ink);
}

.bd-results a {
    font-size: 13px;
    color: var(--bd-orange);
    font-weight: 700;
    text-decoration: none;
}

/* ---------- Cards ---------- */
.bd-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 640px) {
    .bd-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .bd-grid { grid-template-columns: repeat(3, 1fr); }
    .bd-hero { padding: 34px 0 72px; }
    .bd-hero h1 { font-size: 30px; }
}

.bd-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--bd-line);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.bd-card:active {
    transform: scale(.99);
}

@media (hover: hover) {
    .bd-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 26px rgba(15, 23, 42, .10);
    }
}

.bd-card__cover {
    position: relative;
    height: 96px;
    background: var(--bd-cover, linear-gradient(135deg, var(--bd-navy), var(--bd-navy-2)));
    background-size: cover;
    background-position: center;
}

.bd-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bd-card__featured {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .95);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.bd-card__body {
    position: relative;
    padding: 0 14px 14px;
}

.bd-card__logo {
    width: 64px;
    height: 64px;
    margin-top: -32px;
    border-radius: 16px;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .14);
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--bd-navy);
    font-size: 24px;
    font-weight: 800;
}

.bd-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.bd-card__status {
    position: absolute;
    top: 10px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--bd-soft);
    color: var(--bd-muted);
}

.bd-card__status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.bd-card__status.is-open {
    background: #dcfce7;
    color: #15803d;
}

.bd-card__status.is-closed {
    background: #fee2e2;
    color: #b91c1c;
}

.bd-card__name {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--bd-ink);
    line-height: 1.25;
}

.bd-card__name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bd-card__name .fa-circle-check {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 14px;
}

.bd-card__handle {
    margin: 2px 0 0;
    color: var(--bd-muted);
    font-size: 13px;
}

.bd-card__tagline {
    margin: 8px 0 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bd-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 10px;
    color: var(--bd-muted);
    font-size: 12.5px;
}

.bd-card__meta i {
    margin-right: 4px;
}

.bd-card__rating {
    color: var(--bd-ink);
    font-weight: 700;
}

.bd-card__rating i {
    color: #f59e0b;
}

.bd-card__rating small {
    color: var(--bd-muted);
    font-weight: 500;
}

.bd-card__cat {
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--bd-navy);
    font-weight: 700;
    font-size: 11.5px;
}

/* ---------- Pagination + empty ---------- */
.bd-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 0;
}

.bd-pages a,
.bd-pages span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.bd-pages a {
    background: #fff;
    border: 1px solid var(--bd-line);
    color: var(--bd-navy);
}

.bd-pages span {
    color: var(--bd-muted);
}

.bd-empty {
    text-align: center;
    background: #fff;
    border: 1px dashed var(--bd-line);
    border-radius: 18px;
    padding: 40px 20px;
    color: var(--bd-muted);
}

.bd-empty i {
    font-size: 34px;
    color: #cbd5e1;
}

.bd-empty h3 {
    margin: 12px 0 4px;
    color: var(--bd-ink);
    font-size: 17px;
}

.bd-empty a {
    display: inline-block;
    margin-top: 14px;
    padding: 11px 18px;
    border-radius: 12px;
    background: var(--bd-navy);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

/* ---------- Filter sheet (bottom sheet on phones, side panel on desktop) ---------- */
.bd-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 2000;
}

.bd-sheet-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.bd-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 22px 22px 0 0;
    padding: 10px 18px 22px;
    transform: translateY(105%);
    transition: transform .25s ease;
    z-index: 2001;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .2);
}

.bd-sheet.open {
    transform: translateY(0);
}

.bd-sheet__grab {
    width: 42px;
    height: 5px;
    border-radius: 3px;
    background: #cbd5e1;
    margin: 0 auto 12px;
}

.bd-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bd-sheet__head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--bd-ink);
}

.bd-sheet__close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: var(--bd-soft);
    color: var(--bd-ink);
    cursor: pointer;
}

.bd-sheet label {
    display: block;
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bd-ink);
}

.bd-sheet input[type="text"],
.bd-sheet select {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--bd-line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--bd-ink);
}

.bd-sheet__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bd-sheet__check {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-top: 16px !important;
    font-weight: 600 !important;
}

.bd-sheet__check input {
    width: 20px;
    height: 20px;
    accent-color: var(--bd-orange);
}

.bd-sheet__actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    margin-top: 20px;
}

.bd-sheet__actions a,
.bd-sheet__actions button {
    height: 48px;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.bd-sheet__actions a {
    border: 1px solid var(--bd-line);
    color: var(--bd-ink);
    background: #fff;
}

.bd-sheet__actions button {
    border: 0;
    background: var(--bd-orange);
    color: #fff;
}

@media (min-width: 769px) {
    .bd-sheet {
        left: auto;
        top: 0;
        width: 420px;
        max-height: none;
        border-radius: 0;
        transform: translateX(105%);
        padding-top: 22px;
    }

    .bd-sheet.open {
        transform: translateX(0);
    }

    .bd-sheet__grab {
        display: none;
    }
}

/* The site's old global rule squares every "*-card" and every button (style.css); this page is rounded. */
.bd .bd-card { border-radius: 18px !important; }
.bd button.bd-filter-btn,
.bd button.bd-go,
.bd .bd-sheet__actions button { border-radius: 12px !important; }
.bd button.bd-sheet__close { border-radius: 50% !important; }
