/* =========================================
   LA TAVOLA - ESTILO GOURMET
   ========================================= */

:root {
    --primary: #d35400;
    /* Terracota / Salsa */
    --dark: #2d3436;
    --light: #fdfbf7;
    /* Crema */
    --white: #ffffff;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    padding-bottom: 80px;
    /* Espacio para el carrito */
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* --- NAVBAR --- */
.navbar {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-info {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--dark);
}

/* --- HERO --- */
.hero {
    height: 50vh;
    background: url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.btn-hero {
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 50px;
    transition: 0.3s;
}

.btn-hero:hover {
    background: #e67e22;
}

/* --- CATEGORÍAS STICKY --- */
.category-nav {
    background: var(--white);
    padding: 15px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    white-space: nowrap;
}

.cat-btn {
    background: transparent;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 20px;
    margin: 0 5px;
    cursor: pointer;
    font-family: 'Lato';
    font-weight: bold;
    transition: 0.3s;
}

.cat-btn:hover,
.cat-btn:focus {
    background: var(--dark);
    color: white;
    border-color: var(--dark);
}

/* --- MENÚ GRID --- */
.menu-section {
    padding: 50px 0;
}

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

.dish-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
}

.dish-card:hover {
    transform: translateY(-5px);
}

.dish-img {
    position: relative;
    height: 200px;
}

.dish-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--white);
    color: var(--dark);
    padding: 5px 12px;
    font-weight: bold;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dish-info {
    padding: 20px;
    text-align: center;
}

.dish-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.dish-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    min-height: 40px;
}

.btn-add {
    width: 100%;
    background: var(--dark);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-add:hover {
    background: var(--primary);
}

/* --- CARRITO FLOTANTE (BARRA INFERIOR) --- */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid #ddd;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cart-bar.visible {
    transform: translateY(0);
}

.cart-info {
    font-weight: bold;
    font-size: 1.1rem;
}

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

.btn-checkout {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-checkout:hover {
    background: #128C7E;
}

/* --- FOOTER --- */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .cart-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

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