/* =========================================================
   PANEL DEL VENDEDOR (/cuenta/) · mismo mundo tipo app que
   Personalizar (editor.css aporta los tokens --ed-* y los
   controles ed-*). Lienzo gris, tarjetas agrupadas tipo iOS,
   navegación lateral en computadora y pestañas en el celular.
   ========================================================= */

.panel-body { min-height: 100dvh; background: var(--ed-canvas); }
.panel-body ::selection { background: color-mix(in srgb, var(--accent) 65%, transparent); color: var(--on-accent); }
html:has(.panel-body) { scroll-padding-top: 76px; }

/* ---------- Barra superior ---------- */
.pn-bar { position: sticky; z-index: 30; top: 0; height: var(--ed-bar-h); padding: 0 16px 0 20px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--ed-hair); background: color-mix(in srgb, var(--ed-surface) 86%, transparent); backdrop-filter: saturate(1.5) blur(14px); }
.pn-brand { flex: none; }
.pn-bar-store { min-width: 0; overflow: hidden; color: var(--ink-2); font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease-out), transform .35s var(--ease-out); }
.pn-bar-store.is-shown { opacity: 1; transform: none; }
.pn-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.pn-bar-actions form { margin: 0; }
.pn-bar-actions .ed-text-button { white-space: nowrap; }
.pn-bar-link { min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; border-radius: 10px; color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background-color .2s var(--ease-out); }
.pn-bar-link:hover { background: var(--ed-fill-hover); }
.pn-bar-link:focus-visible { outline: none; box-shadow: var(--ed-ring); }
.pn-bar-link .icon { width: 18px; height: 18px; }
.pn-bar .theme-button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; }
.pn-bar .theme-button:hover { background: var(--ed-fill-hover); }

/* ---------- Estructura ---------- */
.pn-shell { max-width: 1360px; margin: 0 auto; padding: 28px 24px 64px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; align-items: start; gap: 36px; }

/* Navegación lateral. */
.pn-side { position: sticky; top: calc(var(--ed-bar-h) + 24px); display: grid; gap: 2px; }
.pn-side-title { margin: 18px 12px 6px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.pn-nav-item { min-height: 40px; padding: 0 12px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 11px; border-radius: 10px; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; transition: background-color .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.pn-nav-item .icon { width: 19px; height: 19px; color: var(--ink-2); transition: color .2s var(--ease-out); }
.pn-nav-item em { color: var(--ink-2); font-size: 12px; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.pn-nav-item .pn-external { width: 14px; height: 14px; }
.pn-nav-item:hover { background: var(--ed-fill); }
.pn-nav-item.is-current { background: var(--ed-surface); box-shadow: var(--ed-lift), 0 0 0 1px var(--ed-hair); }
.pn-nav-item.is-current .icon { color: var(--ink); }
.pn-nav-item:focus-visible { outline: none; box-shadow: var(--ed-ring); }

/* ---------- Contenido ---------- */
.pn-main { min-width: 0; max-width: 780px; display: grid; gap: 40px; }
.pn-section { display: grid; gap: 14px; scroll-margin-top: 76px; }
#inicio { gap: 16px; }
.pn-group { display: grid; gap: 10px; }
.pn-group-head { min-height: 36px; padding: 0 4px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.pn-group-head h2 { display: flex; align-items: baseline; gap: 8px; font-size: 20px; font-weight: 760; letter-spacing: -.01em; }
.pn-group-head h2 .mono { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.pn-group-head > span.mono, .pn-head-note { color: var(--ink-2); font-size: 13px; font-weight: 550; }
.pn-foot { padding: 0 4px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }

.pn-card { margin: 0; overflow: hidden; border-radius: 16px; background: var(--ed-surface); box-shadow: 0 0 0 1px var(--ed-hair); }

/* Saludo y nombre. */
.pn-hello { padding: 4px 4px 0; }
.pn-greeting { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; font-weight: 550; }
.pn-store-name { overflow-wrap: anywhere; font-size: clamp(30px, 4.2vw, 44px); font-weight: 820; line-height: 1.02; letter-spacing: -.03em; }

/* Botones. */
.pn-button { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: background-color .2s var(--ease-out), opacity .2s var(--ease-out), transform .2s var(--ease-out); }
.pn-button .icon { width: 17px; height: 17px; }
.pn-button-soft { background: var(--ed-fill); color: var(--ink); }
.pn-button-soft:hover { background: var(--ed-fill-hover); }
.pn-button:active { transform: scale(.97); }
.pn-button:focus-visible { outline: none; box-shadow: var(--ed-ring); }
.pn-button-small { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.ed-primary.pn-button { color: var(--paper); }
.ed-primary.is-copied { background: var(--accent); color: var(--on-accent); }

/* Enlace para compartir. */
.pn-share { padding: 14px; display: grid; gap: 12px; }
.pn-share-url { min-height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border-radius: 12px; background: var(--ed-fill); font-size: 14px; }
.pn-share-url .icon { width: 17px; height: 17px; flex: none; color: var(--ink-2); }
.pn-share-url a[data-store-link] { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--ink); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.pn-share-url a[data-store-link]:hover { text-decoration: underline; text-underline-offset: 3px; }
.pn-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Cambiar la dirección web ahí mismo (sin JavaScript se abre con #cambiar-direccion). */
.pn-slug-toggle { width: 32px; height: 32px; margin-right: -8px; flex: none; display: grid; place-items: center; border-radius: 8px; color: var(--ink-2); transition: background-color .2s var(--ease-out), color .2s var(--ease-out); }
.pn-slug-toggle:hover { background: var(--ed-fill-hover); color: var(--ink); }
.pn-slug-toggle:focus-visible { outline: none; box-shadow: var(--ed-ring); }
.pn-slug-edit { display: none; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pn-slug-edit:target, .pn-slug-edit.is-open { display: grid; animation: pn-slug-in .28s var(--ease-out); }
.pn-share:has(.pn-slug-edit:target) [data-slug-view], .pn-share.is-editing [data-slug-view],
.pn-share:has(.pn-slug-edit:target) .pn-share-actions, .pn-share.is-editing .pn-share-actions { display: none; }
@keyframes pn-slug-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pn-slug-label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.pn-slug-input { min-width: 0; min-height: 44px; padding: 0 0 0 14px; display: flex; align-items: center; border-radius: 12px; background: var(--ed-fill); font-size: 14px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .2s var(--ease-out); }
.pn-slug-input:focus-within { box-shadow: var(--ed-ring); }
.pn-slug-input span { flex: none; color: var(--ink-2); white-space: nowrap; }
.pn-slug-input input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]) { width: auto; min-width: 0; height: 44px; min-height: 0; flex: 1 1 auto; margin: 0; padding: 0 14px 0 1px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); font: inherit; outline: none; }
.pn-slug-input input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):focus { border: 0; box-shadow: none; outline: none; }
.pn-slug-input.is-invalid { box-shadow: inset 0 0 0 1.5px var(--danger); }
.pn-slug-help, .pn-slug-error { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.pn-slug-help [data-slug-warning] { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--ink); }
.pn-slug-help [data-slug-warning][hidden] { display: none; }
.pn-slug-error { color: var(--danger); font-weight: 600; }
.pn-slug-actions { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.pn-slug-actions [disabled] { opacity: .6; }
@media (max-width: 639px) {
  .pn-slug-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn-slug-input { font-size: 16px; } /* 16px evita que el iPhone haga zoom al escribir. */
}
/* En el celular: Copiar a todo el ancho y los otros dos lado a lado. */
@media (max-width: 639px) {
  .pn-share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn-share-actions .ed-primary { grid-column: 1 / -1; }
}

/* Lista agrupada (filas con filete compartido). */
.pn-list { margin: 0; padding: 0; list-style: none; }
.pn-row { min-height: 56px; padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 12px; }
.pn-row + .pn-row { border-top: 1px solid var(--ed-hair); }
.pn-row-text { min-width: 0; flex: 1 1 auto; display: grid; gap: 2px; }
.pn-row-text strong { overflow: hidden; font-size: 14.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.pn-meta { min-width: 0; overflow: hidden; display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.pn-row-link { min-width: 0; flex: 1 1 auto; margin: -10px 0 -10px -16px; padding: 10px 0 10px 16px; display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.pn-row-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.pn-row-link:focus-visible { outline: none; box-shadow: inset var(--ed-ring); }
.pn-chevron { width: 16px; height: 16px; flex: none; color: var(--ink-2); }
.pn-row-action { flex: none; min-height: 34px; padding: 0 8px 0 12px; display: inline-flex; align-items: center; gap: 4px; border-radius: 9px; color: var(--ink); font-size: 13.5px; font-weight: 650; text-decoration: none; transition: background-color .2s var(--ease-out); }
.pn-row-action:hover { background: var(--ed-fill); }
.pn-row-action .icon { width: 15px; height: 15px; color: var(--ink-2); }
.pn-delete, .pn-duplicate { color: var(--ink-2); }
.pn-duplicate:hover { color: var(--ink); }
.pn-row-form { flex: none; margin: 0; }
.pn-delete:hover { color: var(--danger); }
.pn-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ed-hair-strong); }
.pn-dot.is-on { background: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); }

/* Lista para vender. */
.pn-progress { height: 4px; margin: 14px 16px 2px; overflow: hidden; border-radius: 999px; background: var(--ed-fill); }
.pn-progress span { display: block; height: 100%; border-radius: inherit; background: var(--ink); transform-origin: left; }
.pn-reveal-ready .pn-progress span { transform: scaleX(0); transition: transform 1.1s var(--ease-out) .25s; }
.pn-reveal-ready .is-in .pn-progress span { transform: none; }
.pn-check-mark { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ed-hair-strong); color: var(--ink-2); }
.pn-check-mark .icon { width: 15px; height: 15px; }
.pn-check.is-done .pn-check-mark { background: var(--ink); box-shadow: none; color: var(--paper); }
.pn-check.is-done .pn-row-text strong { color: var(--ink-2); font-weight: 550; text-decoration: line-through; text-decoration-color: var(--ed-hair-strong); }

/* Resumen. */
.pn-stats { padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; }
.pn-stats li { padding: 14px 16px; display: grid; gap: 2px; }
.pn-stats li + li { border-left: 1px solid var(--ed-hair); }
.pn-stat-value { font-size: 26px; font-weight: 760; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pn-stat-label { color: var(--ink-2); font-size: 12.5px; font-weight: 550; }

/* Productos. */
.pn-search { position: relative; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--ed-hair); }
.pn-search > .icon { position: absolute; margin-left: 12px; width: 17px; height: 17px; color: var(--ink-2); pointer-events: none; }
.pn-search input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]) { min-height: 38px; padding: 8px 12px 8px 38px; border: 0; border-radius: 10px; background: var(--ed-fill); font-size: 14.5px; }
.pn-search input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):focus { background: var(--ed-surface); box-shadow: inset 0 0 0 1px var(--ed-hair-strong), var(--ed-ring); }
.pn-search-count { flex: none; color: var(--ink-2); font-size: 12.5px; }
.pn-search-count:empty { display: none; }
.pn-empty-search { padding: 18px 16px; color: var(--ink-2); font-size: 13.5px; }
.pn-empty-search[hidden] { display: none; }
.pn-product[hidden] { display: none; }
.pn-product-main { min-width: 0; flex: 1 1 auto; margin: -10px 0 -10px -16px; padding: 10px 0 10px 16px; display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.pn-product-main:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.pn-product-main:focus-visible { outline: none; box-shadow: inset var(--ed-ring); }
.pn-thumb { width: 52px; height: 52px; flex: none; border-radius: 11px; object-fit: cover; background: var(--ed-fill); transition: filter .3s var(--ease-out), opacity .3s var(--ease-out); }
.pn-thumb-empty { display: grid; place-items: center; color: var(--ink-2); font-size: 18px; font-weight: 750; }
.pn-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 13.5px; font-weight: 650; }
.pn-price small { color: var(--ink-2); font-size: 12px; font-weight: 550; }
.pn-price .price-was { color: var(--ink-2); font-weight: 500; }
.pn-price .discount-note { color: var(--ink-2); font-size: 12px; font-weight: 550; }
.pn-price .discount-note .icon { width: 12px; height: 12px; margin-right: 2px; vertical-align: -1px; }
.is-hidden-product .pn-thumb { filter: grayscale(1); opacity: .5; }
.is-hidden-product .pn-row-text strong { color: var(--ink-2); }
.pn-toggle-form { flex: none; margin: 0; display: flex; flex-direction: row-reverse; align-items: center; gap: 10px; }
.pn-status { width: 70px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; text-align: right; }

/* Interruptor (botón) tipo iOS: funciona sin JavaScript. */
.pn-switch { position: relative; width: 46px; height: 28px; flex: none; padding: 0; border: 0; border-radius: 999px; background: var(--ed-hair-strong); cursor: pointer; transition: background-color .25s var(--ease-out); }
.pn-switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px color-mix(in srgb, #000 30%, transparent); transition: transform .3s var(--ease-out); }
.pn-switch[aria-pressed="true"] { background: var(--ink); }
:root[data-theme="dark"] .pn-switch[aria-pressed="true"] { background: var(--accent); }
.pn-switch[aria-pressed="true"] span { transform: translateX(18px); }
.pn-switch:focus-visible { outline: none; box-shadow: var(--ed-ring); }
.pn-switch:disabled { cursor: progress; }

/* Banners. */
.pn-banner-chip { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--chip-bg); color: var(--chip-fg); font-size: 14px; font-weight: 800; box-shadow: inset 0 0 0 1px var(--ed-hair); }

/* Vacíos. */
.pn-empty { padding: 28px 20px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.pn-empty > .icon { width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: var(--ed-fill); color: var(--ink-2); }
.pn-empty h3 { font-size: 17px; font-weight: 720; }
.pn-empty p { max-width: 42ch; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }

/* Aviso de tienda suspendida. */
.pn-alert { padding: 14px 16px; display: grid; gap: 4px; border-radius: 16px; background: color-mix(in srgb, var(--danger) 10%, var(--ed-surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.pn-alert strong { color: var(--danger); font-size: 14.5px; }
.pn-alert p { color: var(--ink); font-size: 13.5px; line-height: 1.5; }

/* Descuentos. */
.pn-discount { padding: 16px; display: grid; gap: 18px; }
.pn-fieldset { margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; border: 0; }
.pn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pn-chip { position: relative; cursor: pointer; }
.pn-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pn-chip span { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 10px; background: var(--ed-fill); color: var(--ink); font-size: 13.5px; font-weight: 650; transition: background-color .2s var(--ease-out), color .2s var(--ease-out); }
.pn-chip:hover span { background: var(--ed-fill-hover); }
.pn-chip input:checked + span { background: var(--ink); color: var(--paper); }
.pn-chip input:focus-visible + span { box-shadow: var(--ed-ring); }
.pn-inline-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pn-percent { position: relative; width: 120px; }
.pn-percent > span { position: absolute; top: 50%; right: 12px; color: var(--ink-2); transform: translateY(-50%); pointer-events: none; }
.pn-discount input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]) { min-height: 40px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; background: var(--ed-fill); font-size: 14.5px; }
.pn-discount input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):focus { border-color: var(--ed-hair-strong); background: var(--ed-surface); box-shadow: var(--ed-ring); }
.pn-percent input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]) { padding-right: 30px; --mono: 1; font-variant-numeric: tabular-nums; }
.pn-discount .schedule legend { font-size: 13px; font-weight: 650; }
.pn-discount .schedule-when .segment span { min-height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--ed-fill); font-size: 13.5px; }
.pn-discount .schedule-when .segment input:checked + span { background: var(--ink); color: var(--paper); }
.pn-discount .schedule-panel { padding: 14px; border: 0; border-radius: 12px; background: var(--ed-fill); }
.pn-discount .schedule-panel input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]) { background: var(--ed-surface); }
.pn-discount .day-chip span { border: 0; border-radius: 9px; background: var(--ed-surface); }
.pn-discount .day-chip input:checked + span { background: var(--ink); color: var(--paper); }
.pn-discount .suggest-chip { border: 0; background: var(--ed-surface); }
.pn-discount .schedule-summary { border-top-color: var(--ed-hair); }
.pn-check-row { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 550; line-height: 1.4; cursor: pointer; }
.pn-form-foot { padding-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; border-top: 1px solid var(--ed-hair); }
.pn-form-foot .discount-preview { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.pn-form-foot .discount-preview strong { color: var(--ink); }
.pn-card.schedule-status.pn-list { margin: 0; border-top: 0; display: block; }
/* Gana a las reglas viejas de .schedule-status li (platform.css): mismo relleno que el resto de filas. */
.pn-card.schedule-status .pn-row { padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 0; font-size: inherit; }
.pn-card.schedule-status .pn-row + .pn-row { border-top: 1px solid var(--ed-hair); }
.pn-card.schedule-status .pn-row > * { grid-column: auto; }

/* ---------- Vista previa de la tienda ---------- */
.pn-preview { position: sticky; top: calc(var(--ed-bar-h) + 24px); display: grid; justify-items: center; gap: 12px; }
.pn-preview-head { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.pn-preview-head h2 { padding-left: 4px; font-size: 15px; font-weight: 720; }
.pn-preview-head .pn-bar-link .icon { width: 15px; height: 15px; }
.pn-phone.phone-preview { width: 100%; max-width: 280px; padding: 9px; border-radius: 44px; background: var(--ed-bezel); box-shadow: var(--ed-float), 0 0 0 1px var(--ed-hair); }
.pn-phone .phone-preview-screen { border-radius: 36px; }
.pn-preview-edit { width: 100%; max-width: 280px; }

/* ---------- Pestañas del celular ---------- */
.pn-tabs { display: none; }

/* ---------- Entradas al desplazarse ---------- */
.pn-reveal-ready [data-pn-reveal] { transition: opacity .55s var(--ease-out) var(--pn-delay, 0ms), transform .7s var(--ease-out) var(--pn-delay, 0ms); }
.pn-reveal-ready [data-pn-reveal]:not(.is-in) { opacity: 0; transform: translateY(14px); }

/* ---------- Avisos ---------- */
.panel-body .message-stack { top: calc(var(--ed-bar-h) + 10px); }
.panel-body .toast { top: auto; bottom: 28px; }

/* ---------- Pantallas medianas: sin columna de vista previa ---------- */
@media (max-width: 1240px) {
  .pn-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .pn-preview { display: none; }
}

/* ---------- Tableta y celular: pestañas abajo ---------- */
@media (max-width: 960px) {
  .pn-shell { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pn-side { display: none; }
  .pn-main { max-width: none; gap: 32px; }
  .pn-bar { padding: 0 8px 0 16px; gap: 10px; }
  .pn-bar-link span { display: none; }
  .pn-bar-link { width: 36px; padding: 0; justify-content: center; }
  .pn-tabs { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ed-hair); background: color-mix(in srgb, var(--ed-surface) 88%, transparent); backdrop-filter: saturate(1.5) blur(16px); }
  .pn-tabs a { min-height: 50px; display: grid; justify-items: center; align-content: center; gap: 3px; border-radius: 10px; color: var(--ink-2); font-size: 10.5px; font-weight: 650; text-decoration: none; transition: color .2s var(--ease-out); }
  .pn-tabs a .icon { width: 23px; height: 23px; }
  .pn-tabs a .icon { width: 44px; height: 28px; padding: 3px 11px; border-radius: 999px; transition: background-color .25s var(--ease-out); }
  .pn-tabs a.is-current { color: var(--ink); font-weight: 760; }
  .pn-tabs a.is-current .icon { background: var(--ed-fill-hover); stroke-width: 2.1; }
  .pn-tabs a:focus-visible { outline: none; box-shadow: var(--ed-ring); }
  .panel-body .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  .pn-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn-stats li:nth-child(3) { border-left: 0; }
  .pn-stats li:nth-child(n + 3) { border-top: 1px solid var(--ed-hair); }
  .pn-status { display: none; }
  .pn-bar form .ed-text-button { padding: 0 8px; font-size: 13px; }
  .pn-thumb { width: 46px; height: 46px; }
  /* Pasos de la lista y horarios de descuento: se leen completos en dos líneas. */
  .pn-check .pn-row-text strong, .schedule-status .pn-meta { white-space: normal; line-height: 1.35; }
  .pn-check { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 4px 12px; }
  .pn-check .pn-check-mark { grid-row: 1 / span 2; }
  .pn-check .pn-row-action { grid-column: 2; justify-self: start; min-height: 30px; margin-left: -8px; padding: 0 8px; }
  /* El nombre del producto puede ocupar dos líneas antes de cortarse. */
  .pn-product .pn-row-text strong { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
  .pn-product .pn-meta { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
}

/* Un total que cambia por el interruptor de un producto late un instante. */
.pn-stat-value.is-bumped { animation: pn-bump .5s var(--ease-out); }
@keyframes pn-bump { 35% { transform: translateY(-3px); color: var(--ink); } }
.pn-stat-value { display: inline-block; }
