.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 20px 0;
    margin-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    background: none;
    border: 2px solid #E0E0E0;
    color: #666;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.category-tab:hover {
    border-color: #D49B6A;
    color: #D49B6A;
}

.category-tab.active {
    background-color: #D49B6A;
    border-color: #D49B6A;
    color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 400px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}


.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}


.product-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 125%;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-card:hover .product-image::before {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 44px;
    text-align: center;
    overflow-wrap: break-word;
}

.product-price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #2c2c2c;
}

.old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    background-color: #D49B6A;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background-color: #B8864A;
}


.product-description-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;

    cursor: pointer;
    z-index: 5;
}

.product-description-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-description-overlay p {
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    max-height: 90%;
    overflow-y: auto;
}


.loading-products {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #D49B6A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.filter-modal.active {
    display: flex;
}

.filter-modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.filter-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c2c2c;
}

.filter-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
}

.filter-option label {
    font-size: 14px;
    color: #4a4a4a;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.filter-apply-btn,
.filter-reset-btn {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-apply-btn {
    background-color: #D49B6A;
    color: #fff;
    border: none;
}

.filter-apply-btn:hover {
    background-color: #B8864A;
}

.filter-reset-btn {
    background: none;
    border: 2px solid #E0E0E0;
    color: #666;
}

.filter-reset-btn:hover {
    border-color: #D49B6A;
    color: #D49B6A;
}


.catalog-controls {
    display: flex;
    margin-bottom: 24px;
}

.sort-container {
    position: relative;
    width: 100%;
}

.sort-container select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.sort-container select:focus {
    outline: none;
    border-color: #D49B6A;
}

.sort-container::after {
    content: '▼';
    font-size: 12px;
    color: #999;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}