:root {
  --tx-brand: #ff7a00;
  --tx-brand-dark: #e06400;
  --tx-ink: #16161a;
  --tx-muted: #6b6b76;
  --tx-line: #ececf0;
  --tx-bg: #f6f6f8;
  --tx-card: #ffffff;
  --tx-ok: #12a150;
  --tx-wa: #25d366;
  --tx-radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 120px; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--tx-ink);
  background: var(--tx-bg);
  -webkit-font-smoothing: antialiased;
}
body.tx-lock { overflow: hidden; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* Portada */
.tx-cover { position: relative; background: var(--tx-card); padding-bottom: 14px; }
.tx-cover__bg {
  height: 120px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.25) 0 40px, transparent 41px),
    radial-gradient(circle at 85% 70%, rgba(255,255,255,.18) 0 70px, transparent 71px),
    linear-gradient(135deg, #ff9a2e, var(--tx-brand) 45%, #ff5a00);
}
.tx-cover__inner {
  max-width: 980px; margin: -42px auto 0; padding: 0 16px;
  display: flex; gap: 14px; align-items: flex-end; position: relative;
}
.tx-logo {
  width: 84px; height: 84px; border-radius: 50%; object-fit: contain;
  background: #111; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); flex: none;
}
.tx-store { min-width: 0; padding-top: 46px; }
.tx-store__name { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.tx-store__tag { margin: 2px 0 8px; color: var(--tx-muted); font-size: .9rem; }
.tx-store__links { display: flex; gap: 6px; flex-wrap: wrap; }
.tx-pill {
  font-size: .78rem; font-weight: 600; text-decoration: none; padding: 5px 11px;
  border-radius: 999px; border: 1px solid var(--tx-line); background: #fff;
}
.tx-pill--wa { background: var(--tx-wa); border-color: var(--tx-wa); color: #fff; }
.tx-perks {
  list-style: none; margin: 14px auto 0; padding: 0 16px; max-width: 980px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.tx-perks::-webkit-scrollbar { display: none; }
.tx-perks li {
  flex: none; font-size: .8rem; color: var(--tx-muted); background: var(--tx-bg);
  padding: 7px 12px; border-radius: 10px;
}
.tx-perks strong { color: var(--tx-ink); }

/* Barra fija: buscador + categorías */
.tx-bar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--tx-line);
}
.tx-search {
  display: flex; align-items: center; gap: 8px; max-width: 980px; margin: 0 auto;
  padding: 10px 16px 6px; color: var(--tx-muted);
}
.tx-search input {
  flex: 1; border: 0; background: var(--tx-bg); border-radius: 10px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--tx-ink); outline: none;
}
.tx-search input:focus { box-shadow: 0 0 0 2px var(--tx-brand); }
.tx-tabs {
  display: flex; gap: 4px; overflow-x: auto; max-width: 980px; margin: 0 auto;
  padding: 2px 12px 0; scrollbar-width: none;
}
.tx-tabs::-webkit-scrollbar { display: none; }
.tx-tab {
  flex: none; border: 0; background: none; padding: 9px 10px 11px; font-size: .9rem;
  font-weight: 600; color: var(--tx-muted); border-bottom: 3px solid transparent; white-space: nowrap;
}
.tx-tab.is-active { color: var(--tx-ink); border-bottom-color: var(--tx-brand); }

/* Volver + nombre de categoría */
.tx-crumb { display: flex; align-items: center; gap: 8px; max-width: 980px; margin: 0 auto; padding: 2px 16px 8px; }
.tx-crumb strong { font-size: 1.1rem; font-weight: 800; }
.tx-back {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--tx-line); background: #fff;
  font-size: 1.1rem; font-weight: 700; line-height: 1;
}
.tx-tabs { padding-bottom: 10px; gap: 6px; }
.tx-tab {
  border: 1px solid var(--tx-line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: .84rem;
  border-bottom-width: 1px;
}
.tx-tab.is-active { background: var(--tx-ink); color: #fff; border-color: var(--tx-ink); }

.tx-main { max-width: 980px; margin: 0 auto; padding: 14px 16px 110px; }

/* Portada: elegir categoría */
.tx-cats { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .tx-cats { grid-template-columns: 1fr 1fr; } }
.tx-cat {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; color: inherit;
  background: var(--tx-card); border: 1px solid var(--tx-line); border-radius: 18px; padding: 12px;
  transition: box-shadow .15s, transform .15s;
}
.tx-cat:hover { box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.tx-cat:active { transform: scale(.98); }
.tx-cat:nth-child(-n+3) { padding: 16px 14px; }
.tx-cat__img { flex: none; width: 76px; height: 76px; border-radius: 14px; background: #fff4ea; overflow: hidden; }
.tx-cat:nth-child(-n+3) .tx-cat__img { width: 92px; height: 92px; }
.tx-cat__img img { width: 100%; height: 100%; object-fit: contain; }
.tx-cat__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tx-cat__name { font-size: 1.15rem; font-weight: 800; }
.tx-cat__count { font-size: .84rem; color: var(--tx-muted); }
.tx-cat__go {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--tx-brand); color: #fff;
  font-size: 1.4rem; line-height: 31px; text-align: center; font-weight: 600;
}

/* Grilla de productos: 2 por fila */
.tx-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .tx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 960px) { .tx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tx-item {
  position: relative; display: flex; flex-direction: column; text-align: left; width: 100%; color: inherit;
  background: var(--tx-card); border: 1px solid var(--tx-line); border-radius: var(--tx-radius);
  padding: 0; overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.tx-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,.07); }
.tx-item:active { transform: scale(.98); }
.tx-item__media { position: relative; display: block; aspect-ratio: 1; background: #f5f5f7; }
.tx-item__media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.tx-item__qty {
  position: absolute; left: 8px; top: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--tx-ink); color: #fff; font-size: .75rem; font-weight: 700; line-height: 24px; text-align: center;
}
.tx-low {
  position: absolute; right: 8px; top: 8px; font-size: .68rem; font-weight: 700; color: #fff;
  background: #ea580c; padding: 3px 7px; border-radius: 6px;
}
.tx-item__info { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px 12px; flex: 1; }
.tx-item__brand { font-size: .66rem; font-weight: 700; color: var(--tx-brand-dark); text-transform: uppercase; letter-spacing: .04em; }
.tx-item__name {
  font-size: .86rem; font-weight: 600; line-height: 1.25; min-height: 2.5em; padding-right: 26px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tx-item__price { margin-top: 4px; font-weight: 800; font-size: 1rem; }
.tx-item__compare { font-weight: 500; font-size: .75rem; color: var(--tx-muted); text-decoration: line-through; margin-left: 5px; }
.tx-item__transfer { font-size: .74rem; color: var(--tx-ok); font-weight: 600; }
.tx-item__add {
  position: absolute; right: 8px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--tx-brand); color: #fff; font-size: 1.25rem; line-height: 30px; text-align: center;
  font-weight: 600; box-shadow: 0 3px 8px rgba(255,122,0,.4);
}
.tx-badge {
  display: inline-block; font-size: .68rem; font-weight: 700; background: #fff1e5; color: var(--tx-brand-dark);
  padding: 2px 7px; border-radius: 6px; margin-bottom: 2px; align-self: flex-start;
}
.tx-empty { text-align: center; color: var(--tx-muted); padding: 40px 0; }
.tx-foot { text-align: center; font-size: .82rem; color: var(--tx-muted); padding: 10px 16px 120px; }
.tx-foot a { text-decoration: none; }

/* Barra del carrito */
.tx-cartbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 24px)); z-index: 30; display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 14px; padding: 14px 16px; background: var(--tx-brand); color: #fff;
  font-weight: 700; font-size: 1rem; box-shadow: 0 10px 30px rgba(255,122,0,.35);
}
.tx-cartbar__count { background: rgba(0,0,0,.18); border-radius: 8px; padding: 2px 9px; }
.tx-cartbar__total { margin-left: auto; }
.tx-cartbar.is-bump { animation: tx-bump .35s; }
@keyframes tx-bump { 50% { transform: translateX(-50%) scale(1.04); } }

/* Hojas (producto y carrito) */
.tx-sheet { position: fixed; inset: 0; z-index: 50; }
.tx-sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: tx-fade .2s; }
.tx-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 20px 20px 0 0; animation: tx-up .25s ease-out;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 760px) {
  .tx-sheet__panel {
    left: 50%; top: 50%; bottom: auto; width: 520px; transform: translate(-50%, -50%);
    border-radius: 20px; animation: tx-fade .2s;
  }
}
@keyframes tx-up { from { transform: translateY(100%); } }
@keyframes tx-fade { from { opacity: 0; } }
.tx-sheet__close {
  position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; z-index: 2; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 1.3rem; line-height: 1;
}
.tx-sheet__body { padding: 16px 18px 20px; }
.tx-sheet__title { margin: 4px 0 14px; font-size: 1.2rem; font-weight: 800; }

.tx-gallery {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: -16px -18px 14px;
  background: #f3f3f5; scrollbar-width: none;
}
.tx-gallery::-webkit-scrollbar { display: none; }
.tx-gallery img { flex: none; width: 100%; height: 300px; object-fit: contain; scroll-snap-align: center; }
.tx-p__name { font-size: 1.25rem; font-weight: 800; margin: 0 0 4px; line-height: 1.25; }
.tx-p__price { font-size: 1.3rem; font-weight: 800; }
.tx-p__transfer { color: var(--tx-ok); font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.tx-p__desc { white-space: pre-line; color: #3a3a44; font-size: .9rem; line-height: 1.5; margin: 12px 0; max-height: 220px; overflow-y: auto; }
.tx-p__label { font-size: .85rem; font-weight: 700; margin: 14px 0 8px; }
.tx-variants { display: flex; flex-wrap: wrap; gap: 8px; }
.tx-variant {
  border: 1.5px solid var(--tx-line); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: .88rem; font-weight: 600;
}
.tx-variant.is-active { border-color: var(--tx-brand); background: #fff6ee; color: var(--tx-brand-dark); }
.tx-p__more { display: inline-block; font-size: .85rem; color: var(--tx-muted); margin-top: 6px; }
.tx-p__actions { display: flex; gap: 10px; margin-top: 18px; position: sticky; bottom: 0; background: #fff; padding: 10px 0 4px; }

.tx-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--tx-line); border-radius: 12px; }
.tx-stepper button { width: 40px; height: 44px; border: 0; background: none; font-size: 1.2rem; font-weight: 700; }
.tx-stepper button:disabled { opacity: .3; cursor: default; }
.tx-stepper span { min-width: 26px; text-align: center; font-weight: 700; }
.tx-stepper--sm button { width: 32px; height: 32px; }

.tx-btn {
  display: block; width: 100%; text-align: center; text-decoration: none; border: 0; border-radius: 12px;
  padding: 14px; font-weight: 700; font-size: 1rem; margin-top: 10px;
}
.tx-p__actions .tx-btn { margin: 0; flex: 1; }
.tx-btn--primary { background: var(--tx-brand); color: #fff; }
.tx-btn--primary:disabled { opacity: .6; }
.tx-btn--wa { background: #fff; color: #128c4a; border: 1.5px solid var(--tx-wa); }

.tx-cart__item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--tx-line); }
.tx-cart__item img { width: 54px; height: 54px; object-fit: contain; border-radius: 8px; background: #f3f3f5; flex: none; }
.tx-cart__info { flex: 1; min-width: 0; }
.tx-cart__name { font-size: .88rem; font-weight: 600; line-height: 1.25; }
.tx-cart__var { font-size: .78rem; color: var(--tx-muted); }
.tx-cart__price { font-size: .88rem; font-weight: 700; margin-top: 2px; }
.tx-cart__totals { margin: 14px 0 6px; display: grid; gap: 6px; }
.tx-cart__totals div { display: flex; justify-content: space-between; }
.tx-cart__transfer { color: var(--tx-ok); font-size: .9rem; }
.tx-cart__empty { color: var(--tx-muted); text-align: center; padding: 20px 0; }

.tx-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 60;
  background: var(--tx-ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem;
  max-width: calc(100% - 32px);
}

/* v3: elegir entre 4 categorías (2x2) y productos chiquitos de a 2 */
.tx-ask { font-size: 1.3rem; font-weight: 800; margin: 6px 0 14px; text-align: center; }
.tx-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .tx-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tx-cat, .tx-cat:nth-child(-n+3) {
  flex-direction: column; justify-content: center; text-align: center; gap: 10px; padding: 16px 10px 14px;
}
.tx-cat__img, .tx-cat:nth-child(-n+3) .tx-cat__img { width: 100%; height: auto; aspect-ratio: 1; }
.tx-cat__text { align-items: center; }
.tx-cat__name { font-size: 1.05rem; }
.tx-cat__count { font-size: .78rem; }

.tx-grid { gap: 8px; }
.tx-item { border-radius: 12px; }
.tx-item__media img { padding: 6px; }
.tx-item__info { padding: 6px 8px 9px; gap: 1px; }
.tx-item__brand { font-size: .6rem; }
.tx-item__name { font-size: .76rem; padding-right: 22px; }
.tx-item__price { font-size: .88rem; margin-top: 2px; }
.tx-item__add { width: 24px; height: 24px; line-height: 24px; font-size: 1rem; right: 6px; bottom: 8px; }
.tx-low { font-size: .6rem; padding: 2px 5px; right: 6px; top: 6px; }
.tx-item__qty { left: 6px; top: 6px; }

/* Sin banda naranja arriba */
.tx-cover { padding: 16px 0 14px; }
.tx-cover__bg { display: none; }
.tx-cover__inner { margin-top: 0; align-items: center; }
.tx-store { padding-top: 0; }
