
/* =========================================
   City Category Business Directory
   Frontend Styles
========================================= */

.ccbd-directory {
    width: 100%;
    margin: 0 auto;
    color: #333;
}

/* City Selector */
.ccbd-city-selector {
    margin-bottom: 25px;
}

.ccbd-city-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.ccbd-city-selector select,
.ccbd-directory select {
    width: 100%;
    max-width: 350px;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    font-size: 15px;
}

/* Homepage Category Grid */
.ccbd-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 25px 0;
}

.ccbd-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 85px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all .2s ease;
}

.ccbd-category-item:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}

.ccbd-category-item .dashicons {
    font-size: 28px;
    width: 30px;
    height: 30px;
    color: #2271b1;
}

.ccbd-category-item span:last-child {
    font-weight: 600;
}

/* Category Page Layout */
.ccbd-category-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin: 25px 0;
}

.ccbd-category-sidebar {
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.ccbd-sidebar-section + .ccbd-sidebar-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ccbd-sidebar-section h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.ccbd-sidebar-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ccbd-sidebar-section li {
    margin: 0;
    padding: 0;
}

.ccbd-sidebar-section li a {
    display: block;
    padding: 9px 10px;
    color: #444;
    text-decoration: none;
    border-radius: 4px;
}

.ccbd-sidebar-section li a:hover,
.ccbd-sidebar-section li a.active {
    color: #2271b1;
    background: #f0f6fc;
    font-weight: 600;
}

/* Business Listing */
.ccbd-business-listings {
    min-width: 0;
}

.ccbd-business-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.ccbd-business-image img {
    display: block;
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 5px;
}

.ccbd-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 145px;
    background: #f3f4f5;
    color: #777;
    border-radius: 5px;
}

.ccbd-business-info {
    min-width: 0;
}

.ccbd-business-info h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.ccbd-business-info h3 a {
    color: #222;
    text-decoration: none;
}

.ccbd-business-info h3 a:hover {
    color: #2271b1;
}

.ccbd-business-meta {
    margin-bottom: 10px;
    color: #777;
    font-size: 13px;
}

.ccbd-business-description {
    margin-bottom: 12px;
    line-height: 1.6;
}

.ccbd-view-details {
    display: inline-block;
    padding: 9px 16px;
    color: #fff !important;
    background: #2271b1;
    border-radius: 4px;
    text-decoration: none;
}

.ccbd-view-details:hover {
    background: #135e96;
}

/* Pagination */
.ccbd-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 25px 0;
}

.ccbd-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
}

.ccbd-pagination .current {
    color: #fff;
    background: #2271b1;
    border-color: #2271b1;
}

/* No Results */
.ccbd-no-results {
    padding: 25px;
    background: #f7f7f7;
    border-radius: 6px;
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .ccbd-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ccbd-category-layout {
        grid-template-columns: 230px minmax(0, 1fr);
        gap: 18px;
    }
}

@media (max-width: 650px) {
    .ccbd-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ccbd-category-item {
        min-height: 75px;
        padding: 12px;
        gap: 8px;
    }

    .ccbd-category-layout {
        grid-template-columns: 1fr;
    }

    .ccbd-category-sidebar {
        order: 2;
    }

    .ccbd-business-listings {
        order: 1;
    }

    .ccbd-business-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ccbd-business-image img,
    .ccbd-no-image {
        height: 190px;
    }

    .ccbd-business-info h3 {
        font-size: 18px;
    }
}

@media (max-width: 380px) {
    .ccbd-category-grid {
        grid-template-columns: 1fr;
    }
}
