/* =========================================
   ECOMANIAS - MOBILE RESPONSIVENESS FIX
   Improvements for smaller screens
   ========================================= */

/* === MOBILE PRODUCT CARDS - Better spacing === */
@media (max-width: 480px) {

    /* Product cards spacing improvements */
    .products-grid {
        gap: var(--space-2);
        padding: 0 var(--space-1);
    }

    .product-card .card-body {
        padding: var(--space-3) var(--space-2) var(--space-2);
    }

    .product-card .card-title {
        font-size: 1.25rem;
        min-height: 4.2rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .product-card .price-current {
        font-size: 1.6rem;
    }

    .product-card .price-compare {
        font-size: 1.1rem;
    }

    .btn-add-cart {
        padding: 1rem 1.2rem;
        font-size: 1.2rem;
        margin: var(--space-1) var(--space-2) var(--space-3);
        width: calc(100% - var(--space-4));
    }

    /* Badge size on mobile */
    .card-badge {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* === MOBILE CATEGORY CARDS - Better spacing === */
@media (max-width: 480px) {
    .categories-grid {
        gap: var(--space-2);
        padding: 0 var(--space-1);
    }

    .category-card .card-body {
        padding: var(--space-3);
    }

    .category-card .category-icon {
        font-size: 1.6rem;
    }

    .category-card .card-title {
        font-size: 1.3rem;
    }

    .category-card .category-count {
        font-size: 1.1rem;
    }

    .btn-category {
        padding: 0.8rem 1rem;
        font-size: 1.15rem;
        margin: 0 var(--space-2) var(--space-3);
        width: calc(100% - var(--space-4));
    }

    /* Category image height on mobile */
    .category-card .card-image {
        max-height: 140px;
    }
}

/* === VERY SMALL MOBILE (375px) - iPhone SE/Mini === */
@media (max-width: 375px) {

    .products-grid,
    .categories-grid {
        gap: var(--space-2);
    }

    .product-card .card-title {
        font-size: 1.15rem;
        min-height: 3.8rem;
    }

    .product-card .price-current {
        font-size: 1.5rem;
    }

    .btn-add-cart {
        padding: 0.9rem 1rem;
        font-size: 1.15rem;
        gap: 0.5rem;
    }

    .btn-add-cart svg {
        width: 14px;
        height: 14px;
    }

    /* Section headers on small screens */
    .section-header {
        margin-bottom: var(--space-8);
    }

    .section-title {
        font-size: 2.2rem;
    }

    .section-subtitle {
        font-size: 1.4rem;
        padding: 0 var(--space-2);
    }

    .section-eyebrow {
        font-size: 1rem;
        padding: var(--space-1) var(--space-3);
    }
}

/* === HIGHLIGHTS GRID - Mobile improvements === */
@media (max-width: 480px) {
    .highlights-grid {
        gap: var(--space-3);
    }

    .highlight-card {
        padding: var(--space-5);
    }

    .highlight-card .icon-circle {
        width: 5.5rem;
        height: 5.5rem;
    }

    .highlight-card h3 {
        font-size: 1.3rem;
    }

    .highlight-card p {
        font-size: 1.2rem;
    }
}

/* === TESTIMONIALS - Mobile improvements === */
@media (max-width: 480px) {
    .testimonials-grid {
        gap: var(--space-3);
    }

    .testimonial-card {
        padding: var(--space-4);
    }
}

/* === BENEFITS - Mobile improvements === */
@media (max-width: 480px) {
    .benefits-grid {
        gap: var(--space-3);
    }

    .benefit-card {
        padding: var(--space-4);
    }

    .benefit-card .icon-circle {
        width: 5rem;
        height: 5rem;
    }
}

/* === TRUST BAR - Mobile improvements === */
@media (max-width: 480px) {
    .trust-bar .flex {
        gap: var(--space-3);
        flex-wrap: wrap;
        justify-content: center;
    }

    .trust-bar-item {
        font-size: 1rem;
    }

    .trust-bar-item svg {
        width: 14px;
        height: 14px;
    }
}

/* === FOOTER - Mobile improvements === */
@media (max-width: 480px) {
    .footer-grid {
        gap: var(--space-6);
    }

    .footer-heading {
        font-size: 1.4rem;
    }

    .footer-links li a {
        font-size: 1.3rem;
    }
}

/* === PRICE FORMATTING - Mobile improvements === */
@media (max-width: 480px) {

    /* Price container layout */
    .product-card .price {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        /* Centralizado - sobrepõe improvements.css */
        text-align: center !important;
        gap: 0.3rem;
        width: 100%;
    }

    /* Current price - make it prominent (note: site uses 10px base) */
    .product-card .price-current {
        font-size: 2.4rem !important;
        /* 24px with 10px base */
        font-weight: 800;
        color: var(--primary);
        line-height: 1.2;
    }

    /* Compare/old price */
    .product-card .price-compare {
        font-size: 1.4rem !important;
        /* 14px with 10px base */
        color: var(--gray-500);
        text-decoration: line-through;
        order: -1;
    }

    /* Installments - better formatting */
    .product-card .price-installments {
        font-size: 1.5rem !important;
        /* 15px with 10px base */
        color: var(--gray-600);
        margin-top: 0.4rem;
        line-height: 1.4;
        text-align: center;
        width: 100%;
    }

    .product-card .price-installments strong {
        color: var(--primary);
        font-weight: 700;
    }

    /* Card body padding for price area */
    .product-card .card-body {
        padding: var(--space-3) var(--space-3) var(--space-2);
    }
}

/* === VERY SMALL SCREENS (375px) - Keep prices readable === */
@media (max-width: 375px) {

    /* DO NOT reduce price sizes on small screens - keep them readable */
    .product-card .price-current {
        font-size: 2.2rem !important;
        /* 22px - still prominent */
    }

    .product-card .price-compare {
        font-size: 1.3rem !important;
        /* 13px */
    }

    .product-card .price-installments {
        font-size: 1.4rem !important;
        /* 14px - legible installments */
    }
}

/* === GENERAL CARD IMPROVEMENTS === */
@media (max-width: 480px) {

    /* Ensure cards don't overflow */
    .product-card {
        overflow: hidden;
    }

    /* Better image container */
    .product-card .card-image {
        aspect-ratio: 1;
        overflow: hidden;
    }

    .product-card .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* =========================================
   MOBILE UX IMPROVEMENTS v2.0
   Additional optimizations for better mobile experience
   ========================================= */

/* === CATEGORY GRID - 2 colunas no mobile === */
@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.2rem !important;
    }

    .category-card .card-image {
        height: 120px !important;
        min-height: 120px !important;
    }

    .category-card .card-image img {
        height: 100%;
        object-fit: cover;
    }

    .category-card .card-title {
        font-size: 1.4rem !important;
        min-height: auto !important;
    }

    .btn-category {
        padding: 1rem 1.2rem !important;
        font-size: 1.3rem !important;
        min-height: 44px !important;
        /* Touch target mínimo */
    }
}

/* === TRUST BAR - Texto maior e mais legível === */
@media (max-width: 480px) {
    .trust-bar {
        padding: 1.2rem 1rem !important;
    }

    .trust-bar .flex {
        gap: 1.5rem !important;
    }

    .trust-bar-item {
        font-size: 1.2rem !important;
        gap: 0.5rem !important;
    }

    .trust-bar-item svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* === TRUST BAR - Layout 2 colunas alinhado (mobile) === */
@media (max-width: 480px) {
    .trust-bar {
        /* Mantém a mesma cor/fundo (vem do improvements.css), ajustando só o layout */
        padding: 0.75rem 0.9rem !important;
    }

    .trust-bar .flex {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.55rem !important;
        align-items: stretch !important;
        justify-content: initial !important;
    }

    .trust-bar-item {
        justify-content: flex-start !important;
        min-width: 0;
        line-height: 1.25;
        white-space: normal;
        opacity: 1;

        /* “Card” discreto por item (sem alterar o fundo principal da trust-bar) */
        padding: 0.65rem 0.75rem !important;
        border-radius: 1rem !important;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
        font-size: 0.95rem !important;
    }

    .trust-bar-item svg {
        flex: 0 0 auto;
        margin-top: 0;

        /* Ícone “badge” para ficar mais agradável no mobile */
        width: 14px !important;
        height: 14px !important;
        padding: 0.28rem;
        border-radius: 999px;
        background: rgba(16, 185, 129, 0.16);
        border: 1px solid rgba(16, 185, 129, 0.22);
        box-sizing: content-box;
    }
}

/* === WHATSAPP BUTTON - Posição ajustada === */
@media (max-width: 480px) {

    .whatsapp-float,
    .whatsapp-btn,
    [class*="whatsapp"] {
        bottom: 90px !important;
        /* Acima do conteúdo importante */
        right: 12px !important;
        z-index: 999 !important;
    }
}

/* === PRODUCT GALLERY - Miniaturas maiores === */
@media (max-width: 480px) {

    .product-thumbnails,
    .gallery-thumbs,
    .product-gallery-thumbs {
        gap: 0.8rem !important;
    }

    .product-thumbnails img,
    .gallery-thumbs img,
    .product-gallery-thumbs img,
    .thumb-item img {
        min-width: 60px !important;
        min-height: 60px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 8px !important;
    }
}

/* === CART PAGE - Layout melhorado === */
@media (max-width: 480px) {
    .cart-item {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.2rem !important;
        padding: 1.5rem !important;
    }

    .cart-item-image {
        width: 100% !important;
        max-width: 150px !important;
        margin: 0 auto !important;
    }

    .cart-item-details {
        text-align: center !important;
    }

    .cart-item-title {
        font-size: 1.5rem !important;
    }

    .cart-item-price {
        font-size: 1.8rem !important;
        font-weight: 700 !important;
    }

    /* Controles de quantidade maiores */
    .quantity-controls,
    .quantity-selector,
    .cart-quantity {
        justify-content: center !important;
        gap: 1rem !important;
    }

    .quantity-controls button,
    .quantity-btn,
    .cart-quantity button {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 1.8rem !important;
        border-radius: 8px !important;
    }

    .quantity-controls input,
    .quantity-value,
    .cart-quantity input {
        font-size: 1.6rem !important;
        min-width: 50px !important;
        text-align: center !important;
    }

    /* Botão remover mais visível */
    .cart-item-remove,
    .remove-item,
    .btn-remove {
        margin-top: 1rem !important;
        padding: 1rem !important;
        font-size: 1.3rem !important;
    }
}

/* === CART SUMMARY - Resumo do pedido === */
@media (max-width: 480px) {

    .cart-summary,
    .order-summary {
        padding: 2rem 1.5rem !important;
    }

    .cart-summary .btn,
    .btn-checkout {
        padding: 1.5rem !important;
        font-size: 1.5rem !important;
        min-height: 56px !important;
    }
}

/* === FOOTER - Links com mais espaço === */
@media (max-width: 480px) {
    .footer-grid {
        gap: 2.5rem !important;
    }

    .footer-links li {
        margin-bottom: 0 !important;
    }

    .footer-links a,
    .footer-links li a {
        padding: 1.2rem 0 !important;
        display: block !important;
        font-size: 1.4rem !important;
        min-height: 44px !important;
        /* Touch target */
    }

    .footer-heading {
        font-size: 1.6rem !important;
        margin-bottom: 1.5rem !important;
    }
}

/* === TÍTULOS LONGOS - Melhor quebra === */
@media (max-width: 480px) {

    .product-card .card-title,
    .cart-item-title {
        word-break: break-word !important;
        hyphens: auto !important;
        -webkit-hyphens: auto !important;
    }
}

/* === SECTION HEADERS - Ajustes mobile === */
@media (max-width: 480px) {
    .section-header {
        padding: 0 1rem !important;
        margin-bottom: 2rem !important;
    }

    .section-title {
        font-size: 2.4rem !important;
        line-height: 1.2 !important;
    }

    .section-subtitle {
        font-size: 1.4rem !important;
    }
}