/*
 * BizPry Search Page (/search)
 * Scoped to .bp-search-page
 */

.bp-search-page {
    --bs-p-blue: #0b4fb3;
    --bs-p-blue-deep: #05245d;
    --bs-p-blue-dark: #073078;
    --bs-p-orange: #f85a05;
    --bs-p-teal: #16c8b6;
    --bs-p-ink: #081b3a;
    --bs-p-muted: #5d7089;
    --bs-p-line: #dce7f3;
    --bs-p-surface: #ffffff;
    --bs-p-bg: #f3f7fb;
    --bs-p-soft: #f6f9fe;
    color: var(--bs-p-ink);
    background:
        radial-gradient(circle at 8% 4%, rgba(11, 79, 179, .08), transparent 28%),
        radial-gradient(circle at 92% 2%, rgba(248, 90, 5, .07), transparent 26%),
        var(--bs-p-bg);
    padding-bottom: 4rem;
}

.bp-search-page a {
    text-decoration: none;
}

.bp-search-container {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: clamp(16px, 3vw, 32px);
}

/* ---------------- Hero ---------------- */
.bp-search-hero {
    position: relative;
    overflow: hidden;
    padding: 1.5rem 0 4.2rem;
    color: #ffffff;
    background:
        radial-gradient(circle at 14% 18%, rgba(22, 200, 182, .22), transparent 32%),
        radial-gradient(circle at 86% 14%, rgba(248, 90, 5, .20), transparent 30%),
        linear-gradient(128deg, #051633 0%, #09357a 54%, #0b4fb3 100%);
}

.bp-search-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, rgba(0, 0, 0, .85), transparent 95%);
    pointer-events: none;
}

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

.bp-search-breadcrumb {
    margin-bottom: 1.35rem;
}

.bp-search-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 0;
    padding: .48rem .95rem;
    list-style: none;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
    font-size: .82rem;
    font-weight: 600;
}

.bp-search-breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: rgba(255, 255, 255, .78);
}

.bp-search-breadcrumb li + li::before {
    content: "/";
    color: rgba(255, 255, 255, .42);
}

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

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

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

.bp-search-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .36rem .85rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #9ff7ec;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.bp-search-hero h1 {
    margin: .85rem 0 .5rem;
    color: #ffffff;
    font-size: clamp(1.75rem, 3.6vw, 2.75rem);
    font-weight: 850;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.bp-search-hero h1 span {
    color: #7be4ff;
}

.bp-search-lead {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(.95rem, 1.3vw, 1.04rem);
    line-height: 1.6;
}

/* ---------------- Floating Search Bar ---------------- */
.bp-search-bar-wrap {
    margin-top: -2.35rem;
    position: relative;
    z-index: 2;
}

.bp-search-bar-card {
    padding: clamp(16px, 2.4vw, 26px);
    border-radius: 22px;
    border: 1px solid var(--bs-p-line);
    background: var(--bs-p-surface);
    box-shadow: 0 18px 46px rgba(5, 36, 93, .08);
}

.bp-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.bp-search-input-box {
    position: relative;
    flex: 1 1 280px;
}

.bp-search-input-box i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-p-blue);
    font-size: 1rem;
}

.bp-search-input-box input {
    width: 100%;
    min-height: 52px;
    padding: .75rem 1rem .75rem 2.75rem;
    border-radius: 14px;
    border: 1px solid #cad8ea;
    background: var(--bs-p-soft);
    color: var(--bs-p-ink);
    font-size: .98rem;
    font-weight: 600;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.bp-search-input-box input:focus {
    outline: none;
    border-color: var(--bs-p-blue);
    background: #ffffff;
    box-shadow: 0 0 0 .22rem rgba(11, 79, 179, .13);
}

.bp-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 52px;
    padding: .75rem 1.5rem;
    border-radius: 14px;
    border: 0;
    background: linear-gradient(135deg, #f85a05, #ff7828);
    color: #ffffff;
    font-size: .95rem;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(248, 90, 5, .28);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.bp-search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(248, 90, 5, .38);
}

.bp-search-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-p-line);
}

.bp-jump-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .42rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--bs-p-line);
    background: var(--bs-p-soft);
    color: var(--bs-p-blue-dark);
    font-size: .83rem;
    font-weight: 750;
    transition: all .18s ease;
}

.bp-jump-pill:hover {
    border-color: var(--bs-p-blue);
    background: #eef5ff;
    color: var(--bs-p-blue);
}

.bp-jump-pill strong {
    color: var(--bs-p-orange);
}

/* ---------------- Results Sections ---------------- */
.bp-search-section {
    margin-top: clamp(22px, 3vw, 32px);
}

.bp-surface-card {
    padding: clamp(20px, 3vw, 32px);
    border-radius: 22px;
    border: 1px solid var(--bs-p-line);
    background: var(--bs-p-surface);
    box-shadow: 0 18px 46px rgba(5, 36, 93, .06);
}

.bp-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    margin-bottom: 1.35rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--bs-p-line);
}

.bp-section-head h2 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--bs-p-blue-deep);
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 850;
    letter-spacing: -.025em;
}

.bp-section-head h2 i {
    color: var(--bs-p-orange);
}

.bp-count-badge {
    display: inline-flex;
    align-items: center;
    padding: .35rem .85rem;
    border-radius: 999px;
    background: #eafbf8;
    border: 1px solid rgba(22, 200, 182, .3);
    color: #0e7c71;
    font-size: .8rem;
    font-weight: 800;
}

/* Product Grid */
.bp-search-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.bp-search-product-item,
.bp-search-product-item .bp-product-card {
    height: 100%;
}

/* Business Grid */
.bp-search-biz-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.bp-biz-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 18px;
    border: 1px solid var(--bs-p-line);
    background: var(--bs-p-soft);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.bp-biz-card:hover {
    transform: translateY(-2px);
    border-color: #bdd3ee;
    box-shadow: 0 14px 32px rgba(11, 79, 179, .08);
}

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

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

.bp-biz-thumb i {
    font-size: 1.5rem;
    color: var(--bs-p-blue);
}

.bp-biz-body {
    flex: 1 1 auto;
    min-width: 0;
}

.bp-biz-body h3 {
    margin: 0 0 .35rem;
    font-size: 1.06rem;
    font-weight: 850;
    color: var(--bs-p-blue-deep);
}

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

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

.bp-biz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .9rem;
    color: var(--bs-p-muted);
    font-size: .84rem;
    line-height: 1.5;
    margin-bottom: .85rem;
}

.bp-biz-meta i {
    color: var(--bs-p-orange);
    margin-right: .28rem;
}

.bp-biz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.bp-mini-btn {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .4rem .82rem;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 750;
    border: 1px solid var(--bs-p-line);
    background: #ffffff;
    color: var(--bs-p-blue-dark);
    transition: all .18s ease;
}

.bp-mini-btn:hover {
    border-color: var(--bs-p-blue);
    color: var(--bs-p-blue);
}

.bp-mini-btn--primary {
    border-color: transparent;
    background: var(--bs-p-blue);
    color: #ffffff !important;
}

.bp-mini-btn--primary:hover {
    background: var(--bs-p-blue-dark);
}

/* Category Grid */
.bp-search-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.bp-cat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--bs-p-line);
    background: var(--bs-p-soft);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.bp-cat-card:hover {
    transform: translateY(-2px);
    border-color: #bdd3ee;
    box-shadow: 0 12px 28px rgba(11, 79, 179, .08);
}

.bp-cat-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--bs-p-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bp-cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-cat-thumb i {
    color: var(--bs-p-blue);
    font-size: 1.25rem;
}

.bp-cat-info h3 {
    margin: 0 0 .35rem;
    font-size: 1rem;
    font-weight: 850;
    color: var(--bs-p-blue-deep);
}

.bp-cat-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 750;
    color: var(--bs-p-blue);
}

/* Empty State */
.bp-empty-state {
    text-align: center;
    padding: clamp(28px, 4vw, 52px) 20px;
}

.bp-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    background: #eef5ff;
    color: var(--bs-p-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.bp-empty-state h2 {
    margin: 0 0 .5rem;
    font-size: 1.35rem;
    font-weight: 850;
    color: var(--bs-p-blue-deep);
}

.bp-empty-state p {
    margin: 0 auto 1.25rem;
    max-width: 520px;
    color: var(--bs-p-muted);
}

/* Share Wrapper */
.bp-share-wrap .card {
    border: 1px solid var(--bs-p-line);
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(5, 36, 93, .06);
    overflow: hidden;
}

.bp-share-wrap .card-body {
    padding: clamp(20px, 2.5vw, 30px);
}

/* ---------------- Dark Mode ---------------- */
html[data-frontend-theme="dark"] .bp-search-page {
    --bs-p-ink: #e2ecf8;
    --bs-p-muted: #98aec8;
    --bs-p-line: #253650;
    --bs-p-surface: #101b2d;
    --bs-p-bg: #09111e;
    --bs-p-soft: #152338;
}

html[data-frontend-theme="dark"] .bp-search-page .bp-section-head h2,
html[data-frontend-theme="dark"] .bp-search-page .bp-biz-body h3,
html[data-frontend-theme="dark"] .bp-search-page .bp-cat-info h3,
html[data-frontend-theme="dark"] .bp-search-page .bp-empty-state h2 {
    color: #f1f6fd;
}

html[data-frontend-theme="dark"] .bp-search-page .bp-search-input-box input,
html[data-frontend-theme="dark"] .bp-search-page .bp-mini-btn {
    background: #0d1726;
    border-color: #2b3f5d;
    color: #e2ecf8;
}

html[data-frontend-theme="dark"] .bp-search-page .bp-jump-pill {
    background: #152338;
    border-color: #273a56;
    color: #cde0f8;
}

html[data-frontend-theme="dark"] .bp-search-page .bp-share-wrap .card {
    background: #101b2d;
    border-color: #253650;
    color: #e2ecf8;
}

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

@media (max-width: 991.98px) {
    .bp-search-biz-grid,
    .bp-search-cat-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .bp-search-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .bp-search-submit {
        width: 100%;
    }
}

@media (max-width: 479.98px) {
    .bp-search-product-grid {
        grid-template-columns: 1fr;
    }

    .bp-biz-card {
        flex-direction: column;
    }
}
