/* Estilos de los prototipos de pantalla. Imitan el producto final, no el documento. */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-2: #444444;
  --ink-3: #777777;
  --line: #e2e2e2;
  --line-2: #cfcfcf;
  --shade: #f6f6f6;
  --primary: #111111;
  --primary-ink: #ffffff;
  --ok: #1f6b3a;
  --warn: #8a5a00;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #ffffff; --ink: #111111; --ink-2: #444444; --ink-3: #777777; --line: #e2e2e2; --line-2: #cfcfcf;
    --shade: #f6f6f6; --primary: #111111; --primary-ink: #ffffff; --ok: #1f6b3a; --warn: #8a5a00;
  }
}
:root[data-theme="dark"] {
  --bg: #ffffff; --ink: #111111; --ink-2: #444444; --ink-3: #777777; --line: #e2e2e2; --line-2: #cfcfcf;
  --shade: #f6f6f6; --primary: #111111; --primary-ink: #ffffff; --ok: #1f6b3a; --warn: #8a5a00;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.4; }

/* Marco de teléfono: 390 x 844 */
.phone { width: 390px; min-height: 844px; margin: 0 auto; background: var(--bg); position: relative; display: flex; flex-direction: column; }
/* Chrome headless impone un ancho mínimo de ventana de 500 px: en ese rango el marco va a la izquierda
   para que capturar.ps1 pueda recortar la imagen a 390 px. */
@media (min-width: 391px) and (max-width: 600px) { .phone { margin: 0; } }
.statusbar { height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; font-size: 13px; font-weight: 600; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 16px 12px; border-bottom: 1px solid var(--line); }
.topbar .back { width: 28px; height: 28px; display: grid; place-items: center; font-size: 20px; color: var(--ink-2); }
.topbar h1 { font-size: 17px; font-weight: 600; margin: 0; flex: 1; }
.topbar .sub { font-size: 12px; color: var(--ink-3); }
.content { flex: 1; overflow: hidden; }
.pad { padding: 14px 16px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.chip { display: inline-block; font-size: 12px; padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.ok { color: var(--ok); border-color: var(--ok); }
.chip.warn { color: var(--warn); border-color: var(--warn); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }

.btn { display: block; width: 100%; text-align: center; background: var(--primary); color: var(--primary-ink); font-weight: 600; font-size: 15px; padding: 14px; border: none; border-radius: 8px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.btn.sm { padding: 8px 12px; font-size: 13px; width: auto; display: inline-block; border-radius: 6px; }
.btn.ghost.sm { font-weight: 500; }

.store-head { padding: 16px; border-bottom: 1px solid var(--line); }
.store-head .name { font-size: 20px; font-weight: 700; }
.store-head .info { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.store-head .open { color: var(--ok); font-weight: 600; }

.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; padding: 16px 16px 6px; }
.product { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.product .img { width: 64px; height: 64px; background: var(--shade); border: 1px solid var(--line); border-radius: 6px; flex: none; }
.product .body { flex: 1; min-width: 0; }
.product .name { font-weight: 600; }
.product .desc { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.product .price { font-weight: 600; margin-top: 6px; }
.product .add { width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: 6px; display: grid; place-items: center; font-size: 20px; align-self: center; }
.qty { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; align-self: center; }
.qty span { width: 30px; height: 32px; display: grid; place-items: center; font-size: 16px; }
.qty span.n { border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); font-weight: 600; font-size: 14px; }

.cartbar { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px 24px; background: #fff; border-top: 1px solid var(--line); }
.cartbar .btn { display: flex; justify-content: space-between; }

.field { margin: 0 0 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.field .input { border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 12px; font-size: 15px; min-height: 42px; }
.field .input.placeholder { color: var(--ink-3); }
.field .select { display: flex; justify-content: space-between; }
.radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.radio .dot { width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: 50%; margin-top: 2px; flex: none; }
.radio.on .dot { border: 5px solid var(--ink); }
.radio .t { font-weight: 500; }
.radio .d { font-size: 12.5px; color: var(--ink-3); }

.lines { padding: 0 16px; }
.line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.line.total { font-weight: 700; font-size: 16px; border-bottom: none; padding-top: 10px; }
.line .q { color: var(--ink-3); margin-right: 6px; }

.timeline { padding: 8px 16px; }
.step { display: flex; gap: 14px; padding: 10px 0; }
.step .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; font-size: 12px; position: relative; }
.step.done .mark { background: var(--ink); border-color: var(--ink); color: #fff; }
.step.now .mark { border-color: var(--ink); }
.step.now .mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.step .lbl { font-weight: 600; }
.step .when { font-size: 12.5px; color: var(--ink-3); }
.step.pending .lbl { color: var(--ink-3); font-weight: 500; }

.notice { margin: 12px 16px; padding: 12px; background: var(--shade); border-radius: 8px; font-size: 13.5px; }
.notice b { display: block; margin-bottom: 2px; }

/* Panel de escritorio: 1280 x 800 */
.desk { width: 1280px; height: 800px; margin: 0 auto; display: grid; grid-template-rows: 56px 1fr; background: var(--shade); overflow: hidden; }
.desk .bar { background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; padding: 0 20px; }
.desk .bar .brand { font-weight: 700; font-size: 15px; }
.desk .bar .tabs { display: flex; gap: 18px; font-size: 14px; color: var(--ink-3); }
.desk .bar .tabs .on { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--ink); padding: 17px 0; }
.desk .bar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13.5px; }
.toggle { width: 42px; height: 24px; border-radius: 12px; background: var(--ok); position: relative; }
.toggle::after { content: ""; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 16px 20px; align-content: start; }
.col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 10px; display: flex; justify-content: space-between; }
.col h2 .n { color: var(--ink); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; font-size: 13.5px; }
.card.new { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.card .h { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 4px; }
.card .h .id { font-family: ui-monospace, Consolas, monospace; }
.card .c { color: var(--ink-2); font-size: 13px; }
.card .items { margin: 8px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
.card .f { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.card .pay { font-size: 12px; color: var(--ink-3); }
.card .btn.sm { padding: 6px 10px; font-size: 12.5px; }
.card .t { font-size: 12px; color: var(--ink-3); }

/* Listado de directorio */
.shop { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.shop .logo { width: 48px; height: 48px; border-radius: 8px; background: var(--shade); border: 1px solid var(--line); flex: none; }
.shop .name { font-weight: 600; }
.shop .d { font-size: 12.5px; color: var(--ink-3); }
.shop .st { font-size: 12px; font-weight: 600; }
.shop .st.ok { color: var(--ok); }
.shop .st.off { color: var(--ink-3); }

/* Galería (index) */
.gal { max-width: 1100px; margin: 0 auto; padding: 32px 16px 80px; font-family: Georgia, serif; }
.gal h1 { font-size: 24px; margin: 0 0 4px; }
.gal .sub { color: var(--ink-3); font-style: italic; margin: 0 0 24px; }
.gal .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.gal figure { margin: 0; border-top: 2px solid var(--ink); padding-top: 10px; }
.gal figure img { width: 100%; border: 1px solid var(--line); display: block; }
.gal figure.wide { grid-column: 1 / -1; }
.gal figcaption { font-size: 13.5px; margin-top: 8px; }
.gal figcaption b { display: block; }
.gal figcaption a { color: var(--ink); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.gal .nav { font-family: ui-monospace, Consolas, monospace; font-size: 12px; margin-bottom: 20px; }
.gal .nav a { color: var(--ink); text-decoration: none; margin-right: 12px; }
