:root {
    --primary: #ecebff;
    --secondary: #2a5a9c;
    --accent: #4a8bd8;
    --light: #e6f0ff;
    --gold: #ffd700;
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-contrast: #1a3e6c;
    --shadow: 0 4px 12px rgba(26, 62, 108, 0.2);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--text-dark);
    line-height: 1.6;
    /*overflow-x: clip;*/
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header and Navigation */
header {
    background-color: var(--primary);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Logo con efecto sutil */
.logo {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.logo img {
    height: 100px;
    transition: var(--transition);
}

/* Menú de navegación mejorado */
nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

nav li {
    position: relative;
}

nav a {
    text-decoration: none;
    color: var(--text-contrast);
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Iconos para items de menú */
nav a::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.9em;
    opacity: 0.7;
}

nav a[href="#inicio"]::before {
    content: "\f015";
}

nav a[href="#especialidades"]::before {
    content: "\f787";
}

nav a[href="#contacto"]::before {
    content: "\f075";
}

/* Efecto hover moderno */
nav a:hover {
    color: var(--secondary);
    background: rgba(74, 139, 216, 0.1);
    transform: translateY(-2px);
}

nav a:hover::before {
    opacity: 1;
    color: var(--secondary);
}

/* Carrito modernizado */
.cart-icon {
    position: relative;
    cursor: pointer;
    background: rgba(74, 139, 216, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.cart-icon:hover {
    background: rgba(74, 139, 216, 0.2);
    transform: scale(1.05);
}

.cart-icon i {
    font-size: 1.2rem;
    color: var(--text-contrast);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-contrast);
    background: rgba(74, 139, 216, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(74, 139, 216, 0.2);
}

/* Efecto scroll (opcional) */
header.scrolled {
    padding: 0.8rem 2rem;
    box-shadow: 0 4px 12px rgba(26, 62, 108, 0.15);
}

.btn {
    display: inline-block;
    background-color: var(--gold);
    color: var(--secondary);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    animation: fadeIn 2s ease-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: #ffc107;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}

/* Products Section */
.specialties {
    padding-top: 180px;
    padding-bottom: 9rem;
    padding-left: 3rem;
    padding-right: 3rem;
}

.section-title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #000000;
    text-align: left;
    /* Título a la izquierda */
    display: block;
}

/* Borramos la rayita amarilla de abajo */
.section-title::after {
    display: none;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--gold);
}

/* Product Cards 
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 15px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    width: 280px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeIn 1s ease-out;
    animation-fill-mode: backwards;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(26, 62, 108, 0.3);
}

.product-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    color: var(--text-contrast);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.product-info p {
    color: #555;
    margin-bottom: 1rem;
    min-height: 60px;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--secondary);
    display: block;
    margin: 0.5rem 0;
}

.add-to-cart {
    width: 100%;
    background-color: var(--gold);
    color: var(--secondary);
    border: none;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    background-color: #daa520;
}
*/

/* ✅ PEGA ESTO: DISEÑO UBER EATS - EL GRID EXACTO ✅ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    padding: 10px 0;
}

.ue-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 16px;
    padding: 0;
    cursor: pointer;
    height: 150px;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.ue-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ue-card-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
    padding: 16px;
    overflow: hidden;
}

.ue-card-title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 4px 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ue-card-price {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0 0 6px 0;
}

.ue-card-desc {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #5E5E5E;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ue-card-img-container {
    position: relative;
    width: 150px;
    /* Ancho fijo de 150px */
    height: 150px;
    /* Alto fijo de 150px */
    flex-shrink: 0;
    /* Centramos la imagen en caso de que la tarjeta mida un pelín más o menos */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f6f6f6;
    /* Fondo suave por si la foto no es cuadrada perfecta */
}

.ue-card-img {
    width: 100%;
    height: 100%;
    /* contain asegura que la imagen de 150x150 NUNCA se corte */
    object-fit: contain;
    border-radius: 0;
}

/* Ajustamos la posición del botón + */
.ue-btn-add {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--secondary);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    transition: transform 0.1s ease, background-color 0.2s ease;
}

.ue-btn-add:hover {
    background-color: #e8e8e8;
}

.ue-btn-add:active {
    transform: scale(0.9);
}

.group-title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 24px;
    /* Tamaño más sobrio */
    font-weight: 700;
    color: #000000;
    margin: 40px 0 20px 0;
    text-transform: none;
    /* No todo en mayúsculas */
    text-align: left;
    /* Alineado a la izquierda */
    border: none;
    padding-bottom: 0;
}

/* Borramos rayitas y decoraciones */
.group-title::after {
    display: none;
}

.group-title.with-icon::before {
    display: none;
}

/* Para móvil: 1 sola columna */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Secondary Navigation */
.secondary-nav {
    position: fixed;
    top: calc(110px + 1rem);
    left: 0;
    width: 100%;
    background-color: var(--secondary);
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.nav-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    justify-content: center;
    align-items: center;
}

.nav-items-container {
    order: 2;
    display: flex;
    overflow: hidden;
    width: 100%;
    justify-content: flex-start;
    scroll-behavior: smooth;
    overflow-x: hidden;
    white-space: nowrap;
}

.nav-items {
    display: flex;
    transition: transform 0.5s ease;
}

.nav-btn {
    background-color: transparent;
    color: var(--text-light);
    border: none;
    padding: 0.7rem 1.5rem;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    min-width: 120px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-arrow {
    position: static;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
    font-size: 1.5rem;
    margin: 0 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-arrow-left {
    order: 1;
}

.nav-arrow-right {
    order: 3;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--gold);
    transition: all 0.3s ease;
}

.nav-btn:hover::after {
    width: 60%;
}

.nav-btn i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.nav-btn:hover i {
    transform: scale(1.2);
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-btn.active {
    background-color: rgba(255, 215, 0, 0.2);
    color: var(--gold);
    font-weight: 600;
}

.nav-btn.active::after {
    width: 80%;
    background-color: var(--gold);
}

/* Footer */
footer {
    background-color: var(--primary);
    color: var(--text-contrast);
    padding: 4rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Forma decorativa superior opcional */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    opacity: 0.1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    position: relative;
}

.footer-section {
    padding: 1rem;
    text-align: left;
}

/* Logo del footer */
.footer-logo {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 90px;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-logo img:hover {
    opacity: 1;
    transform: scale(1.03);
}

/* Títulos de sección */
.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, var(--secondary), transparent);
}

/* Información de contacto mejorada */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-info p {
    margin: 0;
    display: flex;
    align-items: flex-start;
    text-align: left;
    line-height: 1.6;
}

.contact-info i {
    margin-right: 12px;
    color: var(--secondary);
    font-size: 1.1rem;
    min-width: 20px;
    margin-top: 3px;
}

/* Redes sociales mejoradas */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-icons a {
    width: 42px;
    height: 42px;
    background-color: rgba(42, 90, 156, 0.08);
    border-radius: 50%;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.social-icons a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, var(--secondary), var(--accent));
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.social-icons a i {
    position: relative;
    z-index: 1;
}

.social-icons a:hover {
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(42, 90, 156, 0.2);
}

.social-icons a:hover::after {
    opacity: 1;
}

/* Copyright mejorado */
.copyright {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(42, 90, 156, 0.15);
    font-size: 0.9rem;
    color: var(--text-contrast);
    opacity: 0.8;
    position: relative;
}

.copyright::before {
    content: '☼';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    padding: 0 1rem;
    color: var(--secondary);
    font-size: 1.2rem;
}

.contact-info p:hover i {
    animation: bounce 0.5s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Group Sections */
.group-section {
    margin-bottom: 3rem;
    scroll-margin-top: 120px;
    position: relative;
}

.group-title {
    color: var(--secondary);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 2.5rem 0;
    padding-bottom: 1rem;
    text-align: center;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Efecto decorativo moderno */
.group-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--secondary));
    border-radius: 2px;
}

/* Efecto hover para la sección completa */
.group-section:hover .group-title {
    color: var(--accent);
    transform: scale(1.02);
}

.group-section:hover .group-title::after {
    width: 100px;
    background: linear-gradient(90deg, var(--secondary), var(--gold));
    transition: all 0.3s ease;
}

/* Opción alternativa con icono */
.group-title.with-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.group-title.with-icon::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--gold);
}

/* Lista de Comentarios */

.comments-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    max-height: 150px;
    overflow-y: auto;
}

.comment-item {
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: white;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    text-align: center;
    position: relative;
    margin: 0;
}

.comment-item:hover {
    background-color: #f0f8ff;
    border-color: #cce0ff;
}

.comment-item.selected {
    background-color: #e6f7ff;
    border-color: #99ccff;
    box-shadow: 0 0 0 2px rgba(74, 139, 216, 0.3);
    color: #0066cc;
    font-weight: 500;
}

.comment-checkbox {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

.custom-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.3s;
}

.comment-checkbox:checked+.custom-checkbox {
    background-color: #4a90e2;
    border-color: #4a90e2;
}

.comment-checkbox:checked+.custom-checkbox::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.comment-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comment-item.selected .comment-text {
    color: #0066cc;
    font-weight: 500;
}

/* Estilos para el carrito */

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid rgba(42, 90, 156, 0.1);
    margin-bottom: 15px;
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cart-item-image {
    grid-row: span 3;
    align-self: start;
}

.cart-item-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-details {
    display: contents;
}

.cart-item h5 {
    grid-column: 2;
    margin: 0;
    font-size: 1.1rem;
    color: var(--secondary);
}

.cart-item p {
    grid-column: 2;
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.cart-item-comments {
    grid-column: 2;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.cart-item-comments strong {
    margin-right: 5px;
}

.comment-list {
    display: inline;
}

.custom-comment {
    display: inline;
}

.cart-item-controls {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-controls button:hover {
    background-color: rgba(42, 90, 156, 0.1);
}

.quantity {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

.item-price {
    font-weight: bold;
    color: var(--secondary);
    font-size: 1.1rem;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.remove-item:hover {
    transform: scale(1.1);
}

.swal-wide {
    width: 700px !important;
    max-width: 90%;
}

.swal2-popup .cart-item {
    animation: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        padding: 0.6rem 1rem;
    }

    .logo img {
        height: 60px;
    }

    .secondary-nav {
        top: 60px;
        z-index: 998;
    }

    .specialties {
        padding-top: 140px;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    nav ul.active {
        display: flex;
    }

    nav li {
        margin: 0.5rem 0;
        text-align: center;
    }

    .product-card {
        width: 100%;
        max-width: 350px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .comments-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .secondary-nav {
        top: 60px;
    }

    .nav-container {
        justify-content: flex-start;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

.user-icon {
    cursor: pointer;
    margin-left: 15px;
}

.user-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.user-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* --- SIDEBAR DEL CARRITO ESTILO UBER EATS --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nevas-cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 450px;
    max-width: 100vw;
    /* Responsivo para celular */
    height: 100vh;
    background: #ffffff;
    z-index: 1050;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.nevas-cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e2e2e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.btn-close-sidebar {
    background: #f6f6f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* =========================================
   MODAL UBER EATS (ESTRUCTURA CORRECTA Y STICKY)
   ========================================= */

/* 1. Reset de SweetAlert */
.swal2-popup.product-modal-ue {
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 950px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

.swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-align: left !important;
}

/* 2. Envoltorio y Scroll */
.ue-modal-wrapper {
    display: flex;
    flex-direction: column;
    height: 85vh;
    max-height: 850px;
    background: #ffffff;
    position: relative;
}

.ue-modal-scroll-area {
    flex: 1;
    overflow-y: auto;
    /* El scroll general pasa aquí */
}

/* 3. Columnas Mágicas (Móvil 1 col, PC 2 col) */
.ue-modal-pc-layout {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .ue-modal-pc-layout {
        flex-direction: row;
        align-items: flex-start;
        /* CRÍTICO para que funcione el sticky */
    }
}

/* COLUMNA IZQUIERDA (LA FOTO) */
.ue-modal-left-col {
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ue-modal-left-col img,
.ue-modal-left-col .carousel {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

@media (min-width: 768px) {
    .ue-modal-left-col {
        width: 45%;
        padding: 40px;
        position: sticky;
        /* ESTA ES LA MAGIA: Fija la foto al hacer scroll */
        top: 0;
    }
}

/* COLUMNA DERECHA (TEXTO Y OPCIONES) */
.ue-modal-right-col {
    width: 100%;
    padding: 0 24px 24px 24px;
}

@media (min-width: 768px) {
    .ue-modal-right-col {
        width: 55%;
        padding: 40px 40px 40px 0;
        /* padding derecho, pero no izquierdo */
    }
}

/* 4. Tipografía y Divisor */
.ue-product-header {
    margin-bottom: 24px;
}

.ue-product-title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0 0 12px 0;
    line-height: 1.1;
}

.ue-product-price {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    margin-bottom: 12px;
}

.ue-product-desc {
    color: #5E5E5E;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.ue-divider {
    height: 1px;
    background-color: #EEEEEE;
    margin-bottom: 24px;
}

/* 5. Elementos de opciones */
.ue-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 16px;
}

.ue-comments-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.ue-comment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #EEEEEE;
    cursor: pointer;
    margin: 0;
}

.ue-comment-item:last-child {
    border-bottom: none;
}

.ue-comment-text {
    font-size: 16px;
    color: #000;
}

.ue-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
    display: block !important;
}

.comment-checkbox:checked+.ue-checkbox {
    background-color: #000;
    border-color: #000;
}

.comment-checkbox:checked+.ue-checkbox::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.comment-checkbox {
    display: none !important;
}

.ue-textarea {
    width: 100%;
    background: #f6f6f6;
    border: 1px solid #EEEEEE;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    resize: none;
    outline: none;
    font-family: inherit;
    margin-bottom: 24px;
}

.ue-textarea:focus {
    border-color: #000;
}

/* 6. Contador y Footer */
/* =========================================
   CONTADOR DE CANTIDAD TIPO PÍLDORA (UBER EATS)
   ========================================= */

/* 1. Contenedor general (Para centrarlo en la pantalla) */
.ue-quantity-container {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 32px;
}

/* 2. La Píldora (Gris claro, bordes súper redondeados) */
.ue-quantity-selector {
    display: inline-flex;
    align-items: center;
    background-color: #EEEEEE;
    /* Fondo gris claro de la píldora */
    border-radius: 50px;
    /* Esto hace la forma de píldora */
    padding: 6px;
    /* Espacio interno para que respiren los botones */
}

/* 3. Los botones de Más (+) y Menos (-) */
.ue-qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* Hace que el hover sea un círculo perfecto */
    border: none;
    background-color: transparent;
    /* Fondo transparente por defecto */
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    transition: background-color 0.2s ease;

    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* Efecto al pasar el mouse sobre los botones */
.ue-qty-btn:hover {
    background-color: #D8D8D8;
    /* Círculo gris más oscuro al hacer hover */
}

/* Efecto al dar clic */
.ue-qty-btn:active {
    transform: scale(0.95);
}

/* 4. El input numérico del centro */
.ue-qty-input {
    width: 45px;
    text-align: center;
    border: none;
    background-color: transparent;
    font-weight: 500;
    font-size: 18px;
    color: #000000;
    pointer-events: none;
    /* Evita que el usuario seleccione el texto por error */
}

/* 5. Magia extra: Ocultar las flechitas feas que traen los inputs numéricos por defecto */
.ue-qty-input::-webkit-outer-spin-button,
.ue-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ue-qty-input[type=number] {
    -moz-appearance: textfield;
}

.ue-modal-bottom-bar {
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #EEEEEE;
    display: flex;
    justify-content: center;
    z-index: 10;
    position: sticky;
    bottom: 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .ue-modal-bottom-bar {
        padding: 24px 40px;
    }
}

/* Botón de Agregar al Carrito Base */
.ue-btn-add-to-cart {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 18px 24px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Mantiene la animación dentro del botón */
    transition: transform 0.1s ease;
}

.ue-btn-add-to-cart:active {
    transform: scale(0.98);
}

/* Ícono del carrito (Invisible al inicio) */
.ue-btn-icon {
    width: 0;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* El texto original (Lo pasamos a un flexbox) */
.ue-btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* LA MAGIA DEL HOVER */
.ue-btn-add-to-cart:hover .ue-btn-icon {
    width: 24px;
    /* Le da espacio al ícono */
    opacity: 1;
    /* Lo hace visible */
    transform: translateX(0);
    /* Lo desliza a su lugar */
    margin-right: 8px;
    /* Empuja el texto ligeramente */
}



/* Contenedor que agrupa todo (debajo del banner del restaurante) */
.ue-main-layout {
    display: flex;
    max-width: 1200px;
    /* Ancho máximo para que no se estire infinito en pantallas gigantes */
    margin: 0 auto;
    /* Centra el contenedor en la pantalla */
    padding: 24px;
    gap: 40px;
    /* Espacio entre la barra lateral y los productos */
}

/* Columna Izquierda (La navegación secundaria) */
.ue-sidebar-nav {
    width: 250px;
    flex-shrink: 0;
    /* position: sticky; */
    /* Lo haremos sticky después */
    /* top: 100px; */
}

/* Columna Derecha (Los productos) */
.ue-content-area {
    flex: 1;
    /* Toma todo el espacio sobrante */
    min-width: 0;
    /* Evita que el flexbox se desborde */
}

/* En celulares, la barra lateral pasa arriba y fluye normal */
@media (max-width: 991px) {
    .ue-main-layout {
        flex-direction: column;
        padding: 16px;
        gap: 24px;
    }

    .ue-sidebar-nav {
        width: 100%;
    }
}

/* =========================================
   DISEÑO BASE UBER EATS (HEADER, BANNER, LAYOUT)
   ========================================= */

/* 1. Header Blanco Limpio */
.ue-header-main {
    background-color: var(--primary);
    padding: 12px 24px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* Sombra muy sutil */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    /* Altura fija */
}

.ue-header-left,
.ue-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ue-header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.ue-header-main .logo img {
    height: 35px;
    /* Logo más discreto */
}

.ue-header-main .menu-toggle {
    color: #000;
    font-size: 20px;
    display: none;
    cursor: pointer;
}

/* Switch Entrega / Recolección */
.ue-delivery-toggle {
    display: flex;
    background: #928fc6;
    border-radius: 30px;
    padding: 4px;
}

.ue-delivery-toggle button {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    transition: background 0.2s;
}

.ue-delivery-toggle button.active {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Contenedor de la barra de búsqueda (En la info del restaurante) */
.ue-search-bar-container {
    max-width: 600px;
    margin-top: 20px;
}

.ue-search-bar {
    display: flex;
    align-items: center;
    background: #EEEEEE;
    /* Fondo gris claro tipo Uber Eats */
    border-radius: 8px;
    padding: 12px 16px;
    width: 100%;
}

.ue-search-bar i {
    color: #000;
    margin-right: 12px;
    font-size: 18px;
}

.ue-search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 16px;
    color: #000;
}

/* Carrito en Header */
.ue-header-main .cart-icon {
    background: #928fc6;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    width: auto;
    height: auto;
}

.ue-header-main .cart-icon:hover {
    opacity: 0.8;
    transform: none;
}

.ue-header-main .cart-count {
    position: static;
    background: transparent;
    color: #fff;
    box-shadow: none;
    font-size: 16px;
    width: auto;
    height: auto;
}


/* 2. Banner del Restaurante */
body {
    padding-top: 72px;
    background-color: #ffffff;
}

.ue-restaurant-banner {
    width: 100%;
    border-bottom: 1px solid #EEEEEE;
    /* Esta es la línea divisoria */
    padding-bottom: 16px;
}

.ue-banner-img {
    width: 100%;
    height: 250px;
    background: #151255;
}

.ue-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ue-restaurant-info {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 0 24px;
}

.ue-restaurant-info h1 {
    font-size: 40px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.ue-tags {
    color: #5E5E5E;
    font-size: 16px;
    margin-bottom: 16px;
}

.ue-delivery-stats {
    display: flex;
    gap: 16px;
    color: #000;
    font-weight: 500;
    font-size: 14px;
}

.ue-delivery-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #EEEEEE;
    padding: 8px 12px;
    border-radius: 8px;
}

/* 3. Layout de Dos Columnas */
.ue-main-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    gap: 40px;
}

/* BARRA LATERAL FIJA CON SCROLL INDEPENDIENTE (PC) */
.ue-sidebar-nav {
    width: 250px;
    flex-shrink: 0;
}

/* Magia para que se quede fija y tenga scroll propio en PC */
@media (min-width: 769px) {
    .ue-sidebar-nav {
        position: sticky;
        top: 96px;
        /* Se pega justo debajo del header principal */
        height: calc(100vh - 120px);
        /* Le damos un tope de altura */
        overflow-y: auto;
        /* Scroll independiente solo para las categorías */
    }

    /* Hacemos que la barrita de scroll se vea elegante y delgada */
    .ue-sidebar-nav::-webkit-scrollbar {
        width: 4px;
    }

    .ue-sidebar-nav::-webkit-scrollbar-thumb {
        background-color: #E2E2E2;
        border-radius: 10px;
    }
}

.ue-content-area {
    flex: 1;
    min-width: 0;
}

/* Menú Lateral Vertical (Sobreescribe el horizontal anterior) */
.ue-vertical-menu .nav-arrow {
    display: none !important;
    /* Ocultamos flechas */
}

.ue-vertical-menu .nav-items-container {
    overflow: visible;
    display: block;
}

.ue-vertical-menu .nav-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: none !important;
}

.ue-vertical-menu .nav-btn {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    padding: 10px 16px;
    border-radius: 8px;
    color: #000;
    background: transparent;
    font-weight: 500;
    font-size: 16px;
}

.ue-vertical-menu .nav-btn::after {
    display: none;
    /* Quitamos rayitas */
}

.ue-vertical-menu .nav-btn.active {
    background: #EEEEEE;
    color: #000;
    font-weight: 700;
}

.ue-vertical-menu .nav-btn:hover {
    background: #f6f6f6;
}


/* =========================================
   📱 RESPONSIVO MÓVIL DEFINITIVO (PARA CHROME Y SAFARI)
   ========================================= */
@media (max-width: 768px) {

    /* 1. HEADER AL TECHO Y CON ALTURA FIJA (Elimina el hueco blanco) */
    header,
    .ue-header-main {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 70px !important;
        padding: 0 16px !important;
        z-index: 1000 !important;
        background-color: var(--primary) !important;
    }

    /* 2. FORZAMOS LOGO, OCULTAMOS HAMBURGUESA */
    .ue-header-main .logo,
    .ue-header-main .logo img {
        display: flex !important;
        height: 32px !important;
        margin-left: 0 !important;
    }

    .menu-toggle,
    .ue-header-main .menu-toggle {
        display: none !important;
    }

    /* 3. TOGGLE EXACTAMENTE AL CENTRO Y VISIBLE */
    .ue-delivery-toggle {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10 !important;
        display: flex !important;
    }

    .ue-delivery-toggle button {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }

    /* 4. CARRITO A LA DERECHA */
    .ue-header-main .cart-icon {
        padding: 8px 16px !important;
        margin: 0 !important;
    }

    .ue-header-main .cart-icon i {
        margin-right: 0 !important;
    }

    /* 5. BARRA DE CATEGORÍAS STICKY (REPARADA PARA CHROME) */
    .ue-sidebar-nav {
        width: 100% !important;
        position: -webkit-sticky !important;
        /* Para Safari/iOS */
        position: sticky !important;
        /* Para Chrome/Android */
        top: 70px !important;
        /* Se pega exactamente donde acaba el header */
        background: #fff !important;
        z-index: 990 !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid #eee !important;
        margin: 0 !important;
    }

    .ue-vertical-menu .nav-items {
        flex-direction: row !important;
        overflow-x: auto !important;
        padding-bottom: 5px !important;
    }

    .ue-vertical-menu .nav-btn {
        width: auto !important;
        white-space: nowrap !important;
        background: #eee !important;
        border-radius: 30px !important;
    }

    /* 6. EXTRAS DEL LAYOUT MÓVIL */
    .ue-banner-img {
        height: 180px !important;
    }

    .ue-restaurant-info h1 {
        font-size: 28px !important;
    }

    .ue-main-layout {
        flex-direction: column !important;
        padding: 16px !important;
        gap: 16px !important;
    }

    .product-card {
        max-width: 100% !important;
    }

    .comments-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* =========================================
   NUEVA TOP BAR Y BOTÓN CERRAR (SOLO ICONO, SIN CÍRCULO)
   ========================================= */

/* Para apagar a la fuerza cualquier 'X' nativa de SweetAlert que se cuele */
.swal2-close {
    display: none !important;
}

/* 1. NUESTRA "X" PERSONALIZADA (Minimalista gris, SIEMPRE a la izquierda) */
.ue-custom-close-btn {
    position: absolute;
    top: 12px;
    left: 16px !important;
    /* Forzado siempre a la izquierda */
    right: auto !important;
    /* Aseguramos que nunca se vaya a la derecha */
    width: 44px;
    height: 44px;
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #757575 !important;
    z-index: 9999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    margin: 0;

    /* Sombra blanca difuminada solo en el texto por si la foto de atrás es oscura */
    text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.9);
}

.ue-custom-close-btn:hover {
    background-color: transparent !important;
    background: transparent !important;
    color: #333333 !important;
}

/* 2. DISEÑO DE LA TOP BAR INICIAL (Transparente) */
.ue-top-bar-movil {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: transparent;
    /* Transparente al inicio */
    z-index: 9998;
    /* Abajo de la "X" */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border-bottom: 1px solid transparent;
    /* Sin línea divisoria al inicio */
    transition: background-color 0.3s ease, border-bottom-color 0.3s ease;
}

/* El texto del título oculto al inicio */
.ue-top-bar-titulo {
    font-size: 18px;
    font-weight: 700;
    color: transparent;
    /* Invisible al inicio */
    transition: color 0.3s ease;
    padding: 0 60px;
    /* Margen para no chocar con la zona de la X */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 3. ESTADO AL HACER SCROLL (Clase "activa" agregada por el JS) */
.ue-top-bar-movil.activa {
    background-color: #ffffff;
    /* La barra se vuelve blanca */
    border-bottom-color: #EEEEEE;
    /* Línea divisoria gris */
    pointer-events: auto;
}

.ue-top-bar-movil.activa .ue-top-bar-titulo {
    color: #000000;
    /* El texto se pinta de negro */
}

/* =========================================
   BOTÓN ANIMADO PARA BORRAR DEL CARRITO
   ========================================= */
.cart-delete-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgb(20, 20, 20);
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.164);
    cursor: pointer;
    transition-duration: .3s;
    overflow: hidden;
    position: relative;
    /* Ajuste extra para que no choque con el precio */
    margin-left: 10px;
}

.cart-delete-btn .svgIcon {
    width: 12px;
    transition-duration: .3s;
}

.cart-delete-btn .svgIcon path {
    fill: white;
}

.cart-delete-btn:hover {
    width: 85px;
    border-radius: 50px;
    transition-duration: .3s;
    background-color: rgb(255, 69, 69);
    align-items: center;
}

.cart-delete-btn:hover .svgIcon {
    width: 35px;
    transition-duration: .3s;
    transform: translateY(60%);
}

.cart-delete-btn::before {
    position: absolute;
    top: -25px;
    content: "Eliminar";
    color: white;
    transition-duration: .3s;
    font-size: 2px;
}

.cart-delete-btn:hover::before {
    font-size: 11px;
    opacity: 1;
    transform: translateY(30px);
    transition-duration: .3s;
}

.distributor-btn {
    top: 20px;
    right: 20px;
    background-color: var(--secondary);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.distributor-btn:hover {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}