/**
 * CSS específico para página de categoria de produtos
 * Otimizado para mobile-first e responsividade
 */

/* Container e seção */
.category-section {
    padding: 1rem 0;
}

.category-section .card {
    padding: 1rem;
}

.category-section .card-header {
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    gap: 1.7rem;
}

.category-section .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.category-section .card-header p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
}

/* Grid de produtos - Mobile First */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Cards de produto */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

/* Imagem do produto */
.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: var(--gray-100);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

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

/* Badge */
.product-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--white);
    z-index: 2;
}

/* Informações do produto */
.product-info {
    padding: 0.75rem;
}

.product-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.price-current {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-seller {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-seller svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

/* Ações do produto */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    width: 100%;
    justify-content: center;
    gap: 0.375rem;
}

.product-actions .btn svg {
    width: 14px;
    height: 14px;
}

/* Tablet - telas médias */
@media (min-width: 481px) {
    .category-section .card-title {
        font-size: 1.375rem;
    }
    
    .category-section .card-header p {
        font-size: 0.8125rem;
        -webkit-line-clamp: 2;
        max-height: 3.25em;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }
    
    .product-info {
        padding: 0.875rem;
    }
    
    .product-name {
        font-size: 0.9375rem;
    }
    
    .price-current {
        font-size: 1.25rem;
    }
    
    .product-actions {
        flex-direction: row;
    }
    
    .product-actions .btn {
        flex: 1;
        width: auto;
    }
}

/* Desktop - telas grandes */
@media (min-width: 769px) {
    .category-section {
        padding: 1.5rem 0;
    }
    
    .category-section .card {
        padding: 1.5rem;
    }
    
    .category-section .card-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .category-section .card-header p {
        font-size: 0.875rem;
        -webkit-line-clamp: 3;
        max-height: 4.2em;
    }
    
    .category-section .card-header {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.75rem;
    }
    
    .product-info {
        padding: 1.25rem;
    }
    
    .product-name {
        font-size: 1rem;
        min-height: auto;
    }
    
    .product-category {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .product-price {
        margin-bottom: 1rem;
    }
    
    .price-current {
        font-size: 1.5rem;
    }
    
    .product-seller {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .product-seller svg {
        width: 14px;
        height: 14px;
    }
    
    .product-actions {
        gap: 0.5rem;
    }
    
    .product-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .product-actions .btn svg {
        width: 16px;
        height: 16px;
    }
    
    .product-badge {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Desktop grande - telas muito grandes */
@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}
