.category-page {
    padding: 0 0 30px 0;
    margin-top: -22px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.products-count {
    font-size: 16px;
    color: var(--text-light);
    white-space: nowrap;
}

.category-content {
    display: block;
    width: 100%;
}

/* Products Section */
.products-section {
    min-width: 0;
}

.products-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    background-color: var(--white);
}

.sort-select:hover {
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    align-items: start;
    margin-top: 0;
}

.product-card {
    position: relative;
    background-color: var(--white);
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: var(--bg-light);
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(0.95);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    pointer-events: none;
}

.product-card:hover .product-overlay {
    opacity: 1;
    pointer-events: auto;
}

.product-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    pointer-events: all;
}

.product-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    pointer-events: auto;
}

.product-action-btn:hover {
    background-color: var(--white);
    transform: scale(1.15);
}

.product-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
    pointer-events: all;
}

.product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.7;
    background-color: #f8f9fa;
}

.product-thumbnail:hover {
    border-color: var(--white);
    opacity: 1;
    transform: scale(1.1);
}

.product-availability {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.availability-dot.in-stock {
    background-color: #4CAF50;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
}

.new-badge {
    background-color: var(--secondary-color);
}

.product-info {
    padding: 15px;
    position: relative;
    background-color: var(--white);
    border-radius: 0 0 8px 8px;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.product-details-hover {
    position: absolute;
    top: calc(100% - 15px);
    left: 0;
    right: 0;
    background-color: var(--white);
    padding: 15px;
    padding-top: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 10;
    pointer-events: auto;
}

.product-card:hover .product-details-hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.product-detail {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
    line-height: 1.5;
}

.btn-add-to-cart {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.3s;
    text-transform: uppercase;
}

.btn-add-to-cart:hover {
    background-color: var(--primary-color-hover);
}

.product-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.product-info {
    background-color: var(--white);
    border-radius: 0 0 8px 8px;
}

.btn-add-to-cart {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.3s;
    text-transform: uppercase;
}

.btn-add-to-cart:hover {
    background-color: var(--primary-color-hover);
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}


.category-header .page-title {
    white-space: nowrap;
    margin-bottom: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1cm;
}
