/* Mercapty: diseño claro (siempre blanco) */
:root {
  --bg: #ffffff;
  --soft: #f5f7fa;
  --soft-2: #eef1f5;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e8ecf1;
  --border-2: #d5dce5;
  --brand: #1d4ed8;
  --brand-600: #1e40af;
  --brand-soft: #eef3ff;
  --good: #047857;
  --good-soft: #ecfdf5;
  --promo: #e11d48;
  --promo-soft: #fff1f3;
  --warn: #92400e;
  --warn-soft: #fffbeb;
  --r-xl: 24px;
  --r-lg: 18px;
  --r: 14px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 5%);
  --shadow: 0 1px 2px rgb(15 23 42 / 4%), 0 12px 32px -14px rgb(15 23 42 / 18%);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 15px/1.55 var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
.muted { color: var(--muted); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
main.container { padding-top: 1.25rem; padding-bottom: 2.5rem; min-height: 60vh; }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
select, .input {
  font: inherit; color: var(--text); background: #fff;
  padding: .55rem .85rem; border: 1px solid var(--border); border-radius: 12px;
}
.input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgb(255 255 255 / 88%);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  position: relative; max-width: 1200px; margin: 0 auto; padding: .7rem 1.25rem;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .75rem 1.5rem; align-items: center;
}
/* Botón de idioma: muestra el otro idioma («EN» o «ES»). */
.lang-toggle {
  display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .7rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; background: #fff;
  color: var(--text-2); font: inherit; font-size: .82rem; font-weight: 700; letter-spacing: .02em;
}
.lang-toggle:hover { background: var(--soft); border-color: var(--border-2); }
.lang-toggle svg { width: 16px; height: 16px; }
.brand { display: flex; align-items: center; gap: .55rem; font-size: 1.2rem; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.brand b { color: var(--brand); font-weight: 800; }
.brand img { border-radius: 10px; }
.search {
  position: relative; display: flex; align-items: center; width: 100%; max-width: 640px; justify-self: center;
  background: var(--soft); border: 1px solid transparent; border-radius: 999px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.search:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search-icon { position: absolute; left: 1rem; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .72rem 1rem .72rem 2.7rem; font: inherit; color: var(--text); }
.search input:focus { outline: none; }
.search button {
  margin: .3rem; border: 0; border-radius: 999px; padding: .45rem 1.1rem; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600;
}
.search button:hover { background: var(--brand-600); }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 999px; color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav svg { width: 18px; height: 18px; }
.count {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem;
  border-radius: 999px; background: var(--promo); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1;
}

/* Barra inferior (solo móvil) */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  grid-template-columns: repeat(5, 1fr);
  padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / 94%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .3rem 0; font-size: .7rem; font-weight: 600; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--brand); }
.tabbar svg { width: 23px; height: 23px; }
.tabbar .count { position: absolute; top: 0; left: calc(50% + 5px); }

@media (max-width: 760px) {
  .topbar-inner { grid-template-columns: 1fr; gap: .6rem; padding: .6rem 1rem; }
  .lang-toggle { position: absolute; top: .6rem; right: 1rem; }
  .topbar .brand { justify-self: start; } /* el enlace del logo no pasa por debajo del botón de idioma */
  .nav { display: none; }
  .search { max-width: none; }
  .tabbar { display: grid; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .container { padding: 0 1rem; }
}

.notice {
  display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .6rem 1rem;
  border-radius: 12px; background: var(--warn-soft); border: 1px solid #fde68a; color: var(--warn); font-size: .86rem;
}
.notice-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }

/* ---------- Portada ---------- */
.hero-slider { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-xl); background: #fff; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; }
.slide {
  flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; align-items: center;
  min-height: 460px; padding: clamp(1.5rem, 1rem + 3vw, 3.25rem) clamp(1.5rem, 1rem + 3vw, 3.25rem) 4.75rem;
}
.slide-main {
  background:
    radial-gradient(900px 380px at 100% 0%, #e8efff 0%, transparent 60%),
    radial-gradient(600px 300px at 0% 100%, #eafaf2 0%, transparent 55%), #fff;
}
.slide-list { background: radial-gradient(800px 380px at 100% 100%, #fff3dc 0%, transparent 60%), #fff; }
.slide-app { background: radial-gradient(700px 420px at 90% 10%, #2b4fd8 0%, transparent 60%), linear-gradient(135deg, #0b1b4d, #0f172a); color: #fff; }
.slide-app .slide-title { color: #fff; }
.slide-app .slide-copy p { color: #cbd5f5; }
.slide-app .eyebrow { background: rgb(255 255 255 / 12%); color: #fff; }
.hero-controls {
  position: absolute; left: clamp(1.5rem, 1rem + 3vw, 3.25rem); right: clamp(1rem, .5rem + 2vw, 2rem); bottom: 1.1rem;
  display: flex; justify-content: space-between; align-items: center; pointer-events: none;
}
.hero-dots, .hero-arrows { display: flex; gap: .45rem; pointer-events: auto; }
.hero-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: width .3s, background .3s; }
.hero-dot[aria-current="true"] { width: 28px; background: var(--brand); }
.hero-arrow {
  width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%;
  background: #fff; color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm);
}
.hero-arrow:hover { border-color: var(--border-2); }
.hero-arrow svg { width: 18px; height: 18px; }
@media (max-width: 820px) {
  .slide { grid-template-columns: 1fr; min-height: 0; padding-bottom: 4.25rem; }
  .slide-visual, .hero-arrows { display: none; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem; padding: .3rem .75rem;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .8rem; font-weight: 600;
}
.slide h1, .slide-title {
  max-width: 20ch; margin: 0 0 .9rem; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.75rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
}
.slide h1 span { background: linear-gradient(90deg, var(--brand), #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slide-copy p { margin: 0; max-width: 56ch; color: var(--text-2); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 1.75rem; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero-stats span { color: var(--muted); font-size: .85rem; }
.hero-updated { margin-top: 1rem; }

/* Visuales del hero */
.slide-visual { display: grid; place-items: center; }
.price-stack { position: relative; width: min(100%, 340px); height: 300px; }
.price-chip {
  position: absolute; display: flex; align-items: center; gap: .75rem; width: 280px; padding: .7rem .9rem .7rem .7rem;
  background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.chip-1 { top: 0; left: 0; }
.chip-2 { top: 105px; right: 0; animation-delay: -2s; }
.chip-3 { top: 210px; left: 20px; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .price-chip { animation: none; } }
.price-chip-img { flex: none; width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: var(--ph, var(--soft)); font-size: 1.6rem; }
.price-chip-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.price-chip-name { font-size: .82rem; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-chip-row { display: flex; align-items: center; gap: .35rem; margin-top: .25rem; color: var(--muted); font-size: .78rem; }
.price-chip-row b { margin-right: .15rem; color: var(--text); font-size: 1.05rem; }
.basket { width: min(100%, 300px); padding: 1.1rem; background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.basket-head { margin-bottom: .6rem; font-weight: 700; }
.basket-row { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--border); font-weight: 500; }
.basket-emoji { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--soft); }
.basket-check { width: 22px; height: 22px; display: grid; place-items: center; margin-left: auto; border-radius: 50%; background: var(--good-soft); color: var(--good); font-size: .75rem; font-weight: 800; }
.basket-total { margin-top: .6rem; padding: .7rem .8rem; border-radius: 12px; background: var(--brand); color: #fff; font-size: .9rem; font-weight: 600; text-align: center; }
.phone {
  position: relative; width: 210px; height: 400px; padding: 12px; border-radius: 36px; background: #0b1020;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 60%), inset 0 0 0 2px rgb(255 255 255 / 12%);
}
.phone-notch { position: absolute; top: 18px; left: 50%; z-index: 1; width: 70px; height: 18px; border-radius: 999px; background: #000; transform: translateX(-50%); }
.phone-screen { height: 100%; display: flex; flex-direction: column; gap: .55rem; padding: 42px 12px 12px; border-radius: 26px; background: #fff; color: var(--text); }
.phone-brand { font-size: 1rem; font-weight: 600; }
.phone-brand b { color: var(--brand); font-weight: 800; }
.phone-search { padding: .5rem .7rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .72rem; }
.phone-card { display: flex; align-items: center; gap: .5rem; padding: .55rem; border: 1px solid var(--border); border-radius: 12px; font-size: .72rem; }
.phone-card > span { font-size: 1.3rem; }
.phone-card small { display: block; color: var(--good); font-weight: 600; }
.phone-scan { margin-top: auto; padding: .6rem; border-radius: 12px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; }
.store-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.store-badge {
  display: inline-flex; align-items: center; gap: .6rem; padding: .55rem 1rem .55rem .8rem; border-radius: 14px;
  background: rgb(255 255 255 / 10%); border: 1px solid rgb(255 255 255 / 22%); color: #fff; font-weight: 700; line-height: 1.1;
}
.store-badge small { display: block; color: #cbd5f5; font-size: .68rem; font-weight: 500; }
.store-badge svg { width: 22px; height: 22px; }

.section { margin: 2.25rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h1, .section-head h2 { margin: 0; }
.link { font-weight: 600; font-size: .9rem; }
.link:hover { text-decoration: underline; }

.cats { display: flex; gap: .75rem; overflow-x: auto; padding: .25rem .1rem .5rem; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: .55rem; width: 108px; padding: .9rem .5rem;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff;
  color: var(--text); font-size: .8rem; font-weight: 600; line-height: 1.2; text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.cat:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.cat-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: var(--ph, var(--soft)); font-size: 1.6rem; }

.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 .75rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem;
  border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text-2); font-size: .88rem; font-weight: 500;
}
.chip:hover { border-color: var(--border-2); }
.chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- Tarjetas de producto ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; } }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { border-color: #dde3ea; box-shadow: var(--shadow); transform: translateY(-2px); }
.media-wrap { position: relative; }
.media { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: var(--ph, var(--soft)); overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: contain; padding: 12%; mix-blend-mode: multiply; }
.ph-emoji { font-size: clamp(2.4rem, 2rem + 2vw, 3.4rem); line-height: 1; }
.badge { position: absolute; top: .6rem; left: .6rem; padding: .2rem .55rem; border-radius: 999px; background: var(--promo); color: #fff; font-size: .7rem; font-weight: 700; }
.add-fab {
  position: absolute; right: .6rem; bottom: .6rem; width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: #fff; color: var(--brand); cursor: pointer;
  box-shadow: 0 2px 10px rgb(15 23 42 / 16%); transition: transform .15s, background .15s, color .15s;
}
.add-fab:hover { background: var(--brand); color: #fff; transform: scale(1.06); }
.add-fab svg { width: 20px; height: 20px; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: .15rem; padding: .85rem .95rem 1rem; color: var(--text); }
.price-row { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.price { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.price-old { color: var(--muted); font-size: .85rem; text-decoration: line-through; }
.name { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: var(--muted); font-size: .82rem; }
.best-at { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; color: var(--text-2); font-size: .82rem; }
.best-at span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.tag { padding: .18rem .5rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .72rem; font-weight: 600; }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.promo { background: var(--promo-soft); color: var(--promo); }
.tag.demo { background: var(--warn-soft); color: var(--warn); }

.avatar {
  flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 14%, white); color: var(--c); font-size: .58rem; font-weight: 800; letter-spacing: -.02em;
}
.avatar.lg { width: 42px; height: 42px; border-radius: 13px; font-size: .8rem; }
.avatar { position: relative; overflow: hidden; }
/* El ícono de la tienda tapa las iniciales solo cuando ya cargó. */
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; opacity: 0; transition: opacity .2s; }
.avatar img.loaded { opacity: 1; }
.avatar:has(img.loaded) { box-shadow: 0 0 0 1px var(--border); }

/* Tiendas que venden el producto, en fila y superpuestas, dentro de la etiqueta «5 tiendas». */
.store-stack { display: inline-flex; align-items: center; gap: .35rem; padding-left: .25rem; }
.stack { display: inline-flex; }
.stack .avatar, .stack .avatar:has(img.loaded) { width: 18px; height: 18px; font-size: .5rem; box-shadow: 0 0 0 2px var(--soft); }
.stack .avatar + .avatar { margin-left: -6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Logos de tiendas y franja de la portada ---------- */
.store-logo {
  flex: none; display: grid; place-items: center; width: 168px; height: 76px; padding: .9rem 1.2rem;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--logo-bg, #fff);
  color: var(--text); font-size: .95rem; transition: border-color .15s, box-shadow .15s;
}
.store-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.store-logo.is-text { display: flex; justify-content: center; gap: .5rem; font-weight: 700; }
.store-logo.sm { width: 112px; height: 56px; padding: .55rem .75rem; border-radius: var(--r); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee var(--duration, 40s) linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 1rem; margin: 0; padding: .3rem 1rem .3rem 0; list-style: none; }
.marquee-item { display: block; }
.marquee-item:hover .store-logo { border-color: var(--border-2); box-shadow: var(--shadow); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; }
  .marquee-group[aria-hidden="true"] { display: none; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; white-space: nowrap;
  padding: .6rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: #fff;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--soft); border-color: var(--border-2); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn-soft:hover { background: #e2eaff; border-color: transparent; }
.btn-danger { color: var(--promo); }
.btn-lg { padding: .85rem 1.25rem; border-radius: 14px; font-size: 1rem; }
.btn-sm { padding: .4rem .7rem; border-radius: 10px; font-size: .84rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Ficha de producto ---------- */
.back { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.back:hover { color: var(--text); }
.back svg { flex: none; width: 18px; height: 18px; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 3rem); align-items: start; }
@media (max-width: 820px) { .pd { grid-template-columns: 1fr; } }
.pd-media .media { border: 1px solid var(--border); border-radius: var(--r-xl); }
.pd-media .media img { padding: 10%; }
.pd-media .ph-emoji { font-size: 6.5rem; }
.pd-admin { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.pd-brand { color: var(--brand); font-size: .9rem; font-weight: 600; }
.pd-info h1 { margin: .2rem 0 .35rem; }
.best-box { margin-top: 1.25rem; padding: 1.35rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.best-label { color: var(--good); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.price-xl { font-size: 2.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.best-store { display: flex; align-items: center; gap: .5rem; margin: .4rem 0 1.1rem; color: var(--text-2); }
.best-actions { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.best-actions .btn-primary { white-space: normal; text-align: center; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.more { display: flex; justify-content: center; margin: 1.75rem 0 .5rem; }
.notice-soft { margin: 0 0 1rem; padding: .6rem .9rem; border-radius: 12px; background: var(--soft); color: var(--text-2); font-size: .9rem; }
code { padding: .1rem .35rem; border-radius: 6px; background: var(--soft); font-size: .85em; }
.saving-note { margin-top: .9rem; padding: .55rem .8rem; border-radius: 10px; background: var(--good-soft); color: var(--good); font-size: .88rem; }

.offers { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); }
.offer {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .5rem 1rem; align-items: center;
  padding: .9rem 1.1rem; border-top: 1px solid var(--border);
}
.offer:first-child { border-top: 0; }
.offer.best { background: linear-gradient(90deg, var(--good-soft), #fff 75%); }
.offer.out { opacity: .55; }
.offer-name { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-weight: 600; }
.offer-sub { color: var(--muted); font-size: .8rem; }
.offer-price { text-align: right; }
.offer-price .price { font-size: 1.15rem; }
.offer-price small { display: block; color: var(--muted); font-size: .78rem; }
@media (max-width: 560px) {
  .offer { grid-template-columns: auto minmax(0, 1fr) auto; }
  .offer .btn { grid-column: 1 / -1; }
}

.panel { padding: 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); }
.history svg { display: block; width: 100%; height: 140px; margin-top: .75rem; }
.history .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.history .area { fill: var(--brand); opacity: .07; }
.history-range { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }

/* ---------- Mi lista ---------- */
.list-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .list-layout { grid-template-columns: 1fr; } }
.list-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: .85rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--border); }
.list-item:first-child { border-top: 0; }
.list-item a { color: var(--text); font-size: .92rem; font-weight: 500; line-height: 1.3; }
.thumb { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--ph, var(--soft)); font-size: 1.5rem; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.qty { display: inline-flex; align-items: center; gap: .2rem; padding: .2rem; border-radius: 999px; background: var(--soft); }
.qty button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; color: var(--text); font-size: 1rem; cursor: pointer; box-shadow: var(--shadow-sm); }
.qty button:hover { color: var(--brand); }
.qty span { min-width: 1.6rem; text-align: center; font-size: .9rem; font-weight: 700; }
.plan { padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); }
.plan + .plan, .plan + details { margin-top: .9rem; }
.plan.best { border: 2px solid var(--good); box-shadow: var(--shadow); }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.plan-head h2 { margin: 0; font-size: 1.05rem; }
.plan-store { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.plan-lines { margin: .5rem 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: .88rem; }
.plan-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
.store-rank { width: 100%; margin-top: .75rem; border-collapse: collapse; font-size: .9rem; }
.store-rank th, .store-rank td { padding: .55rem .25rem; border-bottom: 1px solid var(--border); text-align: left; }
.store-rank th { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.store-rank th:last-child, .store-rank td:last-child { text-align: right; }
.cell-store { display: flex; align-items: center; gap: .45rem; }
details summary { cursor: pointer; font-weight: 600; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.subhead { margin: .25rem 0 .75rem; color: var(--text-2); font-size: 1rem; font-weight: 700; }
.grid + .subhead { margin-top: 1.75rem; }
.loader { display: grid; justify-items: center; gap: .25rem; padding: 3rem 1rem; color: var(--muted); font-weight: 500; text-align: center; }
.loader img { width: min(240px, 70vw); height: auto; }
.empty .big { font-size: 3rem; line-height: 1; margin-bottom: .75rem; }

/* ---------- Tiendas ---------- */
.store-card { padding: 1.25rem; gap: .9rem; }
.store-head { display: flex; align-items: center; gap: .75rem; }
.store-head b { font-size: 1.02rem; line-height: 1.25; }
.store-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.store-stats div { padding: .6rem .7rem; border-radius: 12px; background: var(--soft); }
.store-stats b { display: block; font-size: 1.15rem; font-weight: 800; }
.store-stats span { color: var(--muted); font-size: .72rem; }
.cta-panel { margin-top: 2rem; padding: 1.5rem; border-radius: var(--r-xl); background: var(--brand-soft); border: 1px solid #dbe5ff; }
.cta-panel p { margin: .25rem 0 0; color: var(--text-2); max-width: 70ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* ---------- Panel de imágenes ---------- */
.login { max-width: 440px; margin: 2rem auto; }
.login form { display: flex; gap: .5rem; margin-top: 1rem; }
.login .input { flex: 1; min-width: 0; }
.admin-toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-toolbar .input { flex: 1; min-width: 200px; }
.admin-toolbar label { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-2); font-size: .9rem; }
.admin-card.dragover { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.admin-card .card-body { gap: .5rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.uploading { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(255 255 255 / 80%); font-weight: 600; }
.drop-hint { color: var(--muted); font-size: .85rem; }

/* ---------- Pie de página ---------- */
.footer { margin-top: 3rem; padding: 3rem 0 1.5rem; background: var(--soft); border-top: 1px solid var(--border); color: var(--text-2); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { max-width: 34ch; margin: .75rem 0 1rem; color: var(--muted); }
.footer-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer-badge { padding: .45rem .8rem; border-radius: 12px; background: var(--text); color: #fff; font-size: .82rem; font-weight: 700; line-height: 1.15; }
.footer-badge small { display: block; color: #cbd5e1; font-size: .64rem; font-weight: 500; }
.footer-col h3 { margin: 0 0 .75rem; color: var(--text); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.footer-col a { display: block; padding: .22rem 0; color: var(--text-2); }
.footer-col a:hover { color: var(--brand); }
.footer-contact a { display: flex; align-items: center; gap: .5rem; }
.footer-contact svg { flex: none; width: 17px; height: 17px; }
.footer-contact span { min-width: 0; overflow-wrap: anywhere; }
.footer-col p { margin: 0 0 .5rem; color: var(--muted); }
.footer-bottom { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.footer-bottom p { margin: 0; max-width: 110ch; }
a.footer-badge:hover { background: var(--brand); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: .75rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }
.footer-lang { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.footer-lang:hover { color: var(--brand); }

/* ---------- Página de la app ---------- */
.app-hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; align-items: center;
  padding: clamp(1.5rem, 1rem + 3vw, 3.25rem); border: 1px solid var(--border); border-radius: var(--r-xl);
  background:
    radial-gradient(800px 380px at 100% 0%, #e8efff 0%, transparent 60%),
    radial-gradient(600px 300px at 0% 100%, #fdeef4 0%, transparent 55%), #fff;
}
.app-hero h1 { max-width: 16ch; font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.9rem); letter-spacing: -.03em; }
.app-hero-copy p { max-width: 52ch; margin: 0; color: var(--text-2); font-size: 1.05rem; }
.app-hero-visual { display: grid; place-items: center; }
@media (max-width: 820px) {
  .app-hero { grid-template-columns: 1fr; }
  .app-hero-visual { order: -1; }
  .app-hero-visual .phone { transform: scale(.8); margin: -40px 0; }
}
.installed-note { margin: 1rem 0 0; color: var(--good); font-weight: 600; }
.store-badges.on-light .store-badge { background: var(--text); border-color: var(--text); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.feature { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); }
.feature h3 { margin: .25rem 0 0; font-size: 1.02rem; }
.feature p { flex: 1; margin: 0; color: var(--muted); }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); font-size: 1.5rem; }
.install-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.install-steps h3 { margin: 0 0 .5rem; font-size: 1.02rem; }
.install-steps ol { margin: 0; padding-left: 1.2rem; color: var(--text-2); line-height: 1.8; }

/* ---------- Anuncios ---------- */
.ad-slot { margin: 2rem 0; text-align: center; }
.ad-label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.ad-preview { display: grid; place-items: center; min-height: 110px; border: 2px dashed var(--border-2); border-radius: var(--r-lg); color: var(--muted); font-size: .85rem; }

/* ---------- Páginas legales ---------- */
.legal { max-width: 760px; }
.legal h2 { margin-top: 2rem; }
.legal p, .legal li { color: var(--text-2); line-height: 1.7; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 40; transform: translateX(-50%);
  display: flex; align-items: center; gap: 1rem; width: max-content; max-width: calc(100vw - 2rem);
  padding: .7rem 1.15rem; border-radius: 999px; background: var(--text); color: #fff; font-weight: 500; box-shadow: var(--shadow);
}
.toast button {
  margin: -.3rem -.55rem -.3rem 0; padding: .3rem .75rem; border: 0; border-radius: 999px;
  background: rgb(255 255 255 / 14%); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.toast button:hover { background: rgb(255 255 255 / 24%); }
@media (max-width: 760px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }
