* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFD700;
    --secondary-color: #FF6B35;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --text-color: #34495E;
    --success-color: #27AE60;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

/* Header */
.header {
    background: var(--dark-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

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

.btn-pedido {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pedido:hover {
    background: #ff8c5a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Hero */
.hero {
    background: var(--primary-color);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    color: var(--hero-title-color);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    color: var(--hero-subtitle-color);
}

.btn-primary {
    background: white;
    color: var(--secondary-color);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Menu Section */
.menu-section {
    padding: 4rem 2rem;
    background: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.menu-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.menu-item {
    background: white;
    border-radius: 15px;
    padding: 0;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    word-wrap: break-word;
    min-width: 0;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.menu-item-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.menu-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.menu-item:hover .menu-item-image {
    transform: scale(1.05);
}

.menu-item-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #ccc;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.menu-item-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 0.5rem;
    min-width: 0;
}

.menu-item h3 {
    color: var(--product-title-color);
    font-size: 1.2rem;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
}

.menu-item-price {
    background: var(--price-color, var(--primary-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu-item-familia {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-item-description {
    color: var(--product-description-color);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.menu-item-alergenos {
    font-size: 0.85rem;
    color: #e74c3c;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #ffe6e6;
    border-radius: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.menu-item-peso {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-top: 0.5rem;
    word-wrap: break-word;
}

/* Horarios Section */
.horarios-section {
    padding: 4rem 2rem;
    background: white;
}

.horarios-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.horario-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.horario-icon {
    font-size: 2.5rem;
}

.horario-item h3 {
    color: var(--dark-color);
    margin-bottom: 0.3rem;
}

.horario-item p {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Contacto Section */
.contacto-section {
    padding: 4rem 2rem;
    background: var(--light-color);
}

.contacto-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 95%;
    margin: 0 auto;
}

/* Desktop: 4 columnas */
@media (min-width: 1024px) {
    .contacto-info {
        grid-template-columns: repeat(4, 1fr);
        max-width: 90%;
    }
}

/* Tablet: 2 columnas */
@media (max-width: 1023px) and (min-width: 768px) {
    .contacto-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 columna */
@media (max-width: 767px) {
    .contacto-info {
        grid-template-columns: 1fr;
    }
}

.contacto-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: 180px;
    justify-content: center;
}

.contacto-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.contacto-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.contacto-item h3 {
    color: var(--dark-color);
    margin-bottom: 0.3rem;
}

.contacto-item a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.contacto-item a:hover {
    text-decoration: underline;
}

.contacto-item p {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.contacto-item .payment-instructions {
    font-size: 0.85rem;
    font-weight: 400;
    color: #666;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    pointer-events: none;
}

.cart-sidebar.open {
    pointer-events: all;
}

.cart-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-sidebar.open .cart-sidebar-overlay {
    opacity: 1;
}

.cart-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 550px;
    max-width: 100%;
    height: 100%;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-sidebar.open .cart-sidebar-content {
    transform: translateX(0);
}

.cart-sidebar-header {
    background: var(--dark-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cart-sidebar-header h3 {
    font-size: 1.4rem;
    margin: 0;
}

.btn-close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-sidebar:hover {
    transform: rotate(90deg);
}

/* Resumen del carrito */
.cart-sidebar-summary {
    padding: 1rem 1.2rem;
    border-bottom: 2px solid var(--light-color);
    flex-shrink: 0;
    max-height: 18vh;
    overflow-y: auto;
}

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

.cart-header h4 {
    color: var(--dark-color);
    font-size: 1.1rem;
}

.cart-total {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: var(--light-color);
    border-radius: 10px;
    gap: 0.5rem;
}

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

.cart-item-name {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.cart-item-details {
    font-size: 0.85rem;
    color: #666;
}

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

.btn-remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    transition: background 0.3s;
}

.btn-remove-item:hover {
    background: #c0392b;
}

/* Chat del bot */
.cart-sidebar-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 2px solid var(--light-color);
    min-height: 0; /* Importante para flexbox */
}

.chat-toggle-header {
    background: var(--chat-header-color);
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: white;
    transition: all 0.3s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-toggle-header:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.chat-toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.bot-chat-section {
    display: flex; /* Expandido por defecto */
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0; /* Importante para flexbox */
}

.bot-chat-section.collapsed {
    display: none;
}

.bot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
    background: #f8f9fa;
    min-height: 0; /* Importante para flexbox */
    scroll-behavior: smooth;
}

/* Estilo del scrollbar */
.bot-messages::-webkit-scrollbar {
    width: 8px;
}

.bot-messages::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.bot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.bot-messages::-webkit-scrollbar-thumb:hover {
    background: #ffd000;
}

.bot-message,
.user-message {
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    animation: messageIn 0.3s;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.bot-message {
    background: white;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.user-message {
    background: var(--user-message-color);
    color: white;
    margin-left: 1rem;
    text-align: right;
}

.bot-message ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
    padding-left: 0;
}

.bot-message li {
    margin: 0.3rem 0;
}

/* Estilos especiales para listas de productos */
.bot-message ul.product-list {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
}

.bot-message ul.product-list li {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.6rem 0.8rem;
    margin: 0.4rem 0;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.bot-message ul.product-list li:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(2px);
    transition: all 0.2s ease;
}

/* Asegurar que los párrafos tengan buen espaciado */
.bot-message p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.bot-message p:first-child {
    margin-top: 0;
}

.bot-message p:last-child {
    margin-bottom: 0;
}

.bot-input-container {
    display: flex;
    padding: 0.8rem 1rem;
    border-top: 2px solid var(--light-color);
    gap: 0.6rem;
    background: white;
    flex-shrink: 0;
}

#botInput {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--light-color);
    border-radius: 20px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

#botInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.btn-enviar {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.btn-enviar:hover {
    background: #ff8c5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

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

.bot-quick-actions {
    padding: 0.6rem 1rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    background: white;
    border-top: 1px solid var(--light-color);
    flex-shrink: 0;
    max-height: 80px;
    overflow: hidden;
}

.quick-action-btn {
    background: var(--light-color);
    border: 1px solid #ddd;
    color: var(--text-color);
    padding: 0.5rem 0.8rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.3);
}

.quick-action-btn:active {
    transform: translateY(0);
}

/* Footer del sidebar */
.cart-sidebar-footer {
    padding: 1rem 1.2rem;
    background: white;
    border-top: 2px solid var(--light-color);
    flex-shrink: 0;
}

.btn-finalizar-pedido {
    width: 100%;
    background: var(--success-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-finalizar-pedido:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
    filter: brightness(1.1);
}

.btn-finalizar-pedido:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.footer a:hover {
    color: #FFF200;
    text-decoration: underline;
}

/* Responsive Design - Mobile First Approach */

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .header {
        padding: 0.6rem 0;
    }

    .header .container {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.5rem 12px;
    }

    .logo h1 {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 0;
    }

    .tagline {
        font-size: 0.75rem;
        text-align: center;
        margin-top: 0.2rem;
    }

    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
        justify-content: center;
        width: 100%;
        font-size: 0.8rem;
    }

    .nav a {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        white-space: nowrap;
    }

    .btn-pedido {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        justify-content: center;
    }

    /* Sidebar en móvil - pantalla completa */
    .cart-sidebar-content {
        width: 100%;
        max-width: 100%;
    }

    .cart-sidebar-header {
        padding: 1rem;
    }

    .cart-sidebar-header h3 {
        font-size: 1.2rem;
    }

    .cart-sidebar-summary {
        max-height: 20vh;
        padding: 0.8rem;
    }

    .cart-header h4 {
        font-size: 1rem;
    }

    .cart-total {
        font-size: 1.1rem;
    }

    .cart-item {
        padding: 0.6rem;
        gap: 0.4rem;
    }

    .cart-item-name {
        font-size: 0.85rem;
    }

    .cart-item-details {
        font-size: 0.75rem;
    }

    .cart-item-price {
        font-size: 0.9rem;
    }

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

    .chat-toggle-header {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .bot-messages {
        padding: 0.8rem;
    }

    .bot-message,
    .user-message {
        font-size: 0.85rem;
        padding: 0.75rem 0.9rem;
    }

    .bot-input-container {
        padding: 0.6rem 0.8rem;
        gap: 0.4rem;
    }

    #botInput {
        font-size: 0.85rem;
        padding: 0.7rem 0.85rem;
    }

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

    .quick-action-btn {
        font-size: 0.7rem;
        padding: 0.45rem 0.65rem;
    }

    .bot-quick-actions {
        padding: 0.5rem 0.8rem;
        max-height: 65px;
    }

    .cart-sidebar-footer {
        padding: 0.8rem;
    }

    .btn-finalizar-pedido {
        padding: 0.85rem;
        font-size: 0.9rem;
    }

    .quantity-control label,
    .quantity-control-peso label {
        min-width: 55px;
        font-size: 0.8rem;
    }

    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    .qty-input,
    .peso-input {
        font-size: 0.9rem;
        padding: 0.5rem;
        min-width: 50px;
    }

    /* Hero Section */
    .hero {
        padding: 2.5rem 1rem;
        min-height: 300px;
    }

    .hero-content h2 {
        font-size: 1.6rem;
        margin-bottom: 0.7rem;
        line-height: 1.3;
        text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.3rem;
        text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    }

    .btn-primary {
        padding: 0.85rem 1.8rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 260px;
    }

    /* Secciones */
    .menu-section,
    .horarios-section,
    .contacto-section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    /* Filtros de menú */
    .menu-filters {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .filter-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }

    /* Grid del menú */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1.3rem;
    }

    .menu-item {
        padding: 1rem;
        overflow: hidden;
    }

    .menu-item-header {
        margin-bottom: 0.8rem;
        gap: 0.4rem;
        flex-wrap: nowrap;
    }

    .menu-item h3 {
        font-size: 1rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .menu-item-price {
        padding: 0.35rem 0.65rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .menu-item-familia {
        font-size: 0.75rem;
        padding: 0.25rem 0.7rem;
        max-width: calc(100% - 1rem);
    }

    .menu-item-description {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
        word-break: break-word;
    }

    .menu-item-actions {
        margin-top: 0.8rem;
        padding-top: 0.8rem;
        gap: 0.6rem;
        overflow: hidden;
    }

    .quantity-control label,
    .quantity-control-peso label {
        min-width: 50px;
        font-size: 0.85rem;
    }

    .quantity-input-group {
        gap: 0.25rem;
    }

    .qty-input,
    .peso-input {
        min-width: 45px;
        max-width: 80px;
        padding: 0.5rem 0.3rem;
        font-size: 0.9rem;
    }

    /* Horarios */
    .horarios-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .horario-item {
        padding: 1rem;
        gap: 0.8rem;
    }

    .horario-item h3 {
        font-size: 0.95rem;
    }

    .horario-item p {
        font-size: 0.9rem;
    }

    .horario-icon {
        font-size: 1.8rem;
    }

    /* Contacto */
    .contacto-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contacto-item {
        padding: 1rem;
    }

    .contacto-item h3 {
        font-size: 0.95rem;
    }

    .contacto-item a,
    .contacto-item p {
        font-size: 0.9rem;
    }

    .contacto-icon {
        font-size: 1.8rem;
    }

    .user-message {
        margin-left: 0;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 1rem;
    }

    .footer p {
        font-size: 0.85rem;
    }
}

/* Tablets y móviles grandes (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .hero {
        min-height: 350px;
        padding: 3rem 1.5rem;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .horarios-card {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacto-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .cart-sidebar-content {
        width: 450px;
    }

    .user-message {
        margin-left: 1rem;
    }
}

/* Tablets grandes y laptops pequeñas (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .cart-sidebar-content {
        width: 500px;
    }
}

/* Desktop grande (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

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

    .cart-sidebar-content {
        width: 550px;
    }
}

/* Mejoras para touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos táctiles */
    .filter-btn,
    .btn-pedido,
    .btn-primary,
    .btn-enviar,
    .quick-action-btn,
    .btn-add-to-cart {
        min-height: 44px; /* Tamaño mínimo recomendado para touch */
    }

    .nav a {
        padding: 0.6rem 0.8rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .btn-remove-item {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }

    .qty-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* Evitar efectos hover en touch */
    .menu-item:hover {
        transform: none;
    }

    .filter-btn:hover {
        transform: none;
    }

    .btn-add-to-cart:hover,
    .btn-primary:hover,
    .btn-pedido:hover {
        transform: none;
    }
}

/* Landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .cart-sidebar-content {
        width: 100%;
    }

    .cart-sidebar-summary {
        max-height: 25vh;
    }

    .bot-messages {
        max-height: 35vh;
    }
}

/* Accesibilidad - Reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Menu Item Actions */
.menu-item-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-color);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    min-width: 0;
}

.quantity-control,
.quantity-control-peso {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.quantity-control label,
.quantity-control-peso label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    min-width: 70px;
    flex-shrink: 0;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
}

.qty-btn {
    background: var(--primary-color);
    color: var(--dark-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qty-btn:hover {
    background: #ffd000;
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input,
.peso-input {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    border: 2px solid var(--light-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    min-width: 50px;
    max-width: 100px;
}

.qty-input:focus,
.peso-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-add-to-cart {
    background: var(--button-color, var(--secondary-color));
    color: white;
    border: none;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.btn-add-to-cart:active {
    transform: translateY(0);
}

/* Notificaciones Temporales */
.notificacion-temporal {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 3000;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 350px;
}

.notificacion-temporal.show {
    opacity: 1;
    transform: translateX(0);
}

.notificacion-success {
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.notificacion-error {
    border-left: 4px solid #e74c3c;
    color: #e74c3c;
}

.notificacion-info {
    border-left: 4px solid var(--primary-color);
    color: var(--dark-color);
}

/* Badge de precio destacado para productos caros */
.menu-item[data-familia] {
    position: relative;
}

.menu-item .menu-item-price {
    position: relative;
}

/* Mejoras responsive para botones del menú */
@media (max-width: 480px) {
    .btn-add-to-cart {
        padding: 0.8rem 0.9rem;
        font-size: 0.85rem;
    }

    .notificacion-temporal {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        font-size: 0.85rem;
        padding: 0.85rem 1.2rem;
    }
}

/* Optimizaciones adicionales para móviles muy pequeños */
@media (max-width: 360px) {
    .logo h1 {
        font-size: 1.3rem;
    }

    .tagline {
        font-size: 0.7rem;
    }

    .nav a {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    .hero-content h2 {
        font-size: 1.4rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

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

    .filter-btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.75rem;
    }

    .menu-item {
        padding: 0.9rem;
    }

    .menu-item h3 {
        font-size: 0.95rem;
    }

    .menu-item-price {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .quantity-control label,
    .quantity-control-peso label {
        min-width: 45px;
        font-size: 0.8rem;
    }

    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .qty-input,
    .peso-input {
        min-width: 40px;
        max-width: 70px;
        font-size: 0.85rem;
        padding: 0.4rem 0.2rem;
    }

    .btn-add-to-cart {
        font-size: 0.8rem;
        padding: 0.75rem 0.9rem;
    }

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

    .bot-message,
    .user-message {
        font-size: 0.8rem;
        padding: 0.7rem 0.85rem;
    }
}

/* Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 0.3rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
/* Modal de Imagen */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.image-modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    padding: 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.menu-item-image {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-item-image:hover {
    opacity: 0.9;
}

/* Responsive para modal */
@media (max-width: 768px) {
    .image-modal-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .image-modal-close {
        top: 10px;
        right: 15px;
        font-size: 40px;
    }

    .image-modal-caption {
        font-size: 1rem;
        padding: 15px 10px;
    }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive para botón scroll to top */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 90px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
