﻿/* Movil.css - Ajustes para celulares y tablets de GalixSoftTienda.
   Se carga al final de _Layout.cshtml (tienda) y _Administracion.cshtml (panel),
   así no modifica los estilos originales de las plantillas. */

/* ------------------------------------------------------------------ comunes */
/* En pantallas táctiles el :hover se queda "pegado" después de tocar un enlace:
   el color blanco de a:hover solo se aplica cuando hay mouse (ver los layouts). */
img, video, iframe { max-width: 100%; }

@media (max-width: 767.98px) {
    html, body { overflow-x: hidden; }
    /* Tablas anchas: se desplazan dentro de su caja en vez de ensanchar la página */
    .page-content table.table, .page-content-wrapper table.table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .page-content-wrapper table.dataTable { display: table; }          /* DataTables responsive maneja las suyas */
    .page-content-wrapper .dataTables_wrapper { overflow-x: auto; }
    /* Campos de formulario cómodos para el dedo y sin zoom automático de iOS */
    input.form-control, select.form-control, textarea.form-control, .custom-select { font-size: 16px; min-height: 40px; }
    .btn { min-height: 38px; }
    .modal-dialog { margin: .5rem; }
}

/* ------------------------------------------------------------------ panel de administración */
@media (max-width: 1024px) {
    body.fixed-left #wrapper { overflow: visible; }
    /* Menú lateral fuera de pantalla; el botón ☰ lo abre por encima del contenido */
    body.fixed-left .side-menu.left { position: fixed; top: 0; bottom: 0; height: 100%; margin: 0 !important; padding-bottom: 0;
        width: 260px; max-width: 85vw; left: 0; z-index: 1060 !important; transform: translateX(-105%);
        transition: transform .25s ease; box-shadow: 4px 0 18px rgba(0,0,0,.25); overflow-y: auto; -webkit-overflow-scrolling: touch; }
    body.fixed-left #wrapper.enlarged .side-menu.left { transform: none; }
    body.fixed-left .side-menu .slimScrollDiv, body.fixed-left .side-menu .slimscrollleft { height: auto !important; overflow: visible !important; }
    body.fixed-left .slimScrollBar, body.fixed-left .slimScrollRail { display: none !important; }
    body.fixed-left .side-menu .button-menu-mobile-topbar { right: 0; top: 0; margin: 0; height: 42px; line-height: 42px; font-size: 20px; display: block; z-index: 2; }
    /* Fondo oscuro detrás del menú abierto (un toque fuera lo cierra, ver Movil.js) */
    body.fixed-left .side-menu .topbar-left { padding-right: 42px; }
    body.fixed-left #wrapper.enlarged::before { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1055; }

    body.fixed-left .content-page { margin-left: 0 !important; overflow: visible; }
    body.fixed-left .content-page > .content { padding: 15px 15px 0; margin-bottom: 70px; }   /* 15px = margen negativo de .row */
    body.fixed-left .navbar-custom { margin: -15px -15px 0 -15px; padding: 0 8px; display: flex; align-items: center; flex-wrap: nowrap; min-height: 56px; }
    body.fixed-left .navbar-custom > .menu-left { order: 1; flex: none; }
    body.fixed-left .navbar-custom > .float-right { order: 2; margin-left: auto; float: none !important; display: flex; align-items: center; min-width: 0; }
    body.fixed-left .navbar-custom > .clearfix { display: none; }
    body.fixed-left .button-menu-mobile { display: inline-block; line-height: 42px; height: 42px; font-size: 24px; margin: 7px 0; }
    body.fixed-left .navbar-custom .logo { line-height: 56px; }
    body.fixed-left .page-content-wrapper { margin: 0; }
    body.fixed-left .footer, body.fixed-left #wrapper.enlarged .footer { left: 0; padding: 12px; font-size: .8rem; }
    body.fixed-left .topbar { left: 0; right: 0; }
}
@media (max-width: 575.98px) {
    /* En el celular se ocultan el saludo, el ícono del clima y el reloj de la barra superior */
    body.fixed-left .navbar-custom .float-right > li.logo { display: none !important; }
    body.fixed-left .card-body { padding: .85rem; }
    body.fixed-left .page-title-box, body.fixed-left .page-header-title { padding: 10px 0; }
    body.fixed-left h4.page-title, body.fixed-left .page-title { font-size: 1.05rem; }
    body.fixed-left .dropdown-menu-right.profile-dropdown { right: 0; left: auto; }
}

/* ------------------------------------------------------------------ tienda en línea */
@media (max-width: 991.98px) {
    body.has-smround-btns .hdr-logo .logo { width: auto !important; height: 44px !important; display: inline-flex; align-items: center; }
    body.has-smround-btns .hdr-logo .logo img { max-height: 44px; width: auto; }
    body.has-smround-btns .mobilemenu { max-width: 88vw; }
}
@media (max-width: 575.98px) {
    body.has-smround-btns .container { padding-left: 12px; padding-right: 12px; }
    body.has-smround-btns .custom-text-item { font-size: 12px; }
    body.has-smround-btns .footer-copyright { font-size: 12px; }
}
