/*
 * BizPry Location Directory Page (/{state}/{city}, /{state})
 * Scoped to .bl-page
 */

.bl-page {
    --bl-blue: var(--bizpry-blue, #0b4fb3);
    --bl-blue-dark: var(--bizpry-blue-dark, #073078);
    --bl-orange: var(--bizpry-orange, #f85a05);
    --bl-teal: var(--bizpry-teal, #16c8b6);
    --bl-text: var(--bizpry-ink, #081b3a);
    --bl-muted: var(--bizpry-muted, #5d7089);
    --bl-line: var(--bizpry-line, #dce7f3);
    color: var(--bl-text);
    background: var(--bizpry-surface, #f3f7fb);
}

.bl-page a {
    text-decoration: none;
}

/* ---------------- Hero ---------------- */
.bl-hero {
    position: relative;
    padding: 28px 0 56px;
    color: #e1ecf9;
    background:
        radial-gradient(circle at 10% 15%, rgba(22, 200, 182, .22), transparent 32%),
        radial-gradient(circle at 90% 8%, rgba(248, 90, 5, .24), transparent 30%),
        linear-gradient(128deg, #051633 0%, #09357a 54%, #0b4fb3 100%);
    overflow: hidden;
}

.bl-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, #000, transparent 92%);
    pointer-events: none;
}

.bl-hero .container {
    position: relative;
    z-index: 1;
}

.bl-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 24px;
    padding: 7px 14px;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    font-weight: 700;
}

.bl-breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: rgba(255, 255, 255, .42);
}

.bl-breadcrumb a {
    color: rgba(255, 255, 255, .92);
}

.bl-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.bl-breadcrumb li[aria-current="page"] {
    color: #ffffff;
    font-weight: 800;
}

.bl-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
    gap: clamp(28px, 4vw, 52px);
    align-items: center;
}

.bl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #ffe2d0;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.bl-section .bl-eyebrow {
    color: var(--bl-orange);
}

.bl-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 50px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -.035em;
}

.bl-hero-copy {
    max-width: 680px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(15px, 1.3vw, 17px);
    line-height: 1.68;
}

.bl-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.bl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, .1);
    font-size: 13px;
    font-weight: 750;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    cursor: pointer;
}

.bl-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, .18);
    transform: translateY(-2px);
}

.bl-btn-primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, var(--bl-orange), #ff7a1f);
    box-shadow: 0 12px 28px rgba(248, 90, 5, .3);
}

.bl-btn-primary:hover {
    background: linear-gradient(135deg, #e55204, #ff6d0f);
    box-shadow: 0 16px 34px rgba(248, 90, 5, .4);
}

.bl-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.bl-stat {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
}

.bl-stat strong,
.bl-stat span {
    display: block;
}

.bl-stat strong {
    color: #fff;
    font-size: 24px;
    font-weight: 850;
}

.bl-stat span {
    margin-top: 3px;
    color: #b5cae6;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.bl-hero-panel {
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 22px;
    background: rgba(6, 20, 48, .66);
    box-shadow: 0 26px 64px rgba(3, 14, 38, .32);
    backdrop-filter: blur(16px);
}

.bl-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--bl-orange), #ff7a1f);
}

.bl-hero-panel small {
    color: #ffcfb1;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.bl-hero-panel h2 {
    margin: 6px 0 8px;
    color: #fff;
    font-size: 24px;
    font-weight: 850;
}

.bl-hero-panel p {
    margin: 0 0 18px;
    color: #c0d2ea;
    font-size: 14px;
    line-height: 1.6;
}

.bl-panel-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-top: 1px solid rgba(255, 255, 255, .13);
    color: #d7e4f4;
    font-size: 13px;
}

.bl-panel-row i {
    margin-right: 7px;
    color: var(--bl-teal);
}

.bl-panel-row strong,
.bl-panel-row a {
    color: #fff;
    font-weight: 800;
}

.bl-panel-row a:hover {
    color: #ffcfb1;
}

.bl-panel-row a i {
    margin: 0 0 0 5px;
    color: var(--bl-orange);
    font-size: 10px;
}

/* ---------------- Path Band ---------------- */
.bl-location-path-band {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--bl-line);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 28px rgba(7, 34, 75, .04);
}

.bl-location-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 54px;
    padding: 8px 0;
    color: var(--bl-muted);
    font-size: 12.5px;
    font-weight: 750;
}

.bl-location-path-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-right: 4px;
    color: var(--bl-blue-dark);
    font-size: 10.5px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.bl-location-path-label i,
.bl-location-path > i {
    color: var(--bl-orange);
}

.bl-location-path > i {
    font-size: 9px;
}

.bl-location-path a {
    color: var(--bl-blue);
}

.bl-location-path a:hover {
    color: var(--bl-orange);
}

.bl-location-path [aria-current="page"] {
    color: var(--bl-text);
    font-weight: 850;
}

/* ---------------- Sections ---------------- */
.bl-section {
    padding: clamp(40px, 5vw, 62px) 0;
}

.bl-section-alt {
    border-top: 1px solid var(--bl-line);
    background: #edf4fa;
}

.bl-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.bl-section-head h2 {
    margin: 0;
    color: #05245d;
    font-size: clamp(24px, 3.2vw, 36px);
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -.03em;
}

.bl-section-head p {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--bl-muted);
    line-height: 1.65;
}

.bl-count {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border: 1px solid rgba(22, 200, 182, .3);
    border-radius: 999px;
    color: #0e7c71;
    background: #eafbf8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.bl-section-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.bl-filter {
    position: relative;
    width: min(280px, 100%);
}

.bl-filter i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--bl-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.bl-filter input {
    width: 100%;
    min-height: 42px;
    padding: 10px 13px 10px 40px;
    border: 1px solid var(--bl-line);
    border-radius: 999px;
    color: var(--bl-text);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
}

.bl-filter input:focus {
    border-color: var(--bl-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(11, 79, 179, .12);
}

.bl-parent-location-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--bl-blue-dark), var(--bl-blue));
    box-shadow: 0 10px 24px rgba(11, 79, 179, .16);
    font-size: 12.5px;
    font-weight: 800;
}

.bl-parent-location-link:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* ---------------- Filter Bar ---------------- */
.bl-directory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 0 0 26px;
    padding: 16px;
    border: 1px solid var(--bl-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(7, 34, 75, .05);
}

.bl-directory-filters label,
.bl-directory-filter-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 250px;
    min-width: 0;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--bl-line);
    border-radius: 12px;
    background: #f6f9fe;
}

.bl-directory-filters label i,
.bl-directory-filter-field i {
    color: var(--bl-orange);
}

.bl-directory-filters input,
.bl-directory-filters select {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bl-text);
    font-size: 14px;
    font-weight: 600;
}

.bl-directory-filters .bl-btn {
    min-height: 44px;
    color: var(--bl-text);
    border-color: var(--bl-line);
    background: #f6f9fe;
}

.bl-directory-filters .bl-btn-primary {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--bl-orange), #ff7a1f);
}

/* ---------------- Business Cards ---------------- */
.bl-business-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.bl-biz-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--bl-line);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(7, 34, 75, .055);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.bl-biz-card:hover {
    transform: translateY(-3px);
    border-color: #b9d1ee;
    box-shadow: 0 20px 44px rgba(7, 34, 75, .10);
}

.bl-biz-thumb {
    flex: 0 0 82px;
    width: 82px;
    height: 82px;
    border-radius: 16px;
    border: 1px solid var(--bl-line);
    background: #f6f9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
}

.bl-biz-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.bl-biz-thumb i {
    font-size: 1.6rem;
    color: var(--bl-blue);
}

.bl-biz-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bl-biz-body h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
    font-weight: 850;
    color: #05245d;
    line-height: 1.3;
}

.bl-biz-body h3 a {
    color: inherit;
}

.bl-biz-body h3 a:hover {
    color: var(--bl-blue);
}

.bl-biz-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--bl-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}

.bl-biz-meta i {
    color: var(--bl-orange);
    margin-right: 6px;
    width: 14px;
    text-align: center;
}

.bl-biz-cat-link {
    display: inline-flex;
    align-items: center;
    color: var(--bl-blue);
    font-weight: 700;
}

.bl-biz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bl-biz-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 750;
    border: 1px solid var(--bl-line);
    background: #f6f9fe;
    color: var(--bl-blue-dark);
    transition: all .18s ease;
}

.bl-biz-btn:hover {
    border-color: var(--bl-blue);
    color: var(--bl-blue);
}

.bl-biz-btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--bl-orange), #ff7828);
    color: #ffffff !important;
}

.bl-biz-btn--primary:hover {
    box-shadow: 0 8px 20px rgba(248, 90, 5, .28);
}

/* ---------------- Products, Categories, Cities ---------------- */
.bl-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

.bl-product-card .product-item {
    height: 100%;
    margin: 0 !important;
    border: 1px solid var(--bl-line);
    border-radius: 18px;
    background: #fff !important;
    box-shadow: 0 14px 36px rgba(7, 34, 75, .06);
    overflow: hidden;
}

.bl-product-card .product-img {
    aspect-ratio: 4 / 3;
    background: #eaf1f8;
}

.bl-product-card .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bl-product-card .product-item > a {
    display: block;
    height: 100%;
}

.bl-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.bl-category-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--bl-line);
    border-radius: 18px;
    color: #15253c;
    background: #fff;
    box-shadow: 0 14px 34px rgba(7, 34, 75, .05);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.bl-category-card:hover {
    color: #0b4fb3;
    border-color: #acc9eb;
    box-shadow: 0 20px 44px rgba(7, 34, 75, .1);
    transform: translateY(-3px);
}

.bl-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--bl-blue), #2673dc);
    overflow: hidden;
}

.bl-category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bl-category-card strong,
.bl-category-card small {
    display: block;
}

.bl-category-card strong {
    color: inherit;
    font-size: 16px;
    font-weight: 850;
}

.bl-category-card small {
    margin-top: 4px;
    color: var(--bl-muted);
    font-size: 12px;
    font-weight: 650;
}

.bl-category-arrow {
    margin-left: auto;
    color: var(--bl-orange);
}

.bl-city-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.bl-city-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid var(--bl-line);
    border-radius: 14px;
    color: #20344f;
    background: #fff;
    font-size: 13.5px;
    font-weight: 800;
    transition: transform .18s ease, border-color .18s ease;
}

.bl-city-card i {
    color: var(--bl-orange);
}

.bl-city-card small {
    color: var(--bl-muted);
    font-size: 11px;
    font-weight: 700;
}

.bl-city-card:hover {
    color: var(--bl-blue);
    border-color: #a9c9ed;
    transform: translateY(-2px);
}

.bl-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.bl-pagination nav {
    max-width: 100%;
    overflow-x: auto;
}

.bl-empty {
    padding: 44px 24px;
    border: 1px dashed #bfd0df;
    border-radius: 18px;
    text-align: center;
    background: #fff;
}

.bl-empty i {
    margin-bottom: 12px;
    color: var(--bl-orange);
    font-size: 32px;
}

.bl-empty h3 {
    margin: 0 0 6px;
    color: #10213a;
    font-weight: 850;
}

.bl-empty p {
    color: var(--bl-muted);
}

.bl-page a:focus-visible {
    outline: 3px solid var(--bl-orange);
    outline-offset: 3px;
}

/* ---------------- Dark Mode ---------------- */
html[data-frontend-theme="dark"] .bl-page {
    --bl-text: #d9e5f3;
    --bl-muted: #98aec8;
    --bl-line: #263851;
    color: #d9e5f3;
    background: #091326;
}

html[data-frontend-theme="dark"] .bl-section-alt {
    border-color: #263851;
    background: #0d1a2e;
}

html[data-frontend-theme="dark"] .bl-section-head h2,
html[data-frontend-theme="dark"] .bl-biz-body h3,
html[data-frontend-theme="dark"] .bl-category-card strong,
html[data-frontend-theme="dark"] .bl-empty h3 {
    color: #eef5ff !important;
}

html[data-frontend-theme="dark"] .bl-directory-filters,
html[data-frontend-theme="dark"] .bl-biz-card,
html[data-frontend-theme="dark"] .bl-product-card .product-item,
html[data-frontend-theme="dark"] .bl-category-card,
html[data-frontend-theme="dark"] .bl-city-card,
html[data-frontend-theme="dark"] .bl-empty,
html[data-frontend-theme="dark"] .bl-location-path-band {
    color: #d9e5f3;
    border-color: #293d58;
    background: #101e33 !important;
}

html[data-frontend-theme="dark"] .bl-directory-filters label,
html[data-frontend-theme="dark"] .bl-directory-filter-field,
html[data-frontend-theme="dark"] .bl-directory-filters .bl-btn,
html[data-frontend-theme="dark"] .bl-biz-btn,
html[data-frontend-theme="dark"] .bl-biz-thumb,
html[data-frontend-theme="dark"] .bl-filter input {
    color: #d9e5f3;
    border-color: #2c415e;
    background: #15253e;
}

html[data-frontend-theme="dark"] .bl-location-path-label,
html[data-frontend-theme="dark"] .bl-location-path [aria-current="page"] {
    color: #eef5ff;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1199.98px) {
    .bl-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bl-city-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .bl-hero-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .bl-hero-panel {
        max-width: 630px;
    }

    .bl-product-grid,
    .bl-category-grid,
    .bl-city-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .bl-hero {
        padding: 22px 0 44px;
    }

    .bl-directory-filters > * {
        flex-basis: 100%;
    }

    .bl-stats,
    .bl-business-grid,
    .bl-product-grid,
    .bl-category-grid,
    .bl-city-grid {
        grid-template-columns: 1fr;
    }

    .bl-section-head {
        display: block;
    }

    .bl-section-head > .bl-count {
        margin-top: 12px;
    }

    .bl-section-tools {
        justify-content: flex-start;
        margin-top: 12px;
    }
}

@media (max-width: 479.98px) {
    .bl-biz-card {
        flex-direction: column;
    }
}
