/**
 * KB Seller List - Frontend CSS
 */

/* ===== General Styles ===== */
.kbsl-seller-list-page,
.kbsl-all-sellers-page,
.kbsl-all-products-page {
    padding: 20px 0;
}

/* ===== Page Header ===== */
.kbsl-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 20px;
}

.kbsl-header-content {
    flex: 1;
    min-width: 300px;
}

.kbsl-description {
    font-size: 16px;
    color: #6c757d;
    line-height: 1.6;
}

.kbsl-header-actions {
    display: flex;
    gap: 10px;
}

.kbsl-dashboard-btn,
.kbsl-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kbsl-dashboard-btn .material-icons,
.kbsl-account-btn .material-icons {
    font-size: 20px;
}

/* ===== Back Link ===== */
.kbsl-back-link {
    margin-bottom: 20px;
}

.kbsl-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s;
}

.kbsl-back-link a:hover {
    color: #333;
}

.kbsl-back-link .material-icons {
    font-size: 18px;
}

/* ===== Section Headers ===== */
.kbsl-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.kbsl-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.kbsl-section-title .material-icons {
    color: #25b9d7;
    font-size: 28px;
}

.kbsl-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.kbsl-view-all-btn .material-icons {
    font-size: 18px;
}

/* ===== Sellers Grid ===== */
.kbsl-sellers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.kbsl-seller-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kbsl-seller-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.kbsl-seller-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid #e9ecef;
}

.kbsl-seller-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kbsl-seller-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25b9d7 0%, #1a8fa8 100%);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

.kbsl-seller-info {
    flex: 1;
    margin-bottom: 15px;
}

.kbsl-seller-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px;
}

.kbsl-seller-owner {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 8px;
}

.kbsl-seller-location,
.kbsl-seller-products {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    color: #6c757d;
    margin: 5px 0;
}

.kbsl-seller-location .material-icons,
.kbsl-seller-products .material-icons {
    font-size: 16px;
    color: #25b9d7;
}

.kbsl-view-shop-btn {
    width: 100%;
}

/* ===== Products Grid ===== */
.kbsl-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.kbsl-product-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kbsl-product-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.kbsl-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.kbsl-product-image {
    height: 180px;
    overflow: hidden;
}

.kbsl-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.kbsl-product-card:hover .kbsl-product-image img {
    transform: scale(1.05);
}

.kbsl-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: #6c757d;
}

.kbsl-no-image .material-icons {
    font-size: 48px;
}

.kbsl-product-info {
    padding: 15px;
}

.kbsl-product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.3;
}

.kbsl-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #25b9d7;
    margin: 0;
}

.kbsl-product-seller {
    padding: 10px 15px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.kbsl-seller-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6c757d;
    text-decoration: none;
}

.kbsl-seller-link:hover {
    color: #25b9d7;
}

.kbsl-seller-link .material-icons {
    font-size: 16px;
}

/* ===== Filter Section ===== */
.kbsl-filter-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.kbsl-alphabet-filter {
    margin-bottom: 20px;
}

.kbsl-filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.kbsl-alphabet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.kbsl-letter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s;
}

.kbsl-letter-btn:hover {
    background-color: #25b9d7;
    border-color: #25b9d7;
    color: #fff;
}

.kbsl-letter-btn.active {
    background-color: #25b9d7;
    border-color: #25b9d7;
    color: #fff;
}

/* ===== Search Form ===== */
.kbsl-search-section {
    display: flex;
    justify-content: flex-end;
}

.kbsl-alphabet-filter + .kbsl-search-section {
    margin-top: -40px;
    margin-bottom: 10px;
}

.kbsl-search-form {
    display: inline-block;
}

.kbsl-search-row {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    align-items: stretch;
}

.kbsl-search-type-wrapper {
    position: relative;
    display: inline-block;
}

.kbsl-search-type {
    width: 140px;
    flex-shrink: 0;
    border-radius: 4px 0 0 4px;
    border-right: none;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 25px;
}

.kbsl-dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #6c757d;
    pointer-events: none;
}

.kbsl-search-input {
    width: 200px;
    flex-shrink: 0;
    border-radius: 0;
}

.kbsl-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0 4px 4px 0;
    background-color: #6c757d;
    border-color: #6c757d;
}

.kbsl-search-btn:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.kbsl-clear-btn {
    padding: 0.375rem 0.75rem;
}

/* Results Info with Clear Filter */
.kbsl-results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-bottom: 20px;
}

.kbsl-results-count {
    font-size: 14px;
    color: #333;
}

.kbsl-clear-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.kbsl-clear-filter .material-icons {
    font-size: 16px;
}

/* All Seller Button */
.kbsl-all-btn {
    background-color: #25b9d7;
    border-color: #25b9d7;
    color: #fff;
    padding: 0 15px;
}

/* ===== Sort Section ===== */
.kbsl-sort-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.kbsl-results-info {
    font-size: 14px;
    color: #6c757d;
}

.kbsl-sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kbsl-sort-label {
    font-weight: 500;
    color: #333;
    margin: 0;
}

.kbsl-sort-select {
    width: 180px;
}

/* ===== Pagination ===== */
.kbsl-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.kbsl-pagination .pagination {
    margin: 0;
}

.kbsl-pagination .page-link {
    border-color: #dee2e6;
    color: #6c757d;
}

.kbsl-pagination .page-item.active .page-link {
    background-color: #25b9d7;
    border-color: #25b9d7;
}

/* ===== No Results ===== */
.kbsl-no-results {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kbsl-no-results .material-icons {
    font-size: 24px;
}

.kbsl-no-results a {
    margin-left: 10px;
}

/* ===== Menu Button (Nav) ===== */
.kbsl-menu-button {
    display: inline-block;
}

.kbsl-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.kbsl-nav-link:hover {
    color: #25b9d7;
}

.kbsl-nav-link .material-icons {
    font-size: 20px;
}

/* ===== Customer Account ===== */
#kbsl-account-link,
#kbsl-dashboard-link {
    text-decoration: none;
}

#kbsl-account-link .link-item,
#kbsl-dashboard-link .link-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== Seller List Header ===== */
.kbsl-seller-list-header {
    background-color: #343a40;
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 0;
}

.kbsl-seller-list-header .kbsl-section-title {
    color: #fff;
    margin: 0;
}

.kbsl-seller-list-header .kbsl-section-title .material-icons {
    color: #fff;
}

.kbsl-sellers-section {
    margin-bottom: 0;
}

/* ===== Featured Sellers Section ===== */
.kbsl-featured-sellers,
.kbsl-latest-products {
    margin-bottom: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 1199px) {
    .kbsl-sellers-grid,
    .kbsl-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .kbsl-sellers-grid,
    .kbsl-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kbsl-page-header {
        flex-direction: column;
    }

    .kbsl-header-content {
        min-width: 100%;
    }
}

@media (max-width: 767px) {
    .kbsl-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kbsl-alphabet-buttons {
        justify-content: center;
    }

    .kbsl-alphabet-filter + .kbsl-search-section {
        margin-top: 15px;
        justify-content: center;
    }

    .kbsl-search-row {
        flex-wrap: wrap;
    }

    .kbsl-search-type-wrapper {
        width: 100%;
    }

    .kbsl-search-type {
        width: 100%;
        border-radius: 4px;
        border-right: 1px solid #ced4da;
    }

    .kbsl-search-input {
        width: calc(100% - 50px);
        border-radius: 4px 0 0 4px;
        margin-top: 10px;
    }

    .kbsl-search-btn {
        margin-top: 10px;
    }

    .kbsl-results-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .kbsl-sort-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .kbsl-sort-controls {
        width: 100%;
    }

    .kbsl-sort-select {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .kbsl-sellers-grid,
    .kbsl-products-grid {
        grid-template-columns: 1fr;
    }

    .kbsl-letter-btn {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .kbsl-nav-link span {
        display: none;
    }
}
