.category-container {
    width: 80%;
    margin: 30px auto;
    padding: 20px 0;
    transition: var(--transition);
}

.category-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--submenu-border);
}

.category-header h2 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 600;
}

.category-header .category-desc {
    margin-top: 8px;
    color: var(--text-color);
    opacity: 0.9;
    font-size: 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--submenu-border);
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(74, 128, 130, 0.1);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.product-img-container {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 15px;
}

.product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-name {
    padding: 15px;
    text-align: center;
}

.product-name a {
    color: var(--text-color);
    text-decoration: none;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -ms-flex-direction: column;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    -ms-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.5;
    max-height: 3em;
    transition: var(--transition);
}

.product-card:hover .product-name a {
    color: var(--primary-color);
}


.loading-state,
.empty-state,
.error-state {
    width: 100%;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--menu-btn-bg);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-retry {
    margin-top: 15px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.error-retry:hover {
    background: var(--accent-color);
}

@media screen and (max-width: 768px) {
    .category-container {
        width: 92%;
        margin: 20px auto;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-img-container {
        height: 150px;
    }
}