/*
 * CSS plano, sin build (ver docs/stack.md). Tokens arriba, componentes abajo.
 *
 * Puntos de corte (los de Bootstrap 5.3, sin xxl): mobile first, solo `min-width`; el corte hacia
 * abajo es el inverso exacto (`max-width` = corte − 1). Una media query no acepta variables CSS,
 * así que se escribe el número tal cual. No hay clases `sm`/`md`: son solo estos números.
 *   sm 576 · md 768 · lg 992 · xl 1200 (solo para la barra lateral del panel). Por debajo de 576: el diseño base.
 */
:root {
  --ink: #16161a;
  --muted: #6b6b66;
  --line: #e2e2dc;
  --bg: #fafaf7;
  --surface: #ffffff;
  --accent: #16161a;
  --accent-ink: #ffffff;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok-bg: #e8f5e9;
  --ok: #1b7a3a;
  --line-strong: #cfcfc8;
  --ok-line: #b7dfc2;
  --overlay: rgb(255 255 255 / .92);
  --shadow: rgb(0 0 0 / .12);
  --radius: 10px;
  color-scheme: light;
}

/* Tema oscuro. El tema lo fija el servidor con `data-theme` en <html>, a partir
   de la cookie `theme`, para que no haya parpadeo. Sin cookie, el del sistema. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ecece6;
  --muted: #9a9a93;
  --line: #34342f;
  --bg: #141413;
  --surface: #1e1e1c;
  --accent: #ecece6;
  --accent-ink: #141413;
  --danger: #ff8a80;
  --danger-bg: #3a1613;
  --ok-bg: #10261a;
  --ok: #5bd48a;
  --line-strong: #4a4a44;
  --ok-line: #1f4d31;
  --overlay: rgb(30 30 28 / .9);
  --shadow: rgb(0 0 0 / .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --ink: #ecece6;
    --muted: #9a9a93;
    --line: #34342f;
    --bg: #141413;
    --surface: #1e1e1c;
    --accent: #ecece6;
    --accent-ink: #141413;
    --danger: #ff8a80;
    --danger-bg: #3a1613;
    --ok-bg: #10261a;
    --ok: #5bd48a;
    --line-strong: #4a4a44;
    --ok-line: #1f4d31;
    --overlay: rgb(30 30 28 / .9);
    --shadow: rgb(0 0 0 / .5);
  }
}

* { box-sizing: border-box; }

/* Los #anclas no quedan tapadas por el header fijo. */
html { scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-family: var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}

button, input, select, textarea { font-family: inherit; }

a { color: inherit; }
h1 { font-size: 1.6rem; margin: 0 0 .75rem; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 0; }
.muted { color: var(--muted); font-size: .9rem; margin: .35rem 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1rem; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  position: sticky; top: 0; z-index: 20;
}
@media (min-width: 992px) { .topbar { padding-inline: 2rem; } }
.topbar__brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.topbar__nav { display: flex; align-items: center; gap: 1rem; font-size: .95rem; }
.topbar__user { color: var(--muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { max-width: 720px; margin: 0 auto; padding: 1.25rem 1rem 0; }
/* Páginas con pie (las públicas): el contenido ocupa el alto que sobra y el pie queda abajo aunque haya poco contenido. */
body:has(> .sitefoot) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body:has(> .sitefoot) > .page { width: 100%; flex: 1 0 auto; }
.hero { padding: 2rem 0; }
.hero h1 { font-size: 2.2rem; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin: 1rem 0;
}
.card--narrow { max-width: 420px; margin: 2rem auto; }

.heading {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin: 1.5rem 0 .5rem;
}
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions--center { justify-content: center; }

.list { list-style: none; margin: .5rem 0; padding: 0; }
.list__item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; margin-bottom: .6rem;
}
.list__title { font-weight: 600; text-decoration: none; }

.field { margin: 0 0 1.1rem; }
.field label { display: flex; align-items: center; gap: .45rem; font-weight: 600; margin-bottom: .3rem; }
.field input[type="text"], .field input[type="email"], .field input[type="url"],
.field input[type="number"], .field input[type="tel"], .field textarea {
  width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: var(--surface); color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid color-mix(in srgb, var(--ink) 18%, transparent); outline-offset: 0; border-color: color-mix(in srgb, var(--ink) 55%, var(--line)); }
.field--check { display: flex; align-items: center; gap: .5rem; }
.field--check label { margin: 0; font-weight: 400; }
.code-input { font-size: 1.6rem; letter-spacing: .4rem; text-align: center; }

.button {
  display: inline-block; padding: .65rem 1.1rem; border: 1px solid var(--accent); border-radius: var(--button-radius, 8px);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.button--secondary { background: var(--surface); color: var(--ink); }
.link-button {
  border: 0; background: none; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; cursor: pointer;
}
.link-button--danger { color: var(--danger); margin-top: 1rem; }
.inline-form { margin-top: 1rem; }

.flash { padding: .75rem 1rem; border-radius: 8px; margin: 0 0 1rem; }
.flash--alert { background: var(--danger-bg); color: var(--danger); }
.flash--notice { background: var(--ok-bg); }

.flash ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* Botón "Continuar con Google": blanco con el logo a color, según la guía
   de marca de Google (no usa los tokens del tema a propósito). */
.google-button {
  display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%;
  padding: .7rem .75rem; border: 1px solid #dadce0; border-radius: 6px;
  background: #fff; color: #3c4043; font: 500 .95rem system-ui, sans-serif; cursor: pointer;
}
.google-button:hover { background: #eef1f4; border-color: #c6cace; }
.or-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--muted); font-size: .85rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Tienda pública */
.page--wide { max-width: 1080px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* El encabezado es una sola tarjeta: arriba el banner (si va encima) y abajo el logo con los datos. */
.store-header {
  position: relative; display: flex; flex-direction: column; justify-content: center; margin: .5rem 0 1.5rem; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.6);
}
.store-header__row { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem 1.5rem; }
.store-header h1 { margin: 0; font-size: 1.8rem; }
.store-header__logo { width: 84px; height: 84px; border-radius: var(--logo-radius, 50%); object-fit: cover; flex: none; }
.store-header__logo--empty { display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-size: 2.2rem; font-weight: 700; }
.store-header p { margin: .2rem 0 0; color: var(--muted); }
.store-header .store-header__count { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product-card { display: flex; flex-direction: column; background: var(--card-bg, var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease; }
.product-card:hover { box-shadow: 0 6px 18px var(--shadow); border-color: var(--line-strong); }
.product-card__link { display: block; text-decoration: none; color: inherit; }
.product-card__foot { display: flex; flex-direction: column; align-items: stretch; gap: .6rem; margin-top: auto; padding: .35rem .85rem .9rem; } /* margin-top: auto: el pie queda abajo aunque la tarjeta de al lado sea más alta */
.product-card__price-link { display: block; min-width: 0; text-decoration: none; color: inherit; }
/* Con descuento: el precio normal tachado arriba; abajo el precio y, a su derecha, (-25%). */
.product-card__price .price { display: grid; grid-template-columns: max-content max-content; justify-content: start; align-items: baseline; gap: 0 .5rem; }
.product-card__price .price__was { grid-row: 1; grid-column: 1 / -1; font-size: .85rem; line-height: 1.2; }
.product-card__price .price__now { grid-row: 2; grid-column: 1; }
.product-card__price .price__save { grid-row: 2; grid-column: 2; }
.product-card__image-link { display: block; }
.product-card__image-link:has(.carousel__track) { overflow: hidden; }
.product-card__media { position: relative; display: block; }
.product-card__photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.product-card__kind {
  position: absolute; top: .5rem; right: .5rem; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center;
  background: var(--overlay); color: var(--ink); border-radius: 50%; box-shadow: 0 1px 4px rgb(0 0 0 / .2);
}
.product-card__name { color: var(--card-ink, var(--ink)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: .7rem .85rem 0; font-weight: 500; line-height: 1.3; min-height: 3.1rem; }
.product-card__price { display: block; margin: 0; color: var(--card-ink, var(--ink)); font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
.product {
  display: grid; gap: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.6);
  background: var(--card-bg, var(--surface)); color: var(--card-ink, var(--ink)); position: relative;
}
.product__main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); display: block; }
.product__main--empty { display: flex; align-items: center; justify-content: center; font-size: 6rem; }
.product__thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; }
.product__thumb { padding: 0; border: 2px solid transparent; border-radius: calc(var(--radius) / 2); background: none; cursor: pointer; flex: none; }
.product__thumb[aria-pressed="true"] { border-color: var(--ink); }
.product__thumb img { width: 4rem; height: 4rem; object-fit: cover; display: block; border-radius: calc(var(--radius) / 2); }
.product__info h1 { margin-top: 0; }
.product__price { font-size: 1.8rem; font-weight: 700; margin: 0 0 .25rem; }
.cart-line__qty { margin: 0; }
/* Estado de entrega de un pedido físico: Pagado → Enviado → Entregado, en fila. */
.delivery h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; }
.delivery h2 .icon { width: 1.2rem; height: 1.2rem; }
.delivery__steps { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 .75rem; padding: 0; list-style: none; }
.delivery__step { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem .3rem .35rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); font-weight: 600; font-size: .9rem; }
.delivery__step.is-reached { background: var(--ok-bg); color: var(--ok); }
.delivery__dot { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--surface); font-size: .8rem; }
.delivery__dot .icon { width: .9rem; height: .9rem; }
.cart-line__qty select { padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.product__retracto { margin: 0; font-size: 1.8rem; line-height: 1.2; color: var(--ink); }
.product__stock { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 700; color: var(--warn, #b45309); }
.product-card__retracto { margin: .15rem 0 0; font-size: 1rem; font-weight: 700; color: var(--ink); }
.product__priceline { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
/* Corazón para guardar un producto en favoritos: sobre la foto en las tarjetas, junto al precio en la ficha. */
.fav-form { margin: 0; }
.fav-button { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; border: 1px solid rgb(0 0 0 / .15); border-radius: 50%; background: #fff; color: #000; cursor: pointer; }
.fav-button .icon { width: 1.2rem; height: 1.2rem; }
.fav-button[aria-pressed="true"] { color: #e0245e; }
.fav-button[aria-pressed="true"] .icon { fill: currentColor; }
.fav-button:hover { filter: brightness(.94); }
.product-card__media .fav-form { position: absolute; left: .5rem; top: .5rem; z-index: 2; }
.product-card__store { margin: 0; padding: 0 .85rem; color: var(--muted); font-size: .85rem; }
.product__buy { width: 100%; margin-top: 1rem; }
.product__heading { font-size: 1.1rem; margin: 2rem 0 .25rem; }
.product__description { margin-top: 0; }
@media (min-width: 768px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 2.5rem; padding: 1.75rem; } }
.cart-total { font-size: 1.2rem; text-align: right; }
.list__photo { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; }
.list__body { flex: 1; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.stats .card { margin: 0; padding: .9rem 1rem; }
.stats .muted { margin: 0; }
.stats strong { font-size: 1.3rem; }
.sale__amount { text-align: right; }
.list--sale-items .list__item { padding: .4rem .9rem .4rem .4rem; }
.list--sale-items .list__photo { width: 96px; height: 96px; }
.list--sale-items .list__photo.avatar { font-size: 2.2rem; }
.list__photo--round { border-radius: 50%; }
.menu { position: relative; }
.menu__button { cursor: pointer; list-style: none; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__button::-webkit-details-marker { display: none; }
/* Botón de tienda (enlace al panel o desplegable) a la izquierda del nombre (ver shared/_store_button). */
.user-menu { display: flex; align-items: center; gap: .5rem; }
@media (min-width: 992px) { .user-menu { gap: 1rem; } }
.sidebar__theme { display: flex; justify-content: center; margin-top: auto; padding: 1rem 0; }
.topbar-store { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.2rem; height: 2.2rem; padding: 0; overflow: hidden; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.topbar-store:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.topbar-store:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.topbar-store .icon { width: 1.25rem; height: 1.25rem; }
.shop-menu__dialog { width: min(22rem, calc(100vw - 2rem)); }
.shop-menu__dialog .modal__head { margin-bottom: .5rem; }
.shop-menu__dialog h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-menu__links { display: flex; flex-direction: column; gap: .15rem; }
.shop-menu .sidebar__link { display: flex; align-items: center; gap: .7rem; padding: .7rem .6rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.shop-menu .sidebar__link:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.shop-menu .sidebar__link .icon { flex: none; color: var(--muted); }
.shop-menu .sidebar__sep { width: 100%; margin: .3rem 0; }
.menu__button::after { content: " ▾"; }
.menu__panel {
  position: absolute; right: 0; top: 2rem; z-index: 10; min-width: 11rem; display: flex; flex-direction: column; gap: .6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem;
}
.menu__button--icon::after { content: none; }
.menu__button--icon { display: inline-flex; padding: .4rem; border: 1px solid var(--line); border-radius: var(--radius); }
/* Botón «Copiar el link» de la lista de productos: igual a «Ver», con un check un momento al copiar. */
.actions__copy { display: contents; }
button.copy-button { background: none; color: inherit; font: inherit; }
.copy-button__done, .copy-button[data-copied] .copy-button__idle { display: none; }
.copy-button[data-copied] .copy-button__done { display: inline-flex; color: var(--ok); }
.copy-button__idle { display: inline-flex; }
.menu[open] .menu__panel { animation: menu-in .15s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-.4rem) scale(.97); } to { opacity: 1; transform: none; } }
.menu__panel a { text-decoration: none; }
.menu__panel .link-button { text-align: left; }

/* Tiendas del panel: cards 4:5 */
.store-grid { list-style: none; margin: .5rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
@media (min-width: 768px) { .store-grid { grid-template-columns: repeat(2, 1fr); } }
.store-card { aspect-ratio: 4 / 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.store-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.store-card__image { flex: 1; min-height: 0; width: 100%; object-fit: cover; display: block; }
.store-card__image--empty { display: flex; align-items: center; justify-content: center; background: var(--line); color: var(--muted); font-size: 3rem; font-weight: 700; }
.store-card__name { padding: .6rem .75rem 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-card__meta { padding: 0 .75rem .7rem; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Avatar de producto sin foto: color por slug (ver helper product_avatar) */
.avatar { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.product-card__photo.avatar { font-size: 3rem; }
.list__photo.avatar { font-size: 1.4rem; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1rem 0; margin: 0 0 1.25rem; }
.fieldset legend { font-weight: 700; padding: 0 .4rem; }
.field input[type="text"] { max-width: 100%; }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .4rem 1.25rem; margin: 1rem 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.icon { width: 1.1em; height: 1.1em; flex: none; }
.menu__item { display: flex; align-items: center; gap: .6rem; }
.menu__panel form { margin: 0; }
.menu__panel .link-button { text-decoration: none; }

/* Pestañas del panel de una tienda */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: 1rem 0 .5rem; }
.tabs__tab { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs__tab:hover { color: var(--ink); }
.tabs__tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Ventas aprobadas */
.sale { background: var(--ok-bg); border-color: var(--ok-line); border-left: 4px solid var(--ok); }
.sale .list__title { display: flex; align-items: center; gap: .4rem; }
.sale .list__title .icon { color: var(--ok); }
.sale__amount strong { color: var(--ok); font-size: 1.1rem; }

/* Redes sociales de la tienda */
.social { list-style: none; display: flex; gap: .5rem; margin: .6rem 0 0; padding: 0; }
.social__link { display: flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); transition: background .15s ease; }
.social__link:hover { background: var(--line); }
.social__link .icon { width: 1.15rem; height: 1.15rem; }
button.tabs__tab { background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-weight: 600; cursor: pointer; }
button.tabs__tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs + [data-tabs-target="panel"], .tabs ~ [data-tabs-target="panel"] { margin-top: 1.25rem; }
[data-tabs-target="panel"][hidden] { display: none; }

/* Input con prefijo fijo: instagram.com/ [usuario] */
.input-prefix { display: flex; align-items: stretch; }
.input-prefix__text { display: flex; align-items: center; padding: 0 .7rem; background: var(--bg); border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.input-prefix input { flex: 1; min-width: 0; }
/* Red social: logo y nombre en la caja de la izquierda (es la etiqueta del campo), todas del mismo ancho. */
.field label.input-prefix__network { gap: .5rem; min-width: 9.5rem; margin: 0; padding: 0 1rem; color: var(--ink); font-size: 1rem; font-weight: 600; }
.input-prefix__network .icon { flex: none; }
.input-prefix .input-prefix__text + input[type] { border-radius: 0 8px 8px 0; }

/* Botón de tema: muestra la luna en claro y el sol en oscuro. */
.theme-toggle { display: flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.theme-toggle:hover { background: var(--line); }
.theme-toggle .icon { display: block; } /* sin la línea base de un svg en línea, el ícono queda centrado */
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle__sun { display: block; }
  :root:not([data-theme]) .theme-toggle__moon { display: none; }
}

/* Landing */
.landing-hero { display: grid; gap: 2rem; align-items: center; padding: 2rem 0 1rem; }
@media (min-width: 768px) { .landing-hero { grid-template-columns: 1.2fr .8fr; gap: 3rem; padding: 3.5rem 0 2rem; } }
.landing-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 1rem; }
.landing-lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.5rem; max-width: 36rem; }
.landing-badge { display: inline-block; margin: 0 0 1rem; padding: .25rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 600; }
.button--lg { padding: .85rem 1.5rem; font-size: 1.05rem; }
.landing-hero__visual { text-align: center; }
.demo-card { display: flex; flex-direction: column; gap: .5rem; max-width: 18rem; margin: 0 auto; padding: .75rem .75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.4); box-shadow: 0 18px 40px var(--shadow); transform: rotate(-2deg); text-align: left; }
.demo-card__photo { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: var(--radius); background: linear-gradient(135deg, #2d6a4f, #95d5b2); color: #fff; }
.demo-card__photo .icon { width: 4rem; height: 4rem; }
.demo-card__name { font-weight: 600; line-height: 1.3; }
.demo-card__price { align-self: flex-start; padding: .15rem .7rem; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 1.2rem; font-weight: 800; }
.demo-card__buy { padding: .6rem; text-align: center; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); font-weight: 600; }
.landing-section { padding: 2.5rem 0 .5rem; }
.landing-section > h2 { font-size: 1.6rem; margin-bottom: 1.25rem; letter-spacing: -.01em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.step { padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step h3 { margin: .8rem 0 .3rem; font-size: 1.05rem; }
.step p, .landing-feature p { margin: 0; color: var(--muted); }
.step__icon { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.step__icon .icon { width: 1.3rem; height: 1.3rem; }
.landing-cols { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.landing-feature { margin: 0; }
.landing-feature h3 { margin: .8rem 0 .3rem; }
.landing-pricing .checks { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.checks li { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.checks .icon { color: var(--ok); width: 1.3rem; height: 1.3rem; }
.landing-cta { margin: 3rem 0 1rem; padding: 2.5rem 1.5rem; text-align: center; background: var(--accent); color: var(--accent-ink); border-radius: calc(var(--radius) * 1.6); }
.landing-cta h2 { font-size: 1.7rem; margin-bottom: .4rem; }
.landing-cta p { margin: 0 0 1.25rem; opacity: .8; }
.landing-cta .button { background: var(--accent-ink); color: var(--accent); }

/* Página /crea-tu-tienda. Los tonos suaves se mezclan con --surface para que sirvan en claro y en oscuro. */
.start, .landing { --peach: color-mix(in srgb, #e8836b 22%, var(--surface)); --lilac: color-mix(in srgb, #8b7cf6 16%, var(--surface)); --lilac-strong: color-mix(in srgb, #8b7cf6 24%, var(--surface)); --coral: #d9735a; --warm-line: color-mix(in srgb, #e8836b 16%, var(--line)); }
:root[data-theme="dark"] :is(.start, .landing) { --coral: #f0907a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) :is(.start, .landing) { --coral: #f0907a; } }
.start-hero { padding: 2rem 0 1rem; }
@media (min-width: 768px) { .start-hero { padding: 3.5rem 0 2rem; } }
.start-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 1rem; }
.start-tagline { margin: 0 0 1.25rem; font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand", "Brush Script MT", cursive; font-size: 1.2rem; line-height: 1.35; color: #d9735a; transform: rotate(-3deg); transform-origin: left; }
.start .button .icon, .start-fee a .icon { width: 1.1rem; height: 1.1rem; margin-left: .5rem; vertical-align: -.2em; }
.start-sub { margin: -.75rem 0 1.25rem; color: var(--muted); }
.start-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .start-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .start-steps { grid-template-columns: repeat(4, 1fr); } }
.start-step { display: flex; flex-direction: column; border-radius: calc(var(--radius) * 1.4); }
.start-step__top { display: flex; align-items: center; justify-content: space-between; }
.start-step__top .icon { width: 1.6rem; height: 1.6rem; color: var(--ink); }
.start-step__num { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--peach); font-weight: 700; font-size: .95rem; }
.start-fee { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 2rem 0 0; padding: 1.75rem; background: var(--lilac); border-radius: calc(var(--radius) * 1.6); }
.start-fee__text { flex: 1 1 18rem; }
.start-fee h2 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .75rem; letter-spacing: -.01em; }
.start-fee p { margin: 0 0 .75rem; color: var(--muted); }
.start-fee a { font-weight: 600; }
.start-fee__badge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 11rem; height: 9rem; margin: 0 auto; background: var(--lilac-strong); border-radius: 58% 42% 55% 45% / 50% 55% 45% 50%; }
.start-fee__badge strong { font-size: 3.2rem; line-height: 1; letter-spacing: -.03em; }
.start-fee__badge span { font-weight: 600; }
.landing-cta--left { text-align: left; }
.landing-cta .button .icon { width: 1.1rem; height: 1.1rem; margin-left: .5rem; vertical-align: -.2em; }

/* Modal con <dialog> */
.modal { width: min(32rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.4); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px var(--shadow); }
.modal::backdrop { background: rgb(0 0 0 / .5); }
.modal[open] { animation: menu-in .15s ease-out; }
.modal__box { padding: 1.25rem; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.modal__close { display: flex; padding: .3rem; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; }
.modal__close:hover { background: var(--line); color: var(--ink); }
.kind-options { display: grid; gap: .75rem; }
@media (min-width: 576px) { .kind-options { grid-template-columns: 1fr 1fr; } }
.kind-option { display: flex; flex-direction: column; gap: .35rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.kind-option:hover { border-color: var(--ink); box-shadow: 0 6px 18px var(--shadow); }
.kind-option .step__icon { margin-bottom: .25rem; }
.kind-option .muted { margin: 0; }

/* Pasos de la compra: carro → pedido → pago → listo */
.steps-bar { list-style: none; display: flex; margin: .5rem 0 1.5rem; padding: 0; counter-reset: none; }
.steps-bar__step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; position: relative; color: var(--muted); font-size: .85rem; font-weight: 600; }
.steps-bar__step::before { content: ""; position: absolute; top: 1rem; right: 50%; width: 100%; height: 2px; background: var(--line); }
.steps-bar__step:first-child::before { display: none; }
.steps-bar__step.is-done::before, .steps-bar__step.is-current::before { background: var(--ink); }
.steps-bar__dot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.steps-bar__dot .icon { width: 1.1rem; height: 1.1rem; }
.steps-bar__step.is-done { color: var(--ink); }
.steps-bar__step.is-done .steps-bar__dot { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.steps-bar__step.is-current { color: var(--ink); }
.steps-bar__step.is-current .steps-bar__dot { border-color: var(--ink); box-shadow: 0 0 0 4px var(--line); }
.steps-bar__step.is-current:last-child .steps-bar__dot { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 0 0 4px var(--ok-bg); }
.page-title { display: flex; align-items: center; gap: .6rem; }
.page-title .icon { width: 1.6rem; height: 1.6rem; }
.page-title--ok { color: var(--ok); }
.card--pending { border-left: 4px solid #d9a400; }
/* Opciones de pago: una columna con el mismo ancho y aire entre los botones. */
.pay-options { display: flex; flex-direction: column; gap: .75rem; max-width: 24rem; margin: 1rem 0 0 auto; }
.pay-options form { margin: 0; }
.pay-options p { margin: 0; text-align: right; }
.pay-options .button, .pay-options .button-mp { width: 100%; justify-content: center; }
.card--ok { background: var(--ok-bg); border-color: var(--ok-line); border-left: 4px solid var(--ok); }

/* Producto que ya está en el carro */
.product-card__incart { display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; height: 2.4rem; background: transparent; color: var(--card-ink, var(--ink)); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: .9rem; font-weight: 600; text-decoration: none; }
.product-card__incart:hover { background: color-mix(in srgb, var(--card-ink, var(--ink)) 7%, transparent); }
.product-card__incart .icon { width: 1.1rem; height: 1.1rem; color: var(--ok); }
.product__incart { display: flex; align-items: center; gap: .5rem; margin: 1rem 0 0; padding: .6rem .9rem; background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); border-radius: var(--radius); font-weight: 700; }
.product__incart + .product__buy { margin-top: .6rem; text-align: center; }

/* Carro: precio por producto y total */
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; flex: none; }
.cart-line__side form { margin: 0; }
.cart-line__remove { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; text-decoration: none; }
.cart-line__remove .icon { width: 1.1rem; height: 1.1rem; }
.cart-line__remove:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.list__item--closed { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.list__item--closed .list__photo { filter: grayscale(1); opacity: .55; }
.list__item--closed .list__title { color: var(--muted); }
.cart-line__closed { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cart-line__closed .icon { width: .9rem; height: .9rem; }
.flash .icon { width: 1rem; height: 1rem; margin-right: .4rem; vertical-align: -.15em; }
.cart-line__price { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 1rem 0; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; text-align: left; }
.cart-actions { display: flex; justify-content: flex-end; margin: 1rem 0 2.5rem; }
.cart-total strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }

/* Accesos del comprador, en Ventas */
.accesses { list-style: none; margin: .35rem 0 0; padding: 0; font-size: .85rem; }
.access { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.access--yes { color: var(--ink); font-weight: 600; }
.seen-dots { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 0; padding: 0; }
.seen-dot { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px dashed var(--line-strong); box-sizing: border-box; }
.seen-dot { font-size: .65rem; font-weight: 700; line-height: 1; color: var(--muted); }
.seen-dot--yes { border: 0; background: var(--ok); color: #fff; }
.seen-dot .icon { width: .85rem; height: .85rem; }
.access--yes .muted { font-weight: 400; margin: 0; }
.sale__number { color: var(--muted); font-weight: 700; margin-right: .25rem; }

/* Diseño de la tienda (panel) y su vista previa */
.design-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem 1.5rem; }
.field input[type="color"] { width: 100%; height: 2.6rem; padding: .15rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.field select { width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); }
.field__label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field__label + .muted { margin-top: 0; }
/* Opciones como control segmentado: la elegida se rellena. */
.choices { display: flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.choice { position: relative; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1rem; border-radius: calc(var(--radius) - 2px); cursor: pointer; font-weight: 500; text-align: center; border: 1px solid transparent; }
.choice:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:has(input:checked) { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); font-weight: 700; }
.choice:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 1px; }
.choice__text { display: flex; flex-direction: column; align-items: center; }
.choice__note { font-size: .75rem; font-weight: 400; opacity: .75; }
.choice__shape { display: inline-block; flex: none; width: 1.1rem; height: 1.1rem; border: 2px solid currentColor; box-sizing: border-box; }
.choice__shape--corners-square { border-radius: 0; }
.choice__shape--corners-soft { border-radius: 4px; }
.choice__shape--corners-round, .choice__shape--logo-circle { border-radius: 50%; }
.choice__shape--logo-rounded { border-radius: 4px; }
.choice__shape--logo-square { border-radius: 2px; }
.design-preview { background: var(--bg); color: var(--ink); font-family: var(--font); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin: 0 0 1.1rem; }

/* Diseño de la tienda: reglas que activa el <body> con data-design-* (ver
   store_theme_attributes). Los colores de las texturas salen de --ink, que
   sale del color de fondo elegido: al cambiar el fondo, cambia la textura. */
body[data-design-texture="dots"] { background-image: radial-gradient(color-mix(in srgb, var(--ink) 16%, transparent) 1.3px, transparent 1.6px); background-size: 18px 18px; }
body[data-design-texture="grid"] { background-image: linear-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px); background-size: 28px 28px; }
body[data-design-texture="diagonal"] { background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 8%, transparent) 0 2px, transparent 2px 13px); }
body[data-design-texture="checks"] { background-image: conic-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 25%, transparent 0 50%, color-mix(in srgb, var(--ink) 6%, transparent) 0 75%, transparent 0); background-size: 36px 36px; }

body[data-design-density="large"] .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 992px) { body[data-design-density="large"] .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body[data-design-density="small"] .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 576px) { body[data-design-density="small"] .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 992px) { body[data-design-density="small"] .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

body[data-design-header="center"] .store-header__row { flex-direction: column; text-align: center; }
body[data-design-header="center"] .social { justify-content: center; }
body[data-design-show-description="off"] .store-header__description { display: none; }
body[data-design-show-count="off"] .store-header__count { display: none; }

.store-banner { display: block; width: 100%; aspect-ratio: 10 / 3; object-fit: cover; }
.banner-thumb { max-width: 100%; max-height: 120px; border-radius: 8px; }

/* Vista previa del diseño: misma maqueta con las mismas variables y atributos */
.design-title { margin: 1.5rem 0 .5rem; }
.design-preview__photo { display: block; width: 100%; aspect-ratio: 1 / 1; background: color-mix(in srgb, var(--ink) 12%, transparent); border-radius: calc(var(--radius) / 2); }
.design-preview[data-design-texture="dots"] { background-image: radial-gradient(color-mix(in srgb, var(--ink) 16%, transparent) 1.3px, transparent 1.6px); background-size: 18px 18px; }
.design-preview[data-design-texture="grid"] { background-image: linear-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px); background-size: 28px 28px; }
.design-preview[data-design-texture="diagonal"] { background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 8%, transparent) 0 2px, transparent 2px 13px); }
.design-preview[data-design-texture="checks"] { background-image: conic-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 25%, transparent 0 50%, color-mix(in srgb, var(--ink) 6%, transparent) 0 75%, transparent 0); background-size: 36px 36px; }

/* Pestaña Diseño: en escritorio la vista previa queda fija a la derecha */
.design-layout { display: block; }
.design-layout__preview { margin-bottom: 1rem; }
@media (min-width: 992px) {
  .design-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
  .design-layout__preview { order: 2; position: sticky; top: 1rem; margin-bottom: 0; }
  .design-layout__fields { order: 1; }
}

/* Avanzado: zona de peligro */
.danger-zone { margin: 2rem 0 0; padding: 1rem 1.25rem; border: 1px solid var(--danger); border-radius: var(--radius); }
.danger-zone h2 { color: var(--danger); margin: 0 0 .75rem; }
.danger-zone__item { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: .75rem 0; border-top: 1px solid var(--line); }
.danger-zone__item:first-of-type { border-top: 0; }
.danger-zone__item p { margin: .2rem 0 .5rem; }
.danger-zone__confirm { display: flex; flex-direction: column; gap: .5rem; max-width: 22rem; }
.danger-zone__confirm input { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); }
.button--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--line); color: var(--muted); font-size: .75rem; font-weight: 700; }

/* Precio con descuento: actual en negrita, normal tachado, % que se ahorra */
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; }
.price__now { font-weight: 500; }
.price__was { color: color-mix(in srgb, currentColor 62%, transparent); font-weight: 600; font-size: .9em; }
.price__save { color: var(--ok); font-size: .85em; font-weight: 500; }
.price--lg .price__now { font-size: 1.1em; }

/* Botón «Agregar» de la tarjeta: en una fila bajo el precio, casi de ancho completo */
.product-card__add-form { margin: 0; }
.product-card__add {
  position: absolute; right: .5rem; bottom: .5rem; width: 100%; height: 2.4rem; padding: 0; border: 0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none;
  background: #fff; color: #000; border: 1px solid rgb(0 0 0 / .15); font: inherit; font-size: .9rem; font-weight: 600;
  transition: transform .15s ease;
}
.product-card__add:hover { filter: brightness(.94); }
.product-card__add .icon { width: 1.3rem; height: 1.3rem; }
.product-card__add-form .product-card__add { position: static; }

/* Toast (copiado de tickeet): el aviso flota abajo al centro (abajo a la derecha en
   escritorio) y se cierra solo (toast_controller.js) o al hacer click. El más nuevo
   entra abajo y empuja a los anteriores hacia arriba. */
@keyframes toast-in { from { opacity: 0; transform: translateY(.5rem); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(.5rem); } }
.flash-stack {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; flex-direction: column-reverse; gap: .5rem; max-width: min(22rem, calc(100vw - 2rem)); width: max-content;
  pointer-events: none;
}
.flash-stack .flash {
  margin: 0; padding: .6rem 1rem; font-size: .92rem; border-left: 3px solid; cursor: pointer; pointer-events: auto;
  box-shadow: 0 8px 24px -8px rgb(0 0 0 / .35); animation: toast-in .18s ease-out;
}
.flash-stack .flash--notice { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.flash-stack .flash--alert { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.flash-stack .flash.is-leaving { animation: toast-out .18s ease-in forwards; }
@media (min-width: 576px) {
  .flash-stack { left: auto; right: 1.5rem; bottom: 1.5rem; transform: none; max-width: calc(100vw - 3rem); }
  .flash-stack .flash { padding: .85rem 1.4rem; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .flash-stack .flash, .flash-stack .flash.is-leaving { animation: none; } }

/* Carrusel de fotos en la tarjeta: scroll-snap horizontal + flechas */
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 2rem; height: 2rem; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: rgb(0 0 0 / .35); color: #fff; border: 1px solid rgb(255 255 255 / .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 1px 6px rgb(0 0 0 / .25);
}
.carousel__arrow--prev { left: .4rem; }
.carousel__arrow--next { right: .4rem; }
.carousel__arrow .icon { width: 1.1rem; height: 1.1rem; }
.carousel__arrow:hover { background: rgb(0 0 0 / .55); }
/* En escritorio las flechas aparecen al pasar el mouse; en pantallas táctiles siempre se ven. */
@media (hover: hover) {
  .carousel__arrow { opacity: 0; transition: opacity .15s ease; }
  .product-card__media:hover .carousel__arrow, .carousel__arrow:focus-visible { opacity: 1; }
}

/* Puntos del carrusel: negros "de vidrio" (translúcidos, desenfocan lo que hay detrás,
   con un filo claro para que se vean también sobre fotos oscuras). El activo es más sólido. */
.carousel__dots { position: absolute; left: 50%; bottom: .7rem; transform: translateX(-50%); display: flex; gap: 4px; pointer-events: none; }
.carousel__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgb(0 0 0 / .3); border: 1px solid rgb(255 255 255 / .35);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: background .15s ease, transform .15s ease;
}
.carousel__dot.is-active { background: rgb(0 0 0 / .78); transform: scale(1.15); }

.list__logo-link { display: block; flex: none; line-height: 0; }

/* Mis compras: productos de la compra como lista, con "Ver más" a partir del cuarto */
.purchase-items { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .95rem; }
.purchase-items li { margin: .1rem 0; }
.purchase-more summary { cursor: pointer; margin: .3rem 0 0; font-size: .9rem; font-weight: 600; color: var(--muted); list-style: none; }
.purchase-more summary::-webkit-details-marker { display: none; }
.purchase-more summary:hover { color: var(--ink); }
.purchase-more__close, .purchase-more[open] .purchase-more__open { display: none; }
.purchase-more[open] .purchase-more__close { display: inline; }

/* Al desplegar "Ver más" la card crece hacia abajo: el logo y el total se quedan arriba, no se re-centran. */
.list__item:has(.purchase-items) { align-items: flex-start; }
.purchase-total { white-space: nowrap; }
.purchase-side { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; flex: none; }
.button--sm { padding: .35rem .8rem; font-size: .9rem; }

/* Banner como fondo del encabezado de la tienda: velo oscuro para que el texto y los íconos se lean */
body[data-design-banner-style="background"] .store-header[style*="--banner"] {
  background-image: linear-gradient(rgb(0 0 0 / .5), rgb(0 0 0 / .5)), var(--banner);
  background-size: cover; background-position: center; border-color: transparent; color: #fff; min-height: 9rem;
}
body[data-design-banner-style="background"] .store-header[style*="--banner"] p { color: rgb(255 255 255 / .88); }
body[data-design-banner-style="background"] .store-header[style*="--banner"] .social__link { color: #fff; border-color: rgb(255 255 255 / .5); }
body[data-design-banner-style="background"] .store-header[style*="--banner"] .social__link:hover { background: rgb(255 255 255 / .2); }
body[data-design-banner-style="background"] .store-header[style*="--banner"] .store-header__logo { box-shadow: 0 0 0 2px rgb(255 255 255 / .8); }

/* Conexión de Mercado Pago en el encabezado de la tienda del panel */
.mp-connection { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; padding: .75rem 1rem; border: 1px solid var(--border, #ddd); border-radius: 12px; }
.mp-connection p { margin: 0; }
.mp-connection form { margin: 0; }

/* Desconectar Mercado Pago: abajo y discreto */
.mp-disconnect { margin-top: 2.5rem; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--text, inherit); }

/* Mercado Pago conectado: check verde, con aire junto al texto */
.mp-connection--ok .icon { color: var(--ok); margin-right: .5rem; vertical-align: -.2em; }
.modal__actions { display: flex; justify-content: flex-end; align-items: center; gap: .75rem; margin-top: 1.25rem; }
.modal__actions form { margin: 0; }
.button--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.button--danger:hover { filter: brightness(.92); }

/* Panel de una tienda: sidebar en escritorio; en el celular, menú hamburguesa. */
.panel-shell > .page { container-type: inline-size; }
.sidebar { display: none; }
.topbar__left { display: flex; align-items: center; gap: .75rem; }
.topbar .store-menu { margin: 0; }
/* Celular: el menú de la tienda es un panel lateral que entra de izquierda a derecha, con un velo detrás.
   El filtro de la barra (backdrop-filter) haría que "fixed" se midiera contra la barra, así que se quita mientras está abierto. */
.store-menu__backdrop { display: none; }
@media (max-width: 991px) {
  .topbar:has(.store-menu[open]) { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar .store-menu[open] .store-menu__backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / .4); animation: fade-in .2s ease-out; }
  .topbar .store-menu .menu__panel--left {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 31; width: min(18rem, 82vw); min-width: 0; overflow-y: auto;
    padding: 3.75rem 1rem 1.25rem; gap: .15rem; border-width: 0 1px 0 0; border-radius: 0; box-shadow: 4px 0 24px rgb(0 0 0 / .18);
  }
  .topbar .store-menu[open] .menu__panel--left { animation: drawer-in .22s ease-out; }
  .topbar .store-menu .menu__panel--left { background: var(--panel-bg, var(--bg)); }
  .topbar .store-menu .menu__panel .sidebar__group { margin: 1rem .6rem .2rem; }
  .topbar .store-menu--admin .menu__panel .sidebar__link[aria-current="page"] { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
  .topbar .store-menu--admin .menu__panel .sidebar__link[aria-current="page"] .icon { color: var(--ok); }
  .topbar .store-menu .menu__panel .sidebar__link { display: flex; align-items: center; gap: .7rem; padding: .7rem .6rem; }
  .topbar .store-menu .menu__panel .sidebar__link .icon { flex: none; }
  .topbar .store-menu__close { position: absolute; top: .75rem; right: .75rem; }
  .topbar .store-menu .menu__panel .sidebar__store { max-width: none; margin: 0 .6rem .6rem; }
}
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .topbar .store-menu[open] .menu__panel--left, .topbar .store-menu[open] .store-menu__backdrop { animation: none; } }
.menu__panel .sidebar__store { margin: 0 0 .2rem; font-weight: 700; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-menu .menu__button--icon { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; }
/* Hamburguesa del celular: área táctil de 40 px, icono en el color del texto y fondo con tinte durazno (el de /crea-tu-tienda), para que se vea como botón sin ser un gris. */
.store-menu .menu__button--icon { justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; color: var(--ink); background: color-mix(in srgb, #e8836b 14%, var(--surface)); border-color: color-mix(in srgb, #e8836b 40%, var(--line)); }
.store-menu .menu__button--icon .icon { width: 1.35rem; height: 1.35rem; }
.store-menu .menu__button--icon:hover, .store-menu[open] .menu__button--icon { background: color-mix(in srgb, #e8836b 24%, var(--surface)); }
.menu__panel--left { left: 0; right: auto; top: 2.8rem; min-width: 13rem; }
@media (min-width: 992px) {
  .mobile-only { display: none; }
  .panel-shell { display: grid; grid-template-columns: 180px minmax(0, 1fr); max-width: 1280px; margin: 0 auto; gap: 1rem; padding: 0 1rem; }
  .panel-shell .page { margin: 0; max-width: none; padding-inline: 0; }
  .sidebar { display: flex; flex-direction: column; gap: .15rem; position: sticky; top: 4.2rem; align-self: start; padding-top: 1.5rem; height: calc(100vh - 4.2rem); height: calc(100dvh - 4.2rem); }
  .sidebar__store { font-weight: 700; margin: 0 .75rem .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar__link { position: relative; display: flex; align-items: center; gap: .7rem; padding: .65rem .85rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
  .sidebar__link .icon { color: var(--muted); }
  .sidebar__link:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
  .sidebar__link[aria-current="page"] { color: var(--ok); font-weight: 700; background: var(--ok-bg); }
  .sidebar__link[aria-current="page"] .icon { color: var(--ok); }
  .sidebar__link[aria-current="page"]::before { content: ""; position: absolute; left: -.5rem; top: .35rem; bottom: .35rem; width: 3px; border-radius: 3px; background: var(--ok); }
  .sidebar__sep { border: 0; border-top: 1px solid var(--line); margin: .5rem 0; width: 100%; }
  .store-menu { display: none; }
}
/* Barra lateral más delgada entre lg (992) y xl (1200): ahí el contenido necesita el espacio. */
@media (min-width: 1200px) { .panel-shell { grid-template-columns: 220px minmax(0, 1fr); } }

/* Métricas */
.metrics-period { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 .6rem; }
.metrics-period h2 { margin: 0; }
.bchart-card { padding: 1rem 1rem .75rem; }
.bchart-card__title { margin: 0 0 .6rem; font-weight: 600; color: var(--ink); }
.bchart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 130px auto; column-gap: .6rem; margin: 0; }
.bchart__y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: .75rem; line-height: 1; color: var(--muted); }
.bchart__plot { display: flex; align-items: flex-end; gap: 2px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0, transparent calc(50% - 1px), var(--line) calc(50% - 1px), var(--line) 50%); }
.bchart--two .bchart__plot { background: none; }
.bchart__x { grid-column: 2; display: flex; gap: 2px; margin-top: .3rem; }
.bchart__x span { flex: 1; min-width: 0; text-align: center; font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: visible; }
.chart__bar { min-height: 2px; background: var(--ink); opacity: .75; border-radius: 2px 2px 0 0; }
.chart__bar--empty { opacity: .15; }
.chart__col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; outline: none; }
.chart__col .chart__bar { width: 100%; flex: none; }
.chart__col:hover .chart__bar, .chart__col:focus-visible .chart__bar { opacity: 1; }
/* Leyenda sobre la barra señalada */
.chart__col::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
  padding: .3rem .55rem; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: .75rem; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .1s;
}
.chart__col:first-child::after { left: 0; transform: none; }
.chart__col:last-child::after { left: auto; right: 0; transform: none; }
.chart__col:hover::after, .chart__col:focus-visible::after { opacity: 1; }
/* Aunque estén invisibles, los globos de las últimas columnas ensanchaban la página en el celular: se anclan a la derecha. */
@media (max-width: 991px) { .chart__col:nth-last-child(-n+8)::after { left: auto; right: 0; transform: none; } }

/* Lista de productos del panel: cada producto es una tarjeta con tres bloques (foto, nombre y estados · precio y vendidos · botones). */
/* Celular: la misma fila que en escritorio (foto y nombre con estados · precio y vendidos · botón), más compacta;
   copiar el link y ver la tienda pasan al menú «⋯». */
/* Con `display: contents` la foto, el título, el tipo y los estados son celdas de la fila: los estados ocupan todo el ancho, debajo de la foto. */
.product-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 7rem auto; align-items: center; column-gap: .6rem; row-gap: 0; padding: .7rem .75rem;
  grid-template-areas: "photo title figures actions" "photo meta figures actions" "status status status status";
}
.product-row__main, .product-row .list__body { display: contents; }
.product-row .list__photo { grid-area: photo; }
.product-row .list__title { grid-area: title; align-self: end; }
.product-row__main .muted { grid-area: meta; align-self: start; margin: 0; }
.product-row__status { grid-area: status; margin-top: .6rem; }
.product-row__figures { grid-area: figures; }
.product-row .actions { grid-area: actions; }
.product-row__desk, .actions__copy.product-row__desk { display: none; }
.menu__item--mobile { display: flex; }
.product-row .list__photo { width: 56px; height: 56px; border-radius: 10px; }
.product-row .actions { flex-wrap: nowrap; align-items: center; justify-content: center; gap: .5rem; padding-left: .6rem; border-left: 1px solid var(--line); align-self: stretch; }
.product-row .actions .menu__button--icon { width: 2.6rem; height: 2.6rem; justify-content: center; align-items: center; padding: 0; border-radius: 12px; }
.product-row__figures { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .2rem; min-width: 0; padding-left: .6rem; border-left: 1px solid var(--line); align-self: stretch; }
.product-row__price { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; }
.product-row__price strong { flex-basis: 100%; font-size: 1.1rem; }
.product-row__price .muted { margin: 0; }
.product-row__status { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.product-row__sold { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.product-row__sold .icon { width: 1rem; height: 1rem; flex: none; }
.status { white-space: nowrap; display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); }
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.status--ok { background: var(--ok-bg); color: var(--ok); }
.product-row__price .status::before { content: none; }
@container (min-width: 680px) {
  .product-row { grid-template-columns: minmax(0, 1fr) 10.5rem auto; grid-template-areas: none; gap: 1.25rem; padding: .9rem 1rem; }
  .product-row__main { display: flex; align-items: center; gap: .9rem; min-width: 0; }
  .product-row .list__body { display: block; min-width: 0; }
  .product-row .list__photo, .product-row .list__title, .product-row__main .muted, .product-row__status, .product-row__figures, .product-row .actions { grid-area: auto; }
  .product-row .list__title { align-self: auto; }
  .product-row__main .muted { align-self: auto; }
  .product-row__status { margin-top: .4rem; }
  .product-row__desk { display: inline-flex; }
  .actions__copy.product-row__desk { display: contents; }
  .menu__item--mobile { display: none; }
  .product-row__figures { gap: .3rem; padding: .4rem 0 .4rem 1.25rem; }
  .product-row__sold { font-size: inherit; }
  .product-row__price strong { font-size: 1.5rem; }
  .product-row .actions { justify-content: center; gap: .6rem; padding: .4rem 0 .4rem 1.25rem; }
  .product-row .actions .menu__button--icon { width: 2.9rem; height: 2.9rem; border-radius: 14px; }
  .product-row .actions .menu__button--icon .icon { width: 1.3rem; height: 1.3rem; }
  .list--products .list__photo, .product-row .list__photo { width: 88px; height: 88px; border-radius: 14px; }
  .product-row .list__photo.avatar { font-size: 2.2rem; }
}

/* Lista de ventas del panel: tabla en escritorio (una sola caja con filas separadas por líneas), tarjetas apiladas en el celular. */
.sales-table__head { display: none; }
/* Celular: filas compactas, el comprador y el total arriba, la fecha y la comisión debajo, y los productos al final.
   Sin la columna de acciones: el nombre del comprador ya lleva al detalle. */
.sale-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .2rem .75rem; padding: .65rem .85rem; margin-bottom: .5rem;
  grid-template-areas: "buyer total" "date date" "products products";
}
.sale-row__buyer { grid-area: buyer; display: flex; align-items: center; gap: .65rem; min-width: 0; }
.sale-row__avatar { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; flex: none; background: var(--ok-bg); color: var(--ok); }
.sale-row .seen-dots { margin: 0; }
.sale-row__when { white-space: nowrap; padding: .1rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: color-mix(in srgb, #8b5cf6 18%, var(--surface)); color: color-mix(in srgb, #8b5cf6 70%, var(--ink)); }
.sale-row__when--cancelled { text-decoration: line-through; opacity: .7; }
.sale-row__avatar--link { --kind: #3b82f6; }
.sale-row__avatar--booking { --kind: #8b5cf6; }
.sale-row__avatar--physical { --kind: #e8a317; }
.sale-row__avatar--digital { --kind: #10b981; }
.sale-row__avatar[class*="--"] { background: color-mix(in srgb, var(--kind) 18%, var(--surface)); color: color-mix(in srgb, var(--kind) 70%, var(--ink)); }
.sale-row__buyer .list__body p { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.sale-row__date { grid-area: date; display: flex; gap: .4rem; font-size: .9rem; }
.sale-row__products { grid-area: products; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; font-size: .9rem; }
.sale-row__total { grid-area: total; text-align: right; }
.sale-row .actions { display: none; }
.sale-row__date .muted { margin: 0; }
.sale-row__total strong { color: var(--ok); font-size: 1.15rem; }
@container (min-width: 720px) {
  .sales-table__head, .sale-row {
    display: grid; grid-template-columns: minmax(10rem, 1.4fr) 7.5rem 9rem 5.5rem 9.5rem; align-items: center; gap: 1rem;
  }
  .sales-table { overflow: hidden; margin: .5rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .sales-table .list { margin: 0; }
  .sales-table__head { padding: .7rem 1rem; color: var(--muted); font-size: .9rem; font-weight: 600; background: color-mix(in srgb, var(--ink) 4%, transparent); border-bottom: 1px solid var(--line); }
  .sales-table .sale-row { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
  .sales-table .sale-row:last-child { border-bottom: 0; }
  .sales-table .sale-row:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
  .sales-table .sale-row--test { background: color-mix(in srgb, #8b7cf6 6%, var(--surface)); }
  .sales-table .num, .sale-row__total { text-align: right; }
  .sales-table .center { text-align: center; }
  .sale-row { padding: .8rem 1rem; grid-template-areas: none; }
  .sale-row__buyer, .sale-row__date, .sale-row__products, .sale-row__total { grid-area: auto; }
  .sale-row .actions { display: flex; }
  .sale-row__date { flex-direction: column; gap: .15rem; font-size: inherit; }
  .sale-row__products { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: .15rem; font-size: inherit; }
  .sale-row .seen-dots { margin-top: .35rem; }
  .sale-row .actions { justify-content: flex-end; flex-wrap: nowrap; align-items: center; }
  .sale-row__date span:first-child { white-space: nowrap; }
}
.seen-dots[hidden] { display: none; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin: 1.25rem 0 .5rem; }
.pager a { font-weight: 600; text-decoration: none; }
.pager .muted { margin: 0; }
.pager__off { color: var(--muted); opacity: .5; }
.test-link { text-align: center; margin: 2rem 0 0; font-size: .8rem; }
.test-link a { color: var(--muted); opacity: .6; }
.test-link a:hover { opacity: 1; }

/* Listón cruzado en la esquina de las ventas de prueba. */
.sale-row--test { position: relative; overflow: hidden; }
.ribbon {
  position: absolute; top: 14px; left: -34px; width: 120px; padding: .15rem 0; text-align: center; transform: rotate(-45deg);
  background: #e8a317; color: #3b2a00; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 1px 3px rgb(0 0 0 / .25); pointer-events: none;
}
.card--test { position: relative; overflow: hidden; }
.ribbon--right { left: auto; right: -34px; transform: rotate(45deg); }

/* Interruptor grande (Publicado / Borrador). El input real queda oculto pero accesible. */
.switch-card { position: relative; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.switch-card:has(:checked) { border-color: var(--ok-line); background: var(--ok-bg); }
.switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.field label.switch, .switch { display: flex; align-items: center; gap: 1rem; margin: 0; padding: 1rem; cursor: pointer; font-weight: 400; }
.switch__track { position: relative; flex: none; width: 3.25rem; height: 1.85rem; border-radius: 999px; background: var(--line-strong); transition: background .15s; }
.switch__track::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .15s; }
.switch__input:checked + .switch .switch__track { background: var(--ok); }
.switch__input:checked + .switch .switch__track::after { transform: translateX(1.4rem); }
.switch__input:focus-visible + .switch .switch__track { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch__text { display: flex; flex-direction: column; }
.switch__text .muted { margin: .1rem 0 0; }
.switch__off, .switch__input:checked + .switch .switch__on { display: block; }
.switch__input:checked + .switch .switch__off, .switch__on { display: none; }
.switch__input:checked + .switch .switch__on { display: block; }
.switch__input:checked + .switch strong.switch__on { color: var(--ok); }
@media (prefers-reduced-motion: reduce) { .switch__track, .switch__track::after { transition: none; } }

.form-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.form-section > .design-title { margin-top: 0; }
.file-picker { display: flex; align-items: center; gap: 1rem; }
.file-picker__preview { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.file-picker__preview[hidden] { display: none; }
.file-picker__trigger { padding: 0; border: 0; background: none; border-radius: 12px; cursor: pointer; flex: none; position: relative; display: block; }
.file-picker__badge { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgb(0 0 0 / .5); color: #fff; opacity: .8; pointer-events: none; transition: opacity .15s; }
.file-picker__badge .icon { width: 1.2rem; height: 1.2rem; }
.file-picker__trigger:hover .file-picker__badge, .file-picker__trigger:focus-visible .file-picker__badge { opacity: 1; }
.file-picker__trigger:has(.file-picker__preview--empty:not([hidden])) .file-picker__badge { display: none; }
.form-save-bar { position: sticky; bottom: 1rem; z-index: 10; display: flex; justify-content: center; margin-top: 1.5rem; padding: .75rem 1rem; background: color-mix(in srgb, var(--surface) 72%, transparent); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 8px rgb(0 0 0 / .08); }
.form-save-bar { transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, visibility .28s; }
.form-save-bar[data-state="hidden"] { transform: translateY(calc(100% + 1.5rem)); opacity: 0; visibility: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .form-save-bar { transition: none; } }
.form-save-bar .button { margin: 0; }
.identity-row { display: flex; align-items: flex-start; gap: 1.25rem; }
.identity-row__logo { flex: none; }
.identity-row__logo .file-picker__preview { width: 96px; height: 96px; }
.identity-row__name { flex: 1; min-width: 0; }
.file-picker__trigger:hover .file-picker__preview { filter: brightness(.94); }
.file-picker__trigger:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.file-picker__preview--empty { display: grid; place-items: center; color: var(--muted); background: var(--surface); }
.file-picker .muted { margin: .4rem 0 0; }
.switch-row { position: relative; }
.switch-row .switch { padding: .4rem 0; flex-direction: row-reverse; justify-content: space-between; }
.switch-row .switch__track { width: 2.75rem; height: 1.5rem; }
.switch-row .switch__track::after { top: .17rem; left: .17rem; width: 1.16rem; height: 1.16rem; }
.switch-row .switch__input:checked + .switch .switch__track::after { transform: translateX(1.25rem); }

/* Campo de color: muestra, hexadecimal y cuentagotas en un solo control. */
.color-field__control { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.field input[type="color"].color-field__swatch { width: 2.5rem; height: 2.5rem; flex: none; margin: .4rem; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.field input.color-field__hex { flex: 1; min-width: 0; border: 0; background: transparent; padding: .65rem .5rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; text-transform: uppercase; color: var(--ink); }
.field input.color-field__hex:focus { outline: none; }
.color-field__control:focus-within { outline: 2px solid color-mix(in srgb, var(--ink) 18%, transparent); outline-offset: 0; border-color: color-mix(in srgb, var(--ink) 55%, var(--line)); }
.color-field__dropper { align-self: stretch; display: grid; place-items: center; width: 3rem; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.color-field__dropper:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.color-field__dropper[hidden] { display: none; }
.file-picker--wide { flex-wrap: wrap; }
.file-picker--wide .file-picker__preview { width: 160px; height: 72px; }

/* Admin */
.topbar__page { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--muted); }
.topbar__page::before { content: "/"; margin-right: .75rem; color: var(--line-strong); }
.topbar__section { margin-left: .5rem; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--ok-bg); color: var(--ok); }
.sidebar__group { margin: .9rem .85rem .2rem; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.menu__panel .sidebar__group { margin-left: 0; }
.menu__panel .sidebar__link { padding: .4rem 0; }
.admin-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; align-items: center; }
.admin-filters input[type="search"], .admin-filters input[type="date"], .admin-filters select { padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); }
.admin-filters input[type="search"] { flex: 1 1 14rem; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin-table th { text-align: left; padding: .7rem 1rem; color: var(--muted); font-size: .85rem; font-weight: 600; background: color-mix(in srgb, var(--ink) 4%, transparent); white-space: nowrap; }
.admin-table td { padding: .75rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
.admin-table .num { text-align: right; white-space: nowrap; }
.admin-table a { font-weight: 600; text-decoration: none; }
.admin-table .muted { margin: 0; }
.status--icon::before { content: none; }
.status--icon .icon { width: .95rem; height: .95rem; flex: none; }
.status--info { background: color-mix(in srgb, #2563eb 13%, transparent); color: color-mix(in srgb, #2563eb 78%, var(--ink)); }
.status--warn { background: #fdf0d5; color: #8a5a00; }
.status--bad { background: #fde8e8; color: var(--danger, #b42318); }
.admin-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); margin-top: 1rem; } /* una tarjeta por fila */
.admin-grid .card { margin: 0; }
.admin-ranges { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.admin-ranges a { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--muted); }
.admin-ranges a[aria-current="page"] { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.card--alert { border-color: var(--danger, #b42318); }
.card--alert .muted { margin-bottom: 0; }

/* Actividad reciente del admin */
.activity { list-style: none; margin: .75rem 0 0; padding: 0; }
.activity__item { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem 0; }
.activity__item:not(:last-child) { border-bottom: 1px solid var(--line); }
.activity__icon { display: grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); }
.activity__icon .icon { width: 1rem; height: 1rem; }
.activity__item--sale .activity__icon { background: var(--ok-bg); color: var(--ok); }
.activity__body { flex: 1; min-width: 0; }
.activity__title { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.activity__title:hover { text-decoration: underline; }
.activity__body .muted { margin: .1rem 0 0; overflow-wrap: anywhere; }
.activity__time { display: block; margin-top: .15rem; font-size: .8rem; color: var(--muted); }

/* Dos gráficos: apilados en el celular, mitad y mitad cuando hay ancho. */
.chart-pair { display: grid; gap: .75rem; margin-top: .75rem; }
.chart-pair .card { margin: 0; min-width: 0; }
@container (min-width: 720px) { .chart-pair { grid-template-columns: 1fr 1fr; } }

/* Encabezado de la tienda en el panel: tarjeta con logo, nombre y link, y a la derecha copiar y ver */
.store-banner-head { display: flex; align-items: center; gap: 1rem; margin: .5rem 0 1rem; padding: .6rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.store-banner-head__logo { width: 3.4rem; height: 3.4rem; flex: none; border-radius: 1rem; object-fit: cover; border: 1px solid var(--line); }
.store-banner-head__logo--empty { display: grid; place-items: center; color: var(--ink); background: var(--ok-bg); border-color: var(--ok-line); }
.store-banner-head__logo--empty .icon { width: 1.6rem; height: 1.6rem; }
.store-banner-head__info { flex: 1; min-width: 0; }
.store-banner-head h1 { margin: 0 0 .2rem; font-size: 1.5rem; overflow-wrap: anywhere; }
.store-banner-head__link { display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .3rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); font-size: .95rem; }
.store-banner-head__link .icon { width: 1rem; height: 1rem; flex: none; }
.store-banner-head__link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-banner-head__actions { display: flex; align-items: center; gap: .75rem; flex: none; }
.store-banner-head__copy { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; }
.store-banner-head__copy:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.store-banner-head__copy-done, .store-banner-head__copy[data-copied] .store-banner-head__copy-idle { display: none; }
.store-banner-head__copy[data-copied] .store-banner-head__copy-done { display: block; color: var(--ok); }
.store-banner-head__view { display: inline-flex; align-items: center; gap: .55rem; height: 2.5rem; padding: 0 1.1rem; border-radius: var(--radius); background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.store-banner-head__view:hover { filter: brightness(.96); }
@media (max-width: 575px) {
  .store-banner-head { flex-wrap: wrap; }
  .store-banner-head__logo { width: 3.75rem; height: 3.75rem; }
  .store-banner-head h1 { font-size: 1.4rem; }
  .store-banner-head__actions { width: 100%; }
  .store-banner-head__view { flex: 1; justify-content: center; }
}

/* Vista previa de General: el mismo encabezado y las mismas tarjetas que la tienda pública. `zoom` la achica
   entera (textos, fotos y espacios) sin tocar el CSS de la tienda real; los media query miran la ventana, no este espacio. */
.store-preview { zoom: .7; }
.store-preview[data-design-banner-style="background"] .store-banner { display: none; }
.store-preview[data-design-header="center"] .store-header__row { flex-direction: column; text-align: center; }
.store-preview[data-design-header="center"] .social { justify-content: center; }
.store-preview[data-design-show-description="off"] .store-header__description { display: none; }
.store-preview[data-design-show-count="off"] .store-header__count { display: none; }
.store-preview[data-design-banner-style="background"] .store-header[style*="--banner"] {
  background-image: linear-gradient(rgb(0 0 0 / .5), rgb(0 0 0 / .5)), var(--banner);
  background-size: cover; background-position: center; border-color: transparent; color: #fff; min-height: 9rem;
}
.store-preview[data-design-banner-style="background"] .store-header[style*="--banner"] p { color: rgb(255 255 255 / .88); }
.store-preview[data-design-banner-style="background"] .store-header[style*="--banner"] .social__link { color: #fff; border-color: rgb(255 255 255 / .5); }
.store-preview[data-design-banner-style="background"] .store-header[style*="--banner"] .social__link:hover { background: rgb(255 255 255 / .2); }
.store-preview[data-design-banner-style="background"] .store-header[style*="--banner"] .store-header__logo { box-shadow: 0 0 0 2px rgb(255 255 255 / .8); }
.store-preview .store-header { margin: 0 0 .75rem; }
.store-preview .store-header__description:empty { display: none; }
.store-preview .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.store-preview .product-card:hover { box-shadow: none; border-color: var(--line); }
.general-preview__social li[hidden] { display: none; }

/* Footer de las páginas públicas: usa las variables del tema, así se lee en cualquier diseño de tienda */
.report-link { margin: 2.5rem 0 .75rem; text-align: center; font-size: .75rem; opacity: .6; }
.report-link a { color: var(--muted); text-decoration: none; }
.report-link a:hover { text-decoration: underline; }
.sitefoot { margin-top: 0; padding: 1.5rem 1rem 2rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .85rem; }
.sitefoot__theme { display: flex; justify-content: center; margin-top: 1rem; }
.sitefoot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.25rem; }
.sitefoot__links a { color: inherit; text-decoration: none; }
.sitefoot__links a:hover { color: var(--ink); text-decoration: underline; }
.sitefoot__copy { margin: .6rem 0 0; }
.sitefoot__social { justify-content: center; margin: 0 0 1rem; }

/* Producto con las ventas cerradas */

/* Producto oculto visto por su dirección */
.product__draft { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: .9rem; }
.product__draft .icon { flex: none; }

/* Páginas legales */
.legal { max-width: 46rem; }
.legal h1 { margin-bottom: .25rem; }
.legal h2 { margin: 2rem 0 .5rem; font-size: 1.15rem; }
.legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 1.25rem; }
.legal__meta { color: var(--muted); margin: 0 0 1rem; }
.legal__company { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; line-height: 1.6; }
.legal__note { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: .95rem; }

/* Contenido +18: etiqueta en la tarjeta y aviso de confirmación de edad. */
.product-card__adult { position: absolute; right: .5rem; top: .5rem; padding: .15rem .5rem; border-radius: 999px; background: #000; color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.adult-gate { display: grid; gap: .75rem; margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.adult-gate h2 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.05rem; }
.adult-gate .button { justify-self: start; }
.adult-gate__badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: #000; color: #fff; font-size: .75rem; font-weight: 700; vertical-align: middle; }

/* Colores de /crea-tu-tienda en el panel (layout `panel`): fondo con tinte durazno, durazno en lo activo,
   lila en las métricas. Los tonos se mezclan con --surface y --bg, así que sirven en claro y en oscuro. */
.panel-theme { --panel-bg: color-mix(in srgb, #e8836b 5%, var(--bg)); --peach: color-mix(in srgb, #e8836b 22%, var(--surface)); --lilac: color-mix(in srgb, #8b7cf6 16%, var(--surface)); --coral: #d9735a; --warm-line: color-mix(in srgb, #e8836b 16%, var(--line)); background: var(--panel-bg); }
:root[data-theme="dark"] .panel-theme { --coral: #f0907a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .panel-theme { --coral: #f0907a; } }
.panel-theme .topbar, .panel-theme .tabs { border-color: var(--warm-line); }
.panel-theme .card, .panel-theme .store-card, .panel-theme .list__item { border-color: var(--warm-line); }
.panel-theme .stats .card { background: var(--lilac); border-color: transparent; }
.panel-theme .store-card__image--empty { background: var(--peach); color: var(--coral); }
.panel-theme .tabs__tab[aria-current="page"], .panel-theme button.tabs__tab[aria-selected="true"] { border-bottom-color: var(--coral); }
.panel-theme .sidebar__link[aria-current="page"] { color: var(--ink); background: var(--peach); }
.panel-theme .sidebar__link[aria-current="page"] .icon { color: var(--coral); }
.panel-theme .sidebar__link[aria-current="page"]::before { background: var(--coral); }
.panel-theme .store-banner-head__view { background: var(--peach); border-color: var(--warm-line); }
/* Aviso de «conecta tu Mercado Pago»: es lo que impide vender, así que se nota. */
.mp-connection__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--surface); color: var(--coral); }
.mp-connection__icon .icon { width: 1.4rem; height: 1.4rem; }
.mp-connection__text { flex: 1 1 16rem; }
.panel-theme .mp-connection:not(.mp-connection--ok) { gap: 1rem 1.25rem; padding: 1.1rem 1.25rem; background: var(--peach); border: 1px solid color-mix(in srgb, var(--coral) 45%, transparent); border-left: 6px solid var(--coral); box-shadow: 0 6px 18px color-mix(in srgb, var(--coral) 14%, transparent); }
.panel-theme .mp-connection:not(.mp-connection--ok) strong { display: block; font-size: 1.1rem; margin-bottom: .15rem; }
.panel-theme .mp-connection:not(.mp-connection--ok) .button { padding: .8rem 1.5rem; }

/* Botón «Conectar con Mercado Pago» según la guía de logo de Mercado Pago: logo horizontal a color sin
   modificar (SVG de «Uso digital - RGB»), sobre blanco, de 120 px de ancho como mínimo y con libre alrededor
   el alto de la «d». El archivo ya trae ese espacio libre (el logo visible es el 75 % del ancho), así que se
   muestra a 160 px para que el logo mismo mida 120 px. El texto va fuera de la imagen y no lleva sombras ni
   filtros sobre el logo. */
/* Tema claro: botón negro con letras blancas y el logo blanco oficial («pluma»).
   Tema oscuro: botón blanco con el logo a color. Los SVG del logo no se editan (guía de marca de Mercado Pago). */
.button-mp { display: inline-flex; align-items: center; gap: .6rem; padding: .35rem 1rem .35rem 1.25rem; background: #16161a; color: #fff; border: 1px solid #16161a; border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.button-mp:hover { background: #2c2c33; }
.button-mp:focus-visible { outline: 2px solid #16161a; outline-offset: 2px; }
.button-mp__logo { display: block; width: 160px; min-width: 160px; height: auto; }
.button-mp__logo--color { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button-mp { background: #fff; color: #16161a; border-color: var(--line-strong); gap: .25rem; }
  :root:not([data-theme="light"]) .button-mp:hover { background: #fff; border-color: #16161a; }
  :root:not([data-theme="light"]) .button-mp__logo--color { display: block; }
  :root:not([data-theme="light"]) .button-mp__logo--white { display: none; }
}
:root[data-theme="dark"] .button-mp { background: #fff; color: #16161a; border-color: var(--line-strong); gap: .25rem; }
:root[data-theme="dark"] .button-mp:hover { background: #fff; border-color: #16161a; }
:root[data-theme="dark"] .button-mp__logo--color { display: block; }
:root[data-theme="dark"] .button-mp__logo--white { display: none; }

/* Estado vacío: contenido y botón al centro. */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; padding: 3rem 1.5rem; }
.empty-state h3 { margin: 0; font-size: 1.25rem; }
.empty-state p { margin: 0; max-width: 32rem; color: var(--muted); }
.empty-state__icon { display: grid; place-items: center; width: 4rem; height: 4rem; margin-bottom: .4rem; border-radius: 50%; background: var(--peach, var(--line)); color: var(--coral, var(--muted)); }
.empty-state__icon .icon { width: 1.8rem; height: 1.8rem; }
.empty-state__button { margin-top: 1rem; justify-content: center; }

/* Portada (/): los mismos colores que /crea-tu-tienda. */
.landing .landing-badge { background: var(--peach); border-color: var(--warm-line); }
.landing .demo-card { border-color: var(--warm-line); }
.landing .demo-card__photo { background: linear-gradient(135deg, var(--peach), var(--lilac-strong)); color: var(--coral); }
.landing .step, .landing .landing-feature { border-color: var(--warm-line); }
.landing .step__icon { background: var(--peach); color: var(--coral); }
.landing .landing-feature { background: var(--lilac); border-color: transparent; }
.landing .landing-feature .step__icon { background: var(--surface); }
.landing .landing-pricing { margin-top: 2.5rem; padding: 1.75rem; background: var(--lilac); border-radius: calc(var(--radius) * 1.6); }
.landing .landing-pricing > h2 { margin-top: 0; }
.landing .checks .icon { color: var(--coral); }

/* Interruptores de sí o no del producto: la pregunta a la izquierda y el interruptor a la derecha. La declaración de +18 aparece solo si se enciende el de adultos. */
.switch-card .switch { justify-content: space-between; }
.adult-declaration { display: none; }
.switch-card:has(:checked) + .adult-declaration { display: block; }
.panel-theme .switch-card:has(:checked) { background: var(--peach); border-color: var(--warm-line); }
.panel-theme .switch__input:checked + .switch .switch__track { background: var(--coral); }
/* Pregunta poco frecuente («¿para adultos?»): sin tarjeta, texto chico y gris, interruptor más pequeño. Al encenderla vuelve a destacar. */
.switch-card--quiet:not(:has(:checked)) { border-color: transparent; background: transparent; }
.switch-card--quiet .switch { padding: .5rem .25rem; gap: .75rem; }
.switch-card--quiet .switch__text strong { font-size: .9rem; font-weight: 600; color: var(--muted); }
.switch-card--quiet .switch__text .muted { font-size: .8rem; }
.switch-card--quiet .switch__track { width: 2.5rem; height: 1.4rem; }
.switch-card--quiet .switch__track::after { top: .15rem; left: .15rem; width: 1.1rem; height: 1.1rem; }
.switch-card--quiet .switch__input:checked + .switch .switch__track::after { transform: translateX(1.1rem); }
.switch-card--quiet:has(:checked) .switch__text strong { color: var(--ink); }

/* Spinner al medio de la pantalla mientras se envía un formulario (controlador submit-spinner). */
.spinner-overlay { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; background: var(--overlay); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.spinner-overlay[hidden] { display: none; }
.spinner-overlay__text { font-weight: 600; }
.spinner { width: 3rem; height: 3rem; border: 4px solid var(--line-strong); border-top-color: var(--coral, var(--ink)); border-radius: 50%; animation: spinner-turn .8s linear infinite; }
@keyframes spinner-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
/* El link y «Copiar link» van pegados, como un solo control rectangular. */
.empty-state__actions { display: inline-flex; align-items: stretch; max-width: 100%; margin-top: .4rem; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.empty-state__actions .store-banner-head__link { min-width: 0; padding: .65rem 1rem; border-radius: 0; background: transparent; color: var(--ink); font-weight: 600; text-decoration: none; }
.empty-state__actions .store-banner-head__link:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.empty-state__copy { display: inline-flex; align-items: center; flex: none; border: 0; border-left: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); }
.empty-state__copy:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.empty-state__copy .icon, .empty-state__actions .store-banner-head__link .icon { width: 1.05rem; height: 1.05rem; margin-right: .4rem; vertical-align: -.2em; }
.empty-state__copy-done, .empty-state__copy[data-copied] .empty-state__copy-idle { display: none; }
.empty-state__copy[data-copied] .empty-state__copy-done { display: inline; color: var(--ok); }

/* Compras de prueba (?prueba=1): un aviso claro de que no es plata real, y filas con borde punteado. */
.test-banner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 1.25rem; margin: 1rem 0 1.25rem; padding: 1.25rem; background: var(--lilac, var(--surface)); border: 1px dashed color-mix(in srgb, #8b7cf6 55%, transparent); border-radius: calc(var(--radius) * 1.4); }
.test-banner__icon { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: var(--surface); color: var(--coral, var(--ink)); }
.test-banner__icon .icon { width: 1.5rem; height: 1.5rem; }
.test-banner__text { flex: 1 1 22rem; }
.test-banner h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.test-banner p { margin: 0 0 .5rem; }
.test-banner ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.sale-row--test { border-style: dashed; background: color-mix(in srgb, #8b7cf6 6%, var(--surface)); }
.sale-row__fake { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }

/* Número de productos del carro en el menú de la tienda: círculo de color, para que se note. */
.cart-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; margin-left: .25rem; padding: 0 .35rem; border-radius: 999px; background: #c9553b; color: #fff; font-size: .8rem; font-weight: 700; line-height: 1; vertical-align: .05em; }
#cart-link { font-weight: 600; text-decoration: none; }
.cart-badge--menu { margin-left: auto; }
#cart-link:hover { text-decoration: underline; }

/* Engranaje del dueño en la esquina del encabezado de su tienda: lleva a su panel. */
.store-header__settings { position: absolute; top: .75rem; right: .75rem; z-index: 2; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--overlay); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 2px 8px var(--shadow); text-decoration: none; transition: transform .15s ease; }
.store-header__settings:hover { transform: rotate(45deg); }
.store-header__settings .icon { width: 1.3rem; height: 1.3rem; }
@media (prefers-reduced-motion: reduce) { .store-header__settings { transition: none; } .store-header__settings:hover { transform: none; } }

/* Ventas cerradas: gris y con candado, para que se note que no se puede comprar. */
.product__buy--closed { display: flex; align-items: center; justify-content: center; gap: .5rem; background: color-mix(in srgb, var(--ink) 9%, var(--surface)); border-color: var(--line-strong); color: var(--muted); cursor: not-allowed; opacity: 1; }
.product__buy--closed .icon { width: 1.15rem; height: 1.15rem; }
.product-card__closed { display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; height: 2.4rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: .9rem; font-weight: 600; }
.product-card__closed .icon { width: 1rem; height: 1rem; }

/* Icono de detalles del dueño junto al nombre del producto, y la ficha del producto en el panel. */
.product__details-link { display: inline-grid; place-items: center; position: absolute; top: .75rem; right: .75rem; z-index: 2; width: 2.2rem; height: 2.2rem; margin: 0; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); text-decoration: none; background: var(--surface); }
.product__details-link:hover { color: var(--ink); border-color: var(--ink); }
.product__details-link .icon { width: 1.15rem; height: 1.15rem; }
@media (min-width: 768px) { .product:has(.product__details-link) .product__info h1 { padding-right: 2.6rem; } } /* el título no pasa por debajo del botón de la esquina */
.details-head { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.details-head h1 { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.details-head__photo { width: 72px; height: 72px; border-radius: 12px; }
.details-head__badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.details-head__badges .icon { width: .9rem; height: .9rem; margin-right: .3rem; }
.heading .actions .icon { width: 1.05rem; height: 1.05rem; margin-right: .4rem; vertical-align: -.2em; }

/* Mi perfil */
.profile-head { display: flex; align-items: center; gap: 1.1rem; margin: .5rem 0 1.25rem; min-width: 0; }
.profile-head__avatar { display: grid; place-items: center; flex: none; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--peach, var(--line)); color: var(--coral, var(--ink)); font-size: 1.8rem; font-weight: 800; }
.profile-head h1 { margin: 0 0 .15rem; overflow-wrap: anywhere; }
.profile-head .muted { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.profile-callout { margin: 0 0 1rem; padding: 1.25rem; border-radius: calc(var(--radius) * 1.4); background: var(--peach, var(--line)); }
.profile-callout h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.profile-callout p { margin: 0 0 1rem; }
.profile-card h2 { margin: 0; font-size: 1.1rem; }
.profile-rows { margin: .5rem 0 0; }
.profile-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--warm-line, var(--line)); }
.profile-rows > div:first-child { border-top: 0; }
.profile-rows dt { color: var(--muted); flex: none; }
.profile-rows dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.profile-note { display: flex; align-items: flex-start; gap: .5rem; margin: .5rem 0 0; }
.profile-note .icon { width: 1rem; height: 1rem; flex: none; margin-top: .15rem; }
.profile-links { padding: .4rem 1.25rem; margin-top: 1rem; }
.profile-link { display: flex; align-items: center; gap: .75rem; padding: .85rem 0; border-top: 1px solid var(--warm-line, var(--line)); text-decoration: none; color: var(--ink); font-weight: 600; }
.profile-link:first-child { border-top: 0; }
.profile-link span { flex: 1; }
.profile-link .icon { width: 1.15rem; height: 1.15rem; flex: none; color: var(--muted); }
.profile-link:hover .icon:last-child { color: var(--ink); }

/* Admin: límites */
.limits-table { table-layout: fixed; width: 100%; }
.limits-table th:nth-child(1) { width: 40%; }
.limits-table th:nth-child(2) { width: 20%; }
.limits-table__value { font-weight: 700; overflow-wrap: anywhere; }
.limits-table code { font-size: .8rem; overflow-wrap: anywhere; }

/* Admin: salud de Mercado Pago */
.mp-health { --mp-warn: #d9930d; }
.mp-health__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.mp-health__head h2 { margin: 0; }
.mp-health__head .muted { margin: 0; }
.mp-health__bar { display: flex; gap: 3px; height: .7rem; margin: 1rem 0 1.25rem; }
.mp-health__seg { min-width: .7rem; border-radius: 999px; }
.mp-health__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .75rem; }
.mp-health__tile { display: grid; grid-template-columns: auto 1fr; align-items: center; align-content: start; column-gap: .6rem; row-gap: .1rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.mp-health__tile strong { font-size: 1.7rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.mp-health__label { grid-column: 1 / -1; font-weight: 600; }
.mp-health__tile .muted { grid-column: 1 / -1; margin: 0; font-size: .85rem; }
.mp-health__dot { width: .7rem; height: .7rem; border-radius: 50%; }
.mp-health__dot--ok, .mp-health__seg--ok { background: var(--ok); }
.mp-health__dot--warn, .mp-health__seg--warn { background: var(--mp-warn); }
.mp-health__dot--danger, .mp-health__seg--danger { background: var(--danger); }
.mp-health__dot--off, .mp-health__seg--off { background: var(--line-strong); }

/* Admin: logo junto al nombre de la tienda en las listas */
.admin-store-cell { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.admin-store-cell .list__photo { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }

/* Landing: beneficio de lanzamiento */
.landing-promo { margin: 0 0 1.25rem; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--peach, var(--surface)); }
.landing-promo__title { margin: 0 0 .3rem; font-size: 1.15rem; font-weight: 800; }
.landing-promo p:last-child { margin: 0; }

/* Links de cobro */
.empty-state__limits { width: 100%; max-width: 28rem; padding: 1rem 1.25rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); text-align: left; }
.empty-state__limits p { margin: 0 0 .4rem; color: var(--ink); }
.limits-list { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.pay-link { max-width: 32rem; margin-inline: auto; padding: 0; overflow: hidden; }
.pay-link__head { display: flex; align-items: center; gap: .9rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.pay-link__logo { width: 3rem; height: 3rem; flex: none; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.2rem; }
.pay-link__to { margin: 0; color: var(--muted); font-size: .9rem; }
.pay-link__store { margin: 0; font-size: 1.4rem; line-height: 1.2; }
.pay-link__body { padding: 1.25rem 1.5rem .5rem; }
.pay-link__label { margin: 0 0 .25rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.pay-link__name { margin: 0 0 .4rem; font-size: 1.25rem; }
.pay-link__description { margin: 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.pay-link__amount { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.25rem 1.5rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.pay-link__amount span { color: var(--muted); }
.pay-link__amount strong { font-size: 1.8rem; line-height: 1; }
.pay-link form, .pay-link > .pay-link__button, .pay-link__notice, .pay-link__help { margin-inline: 1.5rem; }
.pay-link__terms { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 1rem; cursor: pointer; }
.pay-link__terms input { margin-top: .3rem; flex: none; }
.pay-link__button { display: flex; justify-content: center; width: calc(100% - 3rem); padding: .85rem 1.1rem; font-size: 1.05rem; }
.pay-link form .pay-link__button { width: 100%; }
.pay-link__help { margin-top: .75rem; margin-bottom: 1.5rem; color: var(--muted); font-size: .9rem; text-align: center; }
.pay-link__notice { margin-top: 0; margin-bottom: 1.5rem; padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); }
/* Reserva con agenda (ver openspec/changes/agenda-simple). Reutiliza .pay-link para la cabecera y el total. */
.booking { max-width: 32rem; margin-inline: auto; padding: 0; overflow: hidden; }
.booking__head { display: flex; align-items: center; gap: .9rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.booking__facts { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0; color: var(--muted); }
.booking__days { display: flex; gap: .5rem; margin: 1rem 1.5rem 0; padding-bottom: .5rem; overflow-x: auto; }
.booking__day { display: grid; justify-items: center; flex: none; min-width: 3.6rem; padding: .5rem .4rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; line-height: 1.2; font-size: .8rem; }
.booking__day strong { font-size: 1.2rem; }
.booking__day[aria-current="date"] { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.booking__date { margin: 1rem 1.5rem .5rem; text-transform: capitalize; }
.booking__blocks { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 1.5rem 1.25rem; padding: 0; list-style: none; }
.booking__blocks form { margin: 0; }
.booking__block { min-width: 4.5rem; padding: .55rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: inherit; font: inherit; font-weight: 600; text-align: center; cursor: pointer; }
.booking__block:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.booking__block--idle { cursor: default; opacity: .8; display: inline-block; }
.booking__block--idle:hover { background: transparent; }
.booking__extras { margin: 1rem 1.5rem 0; padding: 0; border: 0; }
.booking__extras legend { margin-bottom: .5rem; padding: 0; font-weight: 700; }
.booking__extra { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.booking__extra + .booking__extra { margin-top: .5rem; }
.booking__extra-name { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.modality { margin: 1rem 0 0; padding: 0; border: 0; }
.modality__toggle { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font-weight: 600; cursor: pointer; }
.modality__toggle input { width: 1.1rem; height: 1.1rem; margin: 0; }
.modality__fields { display: none; padding: 1rem .25rem 0; }
.modality:has(.modality__toggle input:checked) .modality__fields { display: block; }
.modality__check { display: flex; align-items: center; gap: .5rem; margin: 0 0 .25rem; }
.agenda-modalities { margin: .25rem 0; padding-left: 1.1rem; }
.booking-row__link { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }
.booking-row__link input { flex: 1; min-width: 0; }
.booking__modalities { display: grid; gap: .75rem; margin: 0 1.5rem 1.5rem; padding: 0; list-style: none; }
.booking__date--plain { text-transform: none; }
.booking__modality { display: grid; gap: .15rem; padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.booking__modality:hover { border-color: var(--ink); }
.booking__modality-name { font-weight: 700; }
.booking__where .icon { flex: none; }
.booking__note { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.booking .pay-link__notice, .booking .pay-link__button { margin-inline: 1.5rem; }
.booking .pay-link__button { width: calc(100% - 3rem); }
.booking form .pay-link__button { width: calc(100% - 3rem); margin-bottom: 0; }
.booking__ok { margin-top: 0; }
.booking-entry { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.booking-entry__icon { display: grid; place-items: center; flex: none; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.booking-entry__icon .icon { width: 1.4rem; height: 1.4rem; }
.booking-entry__body { flex: 1; min-width: 0; }
.booking-entry__body h2 { margin: 0 0 .15rem; font-size: 1.1rem; }
.booking-entry__body p { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575px) { .booking-entry { flex-wrap: wrap; } .booking-entry .button { width: 100%; text-align: center; } }
/* Explicación de la agenda cuando aún no existe: título, tres cajas (cómo funciona, alcance, lo que no incluye) y el botón. */
.agenda-intro { --peach: color-mix(in srgb, #e8836b 22%, var(--surface)); --coral: #d9735a; display: grid; gap: 1.5rem; padding: 1rem 0 .5rem; }
:root[data-theme="dark"] .agenda-intro { --coral: #f0907a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .agenda-intro { --coral: #f0907a; } }
.agenda-intro__head { display: grid; justify-items: center; gap: .5rem; text-align: center; }
.agenda-intro__icon { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--peach); color: var(--coral); }
.agenda-intro__icon .icon { width: 1.8rem; height: 1.8rem; }
.agenda-intro__head h2 { margin: .25rem 0 0; font-size: 1.9rem; line-height: 1.15; }
.agenda-intro__head p { margin: 0; max-width: 34rem; color: var(--muted); }
.agenda-intro__grid { display: grid; gap: 1rem; }
.agenda-box { padding: 1.25rem; border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.4); background: var(--surface); }
.agenda-box__head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.agenda-box__head h4 { margin: 0; font-size: 1.15rem; }
.agenda-box__icon { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--peach); color: var(--coral); }
.agenda-box__icon .icon { width: 1.3rem; height: 1.3rem; }
.agenda-steps, .agenda-points { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.agenda-steps li, .agenda-points li { display: flex; align-items: flex-start; gap: .8rem; }
.agenda-steps strong, .agenda-points strong { display: block; line-height: 1.3; }
.agenda-steps p, .agenda-points p { margin: .1rem 0 0; color: var(--muted); font-size: .95rem; line-height: 1.4; overflow-wrap: anywhere; }
.agenda-steps__num { position: relative; display: grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: color-mix(in srgb, var(--ink) 9%, transparent); font-size: .85rem; font-weight: 700; }
.agenda-steps li:not(:last-child) .agenda-steps__num::after { content: ""; position: absolute; top: 100%; left: 50%; width: 1px; height: calc(1rem + 1.2rem); background: var(--line-strong); }
.agenda-mark { display: grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; }
.agenda-mark .icon { width: 1rem; height: 1rem; }
.agenda-mark--yes { background: var(--peach); color: var(--coral); }
.agenda-mark--no { background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); }
.agenda-intro__note { margin: 0; padding: .8rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.agenda-intro__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; }
@media (min-width: 1200px) { .agenda-intro__grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
/* Horario semanal: un interruptor por día y sus tramos con dos selectores (hora y minutos), como en tickeet. */
.sched { display: grid; gap: .75rem; }
.sched-day { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.sched-day .switch { padding: .85rem 1rem; }
.sched-day .switch__text strong { font-size: 1.05rem; }
.sched-day .switch { justify-content: space-between; }
.sched-body { display: grid; gap: .75rem; padding: .85rem 1rem 1rem; border-top: 1px solid var(--line); }
.sched-body[hidden] { display: none; }
.sched-blocks { display: grid; gap: .6rem; }
.sched-block { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .6rem 1rem; padding: .7rem .8rem; border-radius: var(--radius); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.sched-block__time { display: grid; gap: .25rem; }
.sched-block__label { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sched-clock { display: inline-flex; align-items: center; gap: .3rem; }
.sched-colon { color: var(--muted); }
.sched-block select.sched-hm { width: 4.5rem; flex: 0 0 auto; padding: .45rem .4rem .45rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; box-sizing: border-box; }
.sched-block select.sched-hm:focus { outline: 2px solid color-mix(in srgb, var(--ink) 35%, transparent); border-color: var(--ink); }
.sched-remove { display: grid; place-items: center; margin-left: auto; width: 2.4rem; height: 2.4rem; border: 0; border-radius: var(--radius); background: color-mix(in srgb, var(--danger, #c0392b) 14%, transparent); color: var(--danger, #c0392b); cursor: pointer; }
.sched-remove:hover { background: color-mix(in srgb, var(--danger, #c0392b) 24%, transparent); }
.sched-add { justify-content: center; width: 100%; }
@media (max-width: 575px) { .sched-block select.sched-hm { font-size: 16px; } }
/* Tablero de la agenda (ver openspec/changes/agenda-tablero). */
.agenda-step { margin: 0 0 .25rem; }
.agenda-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; }
.agenda-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: 1rem; }
.agenda-status p { margin: 0; }
.agenda-status form { margin: 0; }
.agenda-board { display: grid; gap: 1rem; margin-bottom: 1rem; }
.agenda-board > .card { margin: 0; min-width: 0; }
.agenda-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.agenda-section-head h2 { margin: 0; }
.agenda-summary { display: grid; gap: 1rem; margin-bottom: 1rem; }
.agenda-summary > .card { margin: 0; }
.agenda-extras-list { margin: 0; padding-left: 1.1rem; }
.agenda-table { width: 100%; border-collapse: collapse; margin-bottom: .75rem; }
.agenda-table th, .agenda-table td { padding: .55rem .25rem; border-top: 1px solid var(--line); text-align: left; font-weight: 400; }
.agenda-table tr:first-child th, .agenda-table tr:first-child td { border-top: 0; }
.agenda-table th { width: 7.5rem; font-weight: 600; }
@media (min-width: 1200px) { .agenda-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } .agenda-summary { grid-template-columns: 1fr 1fr; } }
/* Calendario del mes */
.cal__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.cal__title { flex: 1; margin: 0; font-size: 1.15rem; text-align: center; text-transform: capitalize; }
.cal__nav { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; }
.cal__nav:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.cal__today { padding: .35rem .7rem; }
.cal { display: grid; gap: .25rem; }
.cal__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
.cal__week--names span { padding: .25rem 0; color: var(--muted); font-size: .75rem; font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.cal__day { position: relative; display: grid; align-content: center; justify-items: center; gap: .15rem; min-height: 3rem; padding: .3rem .2rem; border: 1px solid transparent; border-radius: var(--radius); color: inherit; text-decoration: none; }
.cal__day:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.cal__num { font-weight: 600; line-height: 1; }
.cal__day--other { opacity: .35; }
.cal__day--off .cal__num { opacity: .45; font-weight: 400; }
.cal__day--today { border-color: var(--line-strong); }
.cal__day--today .cal__num { text-decoration: underline; text-underline-offset: .2rem; }
.cal__day--selected { background: color-mix(in srgb, var(--ink) 10%, transparent); border-color: var(--ink); }
.cal__count { display: grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--coral, #d9735a); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1; }
.cal__day-list { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.cal__day-list h3 { margin: 0 0 .5rem; font-size: 1rem; text-transform: capitalize; }
@media (max-width: 575px) { .cal__day { min-height: 2.6rem; } }
.agenda-extra { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem 0; cursor: pointer; }
.agenda-extra input { margin-top: .3rem; flex: none; }
.button--icon { display: inline-flex; align-items: center; gap: .5rem; }
.plink-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.plink-head h1 { margin: 0; overflow-wrap: anywhere; }
.plink-head p { margin: .2rem 0 0; }
.plink-status { flex: none; }
.plink-status--active { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.plink-status--used { background: color-mix(in srgb, #2563eb 13%, transparent); color: color-mix(in srgb, #2563eb 78%, var(--ink)); }
.plink-status--expired { background: #fdf0d5; color: #8a5a00; }
.plink-status--disabled { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--muted); }
.plink-status--deleted { background: #fde8e8; color: var(--danger, #b42318); }
.plink-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; align-items: start; }
.plink-amount { margin: 0 0 .5rem; font-size: 2rem; font-weight: 700; line-height: 1.1; }
.plink-desc { margin: 0 0 1rem; white-space: pre-line; overflow-wrap: anywhere; }
.plink-buyer { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.plink-buyer p { margin: 0; }
.details--money dt:last-of-type, .details--money dd:last-of-type { padding-top: .6rem; border-top: 1px solid var(--line); }
.details--money dd:last-of-type { font-size: 1.35rem; }
.details--money dt:last-of-type { color: var(--ink); font-weight: 600; }
.details--money dd { text-align: right; }
.plink-delete { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.plink-delete .link-button--danger { margin-top: 0; font-size: .9rem; }

/* Recorte de imágenes antes de subirlas (controlador file-picker con Cropper.js). */
.modal--crop { width: min(40rem, calc(100vw - 2rem)); }
/* Sin animación de apertura: Cropper mide la imagen al abrirse y una escala en curso lo descuadra. */
.modal--crop[open] { animation: none; }
.crop-stage { border-radius: var(--radius); overflow: hidden; background: var(--line); }
.crop-stage cropper-canvas { width: 100%; height: min(22rem, 55vh); }
.crop-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .75rem; }
.crop-tools .muted { margin: 0; font-size: .85rem; }
.crop-zoom { display: flex; gap: .4rem; flex: none; }

/* Formulario de producto: el archivo que se vende (privado) y las fotos (públicas) van en bloques
   distintos, cada uno con su aviso de quién lo ve. Ver openspec/changes/feedback-usuaria-ux. */
.media-section { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); }
.media-section--private { border-left-color: #b45309; }
.media-section--public { border-left-color: #1d6fb8; }
.media-section__head { display: flex; align-items: flex-start; gap: .75rem; margin: 0 0 .9rem; }
.media-section__head h3 { margin: 0 0 .15rem; font-size: 1.05rem; }
.media-section__icon { display: inline-flex; flex: none; padding: .45rem; border-radius: 50%; background: color-mix(in srgb, currentColor 12%, transparent); }
.media-section--private .media-section__icon { color: #b45309; }
.media-section--public .media-section__icon { color: #1d6fb8; }
.media-section__who { margin: 0; color: var(--muted); }
.media-section .field { margin-bottom: 0; }
.media-section__warning { margin: .6rem 0 0; padding: .6rem .75rem; border-radius: 8px; background: color-mix(in srgb, #d9a400 16%, transparent); border: 1px solid color-mix(in srgb, #d9a400 55%, transparent); }
.media-section__warning[hidden] { display: none; }
.media-section__who strong { color: var(--ink); }
/* Recuadro para subir el archivo vendible: el input real queda encima, transparente, y sirve para hacer clic y para arrastrar. */
.field label.dropzone { position: relative; display: grid; justify-items: center; gap: .3rem; margin: 0; padding: 1.5rem 1rem; text-align: center; font-weight: 400; cursor: pointer;
  border: 2px dashed color-mix(in srgb, #b45309 50%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, #b45309 5%, var(--surface)); }
.dropzone:hover, .dropzone[data-dragging] { background: color-mix(in srgb, #b45309 12%, var(--surface)); border-color: #b45309; }
.dropzone:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.field label.dropzone[data-chosen] { border-style: solid; }
.dropzone__icon { display: inline-flex; padding: .55rem; border-radius: 50%; color: #b45309; background: color-mix(in srgb, #b45309 14%, transparent); }
.dropzone__icon .icon { width: 1.4rem; height: 1.4rem; }
.dropzone__title { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.dropzone__hint { color: var(--muted); overflow-wrap: anywhere; }
.dropzone[data-chosen] .dropzone__hint { color: var(--ink); font-weight: 600; }
.dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* Cabecera del formulario de producto: el recuadro de fotos (hasta 8, públicas) a la izquierda del nombre. El input real queda encima, transparente. */
.product-head { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .4rem 1rem; align-items: start; margin-bottom: 1rem; }
.product-head__name { margin: 0; }
.product-head__note { grid-column: 1 / -1; }
.product-head__note p { margin: .2rem 0 0; }
.product-head__note .icon { width: 1rem; height: 1rem; margin-right: .35rem; vertical-align: -.15em; }
.photo-tile { position: relative; display: grid; place-items: center; align-content: center; gap: .2rem; width: 6.5rem; height: 6.5rem; overflow: hidden; text-align: center; cursor: pointer;
  border: 2px dashed color-mix(in srgb, #1d6fb8 50%, var(--line)); border-radius: 12px; background: color-mix(in srgb, #1d6fb8 6%, var(--surface)); }
.photo-tile:hover { background: color-mix(in srgb, #1d6fb8 14%, var(--surface)); border-color: #1d6fb8; }
.photo-tile:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.photo-tile__empty { display: inline-flex; color: #1d6fb8; }
.photo-tile__empty .icon { width: 1.6rem; height: 1.6rem; }
.photo-tile__text { padding: 0 .3rem; font-size: .8rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.photo-tile__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-tile__badge { position: absolute; left: .3rem; right: .3rem; bottom: .3rem; padding: .1rem .3rem; border-radius: 999px; background: rgb(0 0 0 / .65); color: #fff; font-size: .75rem; font-weight: 600; }
.photo-tile__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
@media (max-width: 480px) {
  .product-head { grid-template-columns: 5.5rem minmax(0, 1fr); gap: .4rem .75rem; }
  .photo-tile { width: 5.5rem; height: 5.5rem; }
}

/* Pestañas (Configuración: General, Diseño, Pagos, Avanzado) en el celular y en pantallas angostas: no caben con
   iconos y se salían de la raya. Hasta 600 px van sin iconos y con menos relleno; si aun así no caben, se desplazan solas. */
@media (max-width: 600px) {
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs__tab { flex: none; white-space: nowrap; padding: .6rem .45rem; gap: 0; font-size: .9rem; }
  .tabs__tab .icon { display: none; }
}
@media (max-width: 480px) {
  /* Botón de Mercado Pago: con 130 px de logo (el mínimo oficial es 120) el texto cabe en una línea. */
  .button-mp { padding-left: 1rem; }
  .button-mp__text { white-space: nowrap; }
  .button-mp__logo { width: 130px; min-width: 130px; }
}

/* Modal de error de subida: los datos técnicos pueden ser largos (el navegador, la dirección). */
.upload-error__details { font-size: .9rem; }
.upload-error__details dd { font-weight: 400; overflow-wrap: anywhere; }
.modal--scroll { max-height: calc(100dvh - 2rem); overflow-y: auto; }

/* Zona de despacho (Configuración → Despacho): una región por bloque, con sus comunas dentro. */
.delivery-zone { display: grid; gap: .5rem; margin: 1rem 0; }
.delivery-zone__region { border: 1px solid var(--line); border-radius: 12px; padding: .25rem .75rem; }
.delivery-zone__summary { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; cursor: pointer; }
.delivery-zone__region-name { font-weight: 600; flex: 1; cursor: pointer; }
.delivery-zone__count { white-space: nowrap; }
.delivery-zone__communes { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .25rem .75rem; padding: .25rem 0 .75rem; }
.delivery-zone__commune { display: flex; align-items: center; gap: .4rem; }

/* Campos con fondo #434344 en el tema oscuro (clase `dark-inputs` en el formulario; hoy: dirección de entrega y producto nuevo). */
:root[data-theme="dark"] .dark-inputs :is(input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=color]), select, textarea) { background: #434344; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .dark-inputs :is(input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=color]), select, textarea) { background: #434344; } }

/* Lista de productos: «Público» y «Ventas abiertas» más chicos. */
