/* Piedra & Sal — printable catch sheet.
   Palette lock: deep-sea ink + foam neutrals + ONE accent (ember).
   WhatsApp green is the single justified exception (buyer recognition).
   Shape rule: media/rows 18px · buttons full-pill. */
:root {
  --bg: #edf2f0;
  --surface: #ffffff;
  --surface-2: #dfe9e5;
  --ink: #0e2420;
  --muted: #4f645e;
  --line: #d5e0db;
  --accent: #b0491f;
  --accent-strong: #94400f;
  --accent-soft: #f6e2d4;
  --accent-ink: #ffffff;
  --shadow: 0 18px 40px -18px rgba(12, 56, 48, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }

/* ---------- sheet ---------- */
.page { max-width: 780px; margin: 0 auto; padding: 32px 20px 48px; }
.langbar { display: flex; justify-content: center; margin-bottom: 18px; }
.seg { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg button { border: 0; background: transparent; color: var(--muted); font-family: var(--font); font-weight: 800; font-size: 14px; border-radius: 999px; padding: 8px 18px; cursor: pointer; letter-spacing: 0.04em; }
.seg button.active { background: var(--accent); color: var(--accent-ink); }
.seg button:not(.active):hover { color: var(--ink); }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.sheet-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 30px 34px 22px; }
.sheet-logo { height: 64px; width: auto; flex: none; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-strong); font-weight: 700; margin: 0 0 6px; }
.sheet-head h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); letter-spacing: -0.025em; line-height: 1.05; }
.date { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- rows ---------- */
.rows { list-style: none; margin: 0; padding: 6px 34px 10px; }
.row { display: grid; grid-template-columns: 104px 1fr auto; gap: 18px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row img { width: 104px; height: 104px; object-fit: cover; border-radius: 14px; display: block; background: var(--surface-2); }
.row h3 { margin: 0 0 4px; font-size: 21px; letter-spacing: -0.015em; }
.notes { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.r-price { text-align: right; display: grid; gap: 3px; justify-items: end; }
.r-price strong { font-family: var(--mono); font-size: 24px; color: var(--accent-strong); }
.r-price strong small { font-size: 14px; }
.r-meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 4px 11px 4px 9px; background: var(--accent-soft); color: var(--accent-strong); }
.badge i { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.badge.sold { background: var(--surface-2); color: var(--muted); }
.row.sold img { filter: saturate(0.55); }
.empty { text-align: center; color: var(--muted); padding: 30px; margin: 0; }

/* ---------- footer ---------- */
.sheet-foot { padding: 8px 34px 30px; display: grid; gap: 10px; justify-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font-weight: 800; font-size: 16px; font-family: var(--font);
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 14px 28px; border: 0; cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.25s ease;
}
.btn i { font-size: 20px; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 12px 26px -14px rgba(12, 56, 48, 0.55); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
/* WhatsApp green so buyers recognize it instantly. */
.wa-btn { background: #128c4b; color: #fff; width: 100%; max-width: 460px; }
.wa-btn i { font-size: 22px; }
.join-note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- export actions (screen only) ---------- */
.actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 26px 0 0; }
.actions .msg { font-weight: 700; font-size: 14px; color: var(--muted); margin: 0; width: 100%; text-align: center; min-height: 20px; }

@media (max-width: 560px) {
  .page { padding: 20px 14px 36px; }
  .sheet-head { padding: 22px 20px 16px; }
  .rows { padding: 4px 20px 8px; }
  .row { grid-template-columns: 84px 1fr; }
  .row img { width: 84px; height: 84px; }
  .r-price { grid-column: 2; justify-items: start; text-align: left; }
  .sheet-foot { padding: 6px 20px 22px; }
}

/* ---------- print: flyer only, ink-friendly ---------- */
@page { size: letter; margin: 11mm; }
@media print {
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .sheet { border: 0; border-radius: 0; box-shadow: none; }
  .no-print, .actions { display: none !important; }
  .row { break-inside: avoid; }
  .sheet, .row img, .badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; box-shadow: none; }
}
