/* Shop Layout */
.breadcrumbs-container {
    background: #f1f2f4;
    padding: 10px 0;
    font-size: 14px;
    color: #878787;
    margin-bottom: 20px;
}

.breadcrumbs-container a {
    /* Fixed: removed backtick */
    color: #878787;
    text-decoration: none;
}

.breadcrumbs-container a:hover {
    color: #2874f0;
}

.breadcrumbs-container span {
    color: #212121;
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px 40px;
    display: flex;
    gap: 20px;
}

/* Sidebar */
.shop-sidebar {
    width: 250px;
    flex-shrink: 0;
    /* Prevent sidebar from shrinking */
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    padding: 15px;
    height: fit-content;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.filter-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.clear-filters {
    font-size: 12px;
    color: #2874f0;
    text-decoration: none;
    font-weight: 500;
}

.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: #212121;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    /* Limit height if many items */
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar for filter lists */
.filter-options::-webkit-scrollbar {
    width: 4px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #212121;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Price Inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-inputs input {
    width: 60px;
    padding: 5px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

.price-go-btn {
    background: #2874f0;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.shop-content {
    flex: 1;
    /* Take remaining space */
}

/* Toolbar */
.shop-toolbar {
    background: #fff;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.sort-wrapper select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 2px;
    outline: none;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns on desktop */
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 15px;
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 3px 16px 0 rgba(0, 0, 0, 0.11);
}

.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rating-badge-sm {
    background: #388e3c;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 2px;
    width: fit-content;
    margin-bottom: 5px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #212121;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
    line-height: 1.3;
}

.price-box {
    margin-top: auto;
}

.current-price {
    font-size: 16px;
    font-weight: 600;
    color: #212121;
    display: block;
}

.original-price {
    color: #878787;
    text-decoration: line-through;
    font-size: 13px;
    margin-right: 5px;
}

.discount {
    color: #388e3c;
    font-size: 13px;
    font-weight: 500;
}

.price-on-request {
    color: #d32f2f;
    font-weight: 600;
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border: 1px solid #f0f0f0;
    background: #fff;
    color: #212121;
    text-decoration: none;
    border-radius: 50px;
    /* Pill shape or circle */
    font-size: 14px;
}

.page-link:hover,
.page-link.active {
    background: #2874f0;
    color: #fff;
    border-color: #2874f0;
}

.mobile-filter-bar {
    display: none;
}

.no-products-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fff;
    padding: 50px;
    border: 1px solid #f0f0f0;
}

/* Responsiveness */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 768px) {
    .shop-container {
        flex-direction: column;
    }

    .shop-sidebar {
        /* Hidden by default on mobile, toggled with a class */
        position: fixed;
        top: 0;
        left: -280px;
        /* Hide off-screen */
        width: 280px;
        height: 100vh;
        z-index: 1000;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .shop-sidebar.active {
        left: 0;
    }

    .mobile-filter-bar {
        display: block;
        margin-bottom: 15px;
    }

    .mobile-filter-bar button {
        background: #fff;
        border: 1px solid #e0e0e0;
        padding: 10px 15px;
        border-radius: 4px;
        font-weight: 500;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .mobile-filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    /* When sidebar is active, show overlay (need JS/active class on overlay too ideally) */
    /* For simplicity, we can let user click close or outside. */
}