/* 44rep Global Store - Mobile & Desktop Responsive Stylesheet */
:root {
    --primary: #00008B;
    --primary-hover: #0000cd;
    --accent-sky: #87CEEB;
    --header-bg: #A9A9A9;
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --card-border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background-color: #f8fafc; 
    color: var(--text-dark); 
    overflow-x: hidden; /* Evita rolagem horizontal indesejada no celular */
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

.section-padding { padding: 35px 0; }

/* Botões de Compra (Buy Now) - Cor #00008B */
.btn-buy-product, a.btn-buy-product {
    background: #00008B !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
    padding: 12px 14px !important;
    text-align: center !important;
    display: block !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 139, 0.3) !important;
    transition: transform 0.2s, background-color 0.2s !important;
    font-size: 0.95rem;
}

.btn-buy-product:hover, a.btn-buy-product:hover {
    background: #0000cd !important;
    transform: translateY(-2px) !important;
}

/* Selo de Loja / AliExpress - Cor #87CEEB */
.product-store-badge {
    background: #87CEEB !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    padding: 3px 10px !important;
    border-radius: 50px !important;
    font-size: 0.7rem !important;
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 5 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
}

/* Preços */
.product-price-discount {
    color: #00008B !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
}

.product-price-original {
    color: #94a3b8 !important;
    text-decoration: line-through !important;
    font-size: 0.82rem !important;
}

/* Grid de Produtos Padrão (Desktop) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    background: #ffffff;
    padding: 10px;
    text-align: center;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 6px;
    height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-category {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* Botão de Curtida: Começa BRANCO 🤍 e fica VERMELHO ❤️ */
.btn-like-heart {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff !important;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.btn-like-heart.liked {
    color: #ef4444 !important;
    background: #ffffff !important;
}

/* Lojas Parceiras & Cupons */
.stores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.store-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; text-align: center; text-decoration: none; }
.store-card img { width: 100%; max-height: 40px; object-fit: contain; }

/* ========== MENU DROPDOWN ========== */

/* Botão com submenu (não é link) */
.filter-tab-btn.has-submenu {
    background: none;
    border: none;
    cursor: pointer;
    padding: inherit;
    font-size: inherit;
    font-family: inherit;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
}

.filter-tab-btn.has-submenu:hover {
    background-color: #f1f5f9;
    border-radius: 4px;
}

/* Submenu escondido por padrão */
.subcategories-dropdown-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    margin-top: 4px;
}

.subcategories-dropdown-box a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    color: #334155;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.subcategories-dropdown-box a:hover {
    background-color: #f8fafc;
    color: #00008B;
    padding-left: 22px; /* Efeito de aproximação */
}

/* Submenu visível quando ativo (mobile) */
.filter-dropdown-wrapper.active .subcategories-dropdown-box {
    display: block;
}

/* Ícone rotaciona quando ativo */
.filter-dropdown-wrapper.active .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* ========== DESKTOP: Abre ao passar o mouse ========== */
@media (min-width: 992px) {
    .filter-dropdown-wrapper {
        position: relative;
    }
    
    .filter-dropdown-wrapper:hover .subcategories-dropdown-box {
        display: block;
    }
    
    .filter-dropdown-wrapper:hover .fa-chevron-down {
        transform: rotate(180deg);
    }
}

/* ================================================================ */
/* 📱 REGRAS EXCLUSIVAS PARA SMARTPHONES (Telas de até 768px de largura) */
/* ================================================================ */
@media (max-width: 768px) {
    .container { padding: 0 10px; }
    .section-padding { padding: 25px 0; }

    /* Grade com 2 Produtos por Linha no Celular (Estilo App de Compras) */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .product-img-wrapper {
        height: 150px !important;
        padding: 6px !important;
    }

    .product-body {
        padding: 8px !important;
    }

    .product-title {
        font-size: 0.8rem !important;
        height: 2.6em !important;
        margin-bottom: 4px !important;
    }

    .product-price-discount {
        font-size: 1.05rem !important;
    }

    .product-price-original {
        font-size: 0.75rem !important;
    }

    .btn-buy-product, a.btn-buy-product {
        padding: 9px 8px !important;
        font-size: 0.82rem !important;
        border-radius: 8px !important;
    }

/* ========== MOBILE: Abre ao clicar ========== */
@media (max-width: 991px) {
    .filter-dropdown-wrapper {
        position: relative;
    }
    
    .subcategories-dropdown-box {
        position: static;
        box-shadow: none;
        border: none;
        margin-top: 0;
        background-color: #f8fafc;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .filter-dropdown-wrapper.active .subcategories-dropdown-box {
        max-height: 500px;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
    }
}

    /* Ajuste do Carrossel de Banners no Celular */
    #heroCarousel {
        max-height: 200px !important;
        border-radius: 12px !important;
    }

    #heroCarousel a {
        max-height: 200px !important;
    }

    #heroCarousel img {
        max-height: 200px !important;
    }

    /* Colunas de Checkout e Detalhe do Produto ficam em 1 Coluna */
    .checkout-grid-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}
/* GRADE E CARDS DE CUPONS COMPACTOS */
.coupons-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 20px !important;
}

.coupon-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 220px !important;
    max-width: 100% !important;
}

.coupon-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 10px !important;
}

.coupon-store-logo img {
    width: 45px !important;
    height: 45px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 4px !important;
}

.coupon-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.coupon-badge {
    display: inline-block !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    border-radius: 50px !important;
    margin-bottom: 4px !important;
}
.badge-coupon { background: #dbeafe !important; color: #1e40af !important; }
.badge-offer { background: #fef3c7 !important; color: #92400e !important; }

.coupon-discount {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #16a34a !important;
    margin: 6px 0 !important;
}

.coupon-description {
    font-size: 0.85rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.coupon-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-top: 1px dashed #e2e8f0 !important;
    padding-top: 12px !important;
}

.coupon-meta {
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
}

.btn-coupon {
    background: #00008B !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-decoration: none !important;
}
.btn-coupon:hover { background: #0000cd !important; }