/* =========================================================
   LILI MIMOS - RESPONSIVIDADE
   Breakpoints: 1200px, 1024px, 992px, 768px, 480px
========================================================= */

/* ===== LARGE DESKTOP (max-width: 1200px) ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .dropdown-mega {
        min-width: 800px !important;
    }

    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== DESKTOP MÉDIO (max-width: 1024px) ===== */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .product-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== TABLET (max-width: 992px) ===== */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .lista-categorias {
        gap: 15px;
        justify-content: flex-start;
    }

    .dropdown-mega {
        min-width: 600px !important;
        left: -100px;
    }

    .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner {
        height: 380px;
    }

    .cliente-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== MOBILE GRANDE (max-width: 768px) ===== */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 16px;
        width: 95%;
    }

    /* Header */
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .logo-img {
        height: 45px;
    }

    /* Botão Menu Hamburguer */
    .menu-hamburguer {
        display: block !important;
        background: var(--rosa-vivo, #ff69b4);
        color: white;
        border: none;
        font-size: 22px;
        padding: 8px 12px;
        border-radius: 8px;
        cursor: pointer;
        margin-left: auto;
        z-index: 1001;
    }

    /* Esconder menu normal */
    .menu-main {
        display: none;
    }

    .header-actions .cliente-links {
        display: none;
    }

    .header-actions .menu-admin {
        display: none;
    }

    /* Menu lateral que abre ao clicar */
    .menu-wrapper {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: white;
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 80px 20px 20px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        display: block !important;
        overflow-y: auto;
    }

    .menu-wrapper.active {
        left: 0;
    }

    .menu-wrapper .menu-main {
        display: flex !important;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .menu-wrapper .menu-main a {
        padding: 10px 0;
        font-size: 1rem;
        color: #333;
        text-decoration: none;
        border-bottom: 1px solid #eee;
    }

    .menu-wrapper .header-actions {
        display: flex !important;
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }

    .menu-wrapper .cliente-links {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
    }

    .menu-wrapper .menu-admin {
        display: block !important;
        margin-top: 10px;
    }

    .menu-wrapper .btn-login,
    .menu-wrapper .btn-register,
    .menu-wrapper .btn-admin {
        width: 100%;
        text-align: center;
        padding: 10px;
        justify-content: center;
    }

    /* Barra de categorias */
    .lista-categorias {
        justify-content: flex-start;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 8px;
        flex-wrap: nowrap;
    }

    .lista-categorias::-webkit-scrollbar {
        height: 4px;
    }

    .dropdown-mega {
        min-width: 280px !important;
        right: 0;
        left: auto;
    }

    .grid-5 {
        grid-template-columns: 1fr;
    }

    /* Produtos */
    .product-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-info {
        padding: 10px;
    }

    .product-info h3 {
        font-size: 0.75rem;
    }

    .preco {
        font-size: 0.85rem;
    }

    .filtros-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        font-size: 0.65rem;
        padding: 6px 10px;
    }

    /* Banner */
    .banner {
        height: 280px;
        margin: 15px 0;
    }

    .slide {
        background-position: center;
        background-size: cover;
    }

    .btn-canto {
        bottom: 12px;
        right: 12px;
        padding: 5px 12px;
        font-size: 0.6rem;
    }

    .slider-nav span {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    /* Banner Composto */
    .banner-composto-interno {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
    }

    .banner-laterais-interno {
        flex-direction: row;
        gap: 8px;
    }

    .banner-principal-interno {
        height: 160px;
    }

    .banner-principal-interno img {
        object-fit: cover;
        height: 100%;
    }

    .banner-lateral-interno {
        height: 100px;
    }

    .banner-lateral-interno img {
        object-fit: cover;
        height: 100%;
    }

    .lateral-titulo-interno {
        bottom: 6px;
        left: 6px;
        padding: 2px 6px;
        font-size: 0.5rem;
    }

    /* ===== MODAL DE DETALHES PARA CELULAR ===== */
    .modal-container {
        width: 95%;
        max-height: 90vh;
        padding: 10px;
        margin: 10px;
        overflow-y: auto;
    }

    .cartao-produto {
        display: flex;
        flex-direction: column;
        padding: 10px;
        gap: 15px;
    }

    /* Miniaturas em linha no topo */
    .coluna-miniaturas {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        gap: 8px;
        overflow-x: auto;
        order: 1;
        padding-bottom: 5px;
    }

    .thumb, .thumb-video {
        width: 55px;
        height: 55px;
        flex-shrink: 0;
        border-radius: 8px;
    }

    /* Imagem principal */
    .exibicao-principal {
        order: 2;
        height: 250px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f5f5;
        border-radius: 12px;
    }

    .midia-principal {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    /* Informações do produto */
    .coluna-info {
        order: 3;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .nome-produto {
        font-size: 1.2rem;
        font-weight: 700;
        margin: 0;
        text-align: center;
    }

    .preco-produto {
        font-size: 1.4rem;
        font-weight: 800;
        color: #ff69b4;
        text-align: center;
        margin: 0;
    }

    .btn-carrinho {
        width: 100%;
        padding: 12px;
        background: #ff69b4;
        color: white;
        border: none;
        border-radius: 30px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
    }

    .botao-whatsapp {
        width: 100%;
        padding: 12px;
        background: #25d366;
        color: white;
        border: none;
        border-radius: 30px;
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        text-align: center;
        display: block;
    }

    .caixa-descricao {
        padding: 12px;
        background: #f8f9fa;
        border-radius: 12px;
        border-left: 3px solid #ff69b4;
        font-size: 0.8rem;
        line-height: 1.5;
        color: #555;
        max-height: 200px;
        overflow-y: auto;
    }

    .fechar-modal {
        right: 5px !important;
        top: 5px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }

    /* Carrinho */
    .carrinho-acoes {
        flex-direction: column;
        gap: 15px;
    }

    .table-loja th, .table-loja td {
        padding: 10px 5px;
        font-size: 0.7rem;
    }

    /* Footer */
    .footer-grid {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-about p {
        margin: 0 auto;
        max-width: 100%;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-social a {
        margin: 0 10px;
    }

    /* Área do cliente */
    .cliente-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cliente-header h2 {
        font-size: 1.3rem;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .info-item strong {
        width: 100%;
        display: block;
        margin-bottom: 4px;
    }

    /* Dashboard */
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-row {
        grid-template-columns: 1fr;
    }

    /* Tabelas */
    .tabela-admin th,
    .tabela-admin td {
        padding: 10px;
        font-size: 0.7rem;
    }

    .badge {
        padding: 3px 8px;
        font-size: 0.6rem;
    }
}

/* ===== MOBILE PEQUENO (max-width: 576px) ===== */
@media (max-width: 576px) {
    .container {
        width: 100%;
        padding: 0 12px;
    }

    .titulo-produtos {
        font-size: 1.3rem;
    }

    .section-title p {
        font-size: 0.65rem;
    }

    .product-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-card .img-container {
        height: 200px;
    }

    .banner {
        height: 220px;
    }

    .btn-canto {
        bottom: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 0.55rem;
    }

    .slider-nav span {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .banner-composto-interno {
        padding: 6px;
        gap: 6px;
    }

    .banner-laterais-interno {
        flex-direction: column;
        gap: 6px;
    }

    .banner-principal-interno {
        height: 140px;
    }

    .banner-lateral-interno {
        height: 80px;
    }

    .lateral-titulo-interno {
        font-size: 0.45rem;
        padding: 2px 5px;
    }

    /* Modal para celular pequeno */
    .exibicao-principal {
        height: 200px;
    }

    .thumb, .thumb-video {
        width: 45px;
        height: 45px;
    }

    .nome-produto {
        font-size: 1rem;
    }

    .preco-produto {
        font-size: 1.2rem;
    }

    .btn-carrinho, .botao-whatsapp {
        padding: 10px;
        font-size: 0.75rem;
    }

    .caixa-descricao {
        padding: 10px;
        font-size: 0.7rem;
        max-height: 180px;
    }

    .fechar-modal {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.8rem !important;
    }

    /* Formulários */
    .auth-box {
        padding: 20px;
    }

    .auth-box h2 {
        font-size: 1.2rem;
    }

    .form-group input,
    .form-group select {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    /* Botões */
    .btn {
        padding: 6px 10px;
        font-size: 0.6rem;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 0.55rem;
    }

    .btn-login,
    .btn-register,
    .btn-cliente {
        padding: 4px 8px;
        font-size: 0.6rem;
    }

    /* Checkout */
    .checkout-form {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .resumo-total strong {
        font-size: 0.9rem;
    }

    /* Tabelas */
    .tabela-admin {
        min-width: 100%;
    }

    .tabela-admin th,
    .tabela-admin td {
        padding: 8px 5px;
        font-size: 0.6rem;
    }

    /* Paginação */
    .pagination .page-link {
        padding: 4px 8px;
        font-size: 0.65rem;
    }

    .cliente-header h2 {
        font-size: 1.1rem;
    }

    .cliente-card {
        padding: 12px;
    }

    .card-info {
        padding: 12px;
    }
}

/* ===== DROPDOWN PARA CELULAR (CLICK) ===== */
@media (max-width: 768px) {
    .menu-dropdown .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
        border: none;
        margin-top: 0;
        padding-left: 20px;
        background: transparent;
    }
    
    .menu-dropdown.open .dropdown-content {
        display: block;
    }
    
    .menu-dropdown .dropbtn {
        width: 100%;
        justify-content: space-between;
        background: none;
        padding: 10px 0;
    }
    
    .dropdown-content a {
        padding: 8px 0 8px 20px;
        font-size: 0.7rem;
    }
}

/* ===== AJUSTE PARA DESKTOP (MENU NORMAL) ===== */
@media (min-width: 769px) {
    .menu-hamburguer {
        display: none !important;
    }
    
    .menu-wrapper {
        display: flex !important;
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        overflow: visible;
    }
    
    .menu-wrapper .menu-main {
        display: flex !important;
        flex-direction: row;
    }
    
    .menu-wrapper .header-actions {
        display: flex !important;
        flex-direction: row;
    }
}