/* Variables CSS para Menú */
:root {
    --menu-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #0056A4;
    --text-secondary: #6c757d;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --primary-color: #0056A4;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --btn-primary: #3498db;
    --btn-primary-hover: #2980b9;
    --input-bg: #ffffff;
    --input-text: #333333;
    --input-border: #ced4da;
}

/* Tema oscuro - paleta unificada (estilo login), sin negros */
[data-theme='dark'] {
    --menu-bg: #111827;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.25);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.35);
    --primary-color: #0056A4;
    --primary-dark: #003E78;
    --primary-light: #60a5fa;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --btn-primary: #0056A4;
    --btn-primary-hover: #003E78;
    --input-bg: #283040;
    --input-text: #f1f5f9;
    --input-border: #3b4557;
}

/* Modo oscuro: header y contenedor con fondo slate explícito */
[data-theme='dark'] .menu-container {
    background: linear-gradient(160deg, #111827 0%, #1e293b 100%) !important;
}

[data-theme='dark'] .menu-header {
    background: linear-gradient(135deg, #0056A4 0%, #003E78 45%, #0f172a 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 28px rgba(0, 86, 164, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
}

[data-theme='dark'] .menu-header .menu-title {
    color: #f8fafc !important;
}

[data-theme='dark'] .menu-header .mesero-info {
    color: rgba(248, 250, 252, 0.88) !important;
}

[data-theme='dark'] .menu-header .btn-back {
    color: #f8fafc !important;
}

[data-theme='dark'] .btn-back:hover {
    background: rgba(59, 130, 246, 0.15);
}

/* Footer fijo: plano, sin borde ni sombra */
.menu-container .home-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: inherit;
    background: var(--menu-bg);
    padding: 1.2rem 1rem;
    border: none;
    border-top: none;
    box-shadow: none;
    z-index: 200;
    box-sizing: border-box;
}

/* Espacio inferior para que el contenido no quede tapado por el footer fijo */
.menu-container {
    padding-bottom: 100px;
}

.menu-container .open-table-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1rem 1.25rem;
    background: #0a3a72;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 14px rgba(10, 58, 114, 0.2);
}

.menu-container .open-table-button:hover:not(:disabled) {
    background: #0c488a;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(10, 58, 114, 0.26);
}

.menu-container .open-table-button:active:not(:disabled) {
    transform: translateY(0);
}

.menu-container .open-table-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.menu-container .open-table-button i {
    font-size: 1.15rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .menu-container .open-table-button {
        padding: 0.65rem 0.95rem;
        font-size: 0.82rem;
        gap: 0.4rem;
        letter-spacing: 0.05em;
        border-radius: 9px;
        box-shadow: 0 2px 8px rgba(10, 58, 114, 0.14);
    }

    .menu-container .open-table-button:hover:not(:disabled) {
        box-shadow: 0 3px 10px rgba(10, 58, 114, 0.18);
    }

    .menu-container .open-table-button i {
        font-size: 0.95rem;
    }
}

[data-theme='dark'] .menu-container .home-footer {
    background: var(--menu-bg) !important;
    border: none !important;
    box-shadow: none !important;
}

.menu-container {
    width: 100vw;
    max-width: 100%;
    min-height: 100vh;
    background: var(--menu-bg);
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Header a todo ancho — mismo estándar global (--app-header-* en app.css) */
.menu-header {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: var(--app-header-pad-x);
    padding-right: var(--app-header-pad-x);
    padding-top: var(--app-header-pad-top);
    padding-bottom: var(--app-header-pad-bottom);
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--app-header-row-gap);
    border-radius: 0;
    background: var(--app-header-surface-bg) !important;
    box-shadow: var(--app-header-surface-shadow) !important;
    border-bottom: var(--app-header-surface-border);
    min-height: calc(var(--app-header-title-size) * 1.25 + var(--app-header-pad-top) + var(--app-header-pad-bottom));
}

.menu-header .menu-title {
    color: var(--app-header-title-color) !important;
    text-shadow: none;
    font-size: var(--app-header-title-size) !important;
    font-weight: var(--app-header-title-weight);
    line-height: 1.25;
}

    .menu-header .mesero-info {
        color: #3a4f66 !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 0.6rem !important;
    }

.menu-header .btn-back {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: #1a1a1a !important;
    padding: 0.2rem 0.35rem 0.2rem 0 !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    align-self: center !important;
}

.menu-header .btn-back:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    box-shadow: none;
    transform: none !important;
}

/* Header Menú y Orden: chip compacto (iconos FA Solid necesitan font-weight 900 en el <i>) */
.menu-header .btn-inicio,
.orden-container .orden-header .btn-inicio {
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    background: #0a3a72 !important;
    align-self: center;
    padding: 5px 10px;
    min-height: 34px;
    box-sizing: border-box;
    font-size: 0.78rem;
    box-shadow: 0 1px 4px rgba(10, 45, 85, 0.14);
    transform: none;
}

.menu-header .btn-inicio i,
.menu-header .btn-menu-text,
.orden-container .orden-header .btn-inicio i,
.orden-container .orden-header .btn-menu-text {
    color: #ffffff !important;
    filter: none !important;
    text-shadow: none !important;
}

.menu-header .btn-inicio i,
.orden-container .orden-header .btn-inicio i {
    font-size: 0.88rem;
    font-weight: 900 !important;
    line-height: 1;
}

.menu-header .btn-inicio:hover,
.orden-container .orden-header .btn-inicio:hover {
    background: #0c488a !important;
    box-shadow: 0 2px 8px rgba(10, 45, 85, 0.18);
    transform: none;
}

.menu-header .btn-inicio:hover i,
.menu-header .btn-inicio:hover .btn-menu-text,
.orden-container .orden-header .btn-inicio:hover i,
.orden-container .orden-header .btn-inicio:hover .btn-menu-text {
    color: #ffffff !important;
    filter: none !important;
}

.menu-header .btn-inicio:focus-visible,
.orden-container .orden-header .btn-inicio:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.menu-header .btn-inicio:active,
.orden-container .orden-header .btn-inicio:active {
    background: #09325f !important;
    box-shadow: 0 1px 3px rgba(10, 45, 85, 0.12);
    transform: none;
}

/* Móvil pequeño: solo icono + — cuadrado más pequeño */
@media (max-width: 480px) {
    .menu-header .btn-inicio,
    .orden-container .orden-header .btn-inicio {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 10px !important;
        justify-content: center;
        align-items: center;
    }

    .menu-header .btn-inicio i,
    .orden-container .orden-header .btn-inicio i {
        font-size: 0.9rem;
        font-weight: 900 !important;
    }
}

.menu-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-container .btn-back {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 0.55rem;
    border-radius: 999px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-container .btn-back:hover {
    transform: translateX(-1px) scale(1.05);
}

.menu-title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.menu-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(148, 163, 184, 0.35);
}

.mesero-info {
    color: #3a4f66;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.menu-actions {
    display: flex;
    gap: 15px;
}

.btn-inicio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid var(--text-primary) !important;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: 0 2px 8px rgba(12, 65, 117, 0.15);
    color: var(--text-primary) !important;
    border-color: var(--text-primary) !important;
}

.btn-inicio i {
    font-size: 1.2rem;
    color: var(--text-primary);
    filter: drop-shadow(0 2px 4px rgba(12, 65, 117, 0.3));
    transition: all 0.3s ease;
}

.btn-menu-text {
    display: inline;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(12, 65, 117, 0.2);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn-inicio:hover {
    background: transparent !important;
    background-color: transparent !important;
    border-color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 65, 117, 0.3);
}

.btn-inicio:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 6px rgba(12, 65, 117, 0.5));
    color: var(--text-primary);
}

.btn-inicio:hover .btn-menu-text {
    text-shadow: 0 2px 4px rgba(12, 65, 117, 0.4);
    color: var(--text-primary);
}

.btn-inicio:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    background: transparent !important;
}

.btn-ver-orden {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    box-shadow: var(--shadow-light);
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-hover));
}

.btn-ver-orden:hover {
    background: linear-gradient(135deg, var(--btn-primary-hover), #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Breadcrumb (site map) */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, rgba(22, 22, 94, 0.04) 0%, rgba(22, 22, 94, 0.08) 100%);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.breadcrumb-item {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.breadcrumb-item:hover {
    background: rgba(22, 22, 94, 0.12);
    color: var(--primary-color);
}

.breadcrumb-item.active {
    background: var(--primary-color);
    color: #fff;
}

.breadcrumb-item.active:hover {
    background: var(--primary-dark);
    color: #fff;
}

[data-theme="dark"] .breadcrumb-item.active {
    background: rgba(59, 130, 246, 0.8);
    color: #fff;
}

[data-theme="dark"] .breadcrumb-item.active:hover {
    background: rgba(59, 130, 246, 1);
    color: #fff;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    font-size: 0.65rem;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-separator i {
    font-size: inherit;
}

/* Contenido principal */
.menu-content {
    flex: 1;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-height: 300px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Secciones */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 1rem 0;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2,
.section-title {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.section-header-categorias .section-title,
.section-header-productos .section-title {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-header-productos {
    flex-wrap: wrap;
}

.section-header-categorias {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.categorias-count,
.productos-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d0d3a 100%);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(22, 22, 94, 0.25);
}

/* Toggle 2/3 columnas (solo móvil/tablet) */
.categorias-columnas-toggle {
    display: none;
}

/* Toggle 2/3 columnas productos (solo móvil/tablet) */
.productos-columnas-toggle {
    display: none;
}

.productos-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.btn-productos-view-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-productos-view-toggle:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

[data-theme='dark'] .btn-productos-view-toggle {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme='dark'] .btn-productos-view-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Búsqueda y orden de productos en la misma fila del header (a la izquierda del contador y botón vista) */
.productos-search-sort-inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    margin-left: 1rem;
}

.productos-search-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.productos-search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 280px;
    min-width: 140px;
}

.productos-search-input-wrapper {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.productos-search-input-wrapper .productos-search-input {
    width: 100%;
    box-sizing: border-box;
}

.productos-search-container.buscador-activo {
    min-width: 220px;
}

.productos-search-input {
    width: 100%;
    padding: 0.5rem 2.75rem 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.productos-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(22, 22, 94, 0.1);
}

.productos-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.productos-search-clear {
    position: absolute;
    right: 2.25rem;
    background: none;
    border: none;
    padding: 0.35rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
}

.productos-search-clear:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.productos-search-toggle {
    position: absolute;
    right: 0.4rem;
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--primary-color);
    border-radius: 6px;
}

.productos-search-toggle:hover {
    background: rgba(22, 22, 94, 0.08);
    color: var(--primary-color);
}

.productos-search-icon {
    font-size: 1rem;
}

.productos-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Un solo botón de orden (escritorio y móvil) */
.btn-productos-sort-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-productos-sort-toggle:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(22, 22, 94, 0.25);
}

.btn-productos-sort-toggle.asc,
.btn-productos-sort-toggle.desc {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.productos-no-coinciden {
    grid-column: 1 / -1;
    padding: 2rem 1rem !important;
    text-align: center;
}

.productos-no-coinciden p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Grid de categorías (Menu) - scoped para no ser sobrescrito por carrito.css */
.menu-container .categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.categoria-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    text-align: center;
}

.categoria-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.categoria-icon {
    font-size: 2rem;
    min-width: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.categoria-icon img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

/* Fondo por defecto gris; cuando no hay imagen se sobreescribe con estilo inline (color generado por categoría) */
.categoria-iniciales {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.categoria-nombre-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

/* Modo oscuro para placeholder (productos) */
.dark-theme .categoria-nombre-placeholder {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(74, 144, 226, 0.12) 100%);
    color: var(--primary-color);
}

.categoria-info {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.categoria-nombre {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.01em;
}

.categoria-descripcion {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    letter-spacing: 0.01em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.categoria-action {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
}

/* Grid de productos (Menu - Productos Disponibles) */
/* Sección productos: total + listado a la derecha; grid de productos alineado a la derecha cuando hay pocos */
.menu-container .productos-section {
    width: 100%;
    text-align: right;
}

.menu-container .productos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 200px));
    gap: 0.6rem;
    justify-content: end;
    align-content: start;
    width: 100%;
}

.menu-container .productos-grid.vista-productos-filas {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

/* Modo filas: imagen | texto | icono (horizontal) */
.menu-container .productos-grid.vista-productos-filas .producto-card {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 0.75rem;
    gap: 1rem;
}

.menu-container .productos-grid.vista-productos-filas .producto-card:hover {
    transform: translateY(-1px);
}

.menu-container .productos-grid.vista-productos-filas .producto-icon {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 56px;
    min-height: 56px !important;
    max-height: 56px;
    aspect-ratio: unset;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.menu-container .productos-grid.vista-productos-filas .producto-icon img {
    width: 56px;
    height: 56px;
}

.menu-container .productos-grid.vista-productos-filas .producto-nombre-placeholder {
    width: 56px;
    height: 56px;
    min-height: 56px;
    font-size: 0.65rem;
    padding: 0.25rem;
}

.menu-container .productos-grid.vista-productos-filas .producto-info {
    flex: 1;
    min-width: 0;
    padding: 0.35rem 0;
    text-align: left;
}

.menu-container .productos-grid.vista-productos-filas .producto-nombre {
    -webkit-line-clamp: 2;
    font-size: 0.8rem;
}

.menu-container .productos-grid.vista-productos-filas .producto-action {
    padding: 0;
    flex-shrink: 0;
}

.menu-container .productos-grid.vista-productos-filas .producto-action .action-icon {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
}

/* ============================================================================
   Cards de producto en Menu (mesero) — diseño editorial alineado con MesaQR.
   Variables locales para que la card use la misma paleta que mesaqr-skin
   sin necesidad de estar dentro de ese skin.
   ============================================================================ */
.menu-container {
    --menu-card-bg: #ffffff;
    --menu-card-border: #ececec;
    --menu-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --menu-card-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
    --menu-card-text: #1a1a1a;
    --menu-card-placeholder-bg: linear-gradient(135deg, #0056A4 0%, #003E78 100%);
    --menu-card-placeholder-text: #ffffff;
    --menu-card-cta-bg: linear-gradient(135deg, #0056A4 0%, #0070D0 100%);
    --menu-card-cta-shadow: 0 4px 12px rgba(0, 86, 164, 0.4);
}

[data-theme="dark"] .menu-container {
    --menu-card-bg: #1e293b;
    --menu-card-border: #2e3a52;
    --menu-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --menu-card-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(59, 130, 246, 0.18);
    --menu-card-text: #e2e8f0;
    --menu-card-placeholder-bg: linear-gradient(135deg, #1e3a5f 0%, #0f1f3d 100%);
    --menu-card-placeholder-text: #93c5fd;
    --menu-card-cta-bg: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --menu-card-cta-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

.menu-container .producto-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: var(--menu-card-bg);
    border: 1px solid var(--menu-card-border);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    box-shadow: var(--menu-card-shadow);
    padding: 0;
    width: 100%;
}

.menu-container .producto-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--menu-card-shadow-hover);
}

.menu-container .producto-icon {
    width: 100%;
    aspect-ratio: 5 / 4;
    background: var(--menu-card-placeholder-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 0;
    margin: 0;
    padding: 0;
    min-height: 200px;
}

@media (min-width: 600px) {
    .menu-container .producto-icon {
        min-height: 220px;
    }
}

.menu-container .producto-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.4s ease;
}

.menu-container .producto-card:hover .producto-icon img {
    transform: scale(1.05);
}

.menu-container .producto-nombre-placeholder {
    color: var(--menu-card-placeholder-text);
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
    padding: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    word-break: break-word;
    background: var(--menu-card-placeholder-bg);
    border-radius: 0;
    box-shadow: none !important;
    transform: none !important;
}

.menu-container .producto-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.1rem 0.5rem;
    background: transparent;
    text-align: left;
}

.menu-container .producto-nombre {
    margin: 0;
    color: var(--menu-card-text);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    word-break: break-word;
    overflow-wrap: break-word;
    /* Sin line-clamp — mostrar el nombre completo como MesaQR */
}

/* Footer con el botón "+" alineado a la derecha (estilo MesaQR) */
.menu-container .producto-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.1rem 0.95rem;
}

.menu-container .producto-action .action-icon {
    appearance: none;
    border: none;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: var(--menu-card-cta-bg);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--menu-card-cta-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.menu-container .producto-action .action-icon i {
    opacity: 1;
    font-size: 0.95rem;
    color: #ffffff;
}

.menu-container .producto-card:hover .producto-action .action-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 86, 164, 0.55);
}

.menu-container .producto-action .action-icon:active {
    transform: scale(0.95);
}

/* Fallback para otras páginas (ej. Carrito) que usen producto-card */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.producto-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.producto-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.producto-icon img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    /*border-radius: 8px;*/
}

.producto-nombre-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    padding: 4px;
    word-wrap: break-word;
    overflow: hidden;
}

.producto-info {
    flex: 1;
    min-width: 0;
}

.producto-nombre {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.1rem 0;
}

.producto-descripcion {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.producto-codigo {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(22, 22, 94, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.categoria-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(22, 22, 94, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.categoria-indicator i {
    font-size: 0.75rem;
    opacity: 0.9;
}

.fa-solid, .fas {
    font-weight: 900;
    opacity: 60%;
}

.producto-action {
    color: var(--success-color);
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

/* Mensaje sin contenido */
.no-content-message {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.no-content-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-content-message h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.no-content-message p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* Responsive Design */
/* Estilos para tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .menu-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .menu-header-left {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .menu-actions {
        margin-left: auto;
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-end;
    }
    
    .btn-inicio {
        background: transparent !important;
        background-color: transparent !important;
        color: var(--text-primary) !important;
        border-color: var(--text-primary) !important;
        border: 2px solid var(--text-primary) !important;
    }
    
    .btn-inicio i {
        color: var(--text-primary) !important;
    }
    
    .btn-menu-text {
        color: var(--text-primary) !important;
    }
    
    /* Mostrar texto "Menú" en tablet */
    .btn-menu-text {
        display: inline;
    }

    .section-title {
        font-size: 1.08rem;
    }
}

/* Mobile y tablet portrait: 3 columnas para categorías */
@media (max-width: 768px) {
    .menu-header {
        padding-left: var(--app-header-pad-x-page);
        padding-right: var(--app-header-pad-x-page);
        padding-top: var(--app-header-pad-top);
        padding-bottom: var(--app-header-pad-bottom);
    }

    .section-header-productos {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
    }

    .productos-search-sort-inline {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
        margin-left: 0;
        min-width: 0;
        flex: 1;
    }

    .section-header-productos .productos-header-right {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .productos-search-wrapper {
        flex: 1;
        min-width: 0;
    }

    .productos-search-container {
        max-width: none;
    }

    .productos-search-container.buscador-activo .productos-search-input {
        min-width: 0;
    }

    /* Orden al final de la fila: [ búsqueda ] [ X productos ] [ botón vista ] [ orden ] — mismo borde que vista, sin texto A-Z en móvil */
    .productos-sort-wrapper {
        flex-shrink: 0;
    }

    .btn-productos-sort-toggle-text {
        display: none !important;
    }

    .btn-productos-sort-toggle {
        padding: 0.45rem 0.65rem;
        font-size: 1rem;
        min-width: 40px;
        justify-content: center;
        /* Mismo estilo que botón de listado (vista fila/columna) */
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        color: var(--text-secondary);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .btn-productos-sort-toggle:hover {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
        filter: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .btn-productos-sort-toggle.asc,
    .btn-productos-sort-toggle.desc {
        background: var(--card-bg);
        color: var(--text-secondary);
        border: 2px solid var(--border-color);
    }

    .menu-container .categorias-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        width: 100%;
        min-width: 0;
    }

    .menu-container .productos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .menu-container .productos-grid.productos-grid-2col {
        grid-template-columns: repeat(2, 1fr);
    }

    .menu-container .productos-grid.productos-grid-2col .producto-nombre {
        font-size: 1.1rem;
    }

    .menu-container .categorias-grid.categorias-grid-2col .categoria-card .categoria-descripcion {
        font-size: 1.1rem;
    }

    .menu-container .productos-grid.vista-productos-filas {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .productos-columnas-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 999px;
        padding: 0.2rem;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

    .productos-columnas-toggle button {
        padding: 0.35rem 0.75rem;
        border: none;
        border-radius: 999px;
        font-size: 0.85rem;
        font-weight: 600;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .productos-columnas-toggle button:hover {
        color: var(--primary-color);
    }

    .productos-columnas-toggle button.activo {
        background: var(--primary-color);
        color: #fff;
    }

    .menu-container .producto-card {
        border-radius: 18px;
    }

    .menu-container .producto-info {
        padding: 0.85rem 1rem 0.45rem;
    }

    .menu-container .producto-nombre {
        font-size: 1rem;
        /* Sin line-clamp — mostrar nombre completo como MesaQR */
        -webkit-line-clamp: unset;
        display: block;
    }

    .menu-container .producto-action .action-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .categoria-card {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 0.6rem;
        text-align: center;
        min-width: 0;
        overflow: hidden;
    }

    .categoria-card .categoria-icon {
        width: 100%;
        min-width: 0;
        margin-bottom: 0.25rem;
    }

    .categoria-card .categoria-icon img,
    .categoria-card .categoria-iniciales {
        width: 100%;
        max-width: 64px;
        height: 64px;
        margin: 0 auto;
    }

    .categoria-card .categoria-iniciales {
        font-size: 0.9rem;
    }

    .categoria-card .categoria-info {
        width: 100%;
        min-width: 0;
    }

    .categoria-card .categoria-descripcion {
        font-size: 0.95rem;
        margin: 0 0 0.2rem 0;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .categorias-columnas-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 999px;
        padding: 0.2rem;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

    .categorias-columnas-toggle button {
        padding: 0.35rem 0.75rem;
        border: none;
        border-radius: 999px;
        font-size: 0.85rem;
        font-weight: 600;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .categorias-columnas-toggle button:hover {
        color: var(--primary-color);
    }

    .categorias-columnas-toggle button.activo {
        background: var(--primary-color);
        color: #fff;
    }

    .menu-container .categorias-grid.categorias-grid-2col {
        grid-template-columns: repeat(2, 1fr);
    }

    .categoria-card .categoria-indicator {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
        justify-content: center;
    }

    .categoria-card .categoria-action {
        margin-top: 0.2rem;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Misma alineación que Home: una fila, título a la izquierda, botón a la derecha */
    .menu-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }
    
    .menu-header-left {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .menu-title-section {
        align-items: flex-start;
        min-width: 0;
    }
    
    .btn-back {
        font-size: 1.8rem;
        min-width: 45px;
        height: 45px;
        flex-shrink: 0;
    }
    
    .menu-title {
        font-size: 1.1rem;
    }
    
    .menu-actions {
        flex: 0 0 auto;
        justify-content: flex-end;
        gap: 0.5rem;
    }
    
    .btn-ver-orden,
    .btn-inicio {
        flex: 0 0 auto;
        justify-content: center;
        max-width: none;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .btn-inicio i {
        font-size: 1.1rem;
    }
    
    /* Ocultar texto "Menú" en móvil pequeño */
    .btn-menu-text {
        display: none;
    }
    
    .menu-content {
        padding: 0.5rem;
    }
    
    .menu-container .categorias-grid {
        gap: 0.4rem;
    }
    
    .categoria-card {
        padding: 0.5rem;
    }

    .categoria-card .categoria-icon img,
    .categoria-card .categoria-iniciales {
        max-width: 52px;
        height: 52px;
    }

    .categoria-card .categoria-iniciales {
        font-size: 0.75rem;
    }

    .categoria-card .categoria-descripcion {
        font-size: 0.88rem;
    }

    .menu-container .producto-nombre {
        font-size: 0.88rem;
    }

    .menu-container .productos-grid.productos-grid-2col .producto-nombre {
        font-size: 1rem;
    }

    .menu-container .categorias-grid.categorias-grid-2col .categoria-card .categoria-descripcion {
        font-size: 1rem;
    }

    .producto-card {
        padding: 1rem;
    }

    .menu-container .producto-card {
        padding: 0;
    }
    
    .breadcrumb {
        padding: 0.75rem 1rem;
    }

    .breadcrumb-item {
        font-size: 0.9rem;
    }

    .breadcrumb-separator {
        font-size: 0.6rem;
    }

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

@media (max-width: 380px) {
    .btn-back {
        font-size: 1.6rem;
        min-width: 40px;
        height: 40px;
        margin-left: -0.25rem;
    }
    
    .menu-title {
        font-size: 1rem;
    }

    .mesero-info {
        font-size: 0.6rem !important;
        letter-spacing: 0.06em !important;
        margin-top: 0.05rem;
    }
    
    .menu-content {
        padding: 0.5rem;
    }
    
    .categoria-card,
    .producto-card {
        padding: 0.75rem;
    }

    .menu-container .producto-card {
        padding: 0;
    }
    
    .categoria-icon,
    .producto-icon {
        font-size: 1.5rem;
        min-width: 40px;
    }
    
    .producto-icon img,
    .producto-nombre-placeholder {
        width: 80px;
        height: 80px;
        font-size: 0.6rem;
    }

    .categoria-card .categoria-icon img,
    .categoria-card .categoria-iniciales {
        max-width: 48px;
        height: 48px;
    }

    .categoria-card .categoria-iniciales {
        font-size: 0.5rem;
    }
    
    .categoria-nombre,
    .producto-nombre {
        font-size: 0.8rem;
    }
    
    .breadcrumb {
        padding: 0.6rem 0.75rem;
    }

    .breadcrumb-item {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }

    .breadcrumb-separator {
        font-size: 0.55rem;
    }

    .section-header {
        padding: 0.75rem 0;
        /*margin-bottom: 1rem;*/
    }

    .section-title {
        font-size: 0.85rem;
    }

    .categorias-count,
    .productos-count {
        font-size: 0.8rem;
        padding: 0.35rem 0.85rem;
    }

    .categoria-card .categoria-descripcion {
        font-size: 0.8rem;
    }

    .menu-container .productos-grid.productos-grid-2col .producto-nombre {
        font-size: 0.95rem;
    }

    .menu-container .categorias-grid.categorias-grid-2col .categoria-card .categoria-descripcion {
        font-size: 0.95rem;
    }

    .categoria-card .categoria-indicator {
        font-size: 0.55rem;
        padding: 0.12rem 0.35rem;
    }
}

/* Estilos para escritorio */
@media (min-width: 769px) {
    .menu-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem 100px 2rem;
    }

    .menu-container .home-footer {
        max-width: 1200px;
    }
    
    .menu-header {
        padding-top: var(--app-header-pad-top);
        padding-bottom: var(--app-header-pad-bottom);
        padding-left: var(--app-header-pad-x);
        padding-right: var(--app-header-pad-x);
        margin-bottom: 1rem;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .menu-header-left {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .menu-actions {
        margin-left: auto;
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-end;
    }
    
    .btn-back {
        font-size: 2.2rem;
        min-width: 55px;
        height: 55px;
    }
    
    .menu-title {
        font-size: 1.6rem;
    }
    
    .btn-inicio {
        background: transparent !important;
        background-color: transparent !important;
        color: var(--text-primary) !important;
        border-color: var(--text-primary) !important;
        border: 2px solid var(--text-primary) !important;
    }
    
    .btn-inicio i {
        color: var(--text-primary) !important;
    }
    
    .btn-menu-text {
        color: var(--text-primary) !important;
    }

    .menu-container .home-footer {
        padding: 1rem 1.25rem;
    }
    
    .menu-container .open-table-button {
        padding: 1.05rem 1.35rem;
        font-size: 1.05rem;
        border-radius: 10px;
    }
    
    /* Mostrar texto "Menú" en escritorio */
    .btn-menu-text {
        display: inline;
    }
    
    .menu-content {
        padding: 0 2rem 2rem 2rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .menu-container .categorias-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.25rem;
    }
    
    .menu-container .productos-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.25rem;
    }

    .menu-container .productos-grid.vista-productos-filas {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .menu-container .producto-card {
        padding: 0;
        border-radius: 18px;
    }

    .menu-container .producto-info {
        padding: 1rem 1.1rem 0.5rem;
    }

    .menu-container .producto-nombre {
        font-size: 1.1rem;
        /* Sin line-clamp — mostrar nombre completo como MesaQR */
        -webkit-line-clamp: unset;
        display: block;
    }

    .menu-container .producto-action .action-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }
    
    .categoria-card,
    .producto-card {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .producto-icon img,
    .producto-nombre-placeholder {
        width: 100%;
        height: 60px;
        font-size: 0.8rem;
    }

    .categoria-icon img,
    .categoria-iniciales {
        width: 64px;
        height: 64px;
    }

    .categoria-iniciales {
        font-size: 1rem;
    }
    
    .no-content-message {
        padding: 4rem;
        border-radius: 16px;
    }
    
    /* Estilos para botones del modal en escritorio */
    .modal-actions {
        justify-content: center;
        gap: 1rem;
    }
    
    .btn-aceptar,
    .btn-cancelar {
        padding: 0.75rem 2rem;
        font-size: 1rem;
        min-width: 120px;
        max-width: 200px;
    }
}

/* Tablet: 3 columnas productos */
@media (min-width: 769px) and (max-width: 1023px) {
    .menu-container .productos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .menu-container .productos-grid.vista-productos-filas {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    
    .menu-container .producto-nombre {
        font-size: 1.15rem;
    }
}

/* Estilos para pantallas muy grandes */
@media (min-width: 1200px) {
    .menu-container {
        max-width: 1400px;
    }

    .menu-container .home-footer {
        max-width: 1400px;
    }

    .section-title {
        font-size: 1.4rem;
    }
    
    .menu-container .categorias-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
    }
    
    .menu-container .productos-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
    }

    .menu-container .productos-grid.vista-productos-filas {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .menu-container .producto-nombre {
        font-size: 1.15rem;
    }
}

/* Estilos para el Modal de Detalle de Producto */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(6px);
    }
}

[data-theme='dark'] .modal-overlay {
    background: rgba(0, 0, 0, 0.65);
}

.modal-producto {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-primary);
    position: relative;
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .modal-producto {
    background: #1e293b !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155;
}

/* Estilos para el Modal de Imagen del Producto */
.modal-imagen-producto {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalAppear 0.3s ease-out;
    color: var(--text-primary);
}

.modal-body-imagen {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.imagen-producto-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--menu-bg);
    border-radius: 8px;
    padding: 1rem;
    min-height: 300px;
}

.imagen-producto-full {
    max-width: 100%;
    max-height: 60vh;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.descripcion-producto-container {
    padding: 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.descripcion-titulo {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.descripcion-texto {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.producto-sin-imagen-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--menu-bg);
    border-radius: 8px;
    padding: 2rem;
    min-height: 300px;
}

.producto-nombre-placeholder-large {
    background: linear-gradient(135deg, var(--primary-color), #2c3e50);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    box-shadow: var(--shadow-light);
    max-width: 100%;
    word-wrap: break-word;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c3e50 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

[data-theme='dark'] .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
}

.btn-cerrar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cerrar:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.05);
}

.btn-cerrar:active {
    transform: rotate(90deg) scale(0.95);
}

.modal-body {
    padding: 1.75rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.producto-detalle-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.producto-detalle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--input-bg) 0%, var(--card-bg) 100%);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.producto-detalle-row:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

[data-theme='dark'] .producto-detalle-row {
    background: linear-gradient(135deg, #283040 0%, #1e293b 100%);
    border-color: #334155;
}

[data-theme='dark'] .producto-detalle-row:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 86, 164, 0.2);
}

.producto-detalle-row label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.producto-detalle-valor {
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1rem;
}

.producto-detalle-nombre {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c3e50 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

[data-theme='dark'] .producto-detalle-nombre {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    box-shadow: 0 6px 20px rgba(0, 86, 164, 0.3);
}

.producto-detalle-precio {
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 700;
    color: #27ae60;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.15);
}

[data-theme='dark'] .producto-detalle-precio {
    color: #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
    border-color: rgba(76, 175, 80, 0.3);
}

.producto-detalle-existencia {
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
    color: #f39c12;
    font-size: 1rem;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #ffd93d;
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.15);
}

[data-theme='dark'] .producto-detalle-existencia {
    color: #ffa726;
    background: linear-gradient(135deg, rgba(255, 167, 38, 0.2) 0%, rgba(255, 167, 38, 0.1) 100%);
    border-color: rgba(255, 167, 38, 0.3);
}

.producto-detalle-cantidad {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(22, 22, 94, 0.03) 0%, rgba(22, 22, 94, 0.01) 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: relative;
}

.producto-detalle-cantidad::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #2c3e50);
    border-radius: 12px 12px 0 0;
}

[data-theme='dark'] .producto-detalle-cantidad {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.06) 100%);
    border-color: var(--primary-color);
}

[data-theme='dark'] .producto-detalle-cantidad::before {
    background: linear-gradient(90deg, var(--primary-color), #1e293b);
}

.producto-detalle-cantidad label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.cantidad-info-badge {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(22, 22, 94, 0.05) 0%, rgba(22, 22, 94, 0.02) 100%);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 0.75rem;
}

[data-theme='dark'] .cantidad-info-badge {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.06) 100%);
    border-color: #334155;
}

.cantidad-actual-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.cantidad-actual-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Consolas', 'Monaco', monospace;
    background: var(--card-bg);
    padding: 0.4rem 0.875rem;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme='dark'] .cantidad-actual-value {
    color: var(--primary-light);
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--primary-color);
}

.cantidad-diferencia {
    font-size: 0.925rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    margin-left: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    letter-spacing: 0.3px;
}

.cantidad-diferencia.diferencia-positiva {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
}

[data-theme='dark'] .cantidad-diferencia.diferencia-positiva {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.25) 0%, rgba(76, 175, 80, 0.15) 100%);
    color: #4caf50;
    border-color: #4caf50;
}

.cantidad-diferencia.diferencia-negativa {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #dc3545;
}

[data-theme='dark'] .cantidad-diferencia.diferencia-negativa {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.25) 0%, rgba(244, 67, 54, 0.15) 100%);
    color: #f44336;
    border-color: #f44336;
}

.cantidad-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.btn-cantidad {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    position: relative;
}

.btn-cantidad::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3), rgba(41, 128, 185, 0.3));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-cantidad:hover::before {
    opacity: 1;
}

[data-theme='dark'] .btn-cantidad {
    background: linear-gradient(135deg, var(--btn-primary) 0%, var(--btn-primary-hover) 100%);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.35);
}

[data-theme='dark'] .btn-cantidad::before {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.35), rgba(53, 122, 189, 0.35));
}
    box-shadow: var(--shadow-light);
}

[data-theme='dark'] .btn-cantidad {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Dark mode support para cantidad info badge */
[data-theme='dark'] .cantidad-info-badge {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-color: #4a5568;
}

[data-theme='dark'] .cantidad-actual-label {
    color: #a0aec0;
}

[data-theme='dark'] .cantidad-actual-value {
    background: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme='dark'] .cantidad-diferencia.diferencia-positiva {
    background: #22543d;
    color: #9ae6b4;
    border-color: #2f855a;
}

[data-theme='dark'] .cantidad-diferencia.diferencia-negativa {
    background: #742a2a;
    color: #fc8181;
    border-color: #9b2c2c;
}

.btn-cantidad:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.45);
}

[data-theme='dark'] .btn-cantidad:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--btn-primary-hover) 0%, #2c3e50 100%);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.45);
}

.btn-cantidad:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

[data-theme='dark'] .btn-cantidad:disabled {
    background: #3d3d3d;
    color: #757575;
}

.cantidad-display {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
}

[data-theme='dark'] .cantidad-display {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(147, 197, 253, 0.4);
}

.modal-actions {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    justify-content: center;
}

[data-theme='dark'] .modal-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.btn-aceptar {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #fff;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    letter-spacing: 0.3px;
}

.btn-aceptar:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.45);
}

.btn-aceptar:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

[data-theme='dark'] .btn-aceptar {
    background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

[data-theme='dark'] .btn-aceptar:hover:not(:disabled) {
    background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.btn-aceptar:disabled {
    background: #d6d6d6;
    color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-cancelar {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    letter-spacing: 0.3px;
}

.btn-cancelar:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.45);
}

.btn-cancelar:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

[data-theme='dark'] .btn-cancelar {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

[data-theme='dark'] .btn-cancelar:hover:not(:disabled) {
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
}

.btn-cancelar:disabled {
    background: #d6d6d6;
    color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

[data-theme='dark'] .btn-aceptar:disabled,
[data-theme='dark'] .btn-cancelar:disabled {
    background: #3b4557;
    color: #94a3b8;
    opacity: 0.5;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: var(--danger-color);
}

/* Estilos para el campo de observaciones */
.observaciones-section {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.observaciones-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.observaciones-toggle:hover {
    color: var(--primary-color);
}

.observaciones-toggle .toggle-icon {
    transition: transform 0.2s;
}

.observaciones-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.observaciones-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
    margin-top: 0.5rem;
}

.observaciones-content.expanded {
    max-height: 200px;
}

.observaciones-input {
    width: 100% !important;
    padding: 0.75rem !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 8px !important;
    background: var(--input-bg) !important;
    color: var(--input-text) !important;
    font-size: 0.9rem !important;
    resize: vertical;
    min-height: 100px !important;
    transition: all 0.2s;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
}

.observaciones-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

[data-theme='dark'] .observaciones-input {
    background: var(--input-bg) !important;
    color: var(--input-text) !important;
    border-color: var(--input-border) !important;
}

/* Asegurar fondo blanco en modo claro */
:not([data-theme='dark']) .observaciones-input {
    background: #ffffff !important;
    border-color: #ced4da !important;
    color: #333333 !important;
}

[data-theme='dark'] .observaciones-input:focus {
    border-color: var(--primary-color);
}

/* Estilos para observaciones - texto libre */
.observaciones-texto-libre {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-agregar-observacion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-agregar-observacion:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-agregar-observacion i {
    font-size: 0.85rem;
}

.campo-texto-observaciones {
    margin-top: 0.75rem;
    animation: fadeIn 0.3s ease-in;
    width: 100%;
    display: block !important;
    padding: 0.5rem 0;
    visibility: visible !important;
}

.campo-texto-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.observaciones-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.observaciones-input-display {
    flex: 1;
    min-height: 40px;
    max-height: 80px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--input-text);
    font-size: 0.9rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-y: auto;
    line-height: 1.4;
}

.observaciones-placeholder {
    color: #999;
    font-style: italic;
}

.btn-editar-observaciones {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-editar-observaciones:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-editar-observaciones i {
    font-size: 1.1rem;
}

[data-theme='dark'] .observaciones-input-display {
    background: var(--input-bg);
    color: var(--input-text);
    border-color: var(--input-border);
}

[data-theme='dark'] .observaciones-placeholder {
    color: #888;
}

/* Asegurar fondo blanco en modo claro para el display */
:not([data-theme='dark']) .observaciones-input-display {
    background: #ffffff !important;
    border-color: #ced4da !important;
    color: #333333 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-theme='dark'] .btn-agregar-observacion {
    background: var(--primary-color);
}

[data-theme='dark'] .btn-agregar-observacion:hover {
    background: #4a90e2;
}

[data-theme='dark'] .observaciones-texto-libre {
    border-top-color: var(--border-color);
}

[data-theme='dark'] .producto-detalle-observaciones label {
    color: #e2e8f0;
}

.btn-toggle-observaciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(0, 86, 164, 0.06) 0%, rgba(0, 86, 164, 0.02) 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-toggle-observaciones:hover {
    background: linear-gradient(135deg, rgba(0, 86, 164, 0.12) 0%, rgba(0, 86, 164, 0.06) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 86, 164, 0.1);
}

.btn-toggle-obs-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-toggle-obs-label i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.btn-toggle-obs-icon {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.btn-toggle-observaciones.expanded .btn-toggle-obs-icon {
    transform: rotate(180deg);
}

[data-theme='dark'] .btn-toggle-observaciones {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.04) 100%);
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme='dark'] .btn-toggle-observaciones:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

[data-theme='dark'] .btn-toggle-obs-label i {
    color: #93c5fd;
}

[data-theme='dark'] .btn-toggle-obs-icon {
    color: #94a3b8;
}

[data-theme='dark'] .campo-texto-label {
    color: #cbd5e1;
}

/* Responsividad para el modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0.75rem;
    }
    
    .modal-producto,
    .modal-imagen-producto {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 14px;
    }
    
    .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .modal-header h3 {
        font-size: 1.15rem;
    }
    
    .btn-cerrar {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
    
    .modal-body,
    .modal-body-imagen {
        padding: 1.25rem 1rem;
    }
    
    .producto-detalle-nombre {
        font-size: 1.05rem;
        padding: 1rem 1.25rem;
    }
    
    .producto-detalle-row {
        padding: 0.875rem 1rem;
    }
    
    .producto-detalle-cantidad {
        padding: 1rem;
    }
    
    .btn-cantidad {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .cantidad-display {
        font-size: 1.35rem;
        min-width: 70px;
        padding: 0.4rem 0.75rem;
    }
    
    .modal-actions {
        flex-direction: row;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1.25rem;
    }
    
    .btn-aceptar,
    .btn-cancelar {
        flex: 1;
        min-width: 0;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .imagen-producto-full {
        max-height: 50vh;
    }
    
    .imagen-producto-container {
        min-height: 200px;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 0.875rem 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.05rem;
    }
    
    .btn-cerrar {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 1rem 0.875rem;
    }
    
    .producto-detalle-nombre {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .producto-detalle-row {
        padding: 0.75rem 0.875rem;
    }
    
    .cantidad-controls {
        gap: 1rem;
    }
    
    .btn-cantidad {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .cantidad-display {
        min-width: 50px;
        font-size: 1rem;
    }

    .cantidad-info-badge {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cantidad-actual-label {
        font-size: 0.75rem;
    }

    .cantidad-actual-value {
        font-size: 0.9rem;
        padding: 0.2rem 0.5rem;
    }

    .cantidad-diferencia {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Dark mode support */
[data-theme='dark'] .cantidad-info-badge {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-color: #4a5568;
}

[data-theme='dark'] .cantidad-actual-label {
    color: #a0aec0;
}

[data-theme='dark'] .cantidad-actual-value {
    background: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme='dark'] .cantidad-diferencia.diferencia-positiva {
    background: #22543d;
    color: #9ae6b4;
    border-color: #2f855a;
}

[data-theme='dark'] .cantidad-diferencia.diferencia-negativa {
    background: #742a2a;
    color: #fc8181;
    border-color: #9b2c2c;
}

/* ===== Estilos para el Modal de Detalle de Kit (FASE 5) ===== */
.modal-detalle-kit {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalAppear 0.3s ease-out;
    color: var(--text-primary);
    position: relative;
}

/* Modo claro: contenedor y cuerpo explícitos */
.modal-detalle-kit .modal-body {
    background: var(--card-bg);
    color: var(--text-primary);
}

.modal-detalle-kit .modal-header {
    background: var(--primary-color);
    color: #fff;
}

.modal-detalle-kit .modal-header h3 {
    color: #fff;
}

.modal-detalle-kit .btn-cerrar {
    color: #fff;
}

.modal-detalle-kit .btn-cerrar:hover {
    background: rgba(255, 255, 255, 0.2);
}

.kit-detalle-container {
 /*   padding: 0.75rem;*/
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Información compacta del kit */
.kit-info-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 0.5rem;
}

.kit-nombre {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.kit-cantidad {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    background: rgba(22, 22, 94, 0.1);
    border-radius: 4px;
}

/* Estilos modo oscuro para kit cantidad */
[data-theme='dark'] .kit-cantidad {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-light);
}

/* Lista de componentes (diseño móvil) */
.kit-componentes-lista {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.componente-item {
    background: var(--input-bg);
    border-radius: 6px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

[data-theme='dark'] .componente-item {
    background: var(--input-bg);
    border-color: var(--border-color);
}

.componente-item.componente-categoria {
    background: rgba(180, 180, 240, 0.3);
    border-color: rgba(0, 0, 128, 0.3);
    cursor: pointer;
}

.componente-item.componente-categoria:hover {
    background: rgba(180, 180, 240, 0.5);
}

.componente-item.componente-categoria.categoria-seleccionada {
    background: rgba(180, 180, 240, 0.6);
    border-color: var(--primary-color);
    border-width: 2px;
}

/* Estilos modo oscuro para componentes de categoría */
[data-theme='dark'] .componente-item.componente-categoria {
    background: rgba(59, 130, 246, 0.18);
    border-color: #334155;
}

[data-theme='dark'] .componente-item.componente-categoria:hover {
    background: rgba(59, 130, 246, 0.28);
}

[data-theme='dark'] .componente-item.componente-categoria.categoria-seleccionada {
    background: rgba(59, 130, 246, 0.35);
    border-color: var(--primary-color);
}

/* Estilos para componentes de artículo seleccionados */
.componente-item.componente-articulo.componente-seleccionado,
.componente-item.componente-seleccionado {
    background: rgba(180, 180, 240, 0.6);
    border-color: var(--primary-color);
    border-width: 2px;
}

[data-theme='dark'] .componente-item.componente-articulo.componente-seleccionado,
[data-theme='dark'] .componente-item.componente-seleccionado {
    background: rgba(59, 130, 246, 0.35);
    border-color: var(--primary-color);
}

/* Hacer los componentes clickeables */
.componente-item.componente-articulo,
.componente-item {
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.componente-item.componente-articulo:hover,
.componente-item:hover {
    background: rgba(180, 180, 240, 0.4);
}

[data-theme='dark'] .componente-item.componente-articulo:hover,
[data-theme='dark'] .componente-item:hover {
    background: rgba(59, 130, 246, 0.25);
}

.componente-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.componente-codigo {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
    min-width: 60px;
}

.componente-nombre {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    word-break: break-word;
}

.componente-cantidad {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-width: 50px;
    text-align: right;
}

.componente-estados {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.25rem;
}

.estado-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.estado-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.estado-item strong .status-badge {
   /* margin-left: 0.25rem;*/
}

/* Estilos generales para badges de estado (SI/NO) - aplican a mobile y desktop */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    min-width: 32px;
    letter-spacing: 0.5px;
    background-color: transparent;
}

.status-badge.status-si {
    background-color: transparent;
    color: #28a745;
    border: 1.5px solid #28a745;
}

    .status-badge.status-no {
        background-color: transparent;
        color: #6c757d;
        border: 1.5px solid #6c757d;
        font-size: 10px;
    }

.status-badge.status-na {
    background-color: transparent;
    color: #6c757d;
    border: 1.5px solid #e9ecef;
}

/* Modo oscuro para badges */
[data-theme='dark'] .status-badge.status-si {
    background-color: transparent;
    color: #4caf50;
    border: 1.5px solid #4caf50;
}

[data-theme='dark'] .status-badge.status-no {
    background-color: transparent;
    color: #9e9e9e;
    border: 1.5px solid #9e9e9e;
}

[data-theme='dark'] .status-badge.status-na {
    background-color: transparent;
    color: #b0b0b0;
    border: 1.5px solid #5a5a5a;
}

.sin-componentes {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

[data-theme='dark'] .sin-componentes {
    color: var(--text-secondary);
}

/* Drawer de botones de acción (deslizable desde abajo) */
.kit-actions-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 2px solid var(--primary-color);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(calc(100% - 50px));
    transition: transform 0.3s ease-out;
    z-index: 1000;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.kit-actions-drawer.drawer-abierto {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 0.5rem;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: calc(70vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drawer-toggle {
    width: 100%;
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.drawer-toggle:hover {
    background: var(--btn-primary-hover);
}

.drawer-toggle i {
    transition: transform 0.3s ease;
}

.kit-footer-salir:has(.drawer-abierto) .drawer-toggle i {
    transform: rotate(180deg);
}

.drawer-content {
    padding: 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.drawer-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.btn-kit-action {
    padding: 0.6rem 0.75rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.btn-kit-action:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

.btn-kit-action:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.btn-kit-action:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

/* Estilos modo oscuro para modales de kit - paleta slate */
[data-theme='dark'] .modal-detalle-kit,
[data-theme='dark'] .modal-productos-kit {
    background: #1e293b !important;
    border: 1px solid #334155;
}

/* Barra Anterior/Siguiente y footer del modal de productos del kit: mismo color oscuro slate */
[data-theme='dark'] .modal-productos-kit .navegacion-productos-kit {
    background: #243044 !important;
    border-top-color: #334155;
}

[data-theme='dark'] .modal-productos-kit .modal-footer {
    background: #243044 !important;
    border-top: 1px solid #334155;
}

[data-theme='dark'] .modal-productos-kit .btn-nav:disabled {
    background: #3b4557;
    color: #94a3b8;
    opacity: 0.7;
}

[data-theme='dark'] .modal-detalle-kit .modal-body {
    background: #1e293b !important;
    color: var(--text-primary);
}

[data-theme='dark'] .modal-detalle-kit .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    color: #fff;
    border-bottom: 1px solid #334155;
}

[data-theme='dark'] .modal-detalle-kit .modal-header h3,
[data-theme='dark'] .modal-detalle-kit .btn-cerrar {
    color: #fff;
}

[data-theme='dark'] .modal-detalle-kit .btn-cerrar:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme='dark'] .kit-info-compact {
    border-bottom-color: var(--primary-color);
}

[data-theme='dark'] .kit-info-row {
    border-bottom-color: var(--border-color);
}

[data-theme='dark'] .kit-detalle-valor {
    color: var(--text-secondary);
}

[data-theme='dark'] .btn-kit-action:disabled {
    background: #3b4557;
    color: #94a3b8;
    opacity: 0.6;
    box-shadow: none;
}

[data-theme='dark'] .btn-kit-action:not(:disabled) {
    background: linear-gradient(135deg, var(--btn-primary) 0%, var(--btn-primary-hover) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 86, 164, 0.35);
}

[data-theme='dark'] .btn-kit-action:not(:disabled):hover {
    background: linear-gradient(135deg, var(--btn-primary-hover) 0%, #1e293b 100%);
    box-shadow: 0 4px 12px rgba(0, 86, 164, 0.45);
}

[data-theme='dark'] .btn-kit-action:not(:disabled):active {
    box-shadow: 0 2px 6px rgba(0, 86, 164, 0.35);
}

[data-theme='dark'] .kit-actions-drawer {
    background: var(--card-bg);
    border-top-color: var(--primary-color);
    border-color: var(--border-color);
}

[data-theme='dark'] .kit-actions-mobile {
    background: var(--card-bg);
    border-top-color: var(--primary-color);
}

[data-theme='dark'] .kit-footer-salir {
    background: var(--card-bg);
    border-top-color: var(--border-color);
}

[data-theme='dark'] .btn-salir-full,
[data-theme='dark'] .btn-salir {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
}

[data-theme='dark'] .btn-salir-full:hover,
[data-theme='dark'] .btn-salir:hover {
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.5);
}

[data-theme='dark'] .btn-salir-full:active,
[data-theme='dark'] .btn-salir:active {
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.4);
}

[data-theme='dark'] .kit-modal-footer {
    border-top-color: var(--border-color);
}

[data-theme='dark'] .kit-actions-drawer.drawer-abierto {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme='dark'] .drawer-content {
    color: var(--text-primary);
}

[data-theme='dark'] .drawer-toggle {
    background: var(--primary-color);
}

[data-theme='dark'] .drawer-toggle:hover {
    background: var(--btn-primary-hover);
}

/* Botones fijos para móvil */
.kit-actions-mobile {
    display: none; /* Oculto por defecto, se muestra en mobile */
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border-top: 2px solid var(--primary-color);
    position: relative;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.kit-buttons-grid-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

/* Footer con botón Salir de ancho completo */
.kit-footer-salir {
    padding: 0.5rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    z-index: 100;
    margin-top: auto;
    display: none; /* Ocultar en mobile ya que ahora usamos kit-actions-mobile */
}

.btn-salir-full {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.35);
}

.btn-salir-full:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.45);
}

.btn-salir-full:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.35);
}

/* Estilos para desktop (mantener tabla original) */
@media (min-width: 769px) {
    .kit-detalle-container {
      /*  padding: 1.5rem;*/
        gap: 0;
        display: flex;
        flex-direction: column;
    }

    .kit-info-compact {
        display: none;
    }
    
    .kit-info-desktop {
        display: block;
        margin-bottom: 1rem;
        width: 100%;
    }
    
    /* Contenedor para tabla y botones lado a lado */
    .kit-content-wrapper {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 1.5rem;
        align-items: start;
        width: 100%;
    }
    
    .kit-info-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .kit-info-left {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .kit-info-right {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .kit-info-row label {
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .kit-info-left label {
        min-width: 100px;
    }

    .kit-detalle-valor {
        color: var(--text-secondary);
        font-size: 1rem;
    }

    .kit-componentes-lista {
        display: none;
    }

    /* Mostrar tabla en desktop - a la izquierda */
    .kit-componentes-tabla {
        display: block;
        width: 100%;
        overflow-x: auto;
        overflow-y: auto;
        max-height: calc(90vh - 250px);
        grid-column: 1;
        align-self: start; /* Alinear desde arriba */
        position: relative;
    }
    
    .kit-componentes-tabla .tabla-componentes {
        width: 100%;
        border-collapse: collapse;
    }
    
    .kit-componentes-tabla .tabla-componentes thead {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--primary-color);
    }
    
    .kit-componentes-tabla .tabla-componentes thead th {
        background: var(--primary-color);
        color: white;
        padding: 0.75rem;
        text-align: left;
        font-weight: 600;
        border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    /* Ocultar drawer en desktop */
    .kit-actions-drawer {
        display: none !important;
    }
    
    .drawer-toggle {
        display: none !important;
    }

    .tabla-componentes {
        width: 100%;
        border-collapse: collapse;
        background: var(--input-bg);
        border-radius: 8px;
        overflow: hidden;
    }

    .tabla-componentes thead {
        background: var(--primary-color);
        color: white;
    }

    [data-theme='dark'] .tabla-componentes thead,
    [data-theme='dark'] .kit-componentes-tabla .tabla-componentes thead {
        background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    }

    [data-theme='dark'] .tabla-componentes thead th,
    [data-theme='dark'] .kit-componentes-tabla .tabla-componentes thead th {
        background: transparent;
        color: #fff;
        border-bottom-color: rgba(255, 255, 255, 0.15);
    }

    .tabla-componentes th {
        padding: 0.75rem;
        text-align: left;
        font-weight: 600;
        font-size: 0.9rem;
    }

    .tabla-componentes tbody tr {
        border-bottom: 1px solid var(--border-color);
        transition: background-color 0.2s ease;
    }

    .tabla-componentes tbody tr:hover {
        background-color: rgba(22, 22, 94, 0.05);
    }

    [data-theme='dark'] .tabla-componentes tbody tr:hover {
        background-color: rgba(59, 130, 246, 0.12);
    }

    .tabla-componentes tbody tr.fila-categoria {
        background-color: rgba(180, 180, 240, 0.3);
        color: rgba(0, 0, 128, 0.9);
        font-weight: 600;
        cursor: pointer;
    }
    
    /* Estilos modo oscuro para tabla de categorías */
    [data-theme='dark'] .tabla-componentes tbody tr.fila-categoria {
        background-color: rgba(59, 130, 246, 0.18);
        color: #cbd5e1;
    }
    
    [data-theme='dark'] .tabla-componentes tbody tr.fila-categoria:hover {
        background-color: rgba(59, 130, 246, 0.28);
    }
    
    [data-theme='dark'] .tabla-componentes tbody tr.fila-seleccionada {
        background-color: rgba(59, 130, 246, 0.35);
    }

    .tabla-componentes td {
        padding: 0.75rem;
        color: var(--text-secondary);
        font-size: 0.9rem;
    }

    [data-theme='dark'] .tabla-componentes td {
        color: var(--text-secondary);
        border-bottom-color: var(--border-color);
    }

    [data-theme='dark'] .tabla-componentes tbody tr {
        border-bottom-color: var(--border-color);
    }

    /* Badges de estado para SI/NO en la tabla */
    .status-badge {
        display: inline-block;
        padding: 0.25rem 0.5rem;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 600;
        text-align: center;
        min-width: 32px;
        letter-spacing: 0.5px;
    }

    .status-badge.status-si {
        background-color: transparent;
        color: #28a745;
        border: 1.5px solid #28a745;
    }

    .status-badge.status-no {
        background-color: transparent;
        color: #6c757d;
        border: 1.5px solid #6c757d;
    }

    .status-badge.status-na {
        background-color: transparent;
        color: #6c757d;
        border: 1.5px solid #e9ecef;
    }

    /* Modo oscuro para badges */
    [data-theme='dark'] .status-badge.status-si {
        background-color: transparent;
        color: #4caf50;
        border: 1.5px solid #4caf50;
    }

    [data-theme='dark'] .status-badge.status-no {
        background-color: transparent;
        color: #9e9e9e;
        border: 1.5px solid #9e9e9e;
    }

    [data-theme='dark'] .status-badge.status-na {
        background-color: transparent;
        color: #b0b0b0;
        border: 1.5px solid #5a5a5a;
    }

    .kit-footer-salir {
        display: none;
    }

    /* Mostrar botones de acción en desktop - a la derecha */
    .kit-content-wrapper {
        display: grid !important;
    }

    .kit-modal-actions {
        grid-column: 2;
        display: block;
        padding: 0;
        border-top: none;
        align-self: start; /* Alinear desde arriba con la tabla */
        width: 200px;
    }

    .kit-actions-left {
        display: none; /* Ocultar en desktop */
    }

    .kit-actions-right {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        min-width: 200px;
    }

    .btn-kit-action {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .kit-modal-footer {
        display: flex;
        justify-content: flex-end;
        padding: 1rem;
      
        border-top: 1px solid var(--border-color);
        margin-top: 1rem;
        width: 100%;
    }

    .btn-salir {
        padding: 0.75rem 2rem;
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        color: #fff;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        font-weight: 600;
        transition: all 0.25s ease;
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.35);
    }
    
    .btn-salir:hover {
        background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.45);
    }
    
    .btn-salir:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(220, 53, 69, 0.35);
    }
}

/* Ocultar tabla y botones tradicionales en móvil */
@media (max-width: 768px) {
    .kit-content-wrapper {
        display: block !important;
    }
    
    .kit-componentes-tabla {
        display: none;
    }
    
    .kit-info-desktop {
        display: none !important;
    }
    
    .kit-modal-actions {
        display: none !important;
    }
    
    .kit-modal-footer {
        display: none !important;
    }
    
    .kit-actions-mobile {
        display: flex;
    }
    
    .kit-footer-salir {
        display: none;
    }
    
    .kit-detalle-container {
        display: flex;
        flex-direction: column;
        max-height: calc(90vh - 100px);
        overflow: hidden;
        padding-bottom: 0;
    }
    
    .kit-componentes-lista {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 0.5rem;
    }
    
    .kit-actions-mobile {
        display: flex !important;
        margin-top: 0.5rem;
    }
}

@media (min-width: 769px) {
    .kit-actions-mobile {
        display: none !important;
    }
}

/* ==================== MODAL DE CAMBIO DE CATEGORÍA (FrmKitCambioCategoria) ==================== */

.modal-cambio-categoria {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalAppear 0.3s ease-out;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

.cambio-categoria-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.categorias-destino-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.categoria-destino-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    justify-content: flex-start;
}

.btn-categoria-destino {
    width: 100%;
    padding: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-categoria-destino:hover {
    border-color: var(--primary-color);
    background: rgba(22, 22, 94, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.label-aumento {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 200, 255, 0.15);
    border-radius: 4px;
    margin: 0;
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(0, 200, 255, 0.3);
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.label-aumento.label-empty {
    visibility: hidden;
    background: transparent;
    border: none;
}

[data-theme='dark'] .label-aumento {
    background: rgba(0, 200, 255, 0.2);
    border-color: rgba(0, 200, 255, 0.4);
    color: var(--text-primary);
}

.navegacion-categorias {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-nav-categoria {
    padding: 0.75rem 2rem;
    background: var(--btn-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nav-categoria:hover:not(:disabled) {
    background: var(--btn-primary-hover);
    transform: translateY(-2px);
}

.btn-nav-categoria:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 2rem;
    gap: 1.25rem;
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid transparent;
    border-radius: 50%;
    position: relative;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    border-left-color: transparent;
    border-right-color: transparent;
}

[data-theme='dark'] .loading-spinner::before {
    border-top-color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modo oscuro para modal de cambio de categoría */
[data-theme='dark'] .modal-cambio-categoria {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme='dark'] .btn-categoria-destino {
    background: var(--input-bg);
    border-color: var(--border-color);
}

[data-theme='dark'] .btn-categoria-destino:hover {
    background: rgba(63, 81, 181, 0.1);
    border-color: var(--primary-color);
}

/* Responsividad */
@media (max-width: 768px) {
    .modal-cambio-categoria {
        max-width: 95%;
        margin: 0.5rem;
    }
    
    .categorias-destino-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        align-items: start;
    }
    
    .cambio-categoria-container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .categoria-destino-item {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        justify-content: flex-start;
        height: 100%;
    }
    
    .btn-categoria-destino {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 50px;
        width: 100%;
        flex-shrink: 0;
    }
    
    .label-aumento {
        font-size: 0.9rem;
        padding: 0.4rem 0.5rem;
        min-height: 2rem;
        width: 100%;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .label-aumento.label-empty {
        visibility: hidden;
        background: transparent;
        border: none;
    }
}

/* ==================== MODAL DE PRODUCTOS DEL KIT (FrmKitProductos) ==================== */

.modal-productos-kit {
    background: var(--card-bg);
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-medium);
    animation: slideDown 0.3s ease;
    color: var(--text-primary);
}

.productos-kit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    overflow-y: auto;
    max-height: 60vh;
}

.btn-producto-kit {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    min-height: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.btn-producto-kit:hover {
    background: var(--btn-primary);
    color: white;
    border-color: var(--btn-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Estilos modo oscuro para botones de productos del kit */
[data-theme='dark'] .btn-producto-kit {
    background: var(--input-bg);
    border-color: var(--border-color);
}

[data-theme='dark'] .btn-producto-kit:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 86, 164, 0.3);
}

.btn-producto-kit:active {
    transform: translateY(0);
}

.producto-kit-imagen {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.producto-kit-nombre {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.navegacion-productos-kit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.btn-nav {
    padding: 0.5rem 1rem;
    background: var(--btn-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-nav:hover:not(:disabled) {
    background: var(--btn-primary-hover);
}

.btn-nav:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-info {
    font-weight: 600;
    color: var(--text-primary);
}

.mensaje-sin-productos {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Filas seleccionables en tabla de componentes */
.fila-categoria {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fila-categoria:hover {
    background-color: var(--bg-hover);
}

.fila-categoria.fila-seleccionada {
    background-color: #e3f2fd;
    font-weight: 600;
}

[data-theme='dark'] .fila-categoria.fila-seleccionada {
    background-color: rgba(59, 130, 246, 0.35);
    color: var(--text-primary);
}

.btn-kit-action:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.btn-kit-action:disabled:hover {
    background: #e0e0e0;
    transform: none;
    box-shadow: none;
}

/* Footer y contador pendientes en modal productos kit */
.modal-productos-kit .modal-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.kit-productos-pendiente {
    margin-right: auto;
    font-size: 0.9rem;
    color: var(--text-secondary, #555);
}

/* Responsive para Modal de Productos del Kit */
@media (max-width: 768px) {
    .modal-productos-kit {
        max-width: 95%;
        width: 95%;
    }
    
    .productos-kit-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .btn-producto-kit {
        min-height: 80px;
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .navegacion-productos-kit {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Estilos para Modal de Alerta */
.modal-alerta {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.3s ease-out;
    overflow: hidden;
}

.modal-header-alerta {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.modal-header-alerta h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-body-alerta {
    padding: 2rem;
    text-align: center;
}

.alerta-icon {
    font-size: 4rem;
    color: #ff5252;
    margin-bottom: 1rem;
    animation: pulse 1s ease-in-out infinite;
}

.alerta-mensaje {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

.modal-footer-alerta {
    padding: 1rem 2rem 2rem 2rem;
    text-align: center;
}

.btn-alerta-aceptar {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 3rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(22, 22, 94, 0.3);
}

.btn-alerta-aceptar:hover {
    background: #1a1a78;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 22, 94, 0.4);
}

.btn-alerta-aceptar:active {
    transform: translateY(0);
}

/* Animación de pulsación para el ícono */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Estilos para modo oscuro */
[data-theme='dark'] .modal-alerta {
    background: var(--card-bg-dark);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

[data-theme='dark'] .alerta-mensaje {
    color: var(--text-primary-dark);
}

[data-theme='dark'] .btn-alerta-aceptar {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(187, 134, 252, 0.3);
}

[data-theme='dark'] .btn-alerta-aceptar:hover {
    background: #bb86fc;
    box-shadow: 0 6px 16px rgba(187, 134, 252, 0.5);
}

/* ============================================================================
   Transición de entrada — usa el @keyframes compartido appFadeIn de app.css.
   Solo opacity (sin translateY) porque productos-grid usa justify-content: end
   y las categorías son multi-columna — translateY genera reacomodo lateral.
   ============================================================================ */
@media (prefers-reduced-motion: no-preference) {
    .menu-container {
        animation: appFadeIn 0.28s ease-out both;
    }

    .menu-container .categorias-grid,
    .menu-container .productos-grid {
        animation: appFadeIn 0.32s ease-out both;
    }

    .menu-container .loading-container {
        animation: appFadeIn 0.2s ease-out both;
    }
}

/* ============================================================================
   Botón "Modificadores" del modal de detalle (Menu.razor) — variante de solo
   contorno azul para que NO se confunda con el CTA sólido de Aceptar, que
   comparte la clase base .preview-cta.
   Se usa el selector doble .preview-cta.preview-cta-mod a propósito: la base
   .preview-cta vive en mesaqr-menu.css, que index.html carga DESPUÉS de este
   archivo — con un solo nombre de clase (misma especificidad) ganaría aquélla.
   El padding descuenta los 2px del borde para conservar la altura del sólido.
   ============================================================================ */
.preview-cta.preview-cta-mod {
    background: transparent;
    border: 2px solid #0056A4;
    color: #0056A4;
    box-shadow: none;
    padding: calc(0.95rem - 2px) calc(1.25rem - 2px);
}

.preview-cta.preview-cta-mod:hover {
    background: rgba(0, 86, 164, 0.08);
    border-color: #003E78;
    color: #003E78;
    box-shadow: none;
}

.preview-cta.preview-cta-mod:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

[data-theme='dark'] .preview-cta.preview-cta-mod {
    background: transparent;
    border-color: #60a5fa;
    color: #93c5fd;
}

[data-theme='dark'] .preview-cta.preview-cta-mod:hover {
    background: rgba(96, 165, 250, 0.12);
    border-color: #93c5fd;
    color: #bfdbfe;
}

/* ───────────────────────────────────────────────────────────────
   2026-10-15: tarjetas de producto del mesero (/menu, vista cuadrícula) con los TAMAÑOS de /cuenta/menu.
   Solo tamaños: colores, textos, vista en filas y el selector de 2/3 columnas del celular quedan igual.
   Antes: foto con mínimo 200–220 px de alto y, en escritorio, 6 por fila estiradas.
   REVERSION: borrar este bloque (respaldo: 26_AppMenu/respaldos/2026-10-15_menu-cliente-antes/menu.css.txt).
   ─────────────────────────────────────────────────────────────── */
.menu-container .productos-grid:not(.vista-productos-filas) .producto-card { border-radius: 14px; }
/* height:auto anula el "height: 70px" genérico de carrito.css, que el mínimo de 200 px tapaba */
.menu-container .productos-grid:not(.vista-productos-filas) .producto-icon {
    aspect-ratio: 4 / 3; min-height: 0; height: auto; max-height: none;
}
.menu-container .productos-grid:not(.vista-productos-filas) .producto-nombre-placeholder { font-size: 0.85rem; padding: 0.75rem; }
.menu-container .productos-grid:not(.vista-productos-filas) .producto-info { padding: 0.65rem 0.8rem 0.2rem; }
.menu-container .productos-grid:not(.vista-productos-filas) .producto-action { padding: 0 0.7rem 0.65rem; }
.menu-container .productos-grid:not(.vista-productos-filas) .producto-action .action-icon { width: 32px; height: 32px; min-width: 32px; }
.menu-container .productos-grid:not(.vista-productos-filas) .producto-action .action-icon i { font-size: 0.85rem; }

/* Escritorio: tarjetas de ~180 px que llenan la fila (como /cuenta/menu) en lugar de 6 estiradas. El celular conserva
   su selector de 2/3 columnas y sus tamaños de letra. */
@media (min-width: 769px) {
    .menu-container .productos-grid:not(.vista-productos-filas) {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    .menu-container .productos-grid:not(.vista-productos-filas) .producto-nombre { font-size: 0.92rem; line-height: 1.2; }
}
