
.catalog-page {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 48px; /* Adjust this value for the space between filter and products */
    padding: 48px 40px;
    min-height: 100vh;
}
 
/* Responsive: only stack on small screens */
@media (max-width: 1100px) {
    .catalog-page {
        flex-direction: column;
        gap: 24px;
        padding: 0 8vw;
    }
    .catalog-sidebar {
        margin-bottom: 18px;
        width: 100%;         /* Make sidebar full width on mobile */
        max-width: 100%;
        padding: 18px 8px;
        box-sizing: border-box;
    }
    .catalog-main {
        padding-right: 0;
        padding-left: 0;
    }
}
.catalog-sidebar {
    min-width: 260px;
    max-width: 300px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 32px 28px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-left: 0; /* Remove or set to 0 */
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.clear-filters-btn {
    background: none;
    border: none;
    color: #1976d2;
    font-size: 0.97rem;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    transition: color 0.18s;
}
.clear-filters-btn:hover {
    color: #023dff;
    text-decoration: underline;
}
.filter-group {
    margin-bottom: 18px;
}
.filter-group h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.97rem;
    margin-bottom: 6px;
    cursor: pointer;
}
.catalog-main {
    flex: 1 1 0;
    padding-right: 20px;
    padding-left: 0; /* Remove left padding if you want the gap to control spacing */
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.catalog-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    margin-top: 8px;
    width: 100%;
}
.sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
#sortSelect {
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background: #f3f6fd;
    transition: border 0.18s;
}
#sortSelect:focus {
    border: 1.5px solid #1976d2;
    outline: none;
}
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-sizing: border-box;
    min-height: 400px;
    justify-items:none;  /* Center cards in grid */
}
.catalog-item {
    width: 270px;           /* Fixed width */
    min-width: 270px;
    max-width: 270px;
    height: 350px;          /* Fixed height */
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.10);
    padding: 0 0 18px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.18s, box-shadow 0.18s;
    position: relative;
    overflow: hidden;
}
.catalog-item:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
}
.catalog-item img {
    width: 100%;
    height: 180px;          /* Fixed image height */
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
    flex-shrink: 0;
}
.featured-tag {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #ffda00;
    color: #222;
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    z-index: 2;
    letter-spacing: 0.5px;
    border: none;
    text-transform: uppercase;
    pointer-events: none;
}
.catalog-item h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin: 18px 0 6px 0;
    color: #222;
    width: 100%;
    text-align: center;
    flex-shrink: 0;
}
.catalog-item .product-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0 auto 0 auto;
    font-size: 0.97rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
}
.catalog-item .product-pieces {
    background: #f3f6fd;
    color: #888;
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 0.97rem;
    font-weight: 500;
}
.catalog-item .product-category {
    background: #7bb6df;
    color: #222;
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 0.97rem;
    font-weight: 500;
}
.catalog-item .product-complex {
    background: #eaeaea;
    color: #222;
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 1rem;
    font-weight: 700;
    margin: 8px auto 0 auto;
    display: block;
    width: fit-content;
    flex-shrink: 0;
}
.catalog-item .product-price {
    color: #1976ff;
    font-weight: 700;
    font-size: 1.08rem;
    margin: 10px auto 0 auto;
    display: block;
    text-align: center;
    flex-shrink: 0;
}
.no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 48px 24px 40px 24px;
    margin: 32px auto;
    width: 100%;
    max-width: 420px;
    text-align: center;
}
.no-products h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
}
.no-products p {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 22px;
}
.no-products .clear-filters-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.no-products .clear-filters-btn:hover {
    background: #023dff;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
}
.catalog-page,
.main-content {
    min-height: 0 !important;
}
@media (max-width: 1100px) {
    .catalog-page {
        flex-direction: column;
        gap: 24px;
        padding: 0 8vw;
        margin-top: 20px;
    }
    .catalog-sidebar {
        margin-bottom: 18px;
        width: 100%;         /* Make sidebar full width on mobile */
        max-width: 100%;
        padding: 18px 8px;
        box-sizing: border-box;
    }
    .catalog-main {
        padding-right: 0;
        padding-left: 0;
    }
    .catalog-grid {
        margin-bottom: 20px;
    }
}
@media (max-width: 700px) {
    .catalog-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .catalog-item {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 260px; /* Reduce card height */
        padding: 0 0 10px 0;
    }
    .catalog-item img {
        height: 160px; /* Reduce image height */
    }
    .catalog-item h3 {
        font-size: 0.95rem;
        margin: 10px 0 4px 0;
    }
    .catalog-item .product-info {
        font-size: 0.82rem;
        gap: 4px 6px;
    }
    .catalog-item .product-pieces,
    .catalog-item .product-category,
    .catalog-item .product-complex {
        font-size: 0.82rem;
        padding: 1px 7px;
    }
    .catalog-item .product-complex {
        margin: 4px auto 0 auto;
    }
    .catalog-item .product-price {
        font-size: 0.95rem;
        margin: 6px auto 0 auto;
    }
    .featured-tag {
        font-size: 0.75rem;
        padding: 3px 10px;
        top: 8px;
        right: 8px;
        border-radius: 8px;
    }
}