/* Reset y variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d97706;
    --secondary-color: #f59e0b;
    --accent-color: #92400e;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --background: #fef3c7;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #fef7ed 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header del restaurante */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    /* position: sticky;
    top: 0;
    z-index: 100; */
}

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

.restaurant-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.restaurant-logo:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.header h1 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header h1:hover {
    cursor: pointer;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Ubicación del cliente */
.location-info {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.location-info:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.location-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
}

.location-content.error {
    cursor: pointer;
    color: #fbbf24;
}

.location-content.error:hover {
    color: #ffffff;
}

.location-content.loading {
    animation: pulse 1.5s infinite;
}

.location-text {
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

.location-retry-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.location-retry-btn:hover {
    color: var(--secondary-color);
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Navegación de categorías mejorada */
.categories-nav {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Efecto de sombra más pronunciada cuando está sticky */
.categories-nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(0);
}

/* Indicador visual de navegación fija */
.categories-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.categories-nav.scrolled::before {
    opacity: 1;
}

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

.nav-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.toggle-btn:hover,
.toggle-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Vista de lista horizontal (original) */
.categories-list {
    display: none;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
}

.categories-list.active {
    display: flex;
}

.categories-list::-webkit-scrollbar {
    height: 4px;
}

.categories-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.categories-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

/* Vista de cuadrícula */
.categories-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

.categories-grid.active {
    display: grid;
}

/* Vista desplegable */
.categories-dropdown {
    display: none;
    position: relative;
}

.categories-dropdown.active {
    display: block;
}

.dropdown-button {
    width: 100%;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
}

.dropdown-button:hover {
    background: var(--primary-color);
    color: var(--white);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.dropdown-item:hover,
.dropdown-item.active {
    background: var(--background);
    color: var(--primary-color);
}

.category-btn {
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    /* white-space: nowrap; */
    white-space: break-spaces;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    min-width: 120px;
    justify-content: center;
}

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

/* Contador de categorías */
.category-count {
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

/* Sección de productos */
.products-section {
    display: none;
}

.products-section.active {
    display: block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Tarjeta de producto */
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #e5e7eb;
}

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

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f3f4f6;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* Carrito flotante */
.cart-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cart-float:hover {
    transform: scale(1.1);
    background: var(--accent-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Modal del carrito */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 1rem;
}

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

.cart-item-image {
    flex-shrink: 0;
    position: relative;
}

.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    transition: var(--transition);
}

.product-thumbnail:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.quantity-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
    animation: bounceIn 0.3s ease-out;
}

.customization-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #8b5cf6;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.combo-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #f59e0b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.comment-badge {
    position: absolute;
    bottom: -8px;
    left: -8px;
    background: #059669;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.cart-item-options,
.cart-item-combo {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.3;
    border-left: 3px solid var(--primary-color);
}

.cart-item-combo {
    border-left-color: #f59e0b;
}

.cart-item.updated {
    animation: cartItemUpdate 0.4s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes cartItemUpdate {
    0% { background-color: transparent; }
    25% { background-color: rgba(var(--primary-color-rgb, 217, 119, 6), 0.1); }
    100% { background-color: transparent; }
}

.cart-item-image.loading .product-thumbnail {
    opacity: 0.7;
    filter: blur(2px);
}

.cart-item-image.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.cart-item-info {
    flex: 1;
    min-width: 0; /* Permite que el texto se trunque si es necesario */
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.3;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.cart-item-subtotal {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Estilos para comentarios por producto en el carrito */
.cart-item-comment-field {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #059669;
}

.item-comment-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #059669;
}

.item-comment-label .comment-icon {
    font-size: 0.9rem;
}

.item-comment-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
    resize: vertical;
    min-height: 40px;
}

.item-comment-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.1);
}

.item-comment-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.item-comment-input:not(:placeholder-shown) {
    border-color: #059669;
    background-color: rgba(5, 150, 105, 0.02);
}

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

.quantity-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--accent-color);
}

.quantity {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.cart-total {
    background: #f9fafb;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    text-align: center;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.distance-info {
    background: #eff6ff;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    border-left: 4px solid #3b82f6;
}

.checkout-btn {
    width: 100%;
    background: #10b981;
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.checkout-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

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

.loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-light);
}

/* Estilos para el desglose de costos */
.cost-breakdown {
    border-top: 2px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.cost-item.total {
    border-top: 2px solid var(--primary-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.cost-item.delivery-free {
    color: #059669;
    font-weight: 600;
}

.cost-item.delivery-unavailable {
    color: #dc2626;
    font-weight: 600;
}

.cost-item.delivery-calculating {
    color: var(--text-light);
    font-style: italic;
}

.cost-item.tip-item {
    color: #22c55e;
    font-weight: 600;
}

.delivery-info {
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.delivery-info small {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Estilos para información del cliente */
.customer-info-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: var(--border-radius);
    border-left: 4px solid #10b981;
}

.customer-info-title {
    color: #10b981;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

.customer-info-content {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.phone-input-container {
    position: relative;
}

.phone-label, .name-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
}

.phone-icon, .name-icon {
    font-size: 1.2rem;
}

.phone-text, .name-text {
    font-size: 1rem;
}

.required-indicator {
    color: #ef4444;
    font-weight: bold;
    font-size: 1.1rem;
}

.phone-input,.name-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
}

.phone-input,.name-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.phone-input,.name-input:valid {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

.phone-input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

.phone-input[value^="+"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.phone-validation {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #eff6ff;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.phone-validation.success {
    background: #f0fdf4;
    border-left-color: #10b981;
}

.phone-validation.error {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.validation-message {
    font-size: 0.85rem;
    color: #1e40af;
    line-height: 1.3;
}

.validation-message.success {
    color: #059669;
}

.validation-message.error {
    color: #dc2626;
}

/* Estilos para comentarios del pedido */
.order-comments-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fef7ed;
    border-radius: var(--border-radius);
    border-left: 4px solid #f59e0b;
}

.order-comments-title {
    color: #f59e0b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

.order-comments-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-field {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.comment-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.comment-icon {
    font-size: 1.2rem;
}

.comment-text {
    font-size: 1rem;
}

.comment-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
    resize: vertical;
    min-height: 60px;
}

.comment-textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.comment-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.comment-help {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}

/* Estilos para propina */
.tip-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: var(--border-radius);
    border-left: 4px solid #22c55e;
}

.tip-title {
    color: #22c55e;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

.tip-content {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.tip-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tip-option-item {
    position: relative;
}

.tip-option-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.tip-option-item label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0.5rem;
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 80px;
    justify-content: center;
}

.tip-option-item label:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.tip-option-item input[type="radio"]:checked + label {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.tip-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #22c55e;
}

.tip-description {
    font-size: 0.8rem;
    color: var(--text-light);
}

.tip-option-item.custom label {
    border-style: dashed;
}

.tip-option-item.custom input[type="radio"]:checked + label {
    border-style: solid;
}

.custom-tip-input {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #22c55e;
}

.custom-tip-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.tip-icon {
    font-size: 1.2rem;
}

.custom-tip-field {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
}

.custom-tip-field:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.tip-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #eff6ff;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.tip-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #1e40af;
    line-height: 1.4;
}

/* Estilos para métodos de pago */
.payment-method-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.payment-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-option {
    position: relative;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.payment-option label:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb, 217, 119, 6), 0.05);
}

.payment-option input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb, 217, 119, 6), 0.1);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb, 217, 119, 6), 0.2);
}

.payment-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.payment-text {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.payment-description {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: auto;
}

/* Botones de checkout actualizados */
.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkout-btn.primary {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    order: 1;
}

.checkout-btn.primary:hover {
    background: var(--accent-color);
}

.checkout-btn.secondary {
    background: #10b981;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    order: 2;
}

.checkout-btn.secondary:hover {
    background: #059669;
}

.checkout-btn.primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.checkout-btn.secondary:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
}

/* Estilos para modales de opciones y combos */
.options-modal-content,
.combo-modal-content {
    max-width: 600px;
    max-height: 85vh;
}

.product-summary {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.product-summary-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.product-summary-info {
    flex: 1;
}

.product-summary-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.product-summary-info p {
    margin: 0 0 1rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.base-price {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

/* Grupos de opciones */
.option-group {
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.option-group-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-group-title {
    font-weight: bold;
    margin: 0;
}

.option-group-required {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.option-group-body {
    padding: 1rem;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.option-item:last-child {
    margin-bottom: 0;
}

.option-item:hover {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.option-item.selected {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb, 217, 119, 6), 0.1);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb, 217, 119, 6), 0.2);
}

.option-item.selected .option-item-name {
    color: var(--primary-color);
    font-weight: 700;
}

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

.option-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.option-item-price {
    color: var(--primary-color);
    font-weight: bold;
}

.option-item-price.free {
    color: #059669;
}

.option-item-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.option-control-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: var(--transition);
    user-select: none;
}

.option-control-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

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

.option-control-btn.minus-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.option-control-btn.plus-btn.max-reached {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.option-quantity {
    min-width: 24px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-dark);
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.option-quantity.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Componentes de combo */
.combo-component {
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.combo-component-header {
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.combo-component-title {
    font-weight: bold;
    margin: 0;
}

.combo-component-counter {
    background: white;
    color: var(--secondary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.combo-component-body {
    padding: 1rem;
}

.combo-option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.combo-option-item:last-child {
    margin-bottom: 0;
}

.combo-option-item:hover {
    border-color: var(--secondary-color);
    background: #f8fafc;
}

.combo-option-item.selected {
    border-color: var(--secondary-color);
    background: rgba(var(--secondary-color-rgb, 245, 158, 11), 0.1);
}

.combo-option-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.combo-option-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.options-actions,
.combo-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb;
}

.options-actions button,
.combo-actions button {
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 1rem;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.pulse {
    animation: pulse 0.6s ease-in-out;
}

/* Footer del restaurante */
.footer {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 3rem 1rem 1rem;
    margin-top: 3rem;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

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

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p, .footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 1rem;
}

.whatsapp-button:hover {
    background: #1DA851;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.powered-by {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.powered-by a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.powered-by a:hover {
    color: var(--white);
}

/* Vista de carga */
.loading-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--background) 0%, var(--white) 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loading-view.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    position: relative;
    max-width: 400px;
    width: 100%;
    padding: 2rem;
}

/* Spinner principal */
.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.plate-spinner {
    position: relative;
    width: 100%;
    height: 100%;
    animation: plateRotate 3s linear infinite;
}

.plate {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 4px solid var(--primary-color);
    box-shadow: 
        0 0 20px rgba(var(--primary-color-rgb, 217, 119, 6), 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.food-item {
    position: absolute;
    font-size: 1.5rem;
    animation: foodFloat 2s ease-in-out infinite;
}

.food-1 { top: 10px; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.food-2 { top: 50%; right: 10px; transform: translateY(-50%); animation-delay: 0.5s; }
.food-3 { bottom: 10px; left: 50%; transform: translateX(-50%); animation-delay: 1s; }
.food-4 { top: 50%; left: 10px; transform: translateY(-50%); animation-delay: 1.5s; }

/* Cubiertos giratorios */
.utensils {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    animation: utensilsRotate 4s linear infinite reverse;
}

.utensil {
    position: absolute;
    font-size: 1.2rem;
    animation: utensilFloat 1.5s ease-in-out infinite;
}

.fork { top: -20px; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.knife { top: 50%; right: -20px; transform: translateY(-50%); animation-delay: 0.5s; }
.spoon { bottom: -20px; left: 50%; transform: translateX(-50%); animation-delay: 1s; }

/* Chef animado */
.chef-animation {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 60px;
    height: 60px;
}

.chef {
    font-size: 2rem;
    animation: chefBounce 2s ease-in-out infinite;
}

.cooking-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    font-size: 1rem;
    animation: particleFloat 3s ease-in-out infinite;
}

.particle:nth-child(1) { top: 10px; left: 10px; animation-delay: 0s; }
.particle:nth-child(2) { top: 20px; right: 10px; animation-delay: 1s; }
.particle:nth-child(3) { bottom: 10px; left: 20px; animation-delay: 2s; }

/* Texto de carga */
.loading-text {
    margin-bottom: 2rem;
}

.loading-text h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.loading-text p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

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

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.5s; }
.loading-dots span:nth-child(3) { animation-delay: 1s; }

/* Barra de progreso */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
    animation: progressGlow 2s ease-in-out infinite;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Elementos decorativos flotantes */
.floating-ingredients {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.ingredient {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.7;
    animation: ingredientFloat 8s ease-in-out infinite;
}

.ing-1 { top: 20%; left: 10%; animation-delay: 0s; }
.ing-2 { top: 30%; right: 15%; animation-delay: 1s; }
.ing-3 { top: 60%; left: 20%; animation-delay: 2s; }
.ing-4 { top: 70%; right: 25%; animation-delay: 3s; }
.ing-5 { top: 40%; left: 5%; animation-delay: 4s; }
.ing-6 { top: 50%; right: 10%; animation-delay: 5s; }

/* Animaciones */
@keyframes plateRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes foodFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

@keyframes utensilsRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes utensilFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes chefBounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

@keyframes particleFloat {
    0% { transform: translateY(0px) scale(1); opacity: 0.7; }
    50% { transform: translateY(-15px) scale(1.2); opacity: 1; }
    100% { transform: translateY(0px) scale(1); opacity: 0.7; }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(var(--primary-color-rgb, 217, 119, 6), 0.5); }
    50% { box-shadow: 0 0 15px rgba(var(--primary-color-rgb, 217, 119, 6), 0.8); }
}

@keyframes ingredientFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.7; 
    }
    25% { 
        transform: translateY(-20px) rotate(90deg); 
        opacity: 1; 
    }
    50% { 
        transform: translateY(0px) rotate(180deg); 
        opacity: 0.8; 
    }
    75% { 
        transform: translateY(-10px) rotate(270deg); 
        opacity: 1; 
    }
}

/* Responsive para vista de carga */
@media (max-width: 768px) {
    .loading-container {
        padding: 1rem;
    }

    .loading-spinner {
        width: 100px;
        height: 100px;
    }

    .loading-text h2 {
        font-size: 1.2rem;
    }

    .loading-text p {
        font-size: 0.9rem;
    }

    .food-item {
        font-size: 1.2rem;
    }

    .utensil {
        font-size: 1rem;
    }

    .chef {
        font-size: 1.5rem;
    }

    .ingredient {
        font-size: 1.2rem;
    }

    .chef-animation {
        width: 50px;
        height: 50px;
        top: -25px;
        right: -25px;
    }
}

/* Vista de negocio cerrado */
.closed-business-view {
    display: none;
    min-height: 100vh;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
    overflow: hidden;
}

.closed-business-view.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.closed-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.closed-icon {
    margin-bottom: 2rem;
    animation: swingSign 3s ease-in-out infinite;
}

.closed-sign {
    display: inline-block;
    position: relative;
}

.sign-chain {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #6b7280, #4b5563);
    margin: 0 auto 5px;
    border-radius: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sign-board {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    border: 3px solid #d97706;
    border-radius: 8px;
    padding: 1rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
    position: relative;
}

.closed-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #92400e;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
}

.closed-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-color);
    margin-top: 1rem;
}

.closed-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: bold;
}

.closed-message {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.closed-info {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.info-section {
    text-align: center;
    max-width: 300px;
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.closed-actions {
    margin-top: 2rem;
}

.refresh-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.refresh-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

/* Animaciones para vista cerrada */
@keyframes swingSign {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

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

.closed-business-view.active .closed-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Patrones de fondo para vista cerrada */
.closed-business-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(var(--primary-color-rgb, 217, 119, 6), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(var(--secondary-color-rgb, 245, 158, 11), 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Responsive para vista cerrada */
@media (max-width: 768px) {
    .closed-container {
        padding: 1rem;
    }

    .closed-content {
        padding: 1.5rem;
    }

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

    .closed-message {
        font-size: 1rem;
    }

    .closed-info {
        margin-bottom: 1.5rem;
    }

    .info-section {
        max-width: 100%;
        padding: 0 1rem;
    }

    .refresh-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Vista de pedido enviado */
.order-sent-view {
    display: none;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    position: relative;
    overflow: hidden;
}

.order-sent-view.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.order-sent-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.order-sent-icon {
    margin-bottom: 2rem;
    animation: orderSuccess 2s ease-in-out infinite;
}

.order-animation {
    display: inline-block;
    position: relative;
}

.order-plate {
    position: relative;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    border-radius: 50%;
    border: 4px solid #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    animation: plateGlow 3s ease-in-out infinite;
}

.order-food {
    font-size: 3rem;
    animation: foodBounce 2s ease-in-out infinite;
}

.order-sparkles {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkleFloat 3s ease-in-out infinite;
}

.sparkle:nth-child(1) {
    top: 10px;
    right: 10px;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    bottom: 10px;
    left: 10px;
    animation-delay: 1s;
}

.sparkle:nth-child(3) {
    top: 50%;
    right: -10px;
    animation-delay: 2s;
}

.order-sent-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid #10b981;
    margin-top: 1rem;
}

.order-sent-title {
    font-size: 2rem;
    color: #10b981;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.order-status {
    margin-bottom: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

.status-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
}

.status-circle.pending {
    background: #fbbf24;
    animation: pulse 2s ease-in-out infinite;
}

.status-circle.confirmed {
    background: #10b981;
}

.status-circle.preparing {
    background: #f59e0b;
    animation: spin 2s linear infinite;
}

.status-circle.cancelled {
    background: #dc2626;
    animation: pulse 2s ease-in-out infinite;
}

.status-text {
    color: #059669;
    font-weight: 600;
    font-size: 1rem;
}

.order-details {
    margin-bottom: 2rem;
}

.order-info {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
}

.order-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.order-info > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.order-info > div:last-child {
    border-bottom: none;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-color);
    font-size: 1.1rem;
    color: var(--primary-color);
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn.primary {
    background: #10b981;
    color: var(--white);
}

.action-btn.primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.action-btn.secondary {
    background: var(--primary-color);
    color: var(--white);
}

.action-btn.secondary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.action-btn.tertiary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.action-btn.tertiary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.order-timer {
    background: #eff6ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.order-timer p {
    margin: 0.25rem 0;
}

.order-comments {
    margin-top: 0.5rem;
}

.comments-content {
    margin-top: 0.5rem;
}

.comment-item {
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    border-left: 3px solid #f59e0b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-section {
    background: #fef7ed;
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #f59e0b;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f59e0b;
}

/* Animaciones para vista de pedido enviado */
@keyframes orderSuccess {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes plateGlow {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
        transform: rotate(0deg);
    }
    50% { 
        box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
        transform: rotate(5deg);
    }
}

@keyframes foodBounce {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes sparkleFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
        opacity: 0.7; 
    }
    50% { 
        transform: translateY(-15px) scale(1.2); 
        opacity: 1; 
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive para vista de pedido enviado */
@media (max-width: 768px) {
    .order-sent-container {
        padding: 1rem;
    }

    .order-sent-content {
        padding: 1.5rem;
    }

    .order-sent-title {
        font-size: 1.5rem;
    }

    .order-plate {
        width: 100px;
        height: 100px;
    }

    .order-food {
        font-size: 2.5rem;
    }

    .sparkle {
        font-size: 1.2rem;
    }

    .action-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .order-info {
        padding: 1rem;
    }

    .order-info > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .restaurant-logo {
        width: 50px;
        height: 50px;
    }

    /* Ubicación del cliente responsive */
    .location-info {
        margin-top: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .location-content {
        font-size: 0.85rem;
        gap: 0.4rem;
    }

    .location-text {
        font-size: 0.85rem;
    }

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

    .cart-float {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }

    /* Navegación sticky responsive */
    .categories-nav {
        margin: 0 -1rem 1rem -1rem;
        border-radius: 0;
        padding: 0.75rem 1rem;
        position: sticky;
        top: 0;
    }

    .categories-nav.scrolled {
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    }

    /* Navegación responsive */
    .nav-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .nav-title {
        justify-content: center;
    }

    .view-toggle {
        justify-content: center;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-width: 100px;
    }

    .toggle-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Auto-cambio a dropdown en móviles con muchas categorías */
    .categories-nav[data-many-categories="true"] .categories-list,
    .categories-nav[data-many-categories="true"] .categories-grid {
        display: none;
    }

    .categories-nav[data-many-categories="true"] .categories-dropdown {
        display: block;
    }

    .categories-nav[data-many-categories="true"] .view-toggle {
        display: none;
    }
}

@media (max-width: 480px) {
    .categories-nav {
        padding: 0.5rem 0.75rem;
    }

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

    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 80px;
    }

    .dropdown-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .dropdown-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Ubicación del cliente en pantallas muy pequeñas */
    .location-info {
        margin-top: 0.5rem;
        padding: 0.4rem 0.5rem;
    }

    .location-content {
        font-size: 0.8rem;
        gap: 0.3rem;
        flex-direction: column;
    }

    .location-text {
        font-size: 0.8rem;
        text-align: center;
    }

    /* Ajustar carrito flotante para no interferir con navegación sticky */
    .cart-float {
        bottom: 1.5rem;
        right: 1rem;
    }

    /* Estilos responsive para miniaturas del carrito */
    .cart-item {
        padding: 0.75rem 0;
        gap: 0.75rem;
    }

    .product-thumbnail {
        width: 50px;
        height: 50px;
        border-radius: 6px;
    }

    .quantity-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: -6px;
        right: -6px;
    }

    .cart-item-name {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .cart-item-price,
    .cart-item-subtotal {
        font-size: 0.8rem;
    }

    .cart-item-controls {
        gap: 0.4rem;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .quantity {
        min-width: 25px;
        font-size: 0.9rem;
    }

    /* Controles de opciones en móvil */
    .option-item-controls {
        gap: 0.5rem;
    }

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

    .option-quantity {
        min-width: 20px;
        font-size: 1rem;
        padding: 0.2rem 0.4rem;
    }

    .options-modal-content,
    .combo-modal-content {
        max-width: 95vw;
        margin: 1rem;
    }

    .product-summary {
        flex-direction: column;
        gap: 0.75rem;
    }

    .product-summary-image {
        width: 60px;
        height: 60px;
        align-self: center;
    }

    .option-group-header {
        padding: 0.75rem;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .option-group-body {
        padding: 0.75rem;
    }

    .option-item {
        padding: 0.6rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .option-item-info {
        text-align: center;
    }

    .option-item-controls {
        align-self: center;
        justify-content: center;
    }
}