/* ============================================
   SISTEMA DE CARTA - ESTILOS
   ============================================ */

/* --- COLORES PRINCIPALES --- */
:root {
    --color-principal: #004542;
    --color-principal-hover: rgba(0, 39, 66, 0.5);
    --color-texto: #333333;
    --color-fondo: #ffffff;
}

/* --- CONTENEDOR PRINCIPAL --- */
.carta-app { 
    font-family: inherit;
    max-width: 1100px; 
    margin: auto; 
    padding: 20px; 
}

/* --- TABS (Categorías) - Versión compacta --- */
.carta-tabs { 
    display: flex; 
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 30px; 
    padding-bottom: 10px;
    scrollbar-width: thin;
}
.carta-tabs::-webkit-scrollbar {
    height: 4px;
}
.carta-tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}
.tab { 
    padding: 8px 12px; 
    background: transparent; 
    border: 1px solid transparent; 
    border-radius: 4px;
    cursor: pointer; 
    font-size: 13px; 
    color: var(--color-texto);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.tab:hover { 
    background: var(--color-principal-hover);
    color: #ffffff !important;
}
.tab.active { 
    background: var(--color-principal); 
    color: #ffffff !important;
    border-color: var(--color-principal);
    font-weight: bold;
}

/* --- CUADRÍCULA DE PLATOS --- */
.carta-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px; 
}

/* ============================================
   PLATOS - TODOS IGUALES (solo cambia el borde)
   ============================================ */
.plato {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    gap: 15px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease;
    height: 110px;
    overflow: hidden;
}
.plato:hover {
    transform: translateX(5px);
    background: #f1f3f5;
}

/* SOLO los destacados tienen borde del color principal */
.plato.destacado {
    border: 2px solid var(--color-principal);
}

.plato-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}
.plato h3 {
    margin: 0;
    font-size: 16px;
    color: var(--color-texto);
    font-weight: 600;
    line-height: 1.3;
}
.plato p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.plato small {
    color: #999;
    font-size: 11px;
}
.precio {
    font-weight: 700;
    color: var(--color-principal);
    font-size: 15px;
    display: inline-block;
    margin-top: 2px;
}

/* IMAGEN rectangular (100x80) */
.plato-img {
    width: 100px !important;
    height: 80px !important;
    min-width: 100px !important;
    min-height: 80px !important;
    max-width: 100px !important;
    max-height: 80px !important;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #dee2e6;
}
.plato-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- BOTÓN PDF (por si lo reactivas después) --- */
.carta-pdf-btn { 
    text-align: center; 
    margin-bottom: 30px; 
}
.btn-pdf { 
    display: inline-block; 
    padding: 12px 30px; 
    background: var(--color-principal); 
    color: #fff !important; 
    text-decoration: none; 
    border-radius: 50px; 
    font-weight: 600;
    transition: .2s;
}
.btn-pdf:hover { 
    background: var(--color-principal-hover); 
    transform: translateY(-2px); 
}

/* ============================================
   RESPONSIVE - MÓVIL
   (thumbnail a la derecha, NO foto abajo)
   ============================================ */
@media (max-width: 768px) {
    .carta-app { padding: 12px; }
    .carta-grid { 
        grid-template-columns: 1fr; 
        gap: 12px;
    }
    /* Tarjeta horizontal: texto izq, foto der */
    .plato {
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 12px;
        gap: 12px;
    }
    .plato h3 { font-size: 15px; }
    .plato p { 
        font-size: 12px; 
        -webkit-line-clamp: 2;
    }
    .precio { font-size: 14px; }
    /* Foto como thumbnail pequeño a la derecha */
    .plato-img {
        width: 72px !important;
        height: 72px !important;
        min-width: 72px !important;
        min-height: 72px !important;
        max-width: 72px !important;
        max-height: 72px !important;
        margin-top: 0;
        border-radius: 8px;
    }
}