/* ============================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ============================================ */

:root {
    /* Colores principales - Tema Oscuro Elegante */
    --primary-color: #FFD700;
    --primary-dark: #B8860B;
    --primary-light: #FFF8DC;
    --accent-color: #FFD700;
    --secondary-color: #0a0a0a;
    --text-dark: #ffffff;
    --text-light: #cccccc;
    --border-light: #333333;
    --success-color: #25D366;
    --bg-dark: #000000;
    --bg-light: #1a1a1a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.9);
    
    /* Tipografía */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 16px;
    --line-height: 1.6;
    
    /* Espaciado */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--text-dark);
    background-color: var(--bg-dark);
    background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="%23000000"/><rect x="0" y="0" width="1" height="1" fill="%23111111"/></svg>');
    background-size: 100px 100px;
    overflow-x: hidden;
}

/* ============================================
   HEADER PROFESIONAL
   ============================================ */

.header {
    background: var(--bg-dark);
    border-bottom: 2px solid var(--primary-color);
    color: white;
    padding: var(--spacing-lg) var(--spacing-md);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 100px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
    transition: all var(--transition-normal);
}

.logo-image:hover {
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.5));
    transform: scale(1.05);
}

.logo-placeholder {
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

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

.restaurant-title h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.restaurant-tagline {
    font-size: 12px;
    opacity: 0.9;
    font-style: italic;
    color: var(--accent-color);
}

.btn-whatsapp-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    font-size: 14px;
}

.btn-whatsapp-header:hover {
    background-color: #1FAE55;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.whatsapp-icon {
    font-size: 18px;
}

/* ============================================
   INFORMACIÓN DEL RESTAURANTE
   ============================================ */

.restaurant-info {
    background: var(--bg-light);
    padding: var(--spacing-lg) var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.info-grid {
    max-width: 1200px;
    margin: 0 auto var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.info-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 215, 0, 0.05);
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
}

.info-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.info-banner {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    color: var(--primary-color);
    text-align: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 8px;
    font-weight: 600;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

/* ============================================
   DEMO BANNER
   ============================================ */

.demo-banner {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    padding: var(--spacing-md);
    text-align: center;
    border-bottom: 3px solid #FF8C00;
}

.demo-text {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

/* ============================================
   NAVEGACIÓN POR CATEGORÍAS
   ============================================ */

.category-nav {
    position: sticky;
    top: 80px;
    z-index: 50;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--primary-color);
    padding: var(--spacing-md) 0;
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    overflow-x: auto;
    scroll-behavior: smooth;
    box-shadow: var(--shadow-md);
}

.category-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-light);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-normal);
    white-space: nowrap;
    flex-shrink: 0;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.category-btn.active {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* ============================================
   MENÚ PRINCIPAL
   ============================================ */

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.menu-category {
    margin-bottom: var(--spacing-xl);
}

.category-header {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.category-header h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.category-divider {
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: var(--spacing-md) auto 0;
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* ============================================
   TARJETAS DE PRODUCTO
   ============================================ */

.product-card {
    background: var(--bg-light);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-light);
    position: relative;
}

.product-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px rgba(255, 215, 0, 0.3);
    border-color: var(--primary-color);
}

.product-card:hover::after {
    transform: scaleX(1);
}

.product-image {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    transition: all var(--transition-normal);
    border-bottom: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.1), rgba(160, 82, 45, 0.05));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover .product-image::before {
    opacity: 1;
}

.product-info {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex-grow: 1;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-light);
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.btn-add {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.btn-add:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

.btn-add:active {
    transform: scale(0.98);
}

/* ============================================
   CARRITO FLOTANTE
   ============================================ */

.cart-container {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 200;
}

.btn-cart-toggle {
    width: 60px;
    height: 60px;
    border-radius: 0;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    transition: all var(--transition-normal);
}

.btn-cart-toggle:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}

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

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--bg-dark);
    width: 28px;
    height: 28px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid var(--bg-dark);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.cart-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-dark);
    border-left: 2px solid var(--primary-color);
    box-shadow: -4px 0 40px rgba(255, 215, 0, 0.3);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: 300;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.cart-header {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: var(--spacing-lg) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.cart-header h2 {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.btn-close {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 28px;
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.btn-close:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
    background: var(--bg-dark);
}

.empty-cart {
    text-align: center;
    color: var(--text-light);
    padding: var(--spacing-lg);
    font-style: italic;
}

.cart-item {
    background: var(--bg-light);
    border-radius: 0;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.cart-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

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

.cart-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-qty {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    width: 28px;
    height: 28px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 700;
    transition: all var(--transition-normal);
}

.btn-qty:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.qty-display {
    width: 30px;
    text-align: center;
    font-weight: 600;
}

.btn-remove {
    background: #ff4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-normal);
}

.btn-remove:hover {
    background: #cc0000;
}

.cart-summary {
    background: var(--bg-light);
    border-top: 2px solid var(--primary-color);
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--primary-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    color: var(--text-dark);
}

.summary-row.total {
    font-size: 18px;
    color: var(--primary-color);
    border-top: 2px solid var(--primary-color);
    padding-top: var(--spacing-md);
    margin-bottom: 0;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.btn-order {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: var(--spacing-md);
    margin: var(--spacing-md);
    border-radius: 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-order:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

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

.btn-clear {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-light);
    padding: var(--spacing-sm) var(--spacing-md);
    margin: 0 var(--spacing-md) var(--spacing-md);
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
}

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

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-xl);
    border-top: 2px solid var(--primary-color);
}

.footer-content p {
    margin-bottom: 8px;
    font-size: 14px;
}

.footer-demo {
    color: var(--accent-color);
    font-weight: 600;
}

/* ============================================
   ANIMACIONES Y EFECTOS
   ============================================ */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.product-card {
    animation: slideInRight 0.5s ease-out;
}

.cart-item {
    animation: slideInRight 0.3s ease-out;
}

/* Notificación de producto agregado */
.add-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease-out, slideInRight 0.3s ease-out 2.7s reverse;
    z-index: 250;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    :root {
        --font-size-base: 14px;
        --spacing-md: 12px;
        --spacing-lg: 16px;
    }

    .header-container {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    .restaurant-title h1 {
        font-size: 22px;
    }

    .btn-whatsapp-header {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 12px;
    }

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

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }

    .category-nav {
        top: 120px;
        padding: var(--spacing-sm) 0;
        gap: 6px;
    }

    .category-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 12px;
    }

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

    .product-card {
        border-radius: 8px;
    }

    .product-image {
        height: 120px;
        font-size: 48px;
    }

    .product-name {
        font-size: 16px;
    }

    .product-desc {
        font-size: 12px;
    }

    .category-header h2 {
        font-size: 22px;
    }

    .btn-cart-toggle {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }

    .cart-count {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 13px;
        --spacing-md: 10px;
        --spacing-lg: 12px;
    }

    .header {
        padding: var(--spacing-sm);
    }

    .restaurant-title h1 {
        font-size: 18px;
    }

    .restaurant-tagline {
        font-size: 10px;
    }

    .logo-placeholder {
        font-size: 32px;
    }

    .btn-whatsapp-header {
        padding: 6px 12px;
        font-size: 11px;
    }

    .restaurant-info {
        padding: var(--spacing-sm);
    }

    .info-grid {
        gap: var(--spacing-sm);
    }

    .info-item {
        padding: var(--spacing-sm);
    }

    .info-label {
        font-size: 10px;
    }

    .info-value {
        font-size: 12px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .product-image {
        height: 100px;
        font-size: 40px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-desc {
        font-size: 11px;
    }

    .product-price {
        font-size: 16px;
    }

    .btn-add {
        padding: 6px 12px;
        font-size: 11px;
    }

    .btn-cart-toggle {
        width: 50px;
        height: 50px;
        font-size: 18px;
        bottom: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    .category-header h2 {
        font-size: 18px;
    }

    .add-notification {
        top: 90px;
        right: 10px;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 12px;
    }

    .menu-container {
        padding: var(--spacing-sm);
    }
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
