/* ============================================================
   Business Directory Plugin — directory.css
   ============================================================ */

/* ── Reset & Wrap ─────────────────────────────────────────── */
.bd-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
}

/* ── Category Grid ─────────────────────────────────────────── */
.bd-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.bd-category-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
    background: #fff;
}
.bd-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    text-decoration: none;
    color: inherit;
}

.bd-cat-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #e5e7eb;
    background-repeat: no-repeat;
    position: relative;
}
.bd-cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,.55) 0%, transparent 60%);
}

.bd-cat-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bd-cat-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    line-height: 1.3;
}
.bd-cat-count {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* ── Archive Hero ──────────────────────────────────────────── */
.bd-archive-hero {
    border-radius: 14px;
    overflow: hidden;
    height: 380px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 28px;
    position: relative;
}
.bd-archive-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,.7) 0%, rgba(15,23,42,.2) 60%, transparent 100%);
}
.bd-archive-hero-inner {
    position: relative;
    z-index: 1;
    padding: 24px 28px;
    color: #fff;
}
.bd-archive-hero-inner h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px;
    color: #fff;
}
.bd-archive-hero-inner p {
    margin: 0;
    font-size: 15px;
    opacity: .85;
}
.bd-archive-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 24px;
    color: #0f172a;
}

/* ── Search Bar ────────────────────────────────────────────── */
.bd-search-bar-wrap {
    margin-bottom: 24px;
}
.bd-search-form { width: 100%; }
.bd-search-inner {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 6px 8px 6px 14px;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: border-color .2s;
}
.bd-search-inner:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.bd-search-icon {
    width: 18px;
    height: 18px;
    color: #9ca3af;
    flex-shrink: 0;
}
.bd-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 15px;
    color: #1a1a2e;
    padding: 6px 0 !important;
    box-shadow: none !important;
}
.bd-search-input::placeholder { color: #9ca3af; }
.bd-search-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
    white-space: nowrap;
}
.bd-search-btn:hover { background: #1d4ed8; }
.bd-search-clear {
    font-size: 20px;
    color: #9ca3af;
    text-decoration: none;
    padding: 0 4px;
    line-height: 1;
    transition: color .15s;
}
.bd-search-clear:hover { color: #ef4444; }
.bd-search-results-info {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

/* ── Listing Cards ─────────────────────────────────────────── */
.bd-listings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bd-listing-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    gap: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.bd-listing-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
}

.bd-listing-logo {
    width: 160px;
    min-width: 160px;
    background: #f8fafc;
    border-right: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 16px;
}
.bd-listing-logo img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 90px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.bd-listing-body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bd-listing-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.bd-listing-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    line-height: 1.3;
}
.bd-listing-title a {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}
.bd-listing-title a:hover { color: #2563eb; }
.bd-listing-type {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.bd-listing-description {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}
.bd-listing-description p { margin: 0 0 6px; }

/* ── Meta rows ─────────────────────────────────────────────── */
.bd-listing-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 6px 16px;
}
.bd-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}
.bd-meta-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #6b7280;
    min-width: 70px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding-top: 1px;
    flex-shrink: 0;
}
.bd-meta-label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.bd-meta-row a {
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
}
.bd-meta-row a:hover { text-decoration: underline; }

/* ── Contacts ──────────────────────────────────────────────── */
.bd-contacts {
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}
.bd-contacts-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #9ca3af;
    margin: 0 0 10px;
}
.bd-contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (max-width: 600px) {
    .bd-contacts-grid { grid-template-columns: 1fr; }
}
.bd-contact-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bd-contact-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: block;
}
.bd-contact-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}
.bd-contact-phone,
.bd-contact-email {
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.bd-contact-phone svg,
.bd-contact-email svg { flex-shrink: 0; }
.bd-contact-phone:hover,
.bd-contact-email:hover { text-decoration: underline; }

/* ── Social Links ──────────────────────────────────────────── */
.bd-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bd-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity .15s;
}
.bd-social-btn:hover { opacity: .82; text-decoration: none; }
.bd-social-fb { background: #1877f2; color: #fff; }
.bd-social-li { background: #0a66c2; color: #fff; }
.bd-social-tw { background: #0f0f0f; color: #fff; }

/* ── No Results ────────────────────────────────────────────── */
.bd-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}
.bd-no-results svg { margin-bottom: 16px; opacity: .4; }
.bd-no-results p { font-size: 16px; margin-bottom: 16px; }

/* ── Button ────────────────────────────────────────────────── */
.bd-btn {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s;
}
.bd-btn:hover { background: #1d4ed8; color: #fff; text-decoration: none; }

/* ── Pagination ────────────────────────────────────────────── */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #374151;
    border: 1px solid #e5e7eb;
    margin: 0 2px;
    transition: all .15s;
}
.page-numbers.current,
.page-numbers:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.page-numbers.dots {
    border-color: transparent;
    background: transparent;
}
nav.navigation { margin-top: 32px; text-align: center; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 680px) {
    .bd-listing-card { flex-direction: column; }
    .bd-listing-logo {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 16px;
        justify-content: flex-start;
    }
    .bd-listing-logo img { max-height: 60px; }
    .bd-listing-body { padding: 16px; }
    .bd-listing-meta { grid-template-columns: 1fr; }
    .bd-contacts-grid { grid-template-columns: 1fr; }
    .bd-categories-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .bd-cat-image { height: 130px; }
    .bd-archive-hero { height: 220px; }
}

/* ============================================================
   Single Listing Page
   ============================================================ */

.bd-single-wrap { padding-top: 16px; }

.bd-back-link {
    margin-bottom: 18px;
}
.bd-back-link a {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s;
}
.bd-back-link a:hover { color: #2563eb; }

.bd-single-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

/* ── Single Header ─────────────────────────────────────────── */
.bd-single-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 32px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.bd-single-logo {
    flex-shrink: 0;
    width: 140px;
    height: 100px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.bd-single-logo img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

.bd-single-title-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.bd-single-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.bd-single-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.bd-cat-tag {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .3px;
    transition: background .15s;
}
.bd-cat-tag:hover { background: #bfdbfe; color: #1d4ed8; text-decoration: none; }

/* ── Single Body ───────────────────────────────────────────── */
.bd-single-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.bd-single-section {}

.bd-single-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #9ca3af;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
    margin: 0 0 16px;
}

.bd-single-description {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}
.bd-single-description p { margin: 0 0 8px; }

/* ── Details Grid ──────────────────────────────────────────── */
.bd-single-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px 20px;
}

.bd-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
}

.bd-detail-icon {
    width: 36px;
    height: 36px;
    background: #dbeafe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #2563eb;
}
.bd-detail-icon svg { width: 17px; height: 17px; }

.bd-detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #9ca3af;
    margin-bottom: 2px;
}

.bd-detail-value {
    font-size: 14px;
    color: #1a1a2e;
    font-weight: 500;
    word-break: break-word;
}

.bd-detail-link {
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.bd-detail-link:hover { text-decoration: underline; }

/* ── Single Contacts ───────────────────────────────────────── */
.bd-single-contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 900px) {
    .bd-single-contacts-grid { grid-template-columns: repeat(2, 1fr); }
}

.bd-single-contact-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: box-shadow .15s;
}
.bd-single-contact-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.bd-single-contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bd-single-contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bd-single-contact-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: block;
}

.bd-single-contact-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    word-break: break-all;
}
.bd-single-contact-row:hover { text-decoration: underline; }
.bd-single-contact-row svg { flex-shrink: 0; }

/* ── Responsive single ─────────────────────────────────────── */
@media (max-width: 680px) {
    .bd-single-header {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }
    .bd-single-logo { width: 100px; height: 80px; }
    .bd-single-title { font-size: 20px; }
    .bd-single-body { padding: 20px; gap: 20px; }
    .bd-single-details-grid { grid-template-columns: 1fr; }
    .bd-single-contacts-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Global Search Bar (buyers-guide page)
   ============================================================ */
.bd-global-search-wrap {
    position: relative;
    margin-bottom: 32px;
}
.bd-global-search-inner {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 8px 8px 16px;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transition: border-color .2s, box-shadow .2s;
}
.bd-global-search-inner:focus-within {
    border-color: #2563eb;
    box-shadow: 0 4px 20px rgba(37,99,235,.15);
}
.bd-global-search-inner .bd-search-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
}
.bd-global-search-inner .bd-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 16px;
    color: #1a1a2e;
    padding: 8px 0 !important;
    box-shadow: none !important;
}
.bd-global-search-inner .bd-search-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
    white-space: nowrap;
}
.bd-global-search-inner .bd-search-btn:hover { background: #1d4ed8; }

/* ── Suggestions Dropdown ──────────────────────────────────── */
.bd-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 9999;
    overflow: hidden;
}
.bd-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #1a1a2e;
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}
.bd-suggestion-item:last-of-type { border-bottom: none; }
.bd-suggestion-item:hover,
.bd-suggestion-item.bd-sug-active {
    background: #eff6ff;
    text-decoration: none;
    color: #1a1a2e;
}
.bd-sug-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bd-sug-logo img { width: 100%; height: 100%; object-fit: contain; }
.bd-sug-initial {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
}
.bd-sug-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.bd-sug-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bd-sug-cat {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.bd-suggestion-all {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}
.bd-suggestion-all:hover { background: #eff6ff; text-decoration: none; }

/* ── 3-column category grid ────────────────────────────────── */
.bd-categories-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
}
@media (max-width: 900px) {
    .bd-categories-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
    .bd-categories-grid { grid-template-columns: 1fr !important; }
}
