/* ============================================
   SOLUVENCON - SISTEMA DE DOMICILIOS
   Hoja de Estilos Principal (Corregida y Optimizada)
   ============================================ */

/* ============================================
   1. VARIABLES GLOBALES
   ============================================ */
:root {
    /* Colores principales */
    --primary: #E63946;
    /* Rojo principal - acciones urgentes */
    --secondary: #F4A261;
    /* Naranja - acentos cálidos */
    --accent: #2A9D8F;
    /* Verde azulado - éxito/confirmación */
    --dark: #5D4037;
    /* Marrón oscuro - texto principal */
    --light: #FFF8E7;
    /* Crema - fondo */
    --white: #FFFFFF;
    --gray: #6c757d;
    /* Gris medio - texto secundario */

    /* Estados funcionales */
    --success: #28a745;
    /* Verde - entregado/completado */
    --warning: #ffc107;
    /* Amarillo - pendiente/atención */
    --danger: #dc3545;
    /* Rojo oscuro - cancelado/error */
    --info: #17a2b8;
    /* Azul - en camino/información */

    /* Sombras y efectos */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-urgent: 0 10px 30px rgba(230, 57, 70, 0.3);

    /* Dimensiones */
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 50px;

    /* Transiciones */
    --transition: all 0.3s ease;
    --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ============================================
   2. RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   3. HEADER Y NAVEGACIÓN
   ============================================ */
header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2rem;
    color: var(--primary);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--white);
}

/* ============================================
   4. HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    /* SIN margen — main ya lo empuja */
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.hero::before {
    content: '🍔';
    position: absolute;
    font-size: 15rem;
    opacity: 0.10;
    bottom: -50px;
    right: -50px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ============================================
   5. BOTONES
   ============================================ */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

/* Variantes de color */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(230, 57, 70, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--dark);
    border: 2px solid var(--dark);
}

.btn-secondary:hover {
    background: var(--dark);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* Tamaños */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* ============================================
   6. SELECTOR DE ZONA
   ============================================ */
.zone-selector {
    background: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-lg);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1000;
}

.zone-selector i {
    color: var(--primary);
    font-size: 1.2rem;
}

.zone-selector select {
    padding: 0.5rem 1rem;
    border-radius: 30px;
    border: 2px solid var(--accent);
    background: var(--white);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
    display: block;
    width: 100%;
    pointer-events: auto;
}

/* ============================================
   7. GRID DE TIENDAS
   ============================================ */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 2rem 0;
}

.store-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.store-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.store-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.store-badge {
    background: var(--primary);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.store-info {
    padding: 1.5rem;
}

.store-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.store-info p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ★ NUEVA CLASE PARA LA DESCRIPCIÓN DE TIENDA ★ */
.store-desc {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.3rem 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Máximo 2 líneas */
    line-clamp: 2;
    /* Propiedad estándar para compatibilidad */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

.store-rating {
    color: #ffc107;
    margin-top: 0.5rem;
}

.store-img-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

/* ============================================
   8. MENÚ DE PRODUCTOS
   ============================================ */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--dark);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-lg);
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    margin-bottom: 2rem;
    transition: var(--transition);
    font-family: inherit;
    font-weight: 500;
}

.back-button:hover {
    background: var(--primary);
    transform: translateX(-5px);
}

.menu-header {
    text-align: center;
    margin-bottom: 3rem;
}

.menu-header h2 {
    font-size: 2rem;
    color: var(--dark);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.product-card {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* ============================================
   CORRECCIÓN IMÁGENES DE PRODUCTOS
   ============================================ */
.product-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 18px 18px 0 0;
}

/* Cuando NO tiene imagen - muestra icono */
.product-img.sin-imagen {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.product-img.sin-imagen i {
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.5;
}

/* Cuando SÍ tiene imagen - muestra la foto */
.product-img.con-imagen {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #f5f5f5;
}

/* Ocultar icono cuando hay imagen */
.product-img.con-imagen i {
    display: none !important;
}

/* Sombra degradada para que se lea el badge sobre la imagen */
.product-img.con-imagen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.product-info {
    padding: 1.2rem;
}

.product-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: var(--dark);
}

.product-desc {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.8rem;
}

.product-price {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.8rem;
}

/* Efecto hover en imagen */
.product-card:hover .product-img.con-imagen {
    transform: scale(1.05);
}

/* ============================================
   9. CARRITO FLOTANTE Y PANEL
   ============================================ */
.cart-float {
    position: fixed;
    bottom: 35px;
    right: 35px;
    width: 72px;
    height: 72px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 998;
    border: 4px solid white;
    box-shadow: 0 6px 25px rgba(230, 57, 70, 0.6);
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.cart-float.visible {
    display: flex;
    animation: popIn 0.4s ease;
}

.cart-float:hover {
    transform: scale(1.12);
    background: var(--accent);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.7);
}

.cart-counter {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--danger);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5);
}

/* Panel lateral del carrito */
.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
}

.cart-panel.active {
    transform: translateX(0);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(93, 64, 55, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    background: linear-gradient(135deg, var(--secondary), var(--dark));
    color: white;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close:hover {
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.3);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light);
}

.cart-empty {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.cart-item {
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.8rem;
    border-left: 4px solid var(--primary);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.cart-item-detail {
    font-size: 0.8rem;
    color: var(--gray);
}

.cart-item-actions {
    text-align: right;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-cantidad {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--light);
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-cantidad:hover {
    background: var(--primary);
    color: white;
}

.btn-eliminar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #ffebee;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.btn-eliminar:hover {
    background: var(--danger);
    color: white;
}

.cart-footer {
    padding: 1rem;
    background: white;
    border-top: 2px solid var(--light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

#cart-total-price {
    color: var(--primary);
    font-size: 1.3rem;
}

#cart-total-price small {
    font-size: 0.75rem;
    color: var(--gray);
}

.btn-whatsapp-cart {
    width: 100%;
    padding: 1rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
}

.btn-whatsapp-cart:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* ============================================
   10. WHATSAPP FLOTANTE
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #25D366;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    z-index: 997;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ============================================
   11. FOOTER
   ============================================ */
footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: white;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #aaa;
}

/* ============================================
   12. ANIMACIONES GLOBALES
   ============================================ */
@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

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

/* Spinner/Loader */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   13. NOTIFICACIONES TOAST BÁSICAS
   ============================================ */
.notificacion {
    position: fixed;
    top: 100px;
    right: -400px;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-hover);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: right 0.3s ease;
    font-weight: 500;
}

.notificacion.mostrar {
    right: 20px;
}

.notificacion-error {
    background: var(--danger);
}

/* Estados vacíos */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* ============================================
   14. PANELES DE ADMINISTRACIÓN
   ============================================ */
main {
    margin-top: 55px;
    padding: 2rem 0;
    /* RESTAURADO — admin lo necesita */
    flex: 1;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.admin-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.admin-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

/* ============================================
   15. TABLAS DE ADMIN
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
}

tr:hover {
    background: #f9f9f9;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--gray);
}

/* Badges de estado para pedidos */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-pendiente {
    background: var(--warning);
    color: #000;
}

.badge-en-camino {
    background: var(--info);
    color: #fff;
}

.badge-entregado {
    background: var(--success);
    color: #fff;
}

.badge-cancelado {
    background: var(--danger);
    color: #fff;
}

/* ============================================
   16. PEDIDOS DEL DOMICILIARIO
   ============================================ */
.pedidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.panel-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.pedido-card {
    border-left: 4px solid var(--primary);
}

.pedido-card.entregado {
    border-left-color: var(--success);
    opacity: 0.8;
}

/* Estados visuales de pedidos */
.pedido-card.pendiente {
    border-left-color: var(--warning);
}

.pedido-card.en-camino {
    border-left-color: var(--info);
}

.pedido-card.entregado {
    border-left-color: var(--success);
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Badges de estado en cards */
.estado-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.estado-pendiente {
    background: var(--warning);
    color: #000;
}

.estado-en-camino {
    background: var(--info);
    color: #fff;
}

.estado-entregado {
    background: var(--success);
    color: #fff;
}

.estado-cancelado {
    background: var(--danger);
    color: #fff;
}

.pedido-info p {
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.pedido-info p strong {
    color: var(--dark);
}

.productos-resumen {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.productos-resumen ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

/* Botones de cambio de estado */
.estado-botones {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.estado-botones .btn {
    flex: 1;
    min-width: 100px;
}

.estado-seccion {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   17. MODALES
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    position: relative;
}

/* Modal de asignar domiciliario - más ancho */
#modalAsignarDomiciliario .modal-content {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--light);
    color: var(--dark);
}

.modal-body {
    padding: 0;
}

/* ============================================
   18. MODAL ASIGNAR DOMICILIARIO (ESPECÍFICO)
   ============================================ */
#asignarPedidoId {
    color: var(--primary);
    font-weight: 700;
}

/* Buscador de domiciliarios */
#buscarDomiciliario {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    margin-bottom: 1rem;
}

#buscarDomiciliario:focus {
    outline: none;
    border-color: var(--primary);
}

/* Lista de domiciliarios */
#listaDomiciliarios {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Scrollbar personalizada */
#listaDomiciliarios::-webkit-scrollbar {
    width: 6px;
}

#listaDomiciliarios::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#listaDomiciliarios::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* Item de domiciliario */
.domiciliario-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.domiciliario-item:hover {
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.15);
}

/* Avatar del domiciliario */
.domiciliario-item>div:first-child {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--dark), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    margin-right: 16px;
    flex-shrink: 0;
}

/* Información del domiciliario */
.domiciliario-item>div:nth-child(2) {
    flex: 1;
}

.domiciliario-item strong {
    display: block;
    font-weight: 600;
    color: var(--dark);
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.domiciliario-item small {
    color: var(--gray);
    font-size: 0.85rem;
}

.domiciliario-item small i {
    color: var(--accent);
    margin-right: 4px;
}

/* Icono de selección */
.domiciliario-item>div:last-child {
    color: var(--primary);
    font-size: 1.2rem;
    margin-left: 12px;
}

/* Mensaje sin resultados */
#sinResultados {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray);
}

#sinResultados i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* ============================================
   19. FORMULARIOS EN MODALES
   ============================================ */
.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions button {
    flex: 1;
    margin: 0;
}

/* ============================================
   20. DETALLE DE PEDIDO EN MODAL
   ============================================ */
.detalle-pedido p {
    margin-bottom: 0.8rem;
    color: var(--gray);
}

.detalle-pedido p strong {
    color: var(--dark);
}

.productos-lista {
    background: var(--light);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin: 1rem 0;
}

.producto-item {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.producto-item:last-child {
    border-bottom: none;
}

.total-pedido {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #eee;
}

/* ============================================
   21. CHECKOUT PAGE
   ============================================ */
.checkout-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.checkout-header {
    text-align: center;
    margin-bottom: 2rem;
}

.checkout-header h1 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.checkout-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.checkout-card h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resumen-pedido {
    background: var(--light);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.resumen-item:last-child {
    border-bottom: none;
}

.resumen-total {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 2px solid var(--dark);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.metodo-pago {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.opcion-pago {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.opcion-pago:hover,
.opcion-pago.selected {
    border-color: var(--primary);
    background: var(--light);
}

.opcion-pago i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.opcion-pago span {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-confirmar {
    width: 100%;
    padding: 1rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin-top: 1.5rem;
}

.btn-confirmar:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.btn-volver:hover {
    color: var(--primary);
}

/* ============================================
   22. TABS NAVEGACIÓN (DOMICILIARIO)
   ============================================ */
.tabs-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--light);
    padding-bottom: 0.5rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 12px 12px 0 0;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--dark);
    background: var(--light);
}

.tab-btn.active {
    color: var(--primary);
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.tab-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-left: 0.3rem;
}

/* Contenido de tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   23. HISTORIAL Y ESTADÍSTICAS
   ============================================ */
.historial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.historial-titulo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    color: var(--dark);
    margin: 0;
}

.historial-controles {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Filtros */
.filtro-grupo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filtro-grupo label {
    font-weight: 500;
    color: var(--gray);
    font-size: 0.9rem;
}

.filtro-grupo select,
.filtro-grupo input {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 200px;
    transition: var(--transition);
}

.filtro-grupo select:focus,
.filtro-grupo input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Botones de acción masiva */
.acciones-masivas {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--light);
    border-radius: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.btn-accion-masiva {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-eliminar-masivo {
    background: var(--danger);
    color: white;
}

.btn-eliminar-masivo:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-exportar {
    background: var(--accent);
    color: white;
}

.btn-exportar:hover {
    background: #218838;
    transform: translateY(-2px);
}

.contador-seleccionados {
    color: var(--gray);
    font-size: 0.9rem;
    margin-left: auto;
}

/* Tabla de historial */
.tabla-historial-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

#tablaHistorialPedidos {
    margin: 0;
}

#tablaHistorialPedidos th {
    background: var(--dark);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

#tablaHistorialPedidos th:first-child {
    width: 50px;
    text-align: center;
}

#tablaHistorialPedidos td {
    vertical-align: middle;
}

/* Checkbox personalizado */
.checkbox-pedido {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

#checkboxTodos {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Fila seleccionada */
.fila-seleccionada {
    background: #fff5f5 !important;
    transition: background 0.2s ease;
}

.fila-seleccionada td {
    border-left: 3px solid var(--primary);
}

/* Tag de domiciliario */
.domiciliario-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--dark);
    font-weight: 500;
}

.domiciliario-tag i {
    color: var(--accent);
    font-size: 0.8rem;
}

/* Contador de resultados */
.contador-resultados {
    padding: 1rem 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* Stats */
.historial-stats {
    display: flex;
    gap: 1rem;
}

.stat-box {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    min-width: 120px;
}

.stat-box i {
    font-size: 1.5rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.stat-box span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-box small {
    color: var(--gray);
    font-size: 0.8rem;
}

/* Filtros de historial */
.filtros-historial {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filtro-btn {
    padding: 0.6rem 1.2rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtro-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filtro-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Cards de historial */
.historial-card {
    opacity: 0.85;
    border-left-color: var(--success) !important;
}

.historial-card:hover {
    opacity: 1;
}

.fecha-entrega {
    background: var(--success);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.historial-acciones {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tiempo-entrega {
    color: var(--gray);
    font-size: 0.85rem;
    font-style: italic;
}

.tiempo-entrega i {
    color: var(--accent);
    margin-right: 0.3rem;
}

/* ============================================
   24. NOTIFICACIONES EN TIEMPO REAL (ADMIN)
   ============================================ */

/* ---------- 24.1 Notificación Base Flotante ---------- */
.notificacion-flotante {
    position: fixed;
    top: 100px;
    right: -400px;
    background: white;
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 3000;
    max-width: 380px;
    border-left: 5px solid var(--success);
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notificacion-flotante.mostrar {
    right: 20px;
}

/* ---------- 24.2 Variantes de Notificación ---------- */

/* Nuevo domiciliario registrado */
.notificacion-nuevo-domi {
    border-left-color: var(--accent);
    background: linear-gradient(135deg, #ffffff 0%, #f0fffa 100%);
}

.notificacion-nuevo-domi .notif-icon {
    background: linear-gradient(135deg, var(--accent), #2A9D8F);
    animation: pulse-icon 2s infinite;
}

/* Nuevo pedido urgente */
.notificacion-pedido-urgente {
    border-left-color: var(--primary);
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    max-width: 420px;
}

.notificacion-pedido-urgente .notif-icon {
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    animation: pulse-urgente 1s infinite;
}

/* ---------- 24.3 Icono y Animaciones ---------- */
.notif-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes pulse-urgente {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(230, 57, 70, 0);
    }
}

/* ---------- 24.4 Contenido de Notificación ---------- */
.notif-content {
    flex: 1;
}

.notif-content h4 {
    margin: 0 0 0.3rem 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.notif-content p {
    margin: 0;
    color: var(--gray);
    font-size: 0.95rem;
}

.notif-content small {
    color: var(--accent);
    font-size: 0.8rem;
}

/* ---------- 24.5 Acciones (Botones y Cierre) ---------- */
.notif-acciones {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notif-close {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.notif-close:hover {
    background: var(--light);
    color: var(--danger);
}

/* Botón Asignar Ahora (en notificación de pedido) */
.btn-asignar-ahora {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-asignar-ahora:hover {
    background: #c62828;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.4);
}

/* ---------- 24.6 Banner Activación de Audio ---------- */
.notificacion-activacion {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), #d32f3f);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-urgent);
    z-index: 2500;
    animation: slideDown 0.5s ease;
}

.notificacion-activacion i {
    font-size: 1.2rem;
}

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

.notificacion-activacion button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ---------- 24.7 Indicador de Estado en Vivo ---------- */
.indicador-en-vivo {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray);
    z-index: 100;
}

.indicador-en-vivo::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ============================================
   25. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {

    /* Navegación móvil */
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--dark), var(--secondary));
        flex-direction: column;
        padding: 1rem;
        text-align: center;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    /* Hero */
    .hero {
        padding: 2rem 0 3rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }


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

    /* Grids */
    .stores-grid,
    .menu-grid {
        grid-template-columns: 1fr;
    }

    /* Carrito */
    .cart-panel {
        max-width: 100%;
    }

    .cart-float {
        width: 64px;
        height: 64px;
        font-size: 1.6rem;
        bottom: 25px;
        right: 25px;
        border-width: 3px;
    }

    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
        bottom: 20px;
        left: 20px;
    }

    /* Admin */
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .pedidos-grid {
        grid-template-columns: 1fr;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    /* Tablas */
    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.6rem;
    }

    /* Modales */
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    #modalAsignarDomiciliario .modal-content {
        max-width: 100%;
        margin: 0.5rem;
        padding: 1.2rem;
    }

    /* Domiciliarios en modal */
    .domiciliario-item {
        padding: 12px;
    }

    .domiciliario-item>div:first-child {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    /* Tabs */
    .tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    /* Historial */
    .historial-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .historial-stats {
        width: 100%;
        justify-content: space-around;
    }

    .stat-box {
        flex: 1;
        padding: 0.8rem;
    }

    /* Notificaciones flotantes en móvil */
    .notificacion-flotante {
        left: 10px;
        right: 10px;
        max-width: none;
        top: auto;
        bottom: -200px;
        border-left: none;
        border-top: 5px solid var(--success);
    }

    .notificacion-flotante.mostrar {
        right: 10px;
        left: 10px;
        bottom: 20px;
    }

    .notificacion-nuevo-domi {
        border-left: none;
        border-top-color: var(--accent);
    }

    .notificacion-pedido-urgente {
        border-left: none;
        border-top-color: var(--primary);
        flex-wrap: wrap;
    }

    .notif-acciones {
        flex-direction: row;
        width: 100%;
        margin-top: 0.5rem;
    }

    .btn-asignar-ahora {
        flex: 1;
        justify-content: center;
    }

    /* Banner de activación en móvil */
    .notificacion-activacion {
        top: 80px;
        left: 10px;
        right: 10px;
        transform: none;
        border-radius: var(--border-radius);
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    @keyframes slideDown {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Responsive para el selector de zona */
    .zone-selector {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.8rem;
        width: 100%;
        box-sizing: border-box;
    }

    .zone-selector select {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .zone-selector i {
        display: none;
    }

    /* Historial responsive */
    .historial-controles {
        flex-direction: column;
        width: 100%;
    }

    .filtro-grupo select,
    .filtro-grupo input {
        width: 100%;
    }

    .acciones-masivas {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-accion-masiva {
        width: 100%;
        justify-content: center;
    }

    .contador-seleccionados {
        margin-left: 0;
        text-align: center;
        width: 100%;
    }

    #tablaHistorialPedidos {
        font-size: 0.85rem;
    }

    #tablaHistorialPedidos th,
    #tablaHistorialPedidos td {
        padding: 0.8rem 0.5rem;
    }

    .domiciliario-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    .tienda-tag-historial {
        max-width: 100px;
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }

    #tablaHistorialPedidos th:nth-child(5),
    #tablaHistorialPedidos td:nth-child(5) {
        padding: 0.5rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .zone-selector {
        flex-direction: column;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .tienda-tag-historial {
        max-width: 80px;
        font-size: 0.68rem;
    }
}

/* ============================================
   26. TAG DE TIENDA EN HISTORIAL
   ============================================ */
.tienda-tag-historial {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--dark);
    font-weight: 500;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tienda-tag-historial i {
    color: var(--secondary);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Tag de tienda en el modal de detalle */
.tienda-tag-detalle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 500;
}

.tienda-tag-detalle i {
    color: var(--secondary);
}

/* ============================================
   27. BOTÓN AGREGAR POR UNIDAD
   ============================================ */
.precio-unidad-container {
    margin-top: 15px;
    width: 100%;
}

.btn-agregar-unidad {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-agregar-unidad:hover {
    background: #d32f3f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.btn-agregar-unidad:active {
    transform: translateY(0);
}

.btn-agregar-unidad i {
    font-size: 0.9rem;
}

/* ============================================
   28. HEADER RESPONSIVE — Cerrar sesión
   ============================================ */
header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

header .nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
}

header .nav-links li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(230, 57, 70, 0.1);
    color: #E63946;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    min-height: 44px;
    white-space: nowrap;
}

header .nav-links li a:hover {
    background: #E63946;
    color: #fff;
}

@media (max-width: 480px) {
    header nav {
        padding: 8px 0;
    }

    header .logo {
        font-size: 1.rem;
    }

    header .nav-links {
        width: 100%;
        justify-content: space-between;
        padding: 8px 0 0;
        border-top: 1px solid #eee;
    }

    header .nav-links li {
        flex: 1;
    }

    header .nav-links li a {
        justify-content: center;
        width: 100%;
        text-align: center;
        font-size: 0.8rem;
        padding: 12px 8px;
    }

    #user-display {
        font-size: 0.75rem !important;
    }
}

/* ============================================
   29. MENÚ HAMBURGUESA (domiciliario / admin)
   ============================================ */
.mobile-menu.active i::before {
    content: '\f00d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

@media (max-width: 768px) {
    header .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--dark), var(--secondary));
        flex-direction: column;
        padding: 1rem 1.5rem;
        text-align: center;
        gap: 0.5rem;
        border-radius: 0 0 16px 16px;
    }

    header .nav-links.active {
        display: flex;
    }

    header .mobile-menu {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--white);
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        transition: background 0.2s;
    }

    header .mobile-menu:hover,
    header .mobile-menu.active {
        background: rgba(230, 57, 70, 0.3);
    }

    header .nav-links li {
        width: 100%;
    }

    header .nav-links li a,
    header .nav-links li span {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 14px;
        border-radius: 10px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    header .nav-links li a {
        color: var(--white);
        background: rgba(255, 255, 255, 0.1);
        text-decoration: none;
        transition: background 0.2s;
    }

    header .nav-links li a:hover {
        background: var(--primary);
        color: #fff;
    }
}

/* ============================================
   NOTA: Se eliminaron las reglas conflictivas
   que sobreescribían margin-top y padding-top
   del .hero. Si necesitas esos estilos en
   admin/domiciliario, usa la clase .hero-admin
   ============================================ */
.hero-admin {
    margin-top: 0;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* ============================================
   30. EXPLOSIÓN DE COMIDA RÁPIDA 🍔🍟🍕
   Se ejecuta cuando se agrega el primer producto
   ============================================ */

.explosion-comida {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.emoji-comida {
    position: absolute;
    font-size: 2.2rem;
    animation: volarEmoji 1.2s ease-out forwards;
    opacity: 0;
}

@keyframes volarEmoji {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 1;
    }

    20% {
        transform: translate(var(--x1), var(--y1)) scale(1.3) rotate(var(--r1));
        opacity: 1;
    }

    100% {
        transform: translate(var(--x2), var(--y2)) scale(0.3) rotate(var(--r2));
        opacity: 0;
    }
}

/* Animación especial para el carrito cuando aparece por primera vez */
.cart-float.aparecer-con-fiesta {
    animation: fiestaCarrito 0.7s ease;
}

@keyframes fiestaCarrito {
    0% {
        transform: scale(0) rotate(-180deg);
    }

    50% {
        transform: scale(1.3) rotate(10deg);
    }

    70% {
        transform: scale(0.9) rotate(-5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Brillo alrededor del carrito en la fiesta */
.cart-float.aparecer-con-fiesta::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 162, 97, 0.5) 0%, transparent 70%);
    animation: brilloCarrito 0.9s ease-out forwards;
    z-index: -1;
}

@keyframes brilloCarrito {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ============================================
   HERO — LANZAMIENTO (nuevos estilos)
   ============================================ */

/* Badge de lanzamiento */
.launch-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.45rem 1.2rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
    animation: badge-pulse 2.5s ease-in-out infinite;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--white);
    animation: dot-blink 1.2s ease-in-out infinite;
}

@keyframes dot-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes badge-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

/* Descuento destacado — pill blanco sobre el gradiente */
.hero-discount {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    animation: pulse-descuento 2s ease-in-out infinite;
}

.discount-number {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

@keyframes pulse-descuento {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

/* Ajuste del ::before — ahora incluye licor */
.hero::before {
    content: '🍔';
    position: absolute;
    font-size: 15rem;
    opacity: 0.10;
    bottom: -50px;
    right: -50px;
}

/* Nuevo ::after — emoji de licor al lado izquierdo */
.hero::after {
    content: '🥃';
    position: absolute;
    font-size: 12rem;
    opacity: 0.08;
    top: 20px;
    left: -30px;
}

/* Ajuste del h1 para el nuevo copy */
.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.hero p {
    position: relative;
    z-index: 1;
}

/* Zone-selector también necesita z-index para estar sobre ::after */
.zone-selector {
    position: relative;
    z-index: 1000;
}
/* ============================================
   32. INDICADOR DE SCROLL (FLECHA ABAJO)
   ============================================ */

.scroll-down-indicator {
    position: absolute;
    bottom: 25px;
    left: 50%;
    /* Centrado perfecto y tamaño grande */
    width: 52px;
    height: 52px;
    background-color: var(--dark); /* Marrón oscuro - resalta en claros y en rojos */
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 1001;
    /* Animación de rebote centrada */
    animation: rebote-flecha 2s ease-in-out infinite;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateX(-50%); /* Lo centra al usar left: 50% */
}

/* Clase que se agrega al hacer scroll para que desaparezca */
.scroll-down-indicator.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(30px); /* Se desvanece cayendo */
    pointer-events: none;
}

@keyframes rebote-flecha {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-12px);
    }
    60% {
        transform: translateX(-50%) translateY(-6px);
    }
}

/* En móviles */
@media (max-width: 768px) {
    .scroll-down-indicator {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
        bottom: 15px;
    }
}