/* Tema textil — neutro, de 360 px hacia arriba. Va después de core/css/carrito.css para ajustar sus variables. */
:root {
    --c-primary: #1F2937;
    --c-orange: #B45309;
    --c-orange-bg: #FEF6EC;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #1F2937; background: #FAFAF9; overflow-x: hidden; }
button { font: inherit; cursor: pointer; }

.cab { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid #E7E5E4; }
.cab-nombre { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.cab-carrito { position: relative; width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; color: #1F2937; }
.cart-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #B45309; color: #fff; font-size: 11px; line-height: 18px; text-align: center; display: none; }
.cart-badge.show { display: block; }
.cart-badge.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: scale(1.3); } }

.contenido { max-width: 960px; margin: 0 auto; padding: 16px; }
.lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vacio { grid-column: 1 / -1; text-align: center; color: #78716C; }
.tarjeta { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; text-align: left; background: #fff; border: 1px solid #E7E5E4; border-radius: 12px; overflow: hidden; }
.tarjeta-img { aspect-ratio: 1; background: #F5F5F4; }
.tarjeta-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tarjeta-nombre, .tarjeta-precio { padding: 0 10px; }
.tarjeta-nombre { font-size: 14px; font-weight: 600; }
.tarjeta-precio { font-size: 13px; color: #57534E; }
.tarjeta-agotado { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 6px; background: #1F2937; color: #fff; font-size: 11px; }

.ficha-fondo { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.ficha-fondo.open { opacity: 1; pointer-events: auto; }
.ficha { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 90vh; overflow-y: auto; padding: 16px; background: #fff; border-radius: 16px 16px 0 0; transform: translateY(100%); visibility: hidden; transition: transform .25s, visibility .25s; }
.ficha.open { transform: none; visibility: visible; }
.ficha-cerrar { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 18px; }
.ficha-img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; }
.ficha-nombre { margin: 12px 0 4px; font-size: 20px; }
.ficha-desc { margin: 0 0 12px; font-size: 14px; color: #57534E; }
.eje { margin: 12px 0; }
.eje-nombre { margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #57534E; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border: 1px solid #D6D3D1; border-radius: 22px; background: #fff; color: #1F2937; }
.chip.sel { border-color: #1F2937; background: #1F2937; color: #fff; }
.chip:disabled { color: #A8A29E; background: #F5F5F4; text-decoration: line-through; cursor: not-allowed; }
.ficha-precio { margin: 14px 0 10px; font-size: 20px; font-weight: 700; }
.btn-agregar { width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: #1F2937; color: #fff; font-weight: 600; }
.btn-agregar:disabled { background: #D6D3D1; color: #57534E; cursor: not-allowed; }

@media (min-width: 640px) { .lista { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .lista { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ficha { left: 50%; right: auto; width: 480px; margin-left: -240px; } }
