/* ===== ANIMAÇÕES ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== HERO SECTION ===== */
.products-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: clamp(60px, 10vh, 100px) 0;
    text-align: center;
    overflow: hidden;
}

.products-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 45, 85, 0.85) 0%,
            rgba(0, 0, 0, 0.75) 100%);
    z-index: 1;
}

.products-hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-icon {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero-icon i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 auto 25px;
    border-radius: 3px;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== SEÇÃO DE BUSCA E FILTROS ===== */
.products-filters {
    padding: 40px 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 8px var(--shadow);
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    flex: 2;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--background);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(233, 113, 19, 0.1);
}

.search-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--background);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 160px;
}

.filter-select:hover {
    border-color: var(--secondary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(233, 113, 19, 0.1);
}

.filter-clear {
    padding: 12px 25px;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filter-clear:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.filter-clear i {
    font-size: 0.8rem;
}

/* Contador de Resultados */
.results-count {
    padding: 20px 0 0;
    text-align: right;
    color: var(--text-light);
    font-size: 0.95rem;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.results-count span {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
}

/* ===== GRID DE PRODUTOS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

/* ===== CARD DE PRODUTO ===== */
.product-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary);
    box-shadow: 0 15px 35px var(--shadow);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 600;
}

.product-brand {
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

/* Botão Centralizado */
.product-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    width: 100%;
    padding-top: 10px;
}

.product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 90%;
    max-width: 220px;
    padding: 12px 20px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
}

.product-btn i {
    font-size: 1rem;
}

.product-btn:hover {
    transform: translateY(-2px);
    gap: 12px;
    box-shadow: 0 5px 15px rgba(233, 113, 19, 0.3);
    background: var(--primary);
}

.product-btn:active {
    transform: translateY(0);
}

/* Sem Resultados */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-results p {
    font-size: 1.1rem;
}

.no-results p:first-of-type {
    font-weight: 500;
    margin-bottom: 10px;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin: 40px 0 60px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    gap: 15px;
    box-shadow: 0 10px 25px rgba(233, 113, 19, 0.3);
    background: var(--primary);
}

.load-more-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.load-more-btn.loading i {
    animation: spin 1s linear infinite;
}

/* ===== BANNER DAS CATEGORIAS ===== */
.category-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: clamp(20px, 5vh, 40px) 0;
    min-height: auto;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.category-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.08"><path fill="white" d="M20,50 Q30,30 40,50 T60,50 T80,50"/><circle cx="30" cy="60" r="2"/><circle cx="50" cy="70" r="2"/><circle cx="70" cy="55" r="2"/></svg>');
    background-repeat: repeat;
    z-index: 1;
}

.category-banner .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.banner-image {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    animation: fadeInUp 0.8s ease;
}

.banner-image img {
    max-width: 100%;
    height: auto;
    max-height: 680px;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.25));
}

.banner-content {
    flex: 1;
    max-width: 550px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.banner-badge {
    display: inline-block;
    background: var(--transparent);
    backdrop-filter: blur(10px);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: white;
    margin-bottom: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.banner-description {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: white;
    margin-bottom: 30px;
    line-height: 1.6;
}

.banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: white;
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 36px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid white;
    cursor: pointer;
    transition: var(--transition);
}

.banner-btn:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.banner-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

/* ===== HERO DA CATEGORIA ===== */
.category-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin: 20px 0 30px;
    background: var(--surface);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}

.category-hero.reverse {
    direction: rtl;
}

.category-hero.reverse .category-hero-text {
    direction: ltr;
}

.category-hero-image {
    overflow: hidden;
    height: 100%;
    min-height: 350px;
}

.category-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-hero:hover .category-hero-image img {
    transform: scale(1.05);
}

.category-hero-text {
    padding: 40px 30px;
    direction: ltr;
}

.category-hero-text h3 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.category-hero-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 3px;
}

.category-hero-text p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}

.hero-features span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--muted);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.hero-features span i {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* ===== CTA CATÁLOGO ===== */
.catalog-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: clamp(40px, 8vw, 60px);
    text-align: center;
    color: white;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    margin-top: 20px;
    border-radius: 20px;
}

.catalog-cta:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.catalog-cta h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
    line-height: 1.2;
}

.catalog-cta p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.catalog-cta .btn {
    background: white;
    color: var(--primary);
    border: 2px solid white;
    padding: 14px 36px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
}

.catalog-cta .btn:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.catalog-cta .btn i {
    font-size: 1.2rem;
}

/* ===== LOADING STATE ===== */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--secondary);
    animation: spin 1s linear infinite;
}

/* ===== FOCOS ACESSÍVEIS ===== */
.product-btn:focus-visible,
.filter-select:focus-visible,
.search-input:focus-visible,
.filter-clear:focus-visible,
.load-more-btn:focus-visible,
.banner-btn:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .products-filters {
        top: 70px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: stretch;
    }
    
    .filter-select {
        flex: 1;
        min-width: auto;
    }
    
    .filter-clear {
        justify-content: center;
    }
    
    .results-count {
        text-align: center;
    }
    
    .category-hero {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 20px 0 25px;
    }
    
    .category-hero.reverse {
        direction: ltr;
    }
    
    .category-hero-image {
        min-height: 280px;
    }
    
    .category-hero-text {
        padding: 30px 25px;
        text-align: center;
    }
    
    .category-hero-text h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .category-banner .container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .banner-image {
        justify-content: center;
    }
    
    .banner-image img {
        max-height: 280px;
    }
    
    .banner-content {
        max-width: 100%;
        text-align: center;
    }
    
    .banner-description {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .products-hero {
        padding: 50px 0;
    }
    
    .hero-icon {
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .products-filters {
        padding: 30px 0;
    }
    
    .filter-group {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .filter-clear {
        width: 100%;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 0;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info h3 {
        font-size: 1.1rem;
    }
    
    .product-btn {
        width: 100%;
        max-width: none;
        padding: 10px 15px;
    }
    
    .load-more-btn {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
    
    .category-hero-image {
        min-height: 220px;
    }
    
    .category-hero-text {
        padding: 25px 20px;
    }
    
    .hero-features span {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .catalog-cta .btn {
        padding: 12px 28px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .catalog-cta {
        padding: clamp(30px, 5vw, 40px);
    }
}

@media (max-width: 480px) {
    .products-hero {
        padding: 40px 0;
    }
    
    .hero-icon {
        font-size: 2.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .products-filters {
        padding: 20px 0;
    }
    
    .search-input {
        padding: 10px 15px 10px 40px;
        font-size: 0.9rem;
    }
    
    .search-box i {
        font-size: 0.9rem;
        left: 12px;
    }
    
    .filter-select {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .filter-clear {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-info h3 {
        font-size: 1rem;
    }
    
    .product-description {
        font-size: 0.85rem;
    }
    
    .product-btn {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    
    .load-more-btn {
        padding: 10px 25px;
        font-size: 0.85rem;
    }
    
    .banner-badge {
        font-size: 0.6rem;
        padding: 4px 14px;
    }
    
    .banner-title {
        font-size: 1.3rem;
    }
    
    .banner-description {
        font-size: 0.85rem;
    }
    
    .banner-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .banner-image img {
        max-height: 160px;
    }
}

/* Tablets em paisagem */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop grande */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== UTILITÁRIOS ===== */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Redução de movimentos */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Tema escuro */
@media (prefers-color-scheme: dark) {
    .product-card {
        background: var(--surface);
    }
}