/* ==========================================================================
   Vendors / Buyer's Guide
   File: wp-content/themes/casbo/css/vendors.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   Archive: page wrapper + two-column layout
   -------------------------------------------------------------------------- */
.vendors-archive-page {
    padding: 40px 0 60px;
}

.vendors-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: start;
}

@media ( max-width: 860px ) {
    .vendors-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 16px;
    }
    .vendors-sidebar {
        order: -1;
        position: static;
    }
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.vendors-filter-group {
    margin-bottom: 28px;
}

.vendors-filter-heading {
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #333;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e6ea;
}

.vendors-sidebar .facetwp-search {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9rem;
}

.vendors-sidebar .facetwp-facet {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.vendors-sidebar .facetwp-checkbox {
    background: none !important;
    padding-left: 0 !important;
    display: block;
    padding: 7px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.9rem;
    cursor: pointer;
    color: #333;
    transition: color 0.15s;
}

.vendors-sidebar .facetwp-checkbox:hover,
.vendors-sidebar .facetwp-checkbox.checked {
    color: #003da5;
    font-weight: 600;
}

.vendors-sidebar .facetwp-counter {
    font-size: 0.8rem;
    color: #999;
    font-weight: 400;
    margin-left: 4px;
}

/* --------------------------------------------------------------------------
   Archive header
   -------------------------------------------------------------------------- */
.vendors-archive-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.vendors-archive-title {
    font-size: 1.75rem;
    margin: 0;
}

.vendors-results-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 4px;
}

.vendors-results-meta .facetwp-counts {
    font-size: 0.875rem;
    color: #666;
    flex: 1;
}

.vendors-results-meta .facetwp-counts::after {
    content: " Results";
}

.vendors-filter-reset {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    color: #003da5;
    cursor: pointer;
    text-decoration: underline;
}

.vendors-filter-reset:hover {
    color: #002d80;
}

/* --------------------------------------------------------------------------
   Vendors grid
   -------------------------------------------------------------------------- */
.vendors-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 24px;
    margin-bottom: 28px;
}

@media ( max-width: 900px ) {
    .vendors-grid {
        grid-template-columns: repeat( 2, 1fr );
    }
}

@media ( max-width: 540px ) {
    .vendors-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Vendor card
   -------------------------------------------------------------------------- */
.vendors-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.vendors-card:hover {
    box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.1 );
}

.vendors-card--pinned {
    border-color: #003da5;
}

.vendors-card__thumb-link {
    display: block;
}

.vendors-card__thumb {
    overflow: hidden;
    background: #eef0f3;
    aspect-ratio: 4 / 3;
}

.vendors-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.vendors-card:hover .vendors-card__thumb img {
    transform: scale( 1.03 );
}

.vendors-card__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: #dce3ed;
}

.vendors-card__placeholder-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: #003da5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vendors-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 18px;
}

.vendors-card__pinned-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #003da5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.vendors-card__topics.bycategories {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.vendors-card__topics.bycategories li a {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #003da5;
    text-decoration: none;
}

.vendors-card__topics.bycategories li a:hover {
    text-decoration: underline;
}

.vendors-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
    flex: 1;
}

.vendors-card__title a {
    color: inherit;
    text-decoration: none;
}

.vendors-card__title a:hover {
    color: #003da5;
}

.vendors-card__excerpt {
    font-size: 0.8125rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vendors-card__actions {
    display: flex;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f2f5;
}

.vendors-card__learn-more {
    font-size: 0.875rem;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   No results
   -------------------------------------------------------------------------- */
.vendors-no-results {
    grid-column: 1 / -1;
    padding: 48px 0;
    text-align: center;
    color: #555;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.vendors-pagination {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.vendors-pagination .facetwp-pager a,
.vendors-pagination .facetwp-pager span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.875rem;
    text-decoration: none;
    color: #003da5;
}

.vendors-pagination .facetwp-pager .active {
    background: #003da5;
    border-color: #003da5;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Single: page wrapper + layout
   -------------------------------------------------------------------------- */
.vendors-single-page {
    padding: 32px 0 60px;
}

.vendors-single-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 48px;
    align-items: start;
}

@media ( max-width: 860px ) {
    .vendors-single-layout {
        grid-template-columns: 1fr;
    }
    .vendors-single-sidebar {
        border-top: 1px solid #e2e6ea;
        padding-top: 24px;
    }
}

/* --------------------------------------------------------------------------
   Single: section label + content
   -------------------------------------------------------------------------- */
.vendors-section-label {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #003da5;
    margin: 0 0 4px;
}

.vendors-section-label a {
    color: inherit;
    text-decoration: none;
}

.vendors-section-label a:hover {
    text-decoration: underline;
}

.vendors-section-rule {
    border: none;
    border-top: 2px solid #e2e6ea;
    margin: 0 0 20px;
}

.vendors-single-title {
    font-size: 1.875rem;
    line-height: 1.2;
    margin: 0 0 16px;
}

.vendors-single-thumb {
    float: right;
    margin: 0 0 20px 32px;
    max-width: 220px;
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.12 );
}

.vendors-single-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.vendors-single-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dce3ed;
    min-height: 120px;
}

.vendors-single-thumb__placeholder-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: #003da5;
    text-align: center;
    padding: 12px;
}

@media ( max-width: 600px ) {
    .vendors-single-thumb {
        float: none;
        margin: 0 0 20px;
        max-width: 100%;
    }
}

.vendors-single-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 28px;
}

.vendors-single-location {
    font-size: 0.9375rem;
    color: #555;
    margin-bottom: 16px;
}

.vendors-single-link-wrap {
    clear: both;
    margin-bottom: 24px;
}

.vendors-visit-btn {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 11px 28px;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.2s;
}

.vendors-visit-btn:hover {
    background: #003da5;
    color: #fff;
}

.vendors-single-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vendors-tag {
    display: inline-block;
    background: #eef0f3;
    color: #444;
    font-size: 0.8125rem;
    padding: 4px 10px;
    border-radius: 2px;
    text-decoration: none;
    border: 1px solid #dde3ed;
}

.vendors-tag:hover {
    background: #003da5;
    border-color: #003da5;
    color: #fff;
}

/* Sidebar tag cloud */
.vendors-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.vendors-tag-cloud a {
    display: inline-block;
    background: #eef0f3;
    color: #444;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 2px;
    text-decoration: none;
    border: 1px solid #dde3ed;
    transition: background 0.15s, color 0.15s;
}

.vendors-tag-cloud a:hover,
.vendors-tag-cloud a.is-active {
    background: #003da5;
    border-color: #003da5;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Single: sidebar
   -------------------------------------------------------------------------- */
.vendors-single-sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.vendors-sidebar-topics {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vendors-sidebar-topics li {
    border-bottom: 1px solid #f0f2f5;
}

.vendors-sidebar-topics li a {
    display: block;
    padding: 7px 0;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    transition: color 0.15s;
}

.vendors-sidebar-topics li a:hover {
    color: #003da5;
    font-weight: 600;
}

.vendors-sidebar-browse {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.875rem;
}

.vendors-sidebar-search-form {
    position: relative;
}

.vendors-sidebar-search-form input[type="search"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.vendors-sidebar-search-form button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

@media ( max-width: 600px ) {
    .vendors-archive-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
