    * { box-sizing: border-box; }

    body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #FEF3C7;
    color: #9A3412;
    }

    .appbar {
    background: #9A3412;
    color: #FEF3C7;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid #B45309;
    box-shadow: 0 2px 8px rgba(154, 52, 18, .25);
    }

    /* Logo + nombre dentro del header */
    .marca {
    display: flex;
    align-items: center;
    gap: 12px;
    }
    .logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: #FEF3C7;
    }
    .marca h1 { margin: 0; font-size: 1.4rem; }

    /* .pill: la "píldora" que muestra si hay conexión o no (la mueve app.js) */
    .pill {
    background: #FEF3C7;
    color: #9A3412;
    border-radius: 999px;
    padding: .25rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    }
    .pill.sin-conexion { background: #B45309; color: #FEF3C7; }

    main {
    max-width: 720px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    }

    section {
    background: #FEF3C7;
    border: 1px solid rgba(180, 83, 9, .3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(154, 52, 18, .10);
    }

    /* .filtros: fila de botones de categoría encima del grid */
    .filtros {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
    }

    /* .filtro: cada botón de categoría */
    .filtro {
    background: transparent;
    color: #9A3412;
    border: 1px solid #B45309;
    border-radius: 999px;
    padding: .35rem .9rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    }
    .filtro:hover { background: rgba(180, 83, 9, .12); }

    /* .filtro--activo: categoría seleccionada actualmente */
    .filtro--activo {
    background: #9A3412;
    color: #FEF3C7;
    border-color: #9A3412;
    }
    .filtro--activo:hover { background: #7c2910; }

    /* .grid: acomoda las tarjetas de producto en columnas que se ajustan solas */
    .grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .producto {
    background: #FEF3C7;
    border: 1px solid rgba(180, 83, 9, .35);
    border-radius: 10px;
    padding: .75rem;
    box-shadow: 0 2px 6px rgba(154, 52, 18, .10);
    transition: transform .15s ease, box-shadow .15s ease;
    }
    .producto:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(154, 52, 18, .20);
    }
    .producto__foto {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: .5rem;
    background: rgba(180, 83, 9, .15);
    }
    .producto strong { display: block; margin-bottom: .25rem; color: #9A3412; }
    .producto .precio { color: #B45309; font-weight: bold; font-size: 1.05rem; }

    /* Tarjetas esqueleto: ocupan el mismo espacio que las reales
    mientras llega catalogo.json, así nada se mueve de lugar (CLS ≈ 0) */
    .producto--cargando strong,
    .producto--cargando .precio,
    .producto--cargando p {
    background: rgba(180, 83, 9, .15);
    border-radius: 4px;
    color: transparent;
    }
    .producto--cargando strong { width: 70%; }
    .producto--cargando .precio { display: inline-block; width: 30%; }
    .producto--cargando p { width: 45%; }
    .producto--cargando button { visibility: hidden; }

    button {
    background: #B45309;
    color: #FEF3C7;
    border: none;
    border-radius: 8px;
    padding: .5rem 1rem;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    transition: background .15s ease;
    }
    button:hover { background: #9A3412; }

    .mensaje { color: #B45309; font-size: .9rem; min-height: 1.2em; }
    .mensaje a { color: #9A3412; font-weight: 600; }

    .sucursal-info { color: #B45309; font-size: .9rem; margin: 0 0 .6rem; }

    /* .mapa: contenedor de Leaflet. Necesita una altura explícita en px/rem */
    .mapa {
    height: 260px;
    border-radius: 10px;
    margin-top: .75rem;
    border: 1px solid rgba(180, 83, 9, .35);
    }

    /* #carrito-lista: nombre / cantidad (con +/-) / precio / quitar en columnas */
    #carrito-lista { list-style: none; padding: 0; }
    #carrito-lista li {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: .6rem;
    border-bottom: 1px solid rgba(180, 83, 9, .25);
    padding: .5rem 0;
    }

    .carrito-nombre { font-weight: 600; }

    .carrito-cantidad {
    display: flex;
    align-items: center;
    gap: .4rem;
    }
    .carrito-cantidad button {
    padding: .1rem .55rem;
    font-size: .95rem;
    line-height: 1.4;
    }
    .carrito-cantidad__valor {
    min-width: 1.4rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    }

    .carrito-precio { font-weight: bold; color: #B45309; white-space: nowrap; }

    .carrito-quitar {
    background: transparent;
    color: #9A3412;
    border: 1px solid #9A3412;
    padding: .25rem .6rem;
    font-size: .8rem;
    }
    .carrito-quitar:hover { background: #9A3412; color: #FEF3C7; }

    /* Pie de página */
    .pie {
    background: #9A3412;
    color: #FEF3C7;
    text-align: center;
    padding: 1.25rem 1rem;
    margin-top: 2rem;
    border-top: 4px solid #B45309;
    font-size: .85rem;
    line-height: 1.5;
    }
    .pie p { margin: .25rem 0; }
    .pie p:first-child { font-weight: bold; font-size: 1rem; }
    .pie p:last-child { opacity: .8; font-size: .8rem; }

    @media (max-width: 480px) {
    #carrito-lista li { grid-template-columns: 1fr auto; grid-template-areas: "nombre nombre" "cantidad precio" "quitar quitar"; }
    .carrito-nombre { grid-area: nombre; }
    .carrito-cantidad { grid-area: cantidad; }
    .carrito-precio { grid-area: precio; justify-self: end; }
    .carrito-quitar { grid-area: quitar; justify-self: start; }
    }