:root {
    --negro: #0f0f0f;
    --carbon: #1a1a1a;
    --amarillo: #f5c400;
    --gris: #b5b5b5;
    --blanco: #ffffff;
    --rojo: #ff4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none !important;
    color: inherit;
}

body {
    background: var(--negro);
    color: var(--blanco);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    padding: 20px;
    padding-bottom: 120px;
}

.titulo-pagina {
    text-align: center;
    margin: 50px 0 40px 0;
    color: var(--amarillo);
    font-size: 2.5rem;
}

/* --- GRID DE PRODUCTOS (VISTA MENÚ) --- */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.producto {
    background: var(--carbon);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.producto:hover {
    transform: translateY(-5px);
}

.img-box {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.info h3 {
    margin-bottom: 8px;
    font-size: 18px;
    color: var(--blanco);
}

.desc {
    font-size: 14px;
    color: var(--gris);
    margin-bottom: 15px;
    line-height: 1.4;
}

.footer-card {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.precios-col {
    display: flex;
    flex-direction: column;
}

.precio-antiguo {
    text-decoration: line-through;
    color: var(--gris);
    font-size: 13px;
}

.precio-final {
    color: var(--amarillo);
    font-weight: bold;
    font-size: 18px;
}

.btn-agregar {
    background: var(--amarillo);
    color: #000;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

/* --- ESTILO MÓVIL (FILA) --- */
@media (max-width: 768px) {
    .grid-productos {
        gap: 12px;
    }

    .producto {
        flex-direction: row !important;
        padding: 12px;
        gap: 12px;
    }

    .producto:hover {
        transform: none;
    }

    .img-box {
        width: 100px;
        height: 100px;
        min-width: 100px;
        border-radius: 12px;
        aspect-ratio: 1/1;
    }

    .info {
        padding: 0;
        min-height: 100px;
    }

    .info h3 {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 13px;
        margin-bottom: 8px;
    }

    .footer-card {
        align-items: center;
    }

    .precio-final {
        font-size: 16px;
    }

    .btn-agregar {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ===================================================
   CARRITO UI (ESCRITORIO)
   =================================================== */
#panel-carrito {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #0f0f0f;
    z-index: 3000;
    transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    padding: 25px;
    color: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
}

#panel-carrito.abierto {
    right: 0;
}

.header-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-carrito h2 {
    font-size: 24px;
    color: #fff;
}

.cart-panel-item {
    display: flex;
    gap: 15px;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    align-items: center;
    position: relative;
    border: 1px solid #222;
}

.cart-item-img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item-header h6 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}

.cart-item-price {
    color: var(--amarillo);
    font-weight: bold;
    margin: 5px 0;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.selector-cantidad {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #333;
    padding: 5px 10px;
    border-radius: 8px;
}

.selector-cantidad button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.btn-eliminar {
    background: none !important;
    border: none !important;
    color: var(--rojo) !important;
    cursor: pointer;
    font-size: 18px;
}

.cart-panel-footer {
    border-top: 1px solid #222;
    padding-top: 20px;
    margin-top: 10px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    margin-bottom: 15px;
}

.cart-total-row strong {
    color: var(--amarillo);
}

.btn-checkout-panel {
    width: 100%;
    background: transparent;
    color: var(--amarillo);
    border: 2px solid var(--amarillo);
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
}

#btn-finalizar-pedido {
    width: 100%;
    padding: 18px;
    background: var(--amarillo);
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
}

#backdrop-carrito {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    z-index: 2500;
    backdrop-filter: blur(4px);
}

#backdrop-carrito.activo {
    display: block;
}

#barra-carrito {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000;
    border-top: 2px solid var(--amarillo);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
}

#total-barra {
    font-size: 20px;
    color: var(--amarillo);
    font-weight: bold;
}

#btn-ver-carrito {
    background: var(--amarillo);
    color: #000;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}