/* ========================================
   FILTROS - WRAPPER PRINCIPAL
   ======================================== */
.colegio-filtros-wrapper {
    margin-bottom: 2rem;
}

/* ========================================
   FILTROS - VERSÃO DESKTOP
   ======================================== */
.filtros-desktop {
    background: #fff;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 1.5rem;
}

.filtros-titulo {
    color: #e74c3c;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    text-transform: none;
}

.filtros-lista {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filtro-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filtro-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #e74c3c;
}

.filtro-item label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    margin: 0;
    user-select: none;
}

.filtro-item label:hover {
    color: #e74c3c;
}

/* ========================================
   FILTROS - VERSÃO MOBILE
   ======================================== */
.filtros-mobile {
    display: none;
}

.filtros-mobile-toggle {
    width: 100%;
    background: #fff;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #e74c3c;
    transition: all 0.3s ease;
}

.filtros-mobile-toggle:hover {
    background: #fff5f5;
}

.filtros-mobile-toggle svg {
    transition: transform 0.3s ease;
}

.filtros-mobile-toggle.active svg {
    transform: rotate(180deg);
}

/* ========================================
   DRAWER (MOBILE)
   ======================================== */
.filtros-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filtros-drawer.active {
    pointer-events: all;
    opacity: 1;
}

.filtros-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.filtros-drawer-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 80vh;
    background: #fff;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.filtros-drawer.active .filtros-drawer-content {
    transform: translateY(0);
}

.filtros-drawer-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.filtros-drawer-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.filtros-drawer-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.filtros-drawer-close:hover {
    color: #e74c3c;
}

.filtros-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.filtros-drawer-body .filtro-item {
    margin-bottom: 1rem;
}

.filtros-drawer-footer {
    padding: 1.25rem;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.filtros-aplicar {
    width: 100%;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filtros-aplicar:hover {
    background: #c0392b;
}

/* ========================================
   PRODUTOS - GRID
   ======================================== */
.produtos-colegio-wrapper {
    position: relative;
}

.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 300px));
    gap: 15px;
    justify-content: start;
}

.produto-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 300px;
}

.produto-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #e74c3c;
    transform: translateY(-2px);
}

.produto-imagem {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

.produto-imagem a {
    display: block;
    width: 100%;
    height: 100%;
}

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

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

.produto-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.produto-titulo {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.produto-titulo a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.produto-titulo a:hover {
    color: #e74c3c;
}

.produto-categorias {
    font-size: 0.85rem;
    color: #666;
}

.produto-categoria {
    display: inline-block;
}

.produto-preco {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e74c3c;
}

.produto-preco del {
    font-size: 0.9rem;
    color: #999;
    margin-right: 0.5rem;
}

.produto-acoes {
    margin-top: auto;
}

.produto-acoes .button {
    width: 100%;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.produto-acoes .button:hover {
    background: #c0392b;
	color:#FFF;
    transform: translateY(-1px);
}

/* ========================================
   ESTADOS DE LOADING
   ======================================== */
.produtos-loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.produtos-sem-resultados {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: #666;
}

/* ========================================
   ANIMAÇÃO DE FADE IN PARA PRODUTOS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.produto-card {
    animation: fadeInUp 0.5s ease-out;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .produtos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Esconder filtros desktop */
    .filtros-desktop {
        display: none;
    }
    
    /* Mostrar filtros mobile */
    .filtros-mobile {
        display: block;
    }
    
    /* Grid de produtos em mobile */
    .produtos-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .produto-card {
        max-width: 100%;
    }
    
    .produto-info {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .produto-titulo {
        font-size: 0.9rem;
    }
    
    .produto-preco {
        font-size: 1.1rem;
    }
    
    .produto-acoes .button {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .produtos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .produto-titulo {
        font-size: 0.85rem;
    }
    
    .produto-categorias {
        font-size: 0.75rem;
    }
}

/* Desktop grande - manter máximo de 4 colunas */
@media (min-width: 1300px) {
    .produtos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   AJUSTES PARA WOOCOMMERCE
   ======================================== */
.produto-card .woocommerce-Price-amount {
    font-size: inherit;
}

.produto-card .added_to_cart {
    display: none;
}

/* Feedback visual quando adiciona ao carrinho */
.produto-card.adding-to-cart {
    opacity: 0.6;
    pointer-events: none;
}

.produto-card.added-to-cart-success {
    border-color: #27ae60;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
