/* Category page CSS (încărcat doar pe category.php) */
.cat-page { 
    max-width: 1280px; 
    margin: 16px auto; 
    padding: 0 16px; 
}

.cat-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin: 20px 0 24px; 
    flex-wrap: wrap;
    gap: 16px;
}

.cat-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cat-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cat-grid { 
    display: grid; 
    grid-template-columns: repeat(4, minmax(0, 1fr)); 
    gap: 20px; 
    margin-bottom: 32px;
}

@media (max-width: 1200px){ 
    .cat-grid{ 
        grid-template-columns: repeat(3, minmax(0, 1fr)); 
        gap: 18px;
    } 
}

@media (max-width: 900px){ 
    .cat-grid{ 
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
        gap: 16px;
    } 
}

@media (max-width: 600px){ 
    .cat-grid{ 
        grid-template-columns: 1fr; 
        gap: 14px;
    }
    .cat-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Card stil îmbunătățit */
.card{ 
    background: #fff; 
    border: 1px solid #f0f0f0; 
    border-radius: 16px; 
    overflow: hidden; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

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

.card .img{ 
    width: 100%; 
    aspect-ratio: 4/3; 
    background: linear-gradient(135deg, #f7f7f8 0%, #f0f0f0 100%);
    position: relative;
    overflow: hidden;
}

.card .img img{ 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s ease;
}

.card:hover .img img {
    transform: scale(1.05);
}

.card .meta{ 
    padding: 16px; 
}

.card .title{ 
    font-weight: 600; 
    font-size: 15px; 
    margin: 0 0 8px; 
    line-height: 1.4;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card .price{ 
    color: #2e7d32; 
    font-size: 16px; 
    font-weight: 700;
}

.card .old-price {
    color: #999;
    font-size: 13px;
    text-decoration: line-through;
    margin-right: 6px;
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ff4444;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

/* Grid products îmbunătățit */
.grid-products{ 
    display: grid; 
    gap: 20px; 
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 32px;
}

@media (min-width: 768px){ 
    .grid-products{ 
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    } 
}

@media (min-width: 1024px){ 
    .grid-products{ 
        grid-template-columns: repeat(4, 1fr);
    } 
}

.product-card{ 
    display: block; 
    border-radius: 20px; 
    overflow: hidden; 
    border: 1px solid #f0f0f0; 
    background: #fff; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.product-card:hover{ 
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: #e0e0e0;
    text-decoration: none;
    color: inherit;
}

.pc-img-wrap{ 
    background: linear-gradient(135deg, #fbfbfb 0%, #f5f5f5 100%); 
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
}

.pc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .pc-img-wrap img {
    transform: scale(1.08);
}

.pc-info{ 
    padding: 16px; 
}

.pc-title{ 
    font-size: 16px; 
    margin: 0 0 8px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

/* Filtre și sortare */
.cat-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.filter-btn.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

/* Stil pentru produsele fără imagine */
.card .img:empty::before {
    content: "📷";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    opacity: 0.3;
}