/* Otimizações específicas para mobile */

/* Melhorar acessibilidade de toque */
@media (max-width: 768px) {
    /* Aumentar área de toque mínima */
    .btn, a, button, input[type="button"], input[type="submit"] {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* Melhorar espaçamento entre elementos interativos */
    .btn + .btn, a + a, button + button {
        margin-top: 0.5rem !important;
    }
    
    /* Ajustar tamanho de fonte para melhor legibilidade */
    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    /* Melhorar contraste e visibilidade */
    .text-muted {
        color: #6c757d !important;
    }
    
    /* Ajustar padding dos containers */
    .container, .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Melhorar cards para mobile */
    .card {
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Ajustar imagens responsivas */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Melhorar imagens em cards */
    .card img {
        object-fit: contain !important;
        object-position: center !important;
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* Container de imagem responsivo */
    .image-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        background-color: #f8f9fa !important;
    }
    
    /* Imagens de produtos específicas */
    .product-image {
        object-fit: contain !important;
        object-position: center !important;
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* Melhorar formulários para mobile */
    input, select, textarea {
        font-size: 16px !important;
        padding: 12px !important;
        border-radius: 8px !important;
    }
    
    /* Ajustar botões para mobile */
    .btn {
        border-radius: 8px !important;
        font-weight: 500 !important;
        text-align: center !important;
    }
    
    /* Melhorar navegação mobile */
    .navbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
    }
    
    /* Ajustar grid para mobile */
    .row {
        margin-left: -8px !important;
        margin-right: -8px !important;
    }
    
    .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    /* Melhorar espaçamentos */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Ajustar títulos para mobile */
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    /* Melhorar progress bars */
    .progress {
        height: 8px !important;
        border-radius: 4px !important;
    }
    
    /* Ajustar badges e labels */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    /* Melhorar modais para mobile */
    .modal-dialog {
        margin: 1rem !important;
        max-width: calc(100% - 2rem) !important;
    }
    
    /* Ajustar tooltips para mobile */
    .tooltip {
        display: none !important;
    }
    
    /* Melhorar dropdowns para mobile */
    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
    
    /* Ajustar tabelas para mobile */
    .table-responsive {
        border: none !important;
    }
    
    .table {
        font-size: 0.875rem !important;
    }
    
    /* Melhorar alertas para mobile */
    .alert {
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
        border-radius: 8px !important;
    }
    
    /* Ajustar paginação para mobile */
    .pagination {
        justify-content: center !important;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem !important;
        min-width: 44px !important;
        text-align: center !important;
    }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 480px) {
    .container, .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    .btn {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .mb-5 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Ajustar imagens para telas muito pequenas */
    .image-container {
        height: 160px !important;
    }
    
    .card img {
        max-width: 90% !important;
        max-height: 90% !important;
    }
    
    .product-image {
        max-width: 90% !important;
        max-height: 90% !important;
    }
}

/* Melhorar performance de scroll */
@media (max-width: 768px) {
    * {
        -webkit-overflow-scrolling: touch !important;
    }
    
    body {
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }
}

/* Otimizações para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container, .container-fluid {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
    
    .btn {
        padding: 10px 18px !important;
        font-size: 15px !important;
    }
    
    .card-body {
        padding: 1.25rem !important;
    }
    
    /* Ajustar imagens para tablets */
    .image-container {
        height: 200px !important;
    }
    
    .card img {
        max-width: 95% !important;
        max-height: 95% !important;
    }
}

/* Melhorar acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Melhorar contraste para acessibilidade */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px !important;
    }
    
    .card {
        border-width: 2px !important;
    }
} 