/* ============================================================
   Comprave — estilo marketplace (inspirado en MercadoLibre)
   ============================================================ */
:root {
  /* Valores por defecto = tema verde actual (los mismos que sirve el servidor),
     así el primer pintado ya es verde y no hay destello amarillo (FOUC). */
  --ml-yellow: #ffffff;
  --ml-yellow-dark: #ffffff;
  --bg: #ebebeb;
  --surface: #ffffff;
  --text: #333333;
  --text-soft: #666666;
  --muted: #999999;
  --border: #e6e6e6;
  --blue: #368f22;
  --blue-dark: #368f22;
  --green: #43b02a;
  --orange: #f73;
  --hero-bg1: #43b02a;
  --hero-bg2: #1e6a12;
  --hdr-text: #333333;
  --logo-size: 54px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.08);
  --shadow: 0 1px 6px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow-x clip en html+body: impide que la página entera se desplace
   lateralmente en el teléfono si algún elemento se desborda */
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.4; font-size: 14px;
  -webkit-font-smoothing: antialiased;
  width: 100%; max-width: 100%; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: 100%; max-width: 1540px; margin: 0 auto; padding: 0 clamp(14px, 2.5vw, 40px); }

/* ---------- Topbar (barra de anuncio: verde oscuro + texto blanco) ---------- */
.topbar { background: #1e6a12; font-size: 12px; }
.topbar__inner { width: 100%; max-width: 1540px; margin: 0 auto; padding: 4px clamp(14px, 2.5vw, 40px); display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 30px; color: #fff; }
.topbar__links { display: flex; gap: 18px; flex-shrink: 0; color: #fff; }
.topbar__links a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.hdr { background: linear-gradient(168deg, color-mix(in srgb, var(--ml-yellow) 86%, #fff), var(--ml-yellow)); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.hdr__inner { width: 100%; max-width: 1540px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px clamp(14px, 2.5vw, 40px); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: calc(var(--logo-size, 38px) * 0.55); flex-shrink: 0; }
.brand__mark { font-size: calc(var(--logo-size, 38px) * 0.62); }
.brand__name { letter-spacing: -.02em; color: var(--hdr-text, #2d3277); }
.brand__logo { height: var(--logo-size, 38px); width: auto; display: block; }

.searchbar { flex: 1; max-width: 600px; display: flex; background: #fff; border: 1px solid #dcdcdc; border-radius: 999px; box-shadow: var(--shadow-sm); overflow: hidden; }
.searchbar input { flex: 1; border: none; outline: none; padding: 11px 18px; font-size: 14px; }
.searchbar button { border: none; background: var(--blue); padding: 0 18px; cursor: pointer; font-size: 16px; color: #fff; }
.searchbar button:hover { filter: brightness(.94); }

.hdr__nav { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.hdr__link { font-size: 13px; color: var(--hdr-text, #333); }
.hdr__link:hover, .topbar__links a:hover { text-decoration: underline; }
.hdr__user { font-weight: 500; }
.hdr__sell { font-size: 13px; font-weight: 600; }
.hdr__cart { position: relative; font-size: 20px; }
.cart-badge {
  position: absolute; top: -6px; right: -8px; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 4px;
}

/* ---------- Category bar + menú desplegable ---------- */
.catbar { background: var(--ml-yellow); border-top: 1px solid rgba(0,0,0,.06); border-bottom: 1px solid rgba(0,0,0,.07); }
.catbar__inner { position: relative; width: 100%; max-width: 1540px; margin: 0 auto; padding: 0 clamp(14px, 2.5vw, 40px); display: flex; align-items: center; gap: 20px; height: 40px; font-size: 13px; white-space: nowrap; }

.cat-menu { position: relative; }
.cat-toggle { display: inline-flex; align-items: center; gap: 7px; border: none; background: transparent; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--hdr-text, #2d3277); padding: 0; }
.cat-toggle__bars { font-size: 16px; line-height: 1; }
.cat-toggle__caret { font-size: 10px; transition: transform .2s; }
.cat-toggle.active .cat-toggle__caret { transform: rotate(180deg); }
.cat-toggle:hover { text-decoration: underline; }

.catbar__nav { display: flex; align-items: center; gap: 20px; overflow-x: auto; }
.catbar__nav::-webkit-scrollbar { height: 0; }
.catbar__nav a { color: var(--hdr-text, #333); opacity: .9; }
.catbar__nav a:hover { opacity: 1; text-decoration: underline; }
.catbar__ofertas { position: relative; }
.tag-new { background: var(--blue); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 8px; vertical-align: super; margin-left: 2px; }

/* Megamenú desplegable (categorías + subcategorías, estilo ML) */
.cat-dropdown {
  position: absolute; top: 100%; left: 0;
  background: #fff; color: var(--text); border-radius: 0 0 6px 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  /* display:none cerrado: si no, sus 580px ensanchan la página en móvil (scroll lateral) */
  display: none;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .18s, transform .18s; z-index: 120;
}
.cat-dropdown.open { display: block; opacity: 1; transform: translateY(0); }
.cat-mega { display: flex; }
.cat-mega__list { list-style: none; width: 260px; max-height: 440px; overflow-y: auto; background: #393b41; border-radius: 0 0 0 6px; padding: 6px 0; }
.cat-mega__cat { display: flex; align-items: center; justify-content: space-between; }
.cat-mega__cat a { flex: 1; display: block; padding: 10px 18px; color: #fff; font-size: 13.5px; }
.cat-mega__cat .cat-arrow { color: #cfcfcf; padding-right: 14px; font-size: 14px; }
.cat-mega__cat.active, .cat-mega__cat:hover { background: #4a4d54; }
.cat-mega__subs { width: 320px; max-height: 440px; overflow-y: auto; padding: 16px 22px; }
.cat-mega__title { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.cat-mega__title a:hover { color: var(--blue); }
.cat-mega__subs ul { list-style: none; columns: 1; }
.cat-mega__subs li a { display: block; padding: 7px 0; color: var(--text-soft); font-size: 13.5px; }
.cat-mega__subs li a:hover { color: var(--blue); }
.cat-mega__all { display: inline-block; margin-top: 12px; color: var(--blue); font-size: 13px; font-weight: 600; }
.cat-mega__all:hover { text-decoration: underline; }

/* Móvil: el megamenú (580px fijos) se salía de la pantalla y cortaba el texto.
   Se centra ocupando casi todo el ancho y los dos paneles se reparten en % con texto envuelto. */
@media (max-width: 720px) {
  /* left compensa el padding de .catbar__inner (el padre posicionado es .cat-menu, no el viewport) */
  .cat-dropdown { left: calc(6px - clamp(14px, 2.5vw, 40px)); width: calc(100vw - 12px); border-radius: 0 0 6px 6px; }
  .cat-mega__list { width: 44%; flex-shrink: 0; }
  .cat-mega__cat a { padding: 10px 12px; font-size: 12.5px; white-space: normal; overflow-wrap: break-word; }
  .cat-mega__cat .cat-arrow { padding-right: 10px; }
  .cat-mega__subs { width: auto; flex: 1; min-width: 0; padding: 14px 12px; }
  .cat-mega__title { font-size: 14px; overflow-wrap: break-word; }
  .cat-mega__subs li a { font-size: 12.5px; white-space: normal; overflow-wrap: break-word; }
  .cat-mega__all { font-size: 12.5px; }
  .cat-mega__list, .cat-mega__subs { max-height: min(440px, calc(100vh - 230px)); }
}

/* Overlay que oscurece el resto de la página */
.cat-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 90; }
.cat-overlay.open { opacity: 1; visibility: visible; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 6px; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-dark); }
.btn--soft { background: #e8f0fe; color: var(--blue); }
.btn--soft:hover { background: #ddeafe; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { filter: brightness(.95); }
.btn--block { width: 100%; }
.btn--lg { padding: 14px 24px; font-size: 16px; }

/* ---------- Home: hero / banner ---------- */
main { padding: 18px 0 40px; }
/* Banner a todo el ancho: degradado (o imagen) de borde a borde, con brillo suave */
.hero-full {
  width: 100%;
  background:
    radial-gradient(120% 130% at 75% 12%, rgba(255,255,255,.16), rgba(255,255,255,0) 48%),
    linear-gradient(120deg, var(--hero-bg1, #1e3a8a) 0%, var(--hero-bg2, #3b82f6) 100%);
  color: #fff;
}
/* Contenido del banner centrado y armónico */
.hero-banner__inner {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 18px; min-height: 300px; padding-top: 54px; padding-bottom: 76px;
}
.hero-banner__inner > div { max-width: 780px; margin: 0 auto; }
.hero-banner__inner h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); letter-spacing: -.02em; font-weight: 800; line-height: 1.12; }
.hero-banner__inner p { opacity: .95; margin-top: 12px; font-size: clamp(1rem, 1.6vw, 1.2rem); }
.hero-banner__inner .btn { background: #fff; color: var(--blue); font-weight: 700; border-radius: 999px; padding: 14px 34px; font-size: 16px; }
.hero-banner__inner .btn:hover { background: #f0f4ff; }

/* category circles */
.cat-strip { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 18px; margin-bottom: 18px; }
/* Las tarjetas se montan un poco sobre el banner (efecto MercadoLibre) */
.cat-strip--overlap { margin-top: -42px; position: relative; z-index: 2; }
.cat-strip__grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px; border-radius: 8px; transition: background .15s; text-align: center; }
.cat-tile:hover { background: #f5f5f5; }
.cat-tile .ico { width: 56px; height: 56px; border-radius: 50%; background: #eef7ea; display: grid; place-items: center; font-size: 24px; font-weight: 700; color: var(--blue); }
.cat-tile span { font-size: 12px; color: var(--text-soft); }

/* section card */
.panel { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 18px; margin-bottom: 18px; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.panel__head h2 { font-size: 1.4rem; font-weight: 600; }
.panel__head a { color: var(--blue); font-size: 13px; }

/* ---------- Product grid / cards ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .15s; display: flex; flex-direction: column; }
.pcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pcard__media { position: relative; aspect-ratio: 1/1; background: #fff; }
.pcard__media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pcard__badge { position: absolute; top: 8px; left: 8px; background: #fff3cd; color: #8a6d00; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 3px; }
.pcard__body { padding: 0 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.pcard__price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard__price .now { font-size: 1.35rem; font-weight: 400; }
.pcard__price .was { color: var(--muted); text-decoration: line-through; font-size: .8rem; }
.pcard__price .off { color: var(--green); font-size: .8rem; font-weight: 600; }
.card__inst, .pcard__inst { color: var(--green); font-size: 12px; }
.pcard__bs, .rcard__bs { color: var(--text-soft); font-size: 12px; }
.pdp__bs { color: var(--text-soft); font-size: 14px; margin: 2px 0 10px; }
.pdp__bs b { color: var(--text); font-weight: 600; }
.pcard__title { color: var(--text-soft); font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.pcard__ship { color: var(--green); font-size: 12px; font-weight: 600; }
.full { background: #00a650; color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 2px; font-style: normal; vertical-align: middle; }

/* ---------- Search results layout ---------- */
.results { display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
.filters-col { display: flex; flex-direction: column; gap: 14px; }

/* Botón "Filtrar" (solo móvil): pliega los filtros para no empujar los resultados */
.filter-toggle { display: none; align-items: center; gap: 8px; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; font-family: inherit; font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm); }
.filter-toggle #filterCount { color: var(--blue, #368f22); font-weight: 700; }
.filter-toggle__caret { margin-left: auto; transition: transform .2s; }
.filter-toggle.open .filter-toggle__caret { transform: rotate(180deg); }
.filter-box { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 16px; }
.filter-box h3, .filter-box .filter-t { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.filter-box a, .filter-box label { display: block; font-size: 13px; color: var(--text-soft); padding: 4px 0; cursor: pointer; }
.filter-box a:hover { color: var(--blue); }
.filter-box a.active { color: var(--text); font-weight: 700; }

.results-main { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 18px; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.results-head h1 { font-size: 1.1rem; font-weight: 400; color: var(--text-soft); }
.results-head h1 b { color: var(--text); }
.sort select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 13px; }

.rcard { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.rcard:hover .rcard__title { color: var(--blue); }
.rcard__media { aspect-ratio: 1/1; background: #fff; }
.rcard__media img { width: 100%; height: 100%; object-fit: contain; }
.rcard__price { display: flex; align-items: center; gap: 10px; }
.rcard__price .now { font-size: 1.5rem; font-weight: 400; }
.rcard__price .was { color: var(--muted); text-decoration: line-through; font-size: .85rem; }
.rcard__price .off { color: var(--green); font-weight: 600; font-size: .85rem; }
.rcard__inst { color: var(--green); font-size: 13px; margin-top: 2px; }
.rcard__title { font-size: 1.05rem; margin: 8px 0; line-height: 1.3; }
.rcard__meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.stars { color: var(--blue); font-size: 13px; letter-spacing: 1px; }
.rcard__reviews { color: var(--muted); font-size: 12px; }
.rcard__ship { color: var(--green); font-size: 13px; font-weight: 600; }
.rcard__cond { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- Product detail ---------- */
.pdp { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); display: grid; grid-template-columns: 1fr 380px; gap: 0; overflow: hidden; }
.pdp__gallery { padding: 28px; display: flex; gap: 16px; border-right: 1px solid var(--border); }
.pdp__thumbs { display: flex; flex-direction: column; gap: 10px; }
.pdp__thumbs img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; padding: 3px; }
.pdp__thumbs img.active { border-color: var(--blue); }
.pdp__main-img { flex: 1; display: grid; place-items: center; }
.pdp__main-img img { max-height: 420px; object-fit: contain; }
.pdp__info { padding: 28px; }
.pdp__cond { color: var(--muted); font-size: 12px; }
.pdp__title { font-size: 1.4rem; font-weight: 600; margin: 6px 0 12px; line-height: 1.3; }
.pdp__rating { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.pdp__price .now { font-size: 2.2rem; font-weight: 300; }
.pdp__price .was { color: var(--muted); text-decoration: line-through; font-size: 1rem; margin-left: 8px; }
.pdp__price .off { color: var(--green); font-weight: 600; margin-left: 8px; }
.pdp__inst { color: var(--green); font-size: 15px; margin: 6px 0 18px; }
.pdp__ship { color: var(--green); font-weight: 600; margin-bottom: 6px; }
.pdp__stock { font-weight: 600; margin: 14px 0 6px; }
.pdp__qty { display: flex; align-items: center; gap: 10px; margin: 10px 0 18px; font-size: 14px; }
.pdp__qty select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; }
.pdp__actions { display: flex; flex-direction: column; gap: 10px; }
.pdp__seller { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-soft); }
.pdp__seller b { color: var(--text); }
.pdp__perks { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.pdp__perks div { display: flex; gap: 8px; align-items: flex-start; }
.pdp__perks .ico { color: var(--blue); }

.pdp-desc { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 28px; margin-top: 18px; }
.pdp-desc h2 { font-size: 1.4rem; font-weight: 500; margin-bottom: 14px; }
.pdp-desc p { color: var(--text-soft); font-size: 15px; line-height: 1.7; max-width: 720px; }

.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--blue); }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.cart-list { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 8px 22px; }
.cart-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-row:last-child { border-bottom: none; }
.cart-row img { width: 90px; height: 90px; object-fit: contain; }
.cart-row__title { font-size: 14px; margin-bottom: 8px; }
.cart-row__title:hover { color: var(--blue); }
.qty-ctrl { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.qty-ctrl button { width: 32px; height: 32px; border: none; background: #fff; cursor: pointer; font-size: 16px; color: var(--blue); }
.qty-ctrl button:hover { background: #f5f5f5; }
.qty-ctrl span { min-width: 36px; text-align: center; font-weight: 600; }
.cart-row__right { text-align: right; }
.cart-row__price { font-size: 1.2rem; }
.cart-row__remove { color: var(--blue); font-size: 12px; background: none; border: none; cursor: pointer; margin-top: 8px; }
.cart-summary { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 22px; position: sticky; top: 90px; }
.cart-summary h2 { font-size: 16px; margin-bottom: 16px; }
.cart-summary .row { display: flex; justify-content: space-between; margin: 10px 0; font-size: 14px; color: var(--text-soft); }
.cart-summary .total { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: 600; margin: 16px 0; padding-top: 16px; border-top: 1px solid var(--border); }
.empty-state { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 60px 20px; text-align: center; }
.empty-state .big { font-size: 48px; margin-bottom: 12px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

/* ---------- Forms (Vender) ---------- */
.form-page { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.form-card { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 28px; }
.form-card h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 6px; }
.form-card .sub { color: var(--muted); margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-family: inherit; font-size: 14px; outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tips { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 22px; position: sticky; top: 90px; }
.tips h3 { font-size: 15px; margin-bottom: 12px; }
.tips ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.tips li { font-size: 13px; color: var(--text-soft); display: flex; gap: 8px; }

/* ---------- Account ---------- */
.acct-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.acct-tabs button { padding: 10px 18px; border: none; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-soft); }
.acct-tabs button.active { background: var(--blue); color: #fff; }
.listing-row { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.listing-row img { width: 70px; height: 70px; object-fit: contain; }
.listing-row__title { font-size: 14px; }
.listing-row__price { font-weight: 600; }
.del-btn { background: #fff0f0; color: #d33; border: none; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }

/* ---------- Auth (login / registro) ---------- */
.auth-wrap { display: grid; place-items: center; padding: 30px 0 50px; }
.auth-card { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); width: min(420px, 100%); padding: 30px 28px; }
.auth-brand { text-align: center; font-size: 1.5rem; font-weight: 800; color: #2d3277; margin-bottom: 20px; }
.auth-brand span { font-size: 1.6rem; }
.auth-tabs { display: flex; background: var(--bg); border-radius: 8px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-soft); }
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-form .field { margin-bottom: 16px; }
.auth-error { color: var(--danger, #d33); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-soft); margin-top: 14px; }
.auth-switch a { color: var(--blue); font-weight: 600; }
.auth-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }

/* Menú de usuario en el header */
.user-menu { position: relative; }
.user-menu__btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none; cursor: pointer; font-family: inherit; font-size: 13px; color: #333; }
.user-menu__btn:hover { text-decoration: underline; }
.user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 220px; background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .18s; z-index: 120; }
.user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown__head { padding: 10px 16px 12px; border-bottom: 1px solid var(--border); }
.user-dropdown__head b { display: block; font-size: 14px; }
.user-dropdown__head span { font-size: 12px; color: var(--muted); }
.user-dropdown a, .user-dropdown button { display: block; width: 100%; text-align: left; padding: 10px 16px; font-size: 13px; color: #333; background: none; border: none; cursor: pointer; font-family: inherit; }
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg); }
.user-dropdown .logout { color: var(--danger, #d33); border-top: 1px solid var(--border); }

/* ---------- Métodos de pago ---------- */
.pm-wrap { max-width: 680px; margin: 0 auto; padding: 10px 0 40px; }
.pm-h1 { font-size: 1.5rem; font-weight: 600; margin: 6px 0; }
.pm-sub { color: var(--text-soft); margin-bottom: 18px; }
.pm-welcome { background: #e8f7ee; border: 1px solid #b6e2c6; color: #1c6b3c; padding: 14px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.pm-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.pm-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.pm-toggle input { width: 18px; height: 18px; accent-color: var(--blue); }
.pm-fields { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pm-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.pm-note { color: var(--muted); font-size: 12px; margin-top: 14px; text-align: center; }

/* Checkout: paso de pago */
.pay-step { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 22px; }
.pay-step h3 { font-size: 1.1rem; margin-bottom: 4px; }
.pay-step .pay-total { color: var(--text-soft); margin-bottom: 16px; }
.pay-option { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.pay-option:hover { border-color: var(--blue); }
.pay-option.active { border-color: var(--blue); background: #f3f8ff; }
.pay-option__head { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.pay-option__head input { width: 17px; height: 17px; accent-color: var(--blue); }
.pay-data { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 13px; color: var(--text-soft); display: grid; gap: 4px; }
.pay-data b { color: var(--text); }
/* Botón "Copiar" (dirección de billetera cripto, cuentas, teléfonos…) */
.copy {
  display: inline-flex; align-items: center; gap: 3px; cursor: pointer;
  font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--blue, #368f22); background: #eaf6e6; border: 1px solid #cbe7c0;
  border-radius: 6px; padding: 3px 8px; font-family: inherit; vertical-align: middle;
}
.copy:hover { background: #d9f0d0; }
.copy:active { transform: scale(.96); }
.copy.copied { background: #368f22; border-color: #368f22; color: #fff; }
/* Fila dato + botón: el valor puede envolver (direcciones cripto largas) */
.pay-kv { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; padding: 3px 0; }
.pay-kv__val { flex: 1; min-width: 0; word-break: break-all; }
.pay-step .field { margin-top: 14px; }
.pay-sub { margin: 18px 0 4px; font-size: 1rem; font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.pay-step textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 14px; resize: vertical; }
.pay-empty { color: var(--muted); font-size: 14px; padding: 10px 0 4px; }

/* Estado de pedido */
.order-status { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.order-status--pendiente { background: #fff3cd; color: #8a6d00; }
.order-status--pagado { background: #e8f7ee; color: #1c6b3c; }

/* ---------- Selección de formas de pago (Vender) ---------- */
.pay-choose { display: flex; flex-direction: column; gap: 8px; }
.pay-choose__opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 14px; }
.pay-choose__opt:hover { border-color: var(--blue); }
.pay-choose__opt input { width: 17px; height: 17px; accent-color: var(--blue); }
.pdp__pay { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; }
.pdp__pay b { display: block; margin-bottom: 6px; color: var(--text); }
.pdp__pay .chip { display: inline-block; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; margin: 0 6px 6px 0; font-size: 12.5px; color: var(--text-soft); }

/* ---------- Cargador de fotos (Vender) ---------- */
.photo-up { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.photo-thumb { position: relative; width: 90px; height: 90px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; display: grid; place-items: center; }
.photo-thumb button:hover { background: #d33; }

/* ---------- Panel de vendedor (dashboard) ---------- */
.dash { display: grid; grid-template-columns: 250px 1fr; gap: 20px; padding: 10px 0 40px; align-items: start; }
.dash__side { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-sm); overflow: hidden; position: sticky; top: 80px; }
.dash__user { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--border); }
.dash__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.dash__name { font-weight: 600; font-size: 14px; }
.dash__email { color: var(--muted); font-size: 12px; }
.dash__nav { display: flex; flex-direction: column; padding: 8px 0 14px; }
.dash__group { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 14px 18px 6px; font-weight: 700; }
.dash__nav a { padding: 9px 18px; font-size: 14px; color: var(--text-soft); border-left: 3px solid transparent; }
.dash__nav a:hover { background: var(--bg); color: var(--text); }
.dash__nav a.active { color: var(--blue); border-left-color: var(--blue); font-weight: 600; background: #f3f8ff; }
.dash__cta { color: var(--green) !important; font-weight: 600; }
.dash__logout { margin: 14px 18px 4px; padding: 9px 0; width: calc(100% - 36px); background: #fff0f0; color: #d33; border: 1px solid #f5d0d0; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600; text-align: center; }
.dash__logout:hover { background: #ffe2e2; }

.dash__main { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 24px; min-height: 360px; }
.dash__loading { color: var(--muted); padding: 40px; text-align: center; }
.dash__h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: 18px; }
.dash__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dash__head .dash__h1 { margin: 0; }

.dash__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.dash__card { background: var(--bg); border-radius: 10px; padding: 18px; font-size: 13px; color: var(--text-soft); }
.dash__num { font-size: 1.6rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.dash__quick { display: flex; gap: 12px; flex-wrap: wrap; }

/* Tarjetas del resumen clicables (llevan a su vista de detalle) */
a.dash__card--link { display: block; text-decoration: none; color: var(--text-soft); cursor: pointer; border: 1px solid transparent; transition: box-shadow .15s, transform .15s, border-color .15s; }
a.dash__card--link:hover { border-color: var(--green, #43b02a); box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.dash__card-go { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--blue, #368f22); }

/* Filtros de la vista Pedidos del admin */
.adm-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.adm-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; color: var(--text-soft); cursor: pointer; font-family: inherit; }
.adm-chip:hover { border-color: var(--green, #43b02a); }
.adm-chip--on { background: var(--green, #43b02a); border-color: var(--green, #43b02a); color: #fff; font-weight: 600; }

/* Tarjeta de pedido en el admin */
.adm-order { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; background: #fff; }
.adm-order__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 4px; }
.adm-order__total { margin-left: auto; font-weight: 700; font-size: 15px; color: var(--text); }

.dash__table { width: 100%; border-collapse: collapse; }
.dash__table th { text-align: left; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.dash__table td { padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.dash__table img { width: 46px; height: 46px; object-fit: contain; border-radius: 6px; background: #fff; }
.dash__table a { color: var(--text); }
.dash__table a:hover { color: var(--blue); }
.dash__actions { display: flex; gap: 10px; white-space: nowrap; }
.dash__edit { color: var(--blue); font-size: 13px; }
.dash__del { background: #fff0f0; color: #d33; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }

.dash__order { border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.dash__order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dash__muted { color: var(--muted); font-size: 12.5px; }
.dash__line { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-soft); padding: 4px 0; }
.dash__total { font-weight: 600; color: var(--text); border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 8px; }
.dash__order-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.dash__order-actions .btn { padding: 8px 18px; font-size: 14px; }
.dash__paid { color: var(--green); font-weight: 600; font-size: 14px; }
.dash__empty { text-align: center; color: var(--muted); padding: 50px 10px; }
.dash__empty p { margin-bottom: 16px; }
.dash__profile { max-width: 480px; }
.dash__row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.dash__row span { color: var(--muted); }

@media (max-width: 820px) {
  .dash { grid-template-columns: 1fr; }
  .dash__side { position: static; }
  .dash__cards { grid-template-columns: repeat(2, 1fr); }
  .dash__table thead { display: none; }
  .dash__table, .dash__table tbody, .dash__table tr, .dash__table td { display: block; width: 100%; }
  .dash__table tr { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; padding: 6px; }
  .dash__table td { border: none; padding: 6px 10px; }
}

/* ---------- Footer ---------- */
.ftr { background: var(--surface); border-top: 1px solid var(--border); margin-top: 30px; }
.ftr__cols { width: 100%; max-width: 1540px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 36px clamp(14px, 2.5vw, 40px); }
.ftr__cols h4 { font-size: 14px; margin-bottom: 12px; }
.ftr__cols a { display: block; color: var(--text-soft); font-size: 13px; padding: 3px 0; }
.ftr__cols a:hover { color: var(--blue); }
.ftr__cols p { color: var(--text-soft); font-size: 13px; }
.ftr__bottom { background: #f5f5f5; text-align: center; padding: 16px; color: var(--muted); font-size: 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: #333; color: #fff; padding: 13px 24px; border-radius: 8px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .results, .cart-layout, .form-page, .pdp { grid-template-columns: 1fr; }
  .pdp__gallery { border-right: none; border-bottom: 1px solid var(--border); }
  /* Filtros plegados detrás del botón "Filtrar" en móvil */
  .filter-toggle { display: flex; }
  .filters-col { display: none; }
  .filters-col.open { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .filters-col.open .filter-box:first-child { grid-column: 1 / -1; }
  .cat-strip__grid { grid-template-columns: repeat(4, 1fr); }
  .cart-summary, .tips { position: static; }
}
@media (max-width: 620px) {
  .hdr__inner { flex-wrap: wrap; position: relative; }
  /* El buscador comparte la 2ª fila con la campana (como la app de ML):
     la base casi-100% lo obliga a envolver; el grow lo llena si no hay campana */
  .searchbar { order: 3; flex: 1 1 calc(100% - 46px); max-width: none; }
  .hdr__bell { order: 4; }
  .hdr__link { display: none; }
  /* Menú de usuario: anclado al botón (right:0) se salía por el borde
     izquierdo; en móvil se ancla al header completo, a lo ancho. */
  .user-menu { position: static; }
  .user-dropdown { left: 10px; right: 10px; width: auto; top: calc(100% + 4px); }
  .cat-strip__grid { grid-template-columns: repeat(3, 1fr); }
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .rcard { grid-template-columns: 110px 1fr; }
  .ftr__cols { grid-template-columns: repeat(2, 1fr); }
  .hero-banner__inner { padding-top: 28px; padding-bottom: 54px; min-height: 200px; }
}

/* ===== Barra de anuncio (editable) ===== */
.topbar__announce { font-size: 12.5px; color: #fff; opacity: .95; line-height: 1.35; }
.topbar__announce.show { font-weight: 500; }

/* ===== Menú: enlace de administración ===== */
.user-dropdown__admin { color: #1b66c9 !important; font-weight: 600; border-top: 1px solid var(--border); }

/* ===== Panel de administración ===== */
.adm-badge { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  background: #e7f0ff; color: #1b66c9; padding: 1px 7px; border-radius: 10px; vertical-align: middle; }
.adm-form { max-width: 640px; }
.adm-form .field { margin-bottom: 16px; }
.adm-form input[type=text], .adm-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 14px; }
.adm-form .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.adm-hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.adm-h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 14px; }
.adm-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; flex-wrap: wrap; }

/* Estado y mini-botones de acciones */
.adm-ok { color: var(--green); font-weight: 600; font-size: 12.5px; }
.adm-no { color: var(--orange); font-weight: 600; font-size: 12.5px; }
.adm-mini { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-family: inherit; margin: 2px 0; }
.adm-mini:hover { background: var(--bg); }
.adm-mini--on { color: var(--green); border-color: var(--green); }
.adm-mini--off { color: var(--text-soft); }
.adm-mini--del { color: #d23; border-color: #f1c5c5; }
.adm-mini--del:hover { background: #fdeaea; }
.adm-mini:disabled { opacity: .5; cursor: default; }

/* Tarjetas del panel */
.adm-card { background: #fafbfc; border: 1px solid var(--border); border-radius: 12px; padding: 18px; }

/* Categorías */
.adm-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.adm-cat { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fff; }
.adm-cat__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-cat__subs { list-style: none; margin: 8px 0 0; padding: 0; }
.adm-cat__subs li { font-size: 13px; color: var(--text-soft); padding: 2px 0; display: flex; align-items: center; gap: 6px; }

/* Colores */
.adm-colors { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; }
.adm-colors input[type=color] { width: 60px; height: 38px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; margin-top: 6px; background: #fff; }

/* Subir banners */
.adm-up { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.adm-link-input { flex: 1; min-width: 200px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13px; }
.adm-banners { display: flex; flex-direction: column; gap: 10px; }
.adm-banner { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; }
.adm-banner img { width: 90px; height: 54px; object-fit: cover; border-radius: 6px; }
.adm-banner__info { font-size: 12.5px; word-break: break-all; }

/* ===== Admin: estadísticas ===== */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-bar { display: grid; grid-template-columns: 130px 1fr 56px; align-items: center; gap: 10px; padding: 5px 0; }
.stat-bar__label { font-size: 12.5px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-bar__track { background: #eef1f4; border-radius: 999px; height: 12px; overflow: hidden; }
.stat-bar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #43b02a, #1e6a12); }
.stat-bar__val { font-size: 12.5px; font-weight: 700; text-align: right; color: var(--text); }

/* ===== "Ayúdanos a mejorar" (dentro del desplegable de Ayuda del pie) ===== */
.ftr-improve { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); max-width: 620px; }
.ftr-improve h3 { font-size: 1.02rem; margin-bottom: 6px; color: var(--text); }
.ftr-improve p { color: var(--text-soft); font-size: 13px; margin-bottom: 11px; line-height: 1.55; }
.ftr-improve p a { color: var(--blue); text-decoration: underline; }
.ftr-improve__form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 10px; font: inherit; font-size: 14px; resize: vertical; background: #fff; }
.ftr-improve__row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ftr-improve__row input { flex: 1; min-width: 220px; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
.ftr-improve__msg { font-size: 13px; margin-top: 8px; min-height: 16px; }
.ftr-improve__msg.is-ok { color: var(--green); font-weight: 600; }
.ftr-improve__msg.is-err { color: #c0392b; }

/* ===== Anuncio de bienvenida (descuento al registrarse) ===== */
.cvw-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 3000;
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: cvwFade .2s ease; }
@keyframes cvwFade { from { opacity: 0; } to { opacity: 1; } }
.cvw-card { position: relative; background: #fff; border-radius: 16px; max-width: 380px; width: 100%;
  padding: 30px 26px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  border-top: 6px solid var(--green, #43b02a); animation: cvwPop .25s ease; }
@keyframes cvwPop { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.cvw-emoji { font-size: 46px; line-height: 1; }
.cvw-card h3 { font-size: 1.4rem; margin: 8px 0 6px; color: #1e6a12; }
.cvw-card p { color: var(--text-soft); font-size: 14px; margin-bottom: 16px; line-height: 1.5; }
.cvw-close { position: absolute; top: 8px; right: 12px; background: none; border: none; font-size: 26px;
  line-height: 1; color: var(--muted); cursor: pointer; }
.cvw-later { display: block; width: 100%; margin-top: 8px; background: none; border: none;
  color: var(--muted); font-size: 13px; cursor: pointer; padding: 8px; font-family: inherit; }
.cvw-later:hover { color: var(--text); }

/* Caja de cupón en el checkout */
.coupon-box { margin: 14px 0; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 10px; background: var(--bg); }

/* ===== Etiquetas de esquina + favorito en tarjetas de producto ===== */
.ptag { position: absolute; top: 8px; left: 8px; z-index: 3; font-size: 10px; font-weight: 800;
  letter-spacing: .02em; color: #fff; padding: 3px 9px; border-radius: 6px; text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0,0,0,.22); line-height: 1.3; }
.ptag--best  { background: #ff7a00; }   /* MÁS VENDIDO */
.ptag--feat  { background: #e53935; }   /* DESTACADO (lo más buscado) */
.ptag--offer { background: #43b02a; }   /* OFERTA */
.ptag--new   { background: #2d6cdf; }   /* NUEVO */
.ptag--pack  { background: #7b2ff7; }   /* PACK */
.pfav { position: absolute; top: 6px; right: 6px; z-index: 3; width: 30px; height: 30px; border: none;
  background: rgba(255,255,255,.92); border-radius: 50%; cursor: pointer; font-size: 17px; line-height: 1;
  color: #c0392b; box-shadow: 0 1px 4px rgba(0,0,0,.18); display: grid; place-items: center; padding: 0;
  transition: transform .12s; }
.pfav:hover { transform: scale(1.12); }
.pfav.on { color: #e53935; }
.rcard__media { position: relative; }
@media (max-width: 620px) { .rcard__media .pfav { width: 26px; height: 26px; font-size: 15px; } }

/* ===== Verificación de identidad (KYC ligero) ===== */
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--ghost { background: transparent; border: 1px solid var(--border); color: var(--text-soft); }
.btn--ghost:hover { background: var(--bg); }
.vf-wrap { margin-top: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.vf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.vf-banner { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.vf-banner--ok { background: #e8f7e3; color: #1e6a12; }
.vf-banner--no { background: #fff4e5; color: #8a5a00; }
.vf-item { border-top: 1px solid var(--border); padding: 14px 0; }
.vf-item:first-of-type { border-top: none; }
.vf-item__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.vf-ico { font-size: 16px; }
.vf-item__done { color: var(--green); font-size: 13px; margin-top: 6px; }
.vf-chip { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; vertical-align: middle; margin-left: 4px; }
.vf-chip--ok { background: #e8f7e3; color: #1e6a12; }
.vf-chip--no { background: #fdecea; color: #c0392b; }
.vf-chip--soon { background: #eef1f4; color: #888; }
.vf-form { margin-top: 10px; background: var(--bg); border-radius: 10px; padding: 12px; }
.vf-lbl { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.vf-input { width: 100%; max-width: 340px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; }
.vf-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.vf-msg { font-size: 13px; margin-top: 8px; color: var(--text-soft); }
.vf-msg--err { color: #c0392b; }
/* Insignia "Vendedor verificado" en tarjetas y ficha */
.seller-vf { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700;
  color: #1e6a12; background: #e8f7e3; padding: 1px 8px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.pcard__vf { margin-top: 2px; }
.pdp__seller .seller-vf { font-size: 12px; }

/* Aviso de "verifica para vender" en la página de publicar */
.sell-gate { max-width: 620px; margin: 30px auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 26px; text-align: center; box-shadow: var(--shadow-sm); }
.sell-gate .big { font-size: 42px; }
.sell-gate h2 { margin: 10px 0 8px; font-size: 1.25rem; }
.sell-gate p { color: var(--text-soft); margin-bottom: 18px; }

/* ===== Admin: agrupar variantes ===== */
.adm-vargroup { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-top: 10px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; }
.adm-varmembers { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.adm-varmember { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 96px; text-align: center; }
.adm-varmember img { width: 54px; height: 54px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.adm-varmember span { font-size: 10.5px; color: var(--text-soft); line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adm-varmember b { font-size: 11.5px; }

/* ===== Carrusel de banners (hero) a todo el ancho ===== */
/* Banner (carrusel): 1774×400 para imágenes generadas por IA.
   Se centra y no pasa de 1774px de ancho; en pantallas menores escala manteniendo
   la proporción, así se ve bien en escritorio y en la app. */
.hero-slider { position: relative; width: 100%; max-width: 1774px; margin: 0 auto; }
.hero-slides { position: relative; width: 100%; height: auto; aspect-ratio: 1774 / 400; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden; transition: opacity .5s ease; color: inherit; }
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide__bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-slide__content { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.hero-slide__content .wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.hero-slide__content h2 { font-size: clamp(1.4rem, 3.4vw, 2.8rem); font-weight: 800; line-height: 1.1; color: #2d2d6b; max-width: 560px; }
.hero-slide__content p { font-size: clamp(.95rem, 1.6vw, 1.25rem); font-weight: 600; color: #333; max-width: 520px; }
.hero-slide__btn { background: #fff; color: var(--blue); font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; gap: 8px; justify-content: center; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,.6); cursor: pointer; padding: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.hero-dot.active { background: #fff; }
@media (max-width: 720px) {
  /* El banner mantiene la proporción 1774×400 y se ve completo */
  .hero-slides { height: auto; aspect-ratio: 1774 / 400; }
  /* Sin solape: en móvil las tarjetas van debajo del banner */
  .cat-strip--overlap { margin-top: 12px; }
  .hero-dots { bottom: 5px; }
  .hero-dot { width: 8px; height: 8px; }
  /* Barra de anuncio: solo el mensaje, centrado y sin desbordes */
  .topbar__links { display: none; }
  .topbar__inner { justify-content: center; text-align: center; padding: 5px 12px; }
  .topbar__announce { font-size: 11.5px; }
  /* Encabezado compacto: el logo no se pasa de alto en teléfonos */
  .brand__logo { height: min(var(--logo-size, 38px), 40px); }
  .brand { font-size: 20px; }
  .hdr__inner { gap: 12px; padding: 8px 14px; }
  .catbar__inner { gap: 14px; }
}

/* ===== Cinta de donación ===== */
.donate-ribbon {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(90deg, #1e6a12, #43b02a 55%, #1e6a12);
  color: #fff; border-radius: 10px; padding: 12px 18px; margin: 0 0 18px;
  font-size: 14.5px; font-weight: 600; text-align: center; box-shadow: var(--shadow-sm);
}
.donate-ribbon .hrt { color: #ff5a5f; font-size: 17px; }
.donate-ribbon b { color: #ffd100; }

/* ===== Franja de beneficios (compra protegida, envío, pagos) ===== */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 20px 18px; margin-bottom: 18px; }
.benefit { display: flex; align-items: center; gap: 12px; }
.benefit .ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: #eef7ea; display: grid; place-items: center; font-size: 22px; }
.benefit b { display: block; font-size: 13.5px; }
.benefit span { display: block; color: var(--text-soft); font-size: 12px; margin-top: 2px; }
@media (max-width: 900px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .benefits { grid-template-columns: 1fr; } }

/* ===== Asistente de publicación por pasos (Vender) ===== */
.wiz-steps { display: flex; gap: 0; margin-bottom: 24px; }
.wiz-step { flex: 1; text-align: center; position: relative; color: var(--muted); font-size: 12.5px; padding-top: 34px; }
.wiz-step::before {
  content: attr(data-n); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--muted); font-weight: 700; font-size: 13px;
  border: 2px solid var(--border); box-sizing: border-box;
}
.wiz-step::after {
  content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px);
  height: 2px; background: var(--border);
}
.wiz-step:first-child::after { display: none; }
.wiz-step.active { color: var(--blue); font-weight: 600; }
.wiz-step.active::before { background: var(--blue); border-color: var(--blue); color: #fff; }
.wiz-step.done { color: var(--green); }
.wiz-step.done::before { background: var(--green); border-color: var(--green); color: #fff; content: "✓"; }
.wiz-step.done::after, .wiz-step.active::after { background: var(--green); }
.wiz-pane { display: none; }
.wiz-pane.active { display: block; animation: wizin .25s ease; }
@keyframes wizin { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.wiz-nav .btn--back { background: var(--bg); color: var(--text-soft); }
.wiz-nav .btn--back:hover { background: #e2e2e2; }
.wiz-h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }

/* ===== Login en dos pasos (estilo marketplace) ===== */
.auth-step[hidden] { display: none; }
.auth-hello { display: flex; align-items: center; gap: 12px; background: #f3f8ff; border: 1px solid #d8e7ff; border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; }
.auth-hello .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex-shrink: 0; }
.auth-hello b { display: block; font-size: 14px; }
.auth-hello span { display: block; font-size: 12.5px; color: var(--text-soft); word-break: break-all; }
.auth-hello a { margin-left: auto; color: var(--blue); font-size: 12.5px; font-weight: 600; flex-shrink: 0; }
.auth-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--text-soft); font-size: 13.5px; margin-bottom: 18px; }

/* ===== Comisiones del vendedor ===== */
.fee-warn { background: #fff6de; border: 1px solid #f2d98c; color: #7a5c00; border-radius: 10px; padding: 13px 16px; font-size: 13.5px; margin-bottom: 18px; line-height: 1.5; }
.fee-donate { background: #e8f7ee; border: 1px solid #b6e2c6; color: #1c6b3c; border-radius: 10px; padding: 13px 16px; font-size: 13.5px; margin-top: 16px; line-height: 1.5; }
.fee-strip { display: block; background: #f3f8ff; border: 1px solid #d8e7ff; color: #173a6b; border-radius: 10px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 18px; }
.fee-strip:hover { background: #e9f2ff; }
.fee-strip b { color: var(--blue); }
.dash__card--due { background: #1e6a12; color: #d9f2d1; }
.dash__card--due .dash__num { color: #ffffff; }
.dash__card--off { opacity: .72; }
.donate-opt { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12.5px; font-weight: 600; color: var(--text-soft); cursor: pointer; }
.donate-opt input { width: 16px; height: 16px; accent-color: #1e6a12; }
.fee-rates { display: flex; flex-wrap: wrap; gap: 8px; }
.fee-rate { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--text-soft); }
.fee-rate b { color: var(--text); }
.fee-hint { background: #f3f8ff; border: 1px dashed #b9d4ff; color: #173a6b; border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.5; margin-top: 6px; }
.fee-frozen { background: #fdecec; border: 1px solid #f2b8b8; color: #a12626; border-radius: 10px; padding: 14px 16px; font-size: 14px; margin-bottom: 18px; line-height: 1.55; }
.order-status--vencido { background: #fdecec; color: #a12626; }

/* ===== Preguntas y respuestas (producto / paneles) ===== */
.qa-form { display: flex; gap: 10px; margin-bottom: 8px; }
.qa-form input { flex: 1; padding: 11px 14px; border: 1px solid var(--border); border-radius: 999px; font-family: inherit; font-size: 14px; outline: none; }
.qa-form input:focus { border-color: var(--blue); }
.qa-form .btn { padding: 10px 22px; border-radius: 999px; }
.qa-hint { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.qa-list { display: flex; flex-direction: column; gap: 14px; }
.qa-item { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.qa-item:last-child { border-bottom: none; }
.qa-q { font-size: 14.5px; font-weight: 600; }
.qa-meta { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 8px; white-space: nowrap; }
.qa-report { background: none; border: none; cursor: pointer; font-size: 13px; opacity: .55; padding: 0 2px; }
.qa-report:hover { opacity: 1; }
.qa-a { color: var(--text-soft); font-size: 14px; margin: 6px 0 0 16px; padding-left: 10px; border-left: 3px solid var(--green); }
.qa-a--wait { border-left-color: var(--border); color: var(--muted); font-style: italic; }
.qa-empty { color: var(--muted); font-size: 14px; }
.qa-item--dash { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.qa-item--dash .qa-form { margin: 10px 0 0 16px; }
@media (max-width: 620px) { .qa-form { flex-direction: column; } .qa-form .btn { width: 100%; } }

/* ===== Editor de banners en el panel ===== */
.adm-banners-edit { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; }
.adm-bedit { display: grid; grid-template-columns: 160px 1fr; gap: 14px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fff; }
.adm-bedit__img img { width: 160px; height: 96px; object-fit: cover; border-radius: 8px; }
.adm-bedit__fields { display: flex; flex-direction: column; gap: 8px; }
.adm-bedit__fields input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px; font-family: inherit; font-size: 13px; }
.adm-bedit__row { display: flex; gap: 8px; }
.adm-bedit__row input { flex: 1; }
@media (max-width: 620px) { .adm-bedit { grid-template-columns: 1fr; } .adm-bedit__img img { width: 100%; height: 140px; } }

/* ---------- Barra de navegación inferior (estilo app, solo móvil) ---------- */
.appnav { display: none; }
@media (max-width: 768px) {
  .appnav {
    position: fixed; bottom: 0; left: 0; z-index: 130;
    width: 100%; max-width: 100vw;
    display: flex; justify-content: center; background: #fff; border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,.07);
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .appnav a {
    flex: 0 1 76px; min-width: 0; position: relative; display: flex; flex-direction: column;
    align-items: center; gap: 2px; font-size: 10px; color: #616161; padding: 3px 0 1px;
    white-space: nowrap; overflow: hidden;
  }
  .appnav a svg { width: 21px; height: 21px; stroke: #5c5c5c; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .appnav a.active { color: var(--blue); font-weight: 600; }
  .appnav a.active svg { stroke: var(--blue); }
  .appnav__badge {
    position: absolute; top: -2px; left: calc(50% + 4px);
    background: #e83a3a; color: #fff; font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
    display: grid; place-items: center; line-height: 1;
  }
  body { padding-bottom: 66px; }
}

/* ---------- Página "Más" (menú estilo app de MercadoLibre) ---------- */
.mas { max-width: 640px; margin: 0 auto; padding: 0 0 20px; }
.mas-hero { background: linear-gradient(150deg, var(--hero-bg1, #43b02a), var(--hero-bg2, #1e6a12)); color: #fff; padding: 22px 18px; border-radius: 0 0 14px 14px; display: flex; align-items: center; gap: 14px; }
.mas-hero__avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.mas-hero__name { font-weight: 700; font-size: 16.5px; }
.mas-hero__mail { font-size: 12.5px; opacity: .85; word-break: break-all; }
.mas-hero .btn { margin-left: auto; flex-shrink: 0; }
.mas-group { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 18px 18px 6px; }
.mas-list { background: var(--surface); border-radius: 10px; margin: 0 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.mas-list a, .mas-list button { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13.5px 16px; font-size: 14.5px; color: var(--text); background: none; border: none; border-bottom: 1px solid #f1f1f1; font-family: inherit; cursor: pointer; text-align: left; }
.mas-list a:last-child, .mas-list button:last-child { border-bottom: none; }
.mas-list a:active, .mas-list a:hover { background: #f7faf6; }
.mas-ico { width: 22px; text-align: center; font-size: 17px; flex-shrink: 0; }
.mas-list .tag-new { margin-left: auto; }
.mas-list .mas-chev { margin-left: auto; color: var(--muted); }
.mas-list .tag-new + .mas-chev { margin-left: 8px; }
.mas-logout { color: #d33 !important; justify-content: center; font-weight: 600; }

/* ---------- Programa de afiliados ---------- */
.aff-hero { background: linear-gradient(150deg, var(--hero-bg1, #43b02a), var(--hero-bg2, #1e6a12)); color: #fff; border-radius: 12px; padding: clamp(24px, 5vw, 44px); text-align: center; margin: 16px 0; }
.aff-hero h1 { font-size: clamp(1.5rem, 4.5vw, 2.3rem); margin-bottom: 10px; }
.aff-hero p { font-size: 15px; opacity: .93; max-width: 560px; margin: 0 auto; }
.aff-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.aff-step { background: var(--surface); border-radius: 10px; padding: 20px 14px; text-align: center; box-shadow: var(--shadow-sm); }
.aff-step__num { width: 34px; height: 34px; margin: 0 auto 10px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; display: grid; place-items: center; }
.aff-step b { display: block; margin-bottom: 5px; }
.aff-step span { font-size: 13px; color: var(--text-soft); }
@media (max-width: 640px) { .aff-steps { grid-template-columns: 1fr; } }
.aff-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.aff-card { background: var(--surface); border-radius: 10px; padding: 16px; box-shadow: var(--shadow-sm); }
.aff-card__label { font-size: 12.5px; color: var(--text-soft); margin-bottom: 4px; }
.aff-card__value { font-size: 1.5rem; font-weight: 800; }
.aff-link { display: flex; gap: 8px; align-items: center; background: #f2f7ef; border: 1px dashed var(--green); border-radius: 9px; padding: 10px 12px; margin: 10px 0; }
.aff-link code { flex: 1; font-size: 13px; word-break: break-all; color: var(--text); }
.aff-prod { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f1f1; }
.aff-prod img { width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 7px; }
.aff-prod__t { flex: 1; font-size: 13.5px; }
.aff-prod__t small { display: block; color: var(--text-soft); }

/* ---------- Ajustes móviles (app): carrusel de categorías + secciones ocultas ---------- */
@media (max-width: 768px) {
  /* Categorías: carrusel deslizable lateral, con scroll propio que NO arrastra la página */
  .cat-strip { padding: 14px 10px; }
  .cat-strip__grid {
    display: flex; gap: 4px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .cat-strip__grid::-webkit-scrollbar { display: none; }
  .cat-strip__grid .cat-tile { flex: 0 0 auto; width: 92px; scroll-snap-align: start; }
  /* La franja de beneficios no se muestra en la app/móvil */
  .benefits { display: none; }
}

/* ---------- Mostrar/ocultar contraseña (ojo en el campo) ---------- */
.pass-field { position: relative; }
.pass-field input { width: 100%; padding-right: 46px; }
.pass-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; font-size: 18px;
  padding: 8px 10px; line-height: 1; color: var(--muted);
}

/* ---------- Pie compacto: una sola línea "Ayuda" desplegable ---------- */
.ftr__help { width: 100%; max-width: 1540px; margin: 0 auto; padding: 6px clamp(14px, 2.5vw, 40px); }
.ftr-help summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 14px; padding: 12px 0; user-select: none;
}
.ftr-help summary::-webkit-details-marker { display: none; }
.ftr-help__caret { font-size: 11px; color: var(--muted); transition: transform .2s; }
.ftr-help[open] .ftr-help__caret { transform: rotate(180deg); }
.ftr-help__links { padding: 0 0 12px; }
.ftr-help__links a { display: block; color: var(--text-soft); font-size: 13.5px; padding: 7px 0; }
.ftr-help__links a:hover { color: var(--blue); }

/* Contenido "¿Qué es Comprave?" + FAQ dentro del desplegable de Ayuda */
.ftr-about { border-top: 1px solid var(--border); padding: 14px 0 6px; }
.ftr-about h2 { font-size: 1.05rem; margin: 12px 0 8px; }
.ftr-about > p { color: var(--text-soft); font-size: 13.5px; line-height: 1.6; max-width: 900px; }
.ftr-about__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 12px 0; }
.ftr-about__grid h3 { font-size: .95rem; margin-bottom: 4px; }
.ftr-about__grid p { color: var(--text-soft); font-size: 13px; line-height: 1.5; }
.ftr-faq details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.ftr-faq summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.ftr-faq details p { color: var(--text-soft); font-size: 13px; line-height: 1.5; margin-top: 6px; }

/* ---------- Página Categorías (estilo app de MercadoLibre) ---------- */
/* Sección de contenido SEO/GEO del inicio */
.seo-info { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 26px 22px; margin: 22px 0; }
.seo-info h2 { font-size: 1.3rem; margin: 8px 0 12px; }
.seo-info > p { color: var(--text-soft); max-width: 900px; line-height: 1.6; margin-bottom: 8px; }
.seo-info__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 14px 0 6px; }
.seo-info__grid h3 { font-size: 1rem; margin-bottom: 4px; }
.seo-info__grid p { color: var(--text-soft); font-size: 14px; line-height: 1.55; }
.seo-faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.seo-faq summary { cursor: pointer; font-weight: 600; }
.seo-faq details p { color: var(--text-soft); font-size: 14px; line-height: 1.55; margin-top: 8px; }
.cats-title { max-width: 1100px; margin: 16px auto 6px; padding: 0 8px; font-size: 1.5rem; font-weight: 700; }
.cats-page { display: flex; width: 100%; max-width: 1100px; margin: 0 auto; background: var(--surface); min-height: 72vh; box-shadow: var(--shadow-sm); }
.cats-side { width: 230px; flex-shrink: 0; background: #f5f5f5; border-right: 1px solid var(--border); overflow-y: auto; }
.cats-side a { display: block; padding: 15px 14px; font-size: 13.5px; line-height: 1.3; color: var(--text); border-bottom: 1px solid #ececec; }
.cats-side a.active { background: var(--surface); font-weight: 700; color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }
.cats-main { flex: 1; min-width: 0; overflow: hidden; padding: 18px 16px 26px; }
.cats-main__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.cats-main__head h2 { font-size: 1.05rem; min-width: 0; overflow-wrap: anywhere; }
.cats-all { color: var(--blue); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.cats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 8px; }
.cats-tile { min-width: 0; max-width: 100%; overflow-wrap: anywhere; text-align: center; font-size: 12.5px; line-height: 1.25; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 7px; }
.cats-tile .circ { width: min(78px, 100%); aspect-ratio: 1; border-radius: 50%; background: #f2f6f0; display: grid; place-items: center; font-size: clamp(24px, 7vw, 34px); }
.cats-tile:hover .circ { background: #e6f2e0; }
@media (min-width: 900px) { .cats-grid { grid-template-columns: repeat(5, 1fr); } .cats-page { margin-top: 14px; border-radius: 10px; overflow: hidden; } }
@media (max-width: 768px) { .cats-side { width: 37%; max-width: 200px; } .cats-side a { padding: 14px 10px; font-size: 13px; } .cats-main { padding: 14px 8px 22px; } .cats-main__head h2 { font-size: .95rem; } .cats-grid { gap: 14px 5px; } .cats-tile { font-size: 11.5px; } }

/* El atributo hidden SIEMPRE oculta, aunque otra regla defina display
   (sin esto, los botones .btn con hidden seguían visibles) */
[hidden] { display: none !important; }

/* ---------- Globo de pendientes 🔔 (menú de usuario del header) ---------- */
.hdr-notif {
  display: inline-grid; place-items: center; margin-left: 7px;
  background: #e83a3a; color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 18px; border-radius: 9px; padding: 0 6px; line-height: 1;
}

/* ---------- Botón "Iniciar sesión" (visible en TODAS las páginas y tamaños;
   los .hdr__link se ocultan en móvil, este botón no) ---------- */
.hdr__login {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: var(--blue, #43b02a); color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px;
}
.hdr__login:hover { background: var(--blue-dark, #368f22); color: #fff; }
@media (max-width: 620px) {
  .hdr__login { font-size: 12px; padding: 6px 10px; }
}

/* ---------- Campana de notificaciones (junto al buscador, estilo linea ML) ---------- */
.hdr__bell { position: relative; display: inline-flex; align-items: center; color: var(--hdr-text, #333); padding: 4px 2px; flex-shrink: 0; }
.hdr__bell svg { width: 25px; height: 25px; }
.hdr__bell:hover { color: var(--blue, #43b02a); }
.hdr__bell .hdr-notif { position: absolute; top: -4px; right: -7px; margin-left: 0; }
.ntf-wrap { max-width: 680px; margin: 0 auto; padding: 6px 0 40px; }
.ntf-pend { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.ntf-pend a {
  background: #fff4e5; border: 1px solid #f3ce9e; color: #8a5a00;
  font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 20px;
}
.ntf-item {
  display: block; background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; color: inherit;
}
.ntf-item.unseen { border-left: 4px solid var(--blue, #43b02a); background: #f4fbf1; }
.ntf-item b { display: block; font-size: 14px; }
.ntf-item p { margin: 3px 0 5px; font-size: 13px; color: var(--text-soft, #555); }
.ntf-item time { font-size: 11.5px; color: var(--muted, #888); }
a.ntf-item:hover { border-color: var(--blue, #43b02a); }

/* Respuesta en línea del dueño en la publicación */
.qa-form--answer { margin: 8px 0 2px 16px; }
.qa-form--answer input { padding: 9px 13px; font-size: 13.5px; }
.qa-form--answer .btn { padding: 8px 18px; }

/* ---------- Secciones por categoria en la portada (estilo ML) ---------- */
.homecat .panel__head h2 { display: flex; align-items: center; gap: 6px; }
.homecat__title { color: var(--text); }
.homecat__title:hover { color: var(--blue, #43b02a); }
.hrow {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 5 * 12px) / 6);
  gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.hrow > * { scroll-snap-align: start; min-width: 0; }
@media (max-width: 1100px) { .hrow { grid-auto-columns: calc((100% - 3 * 12px) / 4); } }
@media (max-width: 900px)  { .hrow { grid-auto-columns: calc((100% - 2 * 12px) / 3); } }
@media (max-width: 620px)  { .hrow { grid-auto-columns: 45%; gap: 10px; } }

/* Inputs editables del catálogo importado (Admin → Importados) */
.adm-imp-in {
  width: 74px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; font-size: 13px; text-align: right;
}
.adm-imp-in:focus { border-color: var(--blue, #43b02a); outline: none; }
.adm-mini--save { background: #eaf6e6; border: 1px solid #cbe7c0; color: #2f7d1f; }
.adm-mini--save:hover { background: #d9f0d0; }
.adm-imp-table td { vertical-align: middle; }

/* ---------- Reseñas / calificaciones (estrellas, estilo Amazon) ---------- */
.rv-summary { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.rv-summary__big { display: flex; align-items: center; gap: 12px; }
.rv-avg { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--text); }
.rv-summary .stars { color: #f5a623; font-size: 18px; letter-spacing: 1px; }
.rv-count { color: var(--muted); font-size: 13px; margin-top: 2px; }
.rv-dist { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.rv-bar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-soft); }
.rv-bar__track { flex: 1; height: 9px; background: #eee; border-radius: 5px; overflow: hidden; }
.rv-bar__fill { height: 100%; background: #f5a623; }
.rv-bar__n { width: 22px; text-align: right; color: var(--muted); }
.rv-empty { color: var(--muted); font-size: 14px; padding: 6px 0 10px; }
.rv-list { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 18px; }
.rv-item { border-top: 1px solid var(--border); padding-top: 12px; }
.rv-item__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.rv-verified { color: #b06a00; font-weight: 600; font-size: 12px; }
.rv-date { color: var(--muted); font-size: 12px; margin-left: auto; }
.rv-item__stars { margin: 4px 0; }
.rv-item__stars .stars { color: #f5a623; font-size: 14px; }
.rv-item__body { font-size: 14px; color: var(--text-soft); line-height: 1.55; white-space: pre-line; }
.rv-form { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.rv-form__title { font-weight: 600; font-size: 15px; }
.rv-stars-input { display: flex; gap: 2px; }
.rv-star { background: none; border: none; cursor: pointer; font-size: 30px; line-height: 1; color: #f5a623; padding: 0 2px; font-family: inherit; }
.rv-form input, .rv-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; resize: vertical; }
.rv-form .btn { align-self: flex-start; }
.rv-hint { color: var(--muted); font-size: 12px; margin: 0; }

/* ============================================================
   SOLO EN LA APP (TWA/PWA standalone) — activado por <html class="in-app">
   / window.CV_APP. En el navegador web NADA de esto aplica.
   ============================================================ */
/* Banner del inicio: en la app conserva el ANCHO completo sin recortar los
   lados (usa la proporción real de la imagen 1774×400, no un recorte 2:1). */
html.in-app .hero-slides { aspect-ratio: 1774 / 400; }
html.in-app .hero-slide__bg { background-size: cover; background-position: center; }

/* ---- Header FIJO en la app (buscador + categorías no desaparecen al hacer
   scroll). En el teléfono, body con overflow-x:hidden rompía position:sticky;
   con `clip` no se crea contenedor de scroll y el header queda pegado arriba. */
html.in-app body { overflow-x: clip; }
/* El header vive dentro de #site-header (inyectado por layout.js). Como ese
   contenedor mide lo mismo que el header, position:sticky no tenía recorrido y
   el header se iba con el scroll. display:contents disuelve esa caja: el
   contenedor de sticky pasa a ser el body (altura completa) y el header queda
   pegado arriba durante todo el scroll. */
html.in-app #site-header { display: contents; }
html.in-app .hdr { position: sticky; top: 0; z-index: 200; }

/* ---- Interfaz con los colores de la marca (verde) para que no se vea monótona.
   Header con degradado verde y textos en blanco. ---- */
html.in-app .topbar { background: #17520d; }
html.in-app .hdr { background: linear-gradient(135deg, #7ed957 0%, #5fc63f 55%, #46b32c 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,.18); }
html.in-app .brand__name,
html.in-app .hdr__user,
html.in-app .hdr__link,
html.in-app .hdr__sell,
html.in-app .hdr__cart,
html.in-app .hdr__bell { color: #fff; }
html.in-app .hdr__bell:hover { color: #d9f2cf; }
html.in-app .searchbar { border: none; box-shadow: 0 2px 7px rgba(0,0,0,.18); }
html.in-app .searchbar button { background: #1e6a12; }
/* Botón "Iniciar sesión" en píldora blanca (contrasta sobre el verde) */
html.in-app .hdr__login { background: #fff; color: #1e6a12; }
html.in-app .hdr__login:hover { background: #eafbe3; color: #1e6a12; }

/* Barra de categorías más pequeña, verde translúcido y con chips claros */
html.in-app .catbar { background: rgba(0,0,0,.14); border: none; }
html.in-app .catbar__inner { height: 34px; gap: 12px; font-size: 12px; padding: 0 12px; }
html.in-app .catbar__nav { gap: 12px; }
html.in-app .catbar__nav a { font-size: 12px; color: #fff; opacity: .96; }
html.in-app .cat-toggle { font-size: 12px; gap: 5px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.20); padding: 4px 11px; border-radius: 999px; }
html.in-app .tag-new { font-size: 8px; padding: 1px 4px; background: #ffd100; color: #1e6a12; }

/* Accesos de categoría: círculos con color de marca (aportan color al home) */
html.in-app .cat-tile .ico { background: linear-gradient(145deg, #eaf7e4, #d3edc8);
  color: #1e6a12; box-shadow: inset 0 0 0 1px rgba(30,106,18,.14); }
html.in-app .cat-tile span { color: var(--text); font-weight: 600; }
html.in-app .cat-strip--overlap { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

/* Títulos de sección con acento verde (rompe la monotonía en blanco) */
html.in-app .panel__head h2 { position: relative; padding-left: 12px; }
html.in-app .panel__head h2::before { content: ""; position: absolute; left: 0; top: 3px;
  bottom: 3px; width: 4px; border-radius: 3px; background: linear-gradient(#43b02a, #1e6a12); }

/* Tarjetas con un poco más de relieve y barra inferior con sombra */
html.in-app .pcard { box-shadow: 0 1px 5px rgba(0,0,0,.10); }
html.in-app .appnav { box-shadow: 0 -2px 12px rgba(0,0,0,.10); }

/* ===== Variantes (mismo producto en varios colores/modelos) ===== */
/* Miniaturas de colores en las tarjetas del catálogo */
.vdots { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.vdots img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); background: #fff; }
.vdots__more { font-size: 11px; color: var(--text-soft); font-weight: 600; }
.desde { font-size: 12px; color: var(--text-soft); font-weight: 500; }
/* Selector de variante en la ficha del producto (estilo Amazon) */
.pdp__variants { margin: 6px 0 10px; }
.pdp__variants-label { font-size: 13.5px; color: var(--text-soft); margin-bottom: 8px; }
.pdp__variants-label b { color: var(--text); }
.pdp__swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.pdp__swatch { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 74px;
  border: 2px solid var(--border); border-radius: 10px; padding: 5px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.pdp__swatch img { width: 100%; height: 58px; object-fit: contain; }
.pdp__swatch-price { font-size: 11.5px; font-weight: 700; color: #000; }
.pdp__swatch:hover { border-color: var(--blue); }
.pdp__swatch.active { border-color: var(--blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 30%, #fff); }

/* Precio de tarjeta estilo e-commerce: negro puro, símbolo/entero/decimales
   en 3 <span> alineados por la base (14 / 22 / 14 px, en negrita). */
.now--split { color: #000000; display: inline-flex; align-items: baseline; gap: 1px; }
.now--split .cur { font-size: 14px; font-weight: 700; }
.now--split .int { font-size: 22px; font-weight: 700; line-height: 1; }
.now--split .dec { font-size: 14px; font-weight: 700; }
