/* ============================================================
   ESTILOS MOBILE - RESPONSIVIDADE
   ============================================================
   
   Este arquivo contém todas as media queries e estilos
   específicos para dispositivos móveis.
   
   Arquivo gerado automaticamente a partir de styles_aqui.css
   ============================================================ */

/* ======= VARIÁVEIS CSS (Escala base) ======= */
:root {
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --radius: 12px;
    --fz-xs: clamp(0.75rem, 1.8vw, 0.875rem);
    --fz-sm: clamp(0.875rem, 2vw, 1rem);
    --fz-md: clamp(1rem, 2.4vw, 1.125rem);
    --fz-lg: clamp(1.25rem, 3.5vw, 1.5rem);
}

/* ======= MOBILE-FIRST (até 768px) - CONSOLIDADO ======= */
@media screen and (max-width: 768px) {
    /* Container / Tipografia base */
    .container {
        padding: 0 var(--sp-4);
    }
    
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }

    /* Main Content */
    .main-content {
        margin: 0;
        margin-top: 0;
        width: 100%;
        padding: var(--sp-4);
        transition: padding 0.2s ease;
    }

    .main-content > .container {
        margin-top: 0;
        padding: var(--sp-4);
    }

    /* Títulos */
    .title-container {
        padding: var(--sp-5) var(--sp-4);
        margin: 0 auto;
    }

    .main-title {
        font-size: clamp(1.4rem, 4vw, 1.7rem);
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 0.6rem;
    }

    .main-title::before,
    .main-title::after {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: clamp(0.85rem, 2.5vw, 1rem);
        margin-top: 0.4rem;
        line-height: 1.5;
    }

    /* WhatsApp Float */
    .whatsapp-float {
        position: fixed;
        right: 20px;
        bottom: 20px;
        min-width: 180px;
        padding: 12px 16px;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        z-index: 1000;
        min-height: 44px; /* Acessibilidade: área de toque mínima */
    }

    .whatsapp-float i {
        font-size: 18px;
    }

    .whatsapp-float .status-text {
        font-size: 10px;
    }

    /* Topbar */
    .topbar-modern {
        position: relative;
    }

    .topbar-container {
        padding: 0.8rem 1rem;
        display: flex;
        flex-wrap: wrap;
        gap: var(--sp-3);
    }

    .topbar-brand {
        flex: 1;
    }

    .topbar-title {
        font-size: 0.9rem;
    }

    .topbar-contact {
        display: none;
    }

    .topbar-radiology-icons {
        display: none;
    }

    .topbar-toggle {
        display: block;
    }

    .topbar-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .topbar-nav.active {
        display: flex;
    }

    .topbar-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.8rem 1rem;
        min-height: 44px; /* Acessibilidade */
    }

    .topbar-link span {
        display: inline;
    }

    /* Sidebar: Estratégia ÚNICA (off-canvas) */
    .header-aquitemo-categories {
        position: relative;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        width: 280px;
        background: var(--surface, #fff);
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.28s ease, opacity 0.28s ease;
        z-index: 999;
        overflow-y: auto;
        will-change: transform, opacity;
    }

    .sidebar.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar a {
        font-size: 16px;
        min-height: 44px; /* Acessibilidade */
        display: flex;
        align-items: center;
    }

    /* Overlay para sidebar */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease;
        z-index: 998;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Menu Toggle */
    .menu-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
    }

    .sidebar-toggle-btn {
        display: none;
    }

    /* Forms */
    .form-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .radio-group,
    .checkbox-group {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }

    /* Tabelas empilhadas */
    table {
        width: 100%;
        margin: 1rem 0;
        border-collapse: collapse;
    }

    tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 1.5rem;
        border-radius: var(--radius);
    }

    td {
        width: 100%;
        padding: 1rem;
    }

    td:first-child {
        background-color: rgba(0, 0, 0, 0.05);
        border-top-left-radius: var(--radius);
        border-top-right-radius: var(--radius);
    }

    td:last-child {
        border-bottom-left-radius: var(--radius);
        border-bottom-right-radius: var(--radius);
    }

    .setor-1,
    .setor-2,
    .setor-3,
    .setor-4 {
        border-left: none;
        border-top: 5px solid;
    }

    .setor-1 {
        border-top-color: #22c55e;
    }

    .setor-2 {
        border-top-color: #eab308;
    }

    .setor-3 {
        border-top-color: #ef4444;
    }

    .setor-4 {
        border-top-color: #06b6d4;
    }

    /* Header Nav */
    .header-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-nav span {
        width: 100%;
        margin: 0;
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* Header Aquitemo */
    .header-ibyte {
        padding: 0.6rem 1rem 0.3rem;
    }

    .header-aquitemo-top {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

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

    .header-aquitemo-info {
        font-size: 0.75rem;
    }

    .header-aquitemo-info span {
        white-space: normal;
    }

    .header-aquitemo-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 0.5rem;
    }

    .header-aquitemo-actions {
        margin-left: auto;
    }

    /* Header Nav rolável (mantém scrollbar visível por acessibilidade) */
    .header-aquitemo-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 10px;
        gap: 8px;
        display: flex;
        /* Scrollbar visível para acessibilidade */
    }

    .header-aquitemo-nav .nav-pill {
        flex-shrink: 0;
        max-width: 120px;
        padding: 6px 12px;
        font-size: 11px;
        gap: 4px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-aquitemo-nav .nav-pill i {
        font-size: 14px;
    }

    .header-aquitemo-nav .nav-pill span {
        display: inline-block;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
    }

    .header-contact-info {
        display: none;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-section h3 {
        font-size: 1.3rem;
    }

    .footer-section h3 i {
        font-size: 1.1rem;
    }

    /* Mural */
    .mural-container {
        margin: 1rem auto;
        min-height: 500px;
    }

    .mural-iframe {
        min-height: 500px;
    }

    /* Auth */
    .auth-container {
        padding: 2rem;
        margin: 1rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-input {
        font-size: 1rem;
        padding: 0.8rem;
        min-height: 44px;
    }

    /* Search */
    .search-container {
        max-width: 100%;
    }

    .search-box input {
        padding: 10px 50px 10px 45px;
        font-size: 0.95rem;
        height: 44px;
    }

    .search-box::before {
        left: 16px;
        font-size: 1rem;
    }

    .search-box button {
        width: 44px;
        height: 44px;
        right: 4px;
    }

    .search-box button i {
        font-size: 1rem;
    }

    /* Produto Card - Base mobile (DRY) */
    .produto-card .produto-imagem {
        height: 113px;
        width: 115px;
        margin: 0 auto;
    }

    .produto-card .produto-imagem a {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .produto-card .produto-imagem img {
        width: 115px;
        height: 113px;
        object-fit: cover;
        object-position: center;
    }

    .amazon-badge {
        width: 36px;
        height: 36px;
        top: 4px;
        right: 4px;
        border-width: 2px;
        min-width: 44px;
        min-height: 44px;
    }

    .amazon-badge .fab.fa-amazon {
        font-size: 14px;
    }

    .amazon-checkmark {
        width: 16px;
        height: 16px;
        font-size: 10px;
        border-width: 1.5px;
    }

    /* Modal Amazon */
    .amazon-modal-content {
        width: 360px;
    }

    .amazon-tab-button {
        padding: 16px 10px;
        min-width: 60px;
        min-height: 44px;
    }

    .amazon-tab-text {
        font-size: 0.7rem;
    }

    .amazon-tab-subtext {
        font-size: 0.6rem;
    }

    .amazon-tab-body {
        padding: 20px;
    }

    /* Modal Avisos */
    .modal-avisos-container {
        margin: 10px;
        max-height: 90vh;
    }

    .modal-avisos-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .modal-header-content h2 {
        font-size: 1.4rem;
    }

    .modal-avisos-body {
        padding: 20px;
        max-height: 50vh;
    }

    .modal-avisos-footer {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        min-height: 44px;
    }

    .aviso-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .aviso-badge {
        align-self: flex-start;
    }

    /* Footer Disclaimer */
    .footer-disclaimer {
        flex-direction: column;
        gap: 12px;
        padding: 16px 18px;
        margin-top: 20px;
    }

    .disclaimer-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .disclaimer-content {
        font-size: 1.1rem;
        color: #000000;
        font-weight: 700;
    }

    .disclaimer-content p {
        font-size: 1.05rem;
        font-weight: 700;
        color: #000000;
        opacity: 1;
    }

    .disclaimer-content strong {
        font-size: 1.1rem;
        letter-spacing: 0.6px;
    }

    /* Delivery Info */
    .delivery-info {
        font-size: 0.85rem;
        padding: 0.6rem;
    }

    .badge-loja-propria,
    .badge-amazon-link {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    /* Floating Icons */
    .floating-icon {
        font-size: 1.8rem;
        opacity: 0.1;
    }

    .radiology-icons-floating {
        display: none;
    }

    /* Floating Banner */
    .floating-banner {
        width: 90vw;
        height: auto;
    }

    /* Quadro Frame */
    .quadro-frame {
        width: 95%;
        height: auto;
    }
}

/* ======= TELAS MUITO PEQUENAS (até 480px) ======= */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    body {
        font-size: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .header-aquitemo-nav {
        gap: 5px;
        padding: 0 5px;
    }

    .header-aquitemo-nav .nav-pill {
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 6px 12px;
        font-size: 11px;
    }

    .header-aquitemo-nav .nav-pill span {
        display: none; /* Oculta texto em telas muito pequenas, mostra apenas ícone */
    }

    .floating-icon {
        font-size: 1.5rem;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
        font-size: 14px;
        min-width: 180px;
    }

    .whatsapp-float i {
        font-size: 16px;
        margin-right: 6px;
    }

    .status-text {
        font-size: 10px;
    }

    /* Produto Card - Ajustes para telas muito pequenas */
    .produto-card .produto-imagem {
        height: 113px;
        width: 115px;
        margin: 0 auto;
    }

    .produto-card .produto-imagem a {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .produto-card .produto-imagem img {
        width: 115px;
        height: 113px;
        object-fit: cover;
        object-position: center;
    }

    .amazon-badge {
        width: 32px;
        height: 32px;
        top: 3px;
        right: 3px;
        border-width: 2px;
        min-width: 44px;
        min-height: 44px;
    }

    .amazon-badge .fab.fa-amazon {
        font-size: 12px;
    }

    .amazon-checkmark {
        width: 14px;
        height: 14px;
        font-size: 9px;
        border-width: 1.5px;
    }

    /* Modal Amazon - Ajustes para telas muito pequenas */
    .amazon-modal-content {
        width: 100%;
        max-width: 100vw;
    }

    .amazon-tab-header h3 {
        font-size: 1rem;
    }

    .amazon-tab-body {
        padding: 16px;
    }

    .disclaimer-content {
        font-size: 0.9rem;
    }

    .disclaimer-icon {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }
}

/* ======= TABLETS (769px - 1024px) ======= */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Topbar ajustes */
    .topbar-container {
        padding: 0.5rem 1rem;
        gap: 1rem;
        min-height: 90px;
    }

    .topbar-modern {
        min-height: 90px;
    }

    .topbar-brand {
        min-width: 180px;
    }

    .topbar-title {
        font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    }

    .topbar-contact {
        min-width: 250px;
        max-width: 300px;
        padding: 0 0.5rem;
    }

    .contact-item {
        font-size: 0.75rem;
    }

    .topbar-nav {
        gap: 0.4rem;
        max-width: calc(100% - 600px);
        row-gap: 0.3rem;
    }

    .topbar-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        height: 36px;
        min-height: 44px;
    }

    .topbar-link span {
        display: inline;
    }

    .topbar-link i {
        font-size: 0.9rem;
        width: 16px;
    }

    .main-content {
        margin-top: 90px;
        min-height: calc(100vh - 90px);
        padding: 15px;
        width: 100%;
    }

    .main-content > .container {
        max-width: 950px;
        margin-top: 0;
    }

    .title-container {
        padding: 1rem 1.2rem;
        margin-bottom: 0.8rem;
    }

    .main-title {
        font-size: clamp(1.5rem, 3vw, 1.9rem);
        margin-bottom: 0.5rem;
    }

    .subtitle {
        font-size: clamp(0.85rem, 1.8vw, 1.05rem);
        margin-top: 0.4rem;
    }

    .mural-container {
        margin: 0.8rem auto 0;
        min-height: 400px;
        max-height: calc(100vh - 250px);
    }

    .mural-iframe {
        min-height: 400px;
        height: calc(100vh - 250px);
        max-height: 480px;
    }

    .main-content footer {
        padding: 1rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .footer-content {
        padding: 0 15px;
        gap: 1rem;
    }

    .footer-section {
        padding: 0.8rem;
    }

    /* Header Nav */
    .header-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-nav span {
        flex: 1 1 calc(50% - 1rem);
        margin: 0;
    }

    table td {
        padding: 1rem;
        font-size: 0.9rem;
    }

    td:first-child {
        width: 30%;
    }

    /* Produto Card - Tablets */
    .produto-card .produto-imagem {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    .produto-card .produto-imagem a {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .produto-card .produto-imagem img {
        width: 200px;
        height: 200px;
        object-fit: cover;
        object-position: center;
    }
}

/* ======= OUTRAS BREAKPOINTS ESPECÍFICAS ======= */
@media (max-width: 820px) {
    .floating-banner {
        width: 90vw;
        height: auto;
    }
}

@media (max-width: 800px) {
    .container {
        padding: 0 12px;
    }
}

@media (max-width: 640px) {
    .header-aquitemo-nav .nav-pill span {
        display: none; /* Oculta texto em telas muito pequenas, mostra apenas ícone */
    }
}

@media (max-width: 600px) {
    .quadro-frame {
        width: 95%;
        height: auto;
    }
}

@media (max-width: 992px) {
    .header-contact-info {
        display: none;
    }

    .header-aquitemo-top {
        flex-wrap: wrap;
    }

    .header-aquitemo-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 0.5rem;
    }

    .header-aquitemo-actions {
        margin-left: auto;
    }

    .main-content {
        margin-top: 130px;
    }
}

@media screen and (min-width: 1025px) {
    .main-content > .container {
        margin-top: 0;
    }
}

/* ======= PREFERS-REDUCED-MOTION ======= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .sidebar {
        transition: none;
    }

    .sidebar-overlay {
        transition: none;
    }

    .footer-section h3 i,
    .footer-description i,
    .footer-address strong i,
    .footer-phone strong i,
    .footer-section ul li a i {
        animation: none;
    }

    .footer-section ul li a:hover {
        transform: none;
    }

    .floating-icon,
    .auth-floating-icon,
    .radiology-icons-floating {
        animation: none !important;
        opacity: 0.05 !important;
    }
}

/* ======= PRINT STYLES ======= */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    .sidebar,
    .whatsapp-float,
    .top-bar,
    .main-header {
        display: none !important;
    }

    /* Evitar quebra de página dentro de cards/tabelas */
    .produto-card,
    table,
    tr {
        page-break-inside: avoid;
    }
}
