/* ============================================================
   AB Bombas - Estilos Responsivos
   ============================================================ */

/* === TABLETS LARGOS (< 1200px) === */
@media (max-width: 1200px) {
    :root { --container-max: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .slide-content { padding: 40px; }
    .slide-title { font-size: 2rem; }
    .products-page-layout { grid-template-columns: 220px 1fr; }
}

/* === TABLETS (< 992px) === */
@media (max-width: 992px) {
    .header-inner {
        grid-template-columns: 190px 1fr auto auto;
        gap: 12px;
        min-height: var(--header-h);
    }
    .header-phone { display: none; }
    .header-whatsapp span { display: none; }
    .slide { height: 400px; }
    .slide-content { padding: 30px; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .banner-cta-inner { flex-direction: column; text-align: center; }
    .products-page-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }

    /* Filtro de produtos colapsável no mobile */
    .filter-header-arrow { display: inline-block; }
    #filterBody { display: none; }
    .filter-sidebar.filter-open #filterBody { display: block; }
    .filter-sidebar.filter-open .filter-header-arrow { transform: rotate(180deg); }
}

/* === TABLETS PEQUENOS / MOBILE GRANDE (< 768px) === */
@media (max-width: 768px) {
    /* Header Mobile */
    .header-inner {
        grid-template-columns: 130px 1fr auto;
        grid-template-rows: auto auto;
        height: auto;
        padding: 10px 16px;
        gap: 8px;
    }
    .header-logo { grid-column: 1; grid-row: 1; }
    .header-actions { grid-column: 3; grid-row: 1; gap: 10px; }
    .header-search { grid-column: 1 / -1; grid-row: 2; }
    .header-whatsapp { display: none; }
    .menu-toggle { display: flex; grid-column: 2; grid-row: 1; width: fit-content; height: fit-content; justify-self: center; align-self: center; }

    /* Navbar Mobile */
    .navbar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        z-index: 995;
        background: var(--azul-escuro);
        overflow-y: auto;
        transition: transform 0.3s ease;
        padding-top: 60px;
        box-shadow: var(--sombra-lg);
    }
    .navbar.open { transform: translateX(300px); }
    .nav-list { flex-direction: column; padding: 10px 0; }
    .nav-link { padding: 14px 24px; font-size: 0.95rem; }
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,.2);
        border-radius: 0;
        display: none;
        padding: 0;
    }
    .nav-item.has-dropdown.open .dropdown-menu { display: block; }
    .dropdown-list a { padding: 10px 24px 10px 40px; color: rgba(255,255,255,.7); }
    .dropdown-list a:hover { background: rgba(255,255,255,.05); color: #fff; padding-left: 40px; }

    /* Topbar Mobile */
    .topbar-left { display: none; }
    .topbar-right { width: 100%; justify-content: center; }

    /* Slider Mobile */
    .slide { height: 300px; }
    .slide-content { padding: 24px; }
    .slide-title { font-size: 1.4rem; }
    .slide-desc { display: none; }
    .slide-btn { padding: 10px 22px; font-size: 0.85rem; }
    .slider-btn { width: 38px; height: 38px; font-size: 0.9rem; }

    /* Grids Mobile */
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }

    /* Produto Detail */
    .product-detail-layout { grid-template-columns: 1fr; gap: 28px; }
    .product-gallery { position: static; }

    /* Breadcrumb */
    .breadcrumb { font-size: 0.75rem; }

    /* Tabs scroll */
    .tabs-header { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Cart */
    .cart-table { font-size: 0.82rem; }
    .cart-table th, .cart-table td { padding: 10px; }

    /* Section */
    .section { padding: 40px 0; }

    /* WhatsApp Float - mostrar texto */
    .whatsapp-float-text { display: none; }
}

/* === MOBILE (< 576px) === */
@media (max-width: 576px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .product-info { padding: 10px; }
    .product-actions { padding: 0 10px 10px; }
    .product-name { font-size: 0.82rem; }
    .btn-add-cart span { display: none; }
    .btn-ver-produto span { display: none; }

    .slide { height: 240px; }
    .slide-tag { display: none; }
    .slide-content { padding: 16px; }
    .slide-title { font-size: 1.1rem; margin-bottom: 10px; }
    .slide-btn { padding: 8px 16px; font-size: 0.8rem; }

    .section-header { margin-bottom: 24px; }
    .section { padding: 32px 0; }

    .features-grid { grid-template-columns: 1fr; }
    .feature-card { padding: 16px; }

    .header-logo .logo-img { height: 40px; }

    .page-hero { padding: 36px 0; }
    .page-hero h1 { font-size: 1.5rem; }

    /* Breadcrumb mais compacto */
    .breadcrumb { gap: 4px; font-size: 0.72rem; }

    /* Toast responsivo */
    .toast-container { right: 10px; left: 10px; }
    .toast { min-width: unset; }

    /* Paginação */
    .paginacao-lista li a { width: 36px; height: 36px; font-size: 0.8rem; }

    /* Tabela técnica */
    .tabela-tecnica td { padding: 8px 12px; font-size: 0.82rem; }
    .tabela-tecnica td:first-child { width: 50%; }

    /* Footer compact */
    .footer-top { padding: 40px 0; }
    .newsletter-form { flex-direction: column; border-radius: var(--radius-sm); }
    .newsletter-form button { width: 100%; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
}

/* === MOBILE XS (< 400px) === */
@media (max-width: 400px) {
    .categories-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .category-card { padding: 16px 8px; }
    .category-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .category-name { font-size: 0.78rem; }
    .products-grid { grid-template-columns: 1fr; }
}

/* === PRINT === */
@media print {
    .header, .footer, .navbar, .topbar, .whatsapp-float, .back-to-top, .slider-wrapper { display: none !important; }
    body { font-size: 12pt; }
    a { color: inherit; text-decoration: none; }
    .cart-summary { page-break-inside: avoid; }
}

/* === ANIMAÇÕES === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.animate-fade-in    { animation: fadeIn 0.5s ease forwards; }

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--cinza-claro) 25%, var(--cinza-medio) 50%, var(--cinza-claro) 75%);
    background-size: 400% 100%;
    animation: skeletonLoad 1.4s ease infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeletonLoad {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
