/* ============================================
   ESTILOS MÓVILES - GRAND ROLL SUSHI
   Diseño responsivo y moderno para móviles
   ============================================ */

:root {
    --primary-color: rgb(138, 36, 34);
    --primary-color-dark: rgb(120, 30, 28);
    --primary-color-light: rgba(138, 36, 34, 0.1);
    --secondary-color: rgba(138, 36, 34, 0.8);
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Eliminar highlight azul en móviles */
    -webkit-touch-callout: none; /* Deshabilitar menú contextual en iOS */
}

/* Mejorar el scroll en móviles */
body {
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    overscroll-behavior: contain; /* Prevenir scroll bounce */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

    .login-body::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 40%;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
        z-index: 0;
    }

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 50px 35px 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-top: 4px solid var(--primary-color);
}

.logo-container {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

.logo-text {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.logo-subtitle {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 5px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.login-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

    .login-form .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px var(--primary-color-light);
    }

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(138, 36, 34, 0.3);
}

    .btn-login:hover {
        background: linear-gradient(135deg, var(--primary-color-dark) 0%, var(--primary-color) 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(138, 36, 34, 0.4);
    }

    .btn-login:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(138, 36, 34, 0.3);
    }

/* ============================================
   MOBILE LAYOUT
   ============================================ */
.mobile-body {
    padding-bottom: 80px;
}

.mobile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    color: #000000;
    display: flex;
    align-items: center;
    line-height: 1.2;
    letter-spacing: 0.5px;
    background: white;
    padding: 8px 15px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.title-text {
    display: inline-block;
    vertical-align: middle;
    color: #000000;
}

.logo-circle-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border-radius: 50%;
    padding: 3px;
    margin: 0 1px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.logo-letter {
    display: inline-block;
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.title-text-fallback {
    display: inline-block;
    vertical-align: middle;
    color: #000000;
}

.header-actions {
    position: relative;
}

.cart-icon {
    font-size: 1.8rem;
    color: white;
    text-decoration: none;
    position: relative;
}

/* Menú Hamburguesa Administración */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    margin-right: 10px;
    z-index: 1001;
    position: relative;
}

    .menu-toggle span {
        width: 25px;
        height: 3px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s;
    }

    .menu-toggle:hover span {
        background: rgba(255, 255, 255, 0.8);
    }

/* Menú Desplegable Administración */
.admin-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    animation: fadeIn 0.3s;
}

    .admin-menu-overlay.show {
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        padding-top: 60px;
    }

.admin-menu-content {
    background: white;
    width: 280px;
    max-width: 85%;
    height: 100%;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    animation: slideInRight 0.3s;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.admin-menu-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .admin-menu-header h3 {
        margin: 0;
        font-size: 1.2rem;
    }

.menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

    .menu-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.admin-menu-nav {
    padding: 10px 0;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--dark-color);
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

    .admin-menu-item:hover {
        background: #f8f9fa;
        color: var(--primary-color);
    }

    .admin-menu-item .menu-icon {
        font-size: 1.5rem;
        margin-right: 15px;
        width: 30px;
        text-align: center;
    }

.admin-menu-logout {
    color: var(--danger-color);
    border-top: 2px solid #e0e0e0;
    margin-top: 10px;
}

    .admin-menu-logout:hover {
        background: #fff5f5;
        color: var(--danger-color);
    }

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.mobile-main {
    padding: 20px;
    max-width: 100%;
}

.mobile-footer {
    background: white;
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* ============================================
   HEADER MOBILE (Page Titles)
   ============================================ */
.header-top {
    margin-bottom: 10px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

    .btn-back:hover {
        background: var(--primary-color);
        color: white;
        transform: translateX(-3px);
    }

.header-mobile {
    margin-bottom: 25px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.page-subtitle {
    color: #666;
    font-size: 0.9rem;
}

/* ============================================
   SUCURSALES
   ============================================ */
.sucursales-grid {
    display: grid;
    gap: 15px;
}

.sucursal-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

    .sucursal-card:hover,
    .sucursal-card:focus {
        transform: translateY(-3px);
        box-shadow: var(--shadow-hover);
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

        .sucursal-card:focus:not(:focus-visible) {
            outline: none;
        }

    .sucursal-card:focus-visible {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }

.sucursal-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.sucursal-nombre {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.sucursal-direccion {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.sucursal-badge {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================
   PEDIDOS - CONTAINER
   ============================================ */
.pedidos-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    overflow: hidden;
    touch-action: pan-y; /* Permitir scroll vertical */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    overscroll-behavior: contain; /* Prevenir scroll bounce */
}

/* ============================================
   PEDIDOS - CAMPO DE BÚSQUEDA
   ============================================ */
.busqueda-container {
    background: white;
    padding: 15px 20px 20px 20px;
    margin: -20px -20px 0 -20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 60px;
    z-index: 102;
}

.busqueda-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.busqueda-icon {
    position: absolute;
    left: 15px;
    font-size: 1.2rem;
    color: #666;
    z-index: 2;
    pointer-events: none;
}

.busqueda-input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    background: #f8f9fa;
    transition: all 0.3s;
    outline: none;
}

    .busqueda-input:focus {
        border-color: var(--primary-color);
        background: white;
        box-shadow: 0 0 0 3px var(--primary-color-light);
    }

    .busqueda-input::placeholder {
        color: #999;
    }

.btn-limpiar-busqueda {
    position: absolute;
    right: 15px;
    background: #ccc;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: white;
    z-index: 3;
    transition: all 0.3s;
    padding: 0;
    line-height: 1;
}

    .btn-limpiar-busqueda:hover {
        background: var(--primary-color);
        transform: scale(1.1);
    }

    .btn-limpiar-busqueda:active {
        transform: scale(0.95);
    }

/* Dropdown de sugerencias */
.sugerencias-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
    border: 1px solid #e0e0e0;
}

    .sugerencias-dropdown.show {
        display: block;
    }

.sugerencia-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .sugerencia-item:first-child {
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
    }

    .sugerencia-item:last-child {
        border-bottom: none;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }

    .sugerencia-item:hover {
        background: var(--primary-color-light);
        transform: translateX(2px);
    }

    .sugerencia-item:active {
        background: rgba(138, 36, 34, 0.15);
        transform: translateX(0);
    }

.sugerencia-nombre {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
    line-height: 1.3;
}

.sugerencia-categoria {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.2;
}

.sugerencia-precio {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 2px;
}

/* ============================================
   PEDIDOS - CATEGORÍAS TABS
   ============================================ */
.categorias-tabs {
    background: white;
    padding: 10px 0;
    margin: -20px -20px 80px -20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 155px;
    z-index: 101;
}

.tabs-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 20px;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .tabs-scroll::-webkit-scrollbar {
        display: none;
    }

.tab-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

    .tab-btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    .tab-btn:hover {
        border-color: var(--primary-color);
    }

/* ============================================
   PRODUCTOS GRID
   ============================================ */
.productos-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    overscroll-behavior: contain; /* Prevenir scroll bounce */
    flex: 1;
    padding-top: 60px;
    padding-bottom: 20px;
    touch-action: pan-y; /* Permitir solo scroll vertical */
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 0;
}

.producto-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y; /* Permitir scroll vertical, prevenir zoom */
    -webkit-tap-highlight-color: transparent; /* Eliminar highlight azul en móviles */
}

.btn-ingredientes {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(138, 36, 34, 0.3);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

    .btn-ingredientes:hover {
        background: rgb(138, 36, 34);
        border-color: rgb(138, 36, 34);
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(138, 36, 34, 0.4);
    }

    .btn-ingredientes:active {
        transform: scale(0.95);
    }

    .btn-ingredientes:hover::after {
        content: 'Ver ingredientes';
        position: absolute;
        top: -35px;
        right: 0;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 0.75rem;
        white-space: nowrap;
        pointer-events: none;
        z-index: 20;
    }

.producto-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.producto-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Removido producto-hint ya que ahora usamos botón de ingredientes */

.producto-imagen {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

    .producto-imagen img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

        .producto-imagen img.loaded {
            opacity: 1;
            position: relative;
            z-index: 2;
        }

    /* Prevenir parpadeo con placeholder mientras carga */
    .producto-imagen::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        z-index: 1;
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    /* Ocultar placeholder cuando la imagen carga */
    .producto-imagen.loaded::before {
        opacity: 0;
        animation: none;
    }

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.producto-info {
    padding: 12px;
}

.producto-nombre {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.producto-precio {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

/* ============================================
   MODAL PRODUCTO
   ============================================ */
.modal-content {
    border-radius: 20px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px;
}

.modal-title {
    font-weight: bold;
    color: var(--dark-color);
}

.modal-body {
    padding: 20px;
    max-height: 75vh;
    overflow-y: auto;
}

.producto-modal-info {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.producto-modal-imagen {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

    .producto-modal-imagen img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.producto-modal-datos {
    flex: 1;
}

    .producto-modal-datos h4 {
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--dark-color);
        margin-bottom: 5px;
    }

.producto-modal-precio {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.ingredientes-section, .extras-section {
    margin-bottom: 25px;
}

    .ingredientes-section h6, .extras-section h6 {
        font-weight: 600;
        color: var(--dark-color);
        margin-bottom: 5px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.section-icon {
    font-size: 1.2rem;
}

.section-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
    font-style: italic;
}

.ingredientes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.ingrediente-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

    .ingrediente-item:hover {
        background: #e9ecef;
        border-color: var(--primary-color);
    }

/* Estilos para controles de cantidad de ingredientes extras */
.btn-cantidad-ingrediente {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

    .btn-cantidad-ingrediente:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
    }

    .btn-cantidad-ingrediente:active {
        transform: scale(0.95);
    }

    .btn-cantidad-ingrediente:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }

.cantidad-ingrediente {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    min-width: 25px;
    text-align: center;
}

.ingrediente-extra-item {
    cursor: default;
}

    .ingrediente-extra-item:hover {
        background: #f8f9fa;
    }

.ingrediente-checkbox {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
}

    .ingrediente-checkbox input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkmark {
    position: absolute;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s;
}

.ingrediente-checkbox:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.ingrediente-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ingrediente-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.ingrediente-nombre {
    font-weight: 500;
    color: var(--dark-color);
    flex: 1;
}

.precio-extra {
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.sin-ingredientes {
    text-align: center;
    padding: 15px;
    font-style: italic;
    color: #999;
}

/* Tooltip de ingredientes */
.ingredientes-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 10000;
    max-width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
    animation: fadeInScale 0.3s;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.tooltip-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .tooltip-header h5 {
        margin: 0;
        font-size: 1.1rem;
    }

.tooltip-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s;
}

    .tooltip-close:hover {
        background: rgba(255,255,255,0.3);
    }

.tooltip-content {
    padding: 20px;
    color: var(--dark-color);
    line-height: 1.8;
}

    .tooltip-content strong {
        color: var(--primary-color);
        display: block;
        margin-top: 10px;
        margin-bottom: 5px;
    }

        .tooltip-content strong:first-child {
            margin-top: 0;
        }

/* ============================================
   VENTAS / PEDIDOS REALIZADOS
   ============================================ */
.ventas-container {
    padding: 20px;
    max-width: 100%;
}

.ventas-filtros {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ventas-filtros .filtro-multi-select {
    flex: 1;
}

.ventas-filtros .btn-ordenar {
    white-space: nowrap;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.ventas-filtros .btn-ordenar:hover {
    border-color: var(--primary-color);
    background: var(--primary-color-light);
}

.ventas-filtros .btn-ordenar:focus {
    outline: none;
    border-color: var(--primary-color);
}

    .ventas-filtros select {
        width: 100%;
        padding: 12px;
        border-radius: 10px;
        border: 2px solid #e0e0e0;
        font-size: 1rem;
    }

    .filtro-multi-select {
        position: relative;
        width: 100%;
    }

    .btn-filtro-toggle {
        width: 100%;
        padding: 12px;
        border-radius: 10px;
        border: 2px solid #e0e0e0;
        background: white;
        font-size: 1rem;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        transition: border-color 0.2s;
    }

    .btn-filtro-toggle:hover {
        border-color: var(--primary-color);
    }

    .btn-filtro-toggle:focus {
        outline: none;
        border-color: var(--primary-color);
    }

    .filtro-icon {
        font-size: 0.8rem;
        color: #666;
        transition: transform 0.2s;
    }

    .filtro-multi-select.active .filtro-icon {
        transform: rotate(180deg);
    }

    .filtro-opciones {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 2px solid #e0e0e0;
        border-radius: 10px;
        margin-top: 5px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        max-height: 300px;
        overflow-y: auto;
    }

    .filtro-opciones.show {
        display: block;
    }

    .filtro-opcion {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        cursor: pointer;
        transition: background-color 0.2s;
        border-bottom: 1px solid #f0f0f0;
    }

    .filtro-opcion.filtro-todos {
        background-color: #f8f9fa;
        font-weight: 500;
    }

    .filtro-opcion.filtro-todos:hover {
        background-color: #e9ecef;
    }

    .filtro-separador {
        height: 1px;
        background-color: #e0e0e0;
        margin: 5px 0;
    }

    .filtro-opcion:last-child {
        border-bottom: none;
    }

    .filtro-opcion:hover {
        background-color: #f8f9fa;
    }

    .filtro-opcion input[type="checkbox"] {
        margin-right: 10px;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    .filtro-opcion span {
        flex: 1;
        font-size: 1rem;
        color: var(--dark-color);
    }

.ventas-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.venta-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid var(--primary-color);
}

    .venta-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
    }

.venta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.venta-info {
    flex: 1;
}

.venta-cliente {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.venta-fecha {
    color: #666;
    font-size: 0.9rem;
}

.venta-estatus {
    margin-left: 10px;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-abierto {
    background: #cfe2ff;
    color: #084298;
    border: 1px solid #0d6efd;
}

.badge-empacado {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.badge-cerrado {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #198754;
    font-weight: bold;
}

.badge-cancelado {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #dc3545;
}

.venta-detalles {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.venta-tipo,
.venta-usuario {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.venta-total {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-top: 10px;
}

.venta-notas {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.ventas-vacio {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

    .ventas-vacio .empty-icon {
        font-size: 4rem;
        margin-bottom: 20px;
    }

/* Modal detalle venta */
.detalle-venta-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

    .detalle-venta-header h4 {
        margin-bottom: 15px;
        color: var(--dark-color);
    }

    .detalle-venta-header p {
        margin: 5px 0;
        color: #666;
    }

.detalle-productos {
    margin-bottom: 20px;
}

    .detalle-productos h5 {
        margin-bottom: 15px;
        color: var(--dark-color);
    }

.producto-detalle {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.producto-detalle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .producto-detalle-header h6 {
        margin: 0;
        color: var(--dark-color);
    }

.producto-subtotal {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.producto-modificaciones {
    margin-top: 8px;
    padding-left: 10px;
}

.producto-notas {
    margin-top: 8px;
    color: #666;
    font-style: italic;
}

.detalle-total {
    border-top: 2px solid #e0e0e0;
    padding-top: 15px;
    text-align: right;
}

    .detalle-total h4 {
        color: var(--primary-color);
        margin: 0;
    }

.notas-section, .cantidad-section {
    margin-top: 20px;
}

.cantidad-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.btn-cantidad-menos, .btn-cantidad-mas {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    .btn-cantidad-menos:hover, .btn-cantidad-mas:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
    }

    .btn-cantidad-menos:active, .btn-cantidad-mas:active {
        transform: scale(0.95);
    }

.cantidad-input {
    width: 70px;
    height: 45px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
}

/* ============================================
   CARRITO
   ============================================ */
.carrito-items {
    margin-bottom: 20px;
}

.carrito-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
}

.item-imagen {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

    .item-imagen img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.item-info {
    flex: 1;
    min-width: 0;
}

.item-nombre {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.item-precio-unitario {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.item-notas, .item-modificaciones {
    font-size: 0.8rem;
    color: #999;
    margin: 2px 0;
}

.item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.cantidad-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-cantidad {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cantidad-value {
    font-weight: bold;
    min-width: 25px;
    text-align: center;
}

.item-subtotal {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
}

.btn-eliminar {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.carrito-vacio {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.carrito-resumen {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.resumen-total {
    text-align: center;
}

    .resumen-total h4 {
        font-size: 1.5rem;
        color: var(--dark-color);
    }

    .resumen-total span {
        color: var(--primary-color);
    }

.carrito-form {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
}

    .carrito-form .form-group {
        margin-bottom: 20px;
    }

    .carrito-form .form-label {
        font-weight: 600;
        color: var(--dark-color);
        margin-bottom: 8px;
        display: block;
    }

    .carrito-form .form-control,
    .carrito-form .form-select {
        width: 100%;
        padding: 12px;
        border: 2px solid #e0e0e0;
        border-radius: 10px;
        font-size: 1rem;
    }

    .carrito-form .form-select:invalid,
    .carrito-form .form-select option[value=""] {
        color: #6c757d;
    }

    .carrito-form .form-select option:not([value=""]) {
        color: #212529;
    }

        .carrito-form .form-control:focus,
        .carrito-form .form-select:focus {
            outline: none;
            border-color: var(--primary-color);
        }

.btn-finalizar {
    width: 100%;
    padding: 15px;
    background: var(--success-color);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

    .btn-finalizar:hover {
        background: #229954;
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
    }

/* ============================================
   NOTIFICACIONES
   ============================================ */
.notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .mobile-main {
        max-width: 600px;
        margin: 0 auto;
    }

    .productos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   MENSAJES FLOTANTES
   ============================================ */
.mensaje-flotante {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

    .mensaje-flotante.mostrar {
        opacity: 1;
        transform: translateX(0);
    }

.mensaje-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.mensaje-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.mensaje-icono {
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.mensaje-texto {
    flex: 1;
    line-height: 1.4;
}

/* ============================================
   ESTILOS PARA CHAROLAS
   ============================================ */

.requisitos-section {
    margin-top: 20px;
}

.requisito-categoria {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.requisito-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    flex-wrap: wrap;
}

    .requisito-titulo .badge {
        margin-left: auto;
        font-size: 0.85rem;
    }

.productos-grid-charola {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.producto-charola-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

    .producto-charola-item:hover {
        border-color: #0d6efd;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .producto-charola-item.seleccionado {
        border-color: #198754;
        background: #f0fff4;
    }

.producto-charola-imagen {
    position: relative;
    width: 100%;
    height: 80px;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 6px;
}

    .producto-charola-imagen img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.check-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #198754;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.producto-charola-info h6 {
    font-size: 0.9rem;
    margin: 0;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.producto-charola-info .small {
    font-size: 0.8rem;
    margin: 0;
}

.producto-charola-controls {
    margin-top: 8px;
}

    .producto-charola-controls .btn {
        width: 100%;
        font-size: 0.85rem;
        padding: 5px 10px;
    }

.charola-modal-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.charola-modal-imagen {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

    .charola-modal-imagen img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.charola-modal-datos {
    flex: 1;
}

    .charola-modal-datos h4 {
        margin: 0 0 5px 0;
        font-size: 1.2rem;
        color: #333;
    }

.charola-modal-precio {
    font-size: 1.3rem;
    font-weight: 600;
    color: #198754;
    margin: 0 0 5px 0;
}

.loading-spinner-small {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

    .loading-spinner-small .spinner-border-sm {
        width: 1.5rem;
        height: 1.5rem;
    }

/* Estilos para productos de charola en carrito */
.charola-productos {
    margin-top: 8px;
    padding: 8px;
    background: #f0f8ff;
    border-radius: 6px;
    border-left: 3px solid #198754;
}

.charola-lista {
    margin: 5px 0 0 0;
    padding-left: 20px;
    list-style: none;
}

    .charola-lista li {
        margin: 3px 0;
        color: #495057;
    }

/* Responsive para charolas */
@media (max-width: 576px) {
    .productos-grid-charola {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .requisito-titulo {
        font-size: 1rem;
    }

        .requisito-titulo .badge {
            font-size: 0.75rem;
            margin-left: 5px;
        }

    .charola-modal-info {
        flex-direction: column;
    }

    .charola-modal-imagen {
        width: 100%;
        height: 150px;
    }
}
