/* Tienda (App\Services\Store). Primero el celular; solo tokens del tema. */
.st-page { padding-block: 1rem 3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.st-hero { position: relative; }
.st-hero[style*="--st-cover"] { background-image: linear-gradient(rgb(0 0 0 / .55), rgb(0 0 0 / .55)), var(--st-cover); background-size: cover; background-position: center; }
.st-hero-in { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }
.st-hero-in .grow { flex: 1 1 16rem; min-width: 0; }
.st-hero h1 { margin: 0; }
.st-hero-a { display: flex; flex-wrap: wrap; gap: .4rem; }
.st-logo { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius); background: var(--surface); }
.st-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; }
.st-cats { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding: .1rem 1rem .3rem; }
.st-cats::-webkit-scrollbar { display: none; }
.st-cats .fr-fc { flex: none; display: inline-flex; align-items: center; gap: .3rem; min-height: 38px; padding: .2rem .7rem; border: 1px solid var(--border-strong, var(--border)); border-radius: 999px; color: var(--text); font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.st-cats .fr-fc[aria-current] { border-color: var(--primary); background: var(--primary); color: var(--on-primary, #fff); }
.st-q { max-width: 30rem; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 720px) { .st-grid { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; } .st-cats { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }
.st-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .15s; }
.st-card:hover { border-color: var(--border-strong, var(--primary)); }
.st-card-img { position: relative; display: block; aspect-ratio: 1; background: var(--surface-2); color: var(--text-muted); }
.st-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-card.is-out img { opacity: .55; }
.st-noimg { display: grid; place-items: center; width: 100%; height: 100%; min-height: 8rem; }
.st-noimg .icon, .st-noimg svg { width: 40px; height: 40px; opacity: .5; }
.st-flag { position: absolute; top: .45rem; left: .45rem; padding: .1rem .45rem; border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: .74rem; font-weight: 700; }
.st-flag.is-off { background: var(--primary); color: var(--on-primary, #fff); }
.st-price .st-flag { position: static; vertical-align: 2px; }
.st-card-b { display: grid; align-content: start; gap: .15rem; padding: .55rem .65rem .7rem; min-width: 0; }
.st-card-s { color: var(--text-muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-card h3 { margin: 0; font-size: .92rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.st-card h3 a { color: var(--text); text-decoration: none; }
.st-price { margin: .1rem 0 0; font-size: .95rem; }
.st-price strong { font-weight: 800; }
.st-price s { color: var(--text-muted); font-size: .84em; }
.st-price.is-big { font-size: 1.5rem; }
.st-sellers { margin-top: .6rem; }
.st-sellers-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .5rem; }
.st-seller { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; }
.st-seller img, .st-seller > span:first-child { flex: none; display: grid; place-items: center; width: 40px; height: 40px; object-fit: contain; border-radius: var(--radius); background: var(--surface-2); }
.st-seller > span:last-child { display: grid; min-width: 0; }
.st-seller strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.st-seller small { color: var(--text-muted); font-size: .76rem; }
.st-ask { margin: 0; text-align: center; }

/* Secciones nuevas de la portada: accesos, amistosos y sorteos */
.lw-acc-sec { padding-block: 1rem !important; }
.lw-acc { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(10.5rem, 1fr); gap: .5rem; overflow-x: auto; margin-inline: -1rem; padding: .15rem 1rem .4rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.lw-acc::-webkit-scrollbar { display: none; }
.lw-acc-i { display: flex; align-items: center; gap: .55rem; min-height: 56px; padding: .5rem .65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; scroll-snap-align: start; min-width: 0; }
.lw-acc-i:hover { border-color: var(--primary); color: var(--text); }
.lw-acc-i:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.lw-acc-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius); background: var(--surface-2); color: var(--primary-ink); }
.lw-acc-ic .icon, .lw-acc-ic svg { width: 18px; height: 18px; }
.lw-acc-t { display: grid; min-width: 0; line-height: 1.2; }
.lw-acc-t strong { font-size: .88rem; white-space: nowrap; }
.lw-acc-t small { overflow: hidden; color: var(--text-muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 900px) { .lw-acc { margin-inline: 0; padding-inline: 0; overflow: visible; grid-auto-flow: initial; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); } }
.lw-pulse { margin: 0 0 .8rem; text-align: center; }
.lw-pulse .fr-live { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.lw-pulse .fr-live i { width: .6rem; height: .6rem; border-radius: 50%; background: #4ade80; }
.lw-fr { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .6rem; }
.lw-fr-i { display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .7rem .8rem; cursor: pointer; }
.lw-fr-ic, .lw-fr-img { flex: none; display: grid; place-items: center; width: 42px; height: 42px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); color: var(--primary-ink); }
.lw-fr-b { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.lw-fr-b a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.lw-fr-b small { color: var(--text-muted); font-size: .8rem; overflow-wrap: anywhere; }
.lw-fr-n { flex: none; color: var(--primary-ink); font-size: .82rem; font-weight: 700; }

/* el producto */
.st-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; color: var(--text-muted); font-size: .84rem; }
.st-prod-g { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
@media (min-width: 860px) { .st-prod-g { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; align-items: start; } .st-buy { position: sticky; top: calc(var(--header-h, 64px) + 1rem); } }
.st-gallery { display: grid; gap: .5rem; min-width: 0; }
.st-gallery-main { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.st-gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.st-thumbs { display: flex; gap: .4rem; }
.st-thumbs button { width: 64px; height: 64px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: var(--radius); background: var(--surface-2); cursor: pointer; }
.st-thumbs button[aria-current] { border-color: var(--primary); }
.st-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-buy { display: grid; gap: .7rem; min-width: 0; }
.st-buy h1 { margin: 0; font-size: 1.45rem; line-height: 1.2; overflow-wrap: anywhere; }
.st-desc { margin: 0; color: var(--text-muted); font-size: .92rem; overflow-wrap: anywhere; }
.st-form { display: grid; gap: .65rem; }
.st-form > * + * { margin-top: 0 !important; }
.st-actions { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: .4rem; }
.st-qty input { width: 100%; min-height: 48px; text-align: center; font-size: 16px; }
.st-go { width: 100%; justify-content: center; }
.st-left { display: flex; align-items: center; gap: .3rem; margin: 0; color: var(--warn); font-size: .86rem; font-weight: 700; }
.fr-opt.is-out > span { opacity: .5; text-decoration: line-through; cursor: not-allowed; }
.st-facts { list-style: none; margin: 0; padding: .65rem .75rem; display: grid; gap: .4rem; border-radius: var(--radius); background: var(--surface-2); font-size: .84rem; }
.st-facts li { display: flex; gap: .4rem; align-items: flex-start; }
.st-facts .icon { flex: none; margin-top: .2rem; color: var(--text-muted); }
.st-seller-line { margin: 0; color: var(--text-muted); font-size: .84rem; }
.st-link { display: inline-flex; align-items: center; gap: .25rem; padding: 0; border: 0; background: none; color: var(--primary-ink); font: inherit; font-size: inherit; text-decoration: underline; cursor: pointer; }
.st-related { margin-top: .8rem; }

/* carrito */
@media (max-width: 480px) { .header-tools:has(.st-cart-ic) [data-theme-toggle] { display: none; } }   /* con el carrito no entra todo en el celular */
.st-cart-ic { position: relative; }
.st-cart-n { position: absolute; top: 0; right: 0; display: grid; place-items: center; min-width: 1.1rem; height: 1.1rem; padding: 0 .2rem; border-radius: 999px; background: var(--primary); color: var(--on-primary, #fff); font-size: .68rem; font-weight: 700; }
.st-note { display: flex; gap: .35rem; align-items: flex-start; margin: 0; color: var(--text-muted); font-size: .84rem; }
.st-note[hidden], [data-st-show][hidden] { display: none; }
.st-bad { color: var(--danger, #dc2626); }
.st-cart-g, .st-order { border: 1px solid var(--border); border-radius: var(--radius-lg, var(--radius)); background: var(--surface); }
.st-cart-g { display: grid; gap: .7rem; padding: .85rem; }
.st-cart-h { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: 1rem; }
.st-cart-h a { color: var(--text); }
.st-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.st-line { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; align-items: center; gap: .6rem; }
.st-line-img { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.st-line-img img { width: 100%; height: 100%; object-fit: cover; }
.st-line-b { display: grid; min-width: 0; font-size: .88rem; }
.st-line-b strong { overflow-wrap: anywhere; font-size: .9rem; }
.st-line-b small { color: var(--text-muted); font-size: .76rem; }
.st-line-b small.st-bad { color: var(--danger, #dc2626); }
.st-line-q { display: flex; align-items: center; gap: .3rem; }
.st-line-q > * + * { margin-top: 0 !important; }
.st-line-q span { min-width: 1.3rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-line-q .btn { min-width: 40px; min-height: 40px; }
.st-checkout { display: grid; gap: .6rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.st-checkout > * + * { margin-top: 0 !important; }
.fr-opts-eq2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
.st-total { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; font-size: 1rem; }
.st-total strong { font-size: 1.3rem; font-weight: 800; }

/* Lo que compró cada persona: perfil y /mis-compras (el sitio no carga console.css ni admin.css) */
.st-tag { display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-size: .74rem; font-weight: 700; }
.st-tag.is-ok { background: var(--ok-soft, var(--surface-2)); color: var(--ok); }
.st-tag.is-warn { background: var(--warn-soft, var(--surface-2)); color: var(--warn); }
.st-tag.is-info { background: var(--info-soft, var(--surface-2)); color: var(--info, var(--text)); }
.st-mine { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.st-mine section, .st-mine-done { display: grid; gap: .5rem; min-width: 0; }
.st-mine-h { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .95rem; }
.st-mine-l { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.st-mine-cart { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; padding: .7rem .85rem; border: 1px solid var(--primary); border-radius: var(--radius); background: var(--primary-soft, var(--surface)); color: var(--text); text-decoration: none; }
.st-mine-cart:hover { color: var(--text); }
.st-mine-cart .grow { display: grid; flex: 1 1 12rem; min-width: 0; }
.st-mine-cart small { color: var(--text-muted); font-size: .8rem; }
.st-mine-ic { flex: none; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: var(--radius); background: var(--surface); color: var(--primary-ink); }
.st-mine-empty { display: grid; justify-items: center; gap: .6rem; padding: 1.5rem 1rem; border: 1px dashed var(--border-strong, var(--border)); border-radius: var(--radius); color: var(--text-muted); text-align: center; }
.st-mine-empty p { margin: 0; max-width: 34rem; }
.st-mine-empty strong { color: var(--text); }
.st-mine-done > summary { display: flex; align-items: center; gap: .4rem; min-height: 44px; font-size: .95rem; font-weight: 700; cursor: pointer; list-style: none; }
.st-mine-done > summary::-webkit-details-marker { display: none; }
.st-mine-c { margin-left: auto; transition: transform .15s; }
.st-mine-done[open] .st-mine-c { transform: rotate(180deg); }
.st-mine-more { margin: 0; text-align: center; }
.st-mo { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; align-items: center; gap: .3rem .7rem; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; scroll-margin-top: calc(var(--header-h, 64px) + 1rem); }
.st-mo:hover { border-color: var(--border-strong, var(--primary)); }
.st-mo.is-warn { box-shadow: inset 3px 0 0 var(--warn); }
.st-mo.is-ok { box-shadow: inset 3px 0 0 var(--ok); }
.st-mo-img { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.st-mo-img img { width: 100%; height: 100%; object-fit: cover; }
.st-mo-b { display: grid; justify-items: start; gap: .1rem; min-width: 0; }
.st-mo-b h3 { margin: 0; font-size: .95rem; font-weight: 600; overflow-wrap: anywhere; }
.st-mo-b h3 a { color: var(--text); text-decoration: none; }
.st-mo-b small { color: var(--text-muted); font-size: .78rem; overflow-wrap: anywhere; }
.st-mo-b small strong { color: var(--text); }
.st-mo-a { display: flex; }
.st-mo-a form { margin: 0; }
.st-mo-a .btn { white-space: nowrap; min-height: 40px; }
@media (max-width: 560px) {
  .st-mo { grid-template-columns: 3.1rem minmax(0, 1fr); }
  .st-mo-img { width: 3.1rem; height: 3.1rem; }
  .st-mo-a { grid-column: 1 / -1; }
  .st-mo-a > *, .st-mo-a .btn { width: 100%; justify-content: center; }
}
/* una compra */
.st-box { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg, var(--radius)); background: var(--surface); min-width: 0; }
.st-box-h { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; font-size: .95rem; }
.st-box-p { margin: 0 0 .3rem; font-size: .9rem; overflow-wrap: anywhere; }
.st-box-p.is-muted { color: var(--text-muted); font-size: .84rem; }
.st-box-a { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 0; }
.st-box-cancel { margin: 0; text-align: center; }
.st-buy-o { max-width: 62rem; }
.st-buy-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .4rem 1.2rem; }
.st-buy-h .grow { flex: 1 1 18rem; min-width: 0; display: grid; justify-items: start; gap: .2rem; }
.st-buy-h h1 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.8rem); line-height: 1.2; overflow-wrap: anywhere; }
.st-buy-h p { margin: 0; color: var(--text-muted); font-size: .88rem; }
.st-buy-t { display: grid; text-align: right; }
.st-buy-t strong { color: var(--text); font-size: 1.35rem; font-weight: 800; }
.st-now { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.st-now > .grow { flex: 1 1 16rem; min-width: 0; }
.st-now p { margin: .1rem 0 0; color: var(--text-muted); font-size: .9rem; overflow-wrap: anywhere; }
.st-now form { margin: 0; }
.st-now.is-warn { border-color: var(--warn); }
.st-now.is-ok { border-color: var(--ok); }
.st-buy-g { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.st-buy-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 860px) { .st-buy-g { grid-template-columns: minmax(0, 1fr) 21rem; } }
.st-line-ro { grid-template-columns: 3.6rem minmax(0, 1fr) auto; }
.st-line-b a { color: inherit; }
.st-sum { display: grid; gap: .3rem; margin: .7rem 0 0; padding-top: .6rem; border-top: 1px solid var(--border); }
.st-sum > div { display: flex; justify-content: space-between; gap: .8rem; font-size: .88rem; }
.st-sum dt { color: var(--text-muted); }
.st-sum dd { margin: 0; text-align: right; }
.st-sum .is-total { font-weight: 800; font-size: 1rem; }
.st-sum .is-total dt { color: var(--text); }
.acc-paydue.is-store { border-color: color-mix(in srgb, var(--ok) 50%, var(--border)); background: var(--ok-soft, var(--surface)); }
@media (max-width: 560px) { .st-buy-t { display: flex; justify-content: space-between; align-items: baseline; flex: 1 1 100%; text-align: left; } }
.acc-paydue.is-store .acc-paydue-ic { color: var(--ok); }

/* mis compras y panel */
.st-orders { max-width: 46rem; }
.st-order { display: grid; gap: .3rem; padding: .85rem; scroll-margin-top: calc(var(--header-h, 64px) + 1rem); }
.st-order h2 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.st-order-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .6rem; }
.st-order-h small { color: var(--text-muted); font-size: .76rem; }
.st-order-m, .st-order-a { margin: 0; color: var(--text-muted); font-size: .86rem; }
.st-order-a { margin-top: .25rem; }

/* Panel de la tienda: fila de orden */
a.st-o-b { color: inherit; text-decoration: none; border-radius: 4px; }
a.st-o-b:hover > strong { text-decoration: underline; }
a.st-o-b:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.st-o-m { font-size: .76rem !important; }
.st-o-end { flex: none; display: grid; justify-items: end; gap: .2rem; text-align: right; }
.st-o-end > strong { font-size: .95rem; font-variant-numeric: tabular-nums; }
.st-o-end .cx-tag { white-space: nowrap; }
.st-o-a { flex: none; margin: 0; }
.st-o-a .btn { min-width: 11.5rem; justify-content: center; white-space: nowrap; }
.cx-pill.is-info { background: var(--info-soft, var(--surface-2)); color: var(--info, var(--text)); }
.cx-pill.is-plain { background: var(--surface-2); color: var(--text-muted); }
@media (max-width: 720px) {
  .st-o { flex-wrap: wrap; gap: .35rem .6rem; padding: .7rem .85rem; }
  .st-o > .cx-row-ic { display: none; }
  .st-o-b { flex: 1 1 0%; }
  .st-o-a { flex: 1 1 100%; }
  .st-o-a .btn { width: 100%; justify-content: center; min-height: 44px; }
}

/* Barra de búsqueda y pestañas de estado de las órdenes */
.st-bar { justify-content: flex-start; }
.st-bar select { width: auto; max-width: 100%; flex: 0 1 14rem; }
.st-bar-q { display: flex; flex: 1 1 16rem; align-items: center; gap: .45rem; min-width: 0; padding-left: .7rem; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--radius); background: var(--surface); }
.st-bar-q input { flex: 1; min-width: 0; min-height: 40px; padding: 0 .6rem 0 0; border: 0; background: transparent; box-shadow: none; }
.st-bar-q input:focus { outline: none; box-shadow: none; }
.st-bar-q:focus-within { outline: 2px solid var(--primary-ink); outline-offset: 1px; }
.st-tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: .9rem; padding-bottom: .15rem; scrollbar-width: none; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tabs a { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .2rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.st-tabs a:hover { border-color: var(--border-strong, var(--primary)); }
.st-tabs a:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.st-tabs a[aria-current] { border-color: var(--primary); background: var(--primary-soft, var(--surface-2)); color: var(--primary-ink); }

/* Ficha de la orden */
.st-ord { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.st-ord.is-inline { gap: .75rem; }
.st-ord-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.st-ord-top { display: grid; gap: .8rem; min-width: 0; }
.st-who { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; min-width: 0; }
.st-who-b { display: grid; min-width: 0; }
.st-who-b strong { font-size: 1.02rem; overflow-wrap: anywhere; }
.st-who-b small { color: var(--text-muted); font-size: .8rem; overflow-wrap: anywhere; }
.st-who-t { flex: none; display: grid; justify-items: end; gap: .15rem; }
.st-who-t strong { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-ord-top .cx-note { margin: 0; }
.st-fold > summary { display: flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem 1.2rem; font-size: .88rem; font-weight: 600; cursor: pointer; }
.st-fold-e { margin: 0; padding: 0 1.2rem .9rem; color: var(--text-muted); font-size: .86rem; }
.st-ord.is-inline { padding: .8rem; }
.st-ord.is-inline .cx-main, .st-ord.is-inline .cx-side { display: contents; }
.st-ord.is-inline .st-ord-col > .cx-main > *, .st-ord.is-inline .st-ord-col > .cx-side > * { min-width: 0; }
.st-next-a > form.is-alt .btn { font-weight: 600; }
.st-o-msg { display: inline-flex; align-items: center; gap: .25rem; color: var(--warn); font-size: .8rem; font-weight: 700; }
/* la charla junto a la orden */
.st-chat { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; scroll-margin-top: calc(var(--header-h, 64px) + 1rem); }
.st-chat:not(.panel *) { border: 1px solid var(--border); border-radius: var(--radius-lg, var(--radius)); background: var(--surface); }
.st-chat .panel-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .65rem .9rem; border-bottom: 1px solid var(--border); }
.st-chat .panel-head h2 { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .95rem; }
.st-chat .cx-n { display: inline-grid; place-items: center; min-width: 1.3rem; padding: 0 .3rem; border-radius: 999px; background: var(--warn-soft, var(--surface-2)); color: var(--warn); font-size: .72rem; font-weight: 700; }
.st-chat-l { display: flex; flex-direction: column; gap: .35rem; max-height: min(44vh, 22rem); min-height: 5.5rem; overflow-y: auto; overscroll-behavior: contain; padding: .7rem .9rem; background: var(--surface-2); }
.st-chat-l:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: -2px; }
.st-chat-empty { margin: auto 0; color: var(--text-muted); font-size: .86rem; text-align: center; }
.st-chat-day, .st-chat-sys { align-self: center; margin: .2rem 0; padding: .05rem .55rem; border-radius: var(--radius); background: var(--surface); color: var(--text-muted); font-size: .72rem; }
.st-msg { display: grid; gap: .1rem; align-self: flex-start; max-width: 85%; min-width: 0; padding: .35rem .6rem .25rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.st-msg.is-mine { align-self: flex-end; border-color: color-mix(in srgb, var(--primary-ink) 28%, var(--border)); background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.st-msg-w { color: var(--primary-ink); font-size: .74rem; }
.st-msg-t { margin: 0; font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
.st-msg-t.is-del { color: var(--text-muted); font-style: italic; }
.st-msg-m { justify-self: end; color: var(--text-muted); font-size: .68rem; }
.st-msg-card, .st-msg-file { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; overflow-wrap: anywhere; }
.st-msg-img img { display: block; max-width: 100%; max-height: 13rem; border-radius: 10px; }
.st-msg .vn { width: min(230px, 56vw); margin: 0; padding: .1rem 0; }
.st-chat-guard, .st-chat-note { display: flex; align-items: flex-start; gap: .4rem; margin: 0; padding: .55rem .9rem; color: var(--text-muted); font-size: .8rem; }
.st-chat-guard { border-top: 1px solid var(--border); }
.st-chat-go { margin: 0; padding: 0 .9rem .8rem; }
.st-chat-join { display: grid; justify-items: start; gap: .55rem; padding: .75rem .9rem .9rem; }
.st-chat-join p { display: flex; align-items: flex-start; gap: .4rem; margin: 0; color: var(--text-muted); font-size: .86rem; }
.st-chat-join strong { color: var(--text); }
.st-chat-join form { margin: 0; }
.st-chat-f { display: grid; gap: .4rem; margin: 0; padding: .55rem .7rem .65rem; border-top: 1px solid var(--border); }
.st-chat-f > * + * { margin-top: 0 !important; }
.st-chat-q { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
.st-chat-q::-webkit-scrollbar { display: none; }
.st-chat-q button { flex: none; min-height: 32px; padding: .1rem .6rem; border: 1px solid var(--border-strong, var(--border)); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: .76rem; cursor: pointer; }
.st-chat-q button:hover { background: var(--surface-2); }
.st-chat-q button:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.st-chat-r { display: flex; align-items: flex-end; gap: .35rem; min-width: 0; }
.st-chat-r > * + * { margin-top: 0 !important; }
.st-chat-r textarea { flex: 1 1 auto; min-width: 0; min-height: 44px; max-height: 140px; resize: none; font-size: 16px; line-height: 1.3; }
@media (min-width: 721px) { .st-chat-r textarea { font-size: .92rem; } }
.st-chat-r .btn { flex: none; min-width: 44px; min-height: 44px; }
.st-steps { list-style: none; display: flex; margin: 0; padding: 0; counter-reset: none; }
.st-steps li { position: relative; flex: 1 1 0; display: grid; justify-items: center; gap: .25rem; min-width: 0; text-align: center; color: var(--text-muted); }
.st-steps li:not(:first-child)::before { content: ""; position: absolute; top: .85rem; right: 50%; width: 100%; height: 2px; background: var(--border); }
.st-steps li.is-done:not(:first-child)::before, .st-steps li.is-now:not(:first-child)::before { background: var(--primary); }
.st-steps span { position: relative; z-index: 1; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 2px solid var(--border-strong, var(--border)); border-radius: 50%; background: var(--surface); font-size: .76rem; font-weight: 700; }
.st-steps .is-done span { border-color: var(--primary); background: var(--primary); color: var(--on-primary, #fff); }
.st-steps .is-now span { border-color: var(--primary-ink); color: var(--primary-ink); }
.st-steps small { font-size: .72rem; line-height: 1.2; overflow-wrap: anywhere; }
.st-steps .is-now small { color: var(--text); font-weight: 700; }
.st-cancelled { display: flex; align-items: flex-start; gap: .4rem; }
.st-next { display: grid; gap: .5rem; padding: .85rem 1rem; }
.st-next-a { display: flex; flex-wrap: wrap; gap: .4rem; }
.st-next-a > form { margin: 0; }
.st-next .cx-note { margin: 0; }
.st-thumb { flex: none; display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.st-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-total-row { border-top: 1px solid var(--border); }
.st-log { list-style: none; margin: 0; padding: .4rem 1.2rem .9rem; display: grid; gap: .55rem; }
.st-log li { display: grid; gap: .05rem; font-size: .88rem; overflow-wrap: anywhere; }
.st-log small { color: var(--text-muted); font-size: .76rem; }
.st-pay { margin: 0; padding: .6rem 1.2rem; display: grid; gap: .4rem; }
.st-pay > div { display: flex; justify-content: space-between; gap: .8rem; font-size: .88rem; }
.st-pay dt { color: var(--text-muted); }
.st-pay dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.st-pay .is-net { margin-top: .2rem; padding-top: .45rem; border-top: 1px solid var(--border); font-weight: 700; }
.st-pay .is-net dt { color: var(--text); }
.st-pay-go { margin: 0; padding: 0 1.2rem .8rem; }
.st-cancel > summary { display: flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem 1.2rem; color: var(--text-muted); font-size: .88rem; cursor: pointer; }
.st-cancel form { display: grid; gap: .55rem; padding: 0 1.2rem 1rem; }
.st-cancel form > * + * { margin-top: 0 !important; }
.st-cancel .cx-note { margin: 0; }

/* Listas de productos y tiendas, y formularios */
.st-cell { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.st-cell-t { display: grid; min-width: 0; line-height: 1.25; }
.st-cell-t strong { overflow-wrap: anywhere; }
.st-cell-t small { color: var(--text-muted); font-size: .78rem; font-weight: 400; }
.st-nowrap { white-space: nowrap; }
.st-vs { display: block; margin-top: .15rem; font-size: .74rem; }
.st-kp.is-3 .cx-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* en la ficha de la orden, en el celular: qué lleva → entrega → pago → cancelar → historial */
@media (max-width: 1024px) {
  .st-ord .cx-layout > .cx-main, .st-ord .cx-layout > .cx-side { display: contents; }
  .st-ord .cx-layout .st-log-p { order: 9; }
}
@media (max-width: 720px) {
  .st-kp .cx-kpi { min-height: 0; padding-block: .6rem; }
  .st-kp .cx-kpi-gap { display: none; }
  .st-kp .cx-sum { gap: .5rem; }
}
.st-restock { display: flex; align-items: center; gap: .35rem; margin: 0; }
.st-restock input { width: 4.6rem; min-height: 36px; padding-inline: .45rem; text-align: center; }
.st-restock.is-wide { flex-wrap: wrap; padding: .8rem 1.2rem 1rem; }
.st-restock.is-wide label { font-size: .88rem; }
.st-side-form { display: grid; gap: .6rem; padding: .85rem 1.2rem 1rem; }
.st-side-form > * + * { margin-top: 0 !important; }
.st-side-form .cx-note { margin: 0; }
.st-var { display: grid; gap: .35rem; justify-items: start; }
.st-var-h, .st-var-r { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem 2.75rem; gap: .35rem; width: 100%; align-items: center; }
.st-var-h { color: var(--text-muted); font-size: .76rem; font-weight: 600; }
.st-var-r input { width: 100%; }
.field[hidden] { display: none !important; }
@media (max-width: 560px) {
  .st-kp.is-3 .cx-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-restock input { width: 3.6rem; }
}
@media print {
  .st-chat { display: none !important; }
  .no-print, .subnav, .sidebar, .topbar, .bottom-nav, .st-next, .st-cancel { display: none !important; }
  .st-ord .panel { break-inside: avoid; box-shadow: none; }
}
