/* Zapatillas Secretas — diseño sobrio, móvil primero.
   Marfil #FBF9F5 · Tinta #221E1A · Arena/Dorado apagado #B08A47 */

:root {
  --bg: #FBF9F5;
  --bg-card: #FFFFFF;
  --ink: #221E1A;
  --ink-soft: #4C4640;
  --muted: #7A7268;
  --line: #E9E2D6;
  --accent: #B08A47;
  --accent-soft: #F3EBDC;
  --ok-bg: #EAF3EA; --ok-ink: #2F5D3A;
  --err-bg: #F7E9E7; --err-ink: #8A3A2E;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(34, 30, 26, .07);
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.no-margin { margin: 0; padding-left: 1.1rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 99;
}
.skip:focus { left: 0; }

/* ---------- Cabecera ---------- */
.site-head { padding: 18px 0; }
.site-head--solid { border-bottom: 1px solid var(--line); background: var(--bg-card); }
.head-grid { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; justify-content: space-between; }
.brand { text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--font-serif); font-size: 1.35rem; letter-spacing: .01em; display: block; }
.brand-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.head-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: .95rem; }
.head-nav a { color: var(--ink-soft); text-decoration: none; padding: 4px 2px; }
.head-nav a:hover, .head-nav a:focus { color: var(--accent); }
.head-nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent); }
.lang-switch { text-transform: capitalize; }
.inline-form { display: inline; }
.link-btn {
  background: none; border: 0; padding: 4px 2px; color: var(--ink-soft);
  font: inherit; cursor: pointer;
}
.link-btn:hover { color: var(--accent); }

/* ---------- Hero / tarjeta de invitación ---------- */
.hero { display: grid; place-items: center; padding: 7vh 0 5vh; }
.invite-card {
  max-width: 34rem; width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 48px);
  text-align: center;
  position: relative;
}
.invite-card::before {
  content: "";
  position: absolute; inset: 7px;
  border: 1px solid var(--accent-soft);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}
.card-kicker { letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; color: #8A6A2F; margin: 0 0 8px; }
.card-title { font-family: var(--font-serif); font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 10px; font-weight: 600; }
.card-sub { color: var(--ink-soft); margin: 0 0 6px; }
.card-offer { color: var(--muted); font-size: .95rem; margin: 4px 0 20px; }
.card-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.prep-note { margin-top: 22px; padding: 14px; background: var(--accent-soft); border-radius: 10px; font-size: .9rem; color: var(--ink-soft); }
.prep-title { margin: 0 0 4px; font-weight: 600; color: var(--ink); }

.landing-strip { padding: 10px 0 44px; }
.strip-list { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 0; color: var(--ink-soft); font-size: .88rem; }
.strip-list li { display: flex; align-items: baseline; }
@media (min-width: 640px) {
  .strip-list { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
  .strip-list li + li::before { content: "·"; color: var(--accent); margin-right: 24px; }
}

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-block; text-align: center; text-decoration: none; cursor: pointer;
  font: inherit; border-radius: 10px; padding: 12px 22px; border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #3A342D; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: #fff; color: var(--err-ink); border-color: var(--err-bg); }
.btn-danger:hover { background: var(--err-bg); }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: wait; }

.stack-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.stack-form label { font-size: .9rem; color: var(--ink-soft); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], select, textarea {
  font: inherit; color: var(--ink);
  width: 100%; padding: 11px 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, textarea:focus, .btn:focus, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.auth-card { max-width: 26rem; margin: 4vh auto 6vh; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(22px, 5vw, 36px); }
.auth-card h1 { font-family: var(--font-serif); margin: 0 0 6px; font-size: 1.6rem; }

.info-page { max-width: 44rem; margin: 4vh auto 6vh; }
.info-page h1 { font-family: var(--font-serif); }
.rich-text h2 { font-size: 1.15rem; margin-top: 1.6em; }

/* ---------- Avisos ---------- */
.flash { margin: 14px 0; padding: 12px 16px; border-radius: 10px; font-size: .95rem; }
.flash--ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash--err { background: var(--err-bg); color: var(--err-ink); }
.flash--demo { background: #FFF7E6; color: #7A5B16; border: 1px dashed #E4C36B; }

/* ---------- Club: catálogo ---------- */
.club-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; margin: 22px 0 6px; }
.club-head h1 { font-family: var(--font-serif); margin: 0; font-size: 1.7rem; }
.filters { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 14px 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.filters .filter-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chk { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-height: 44px; cursor: pointer; }
.chk input { width: 18px; height: 18px; }
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin: 18px 0 40px; }
.product-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.product-card:hover { border-color: var(--accent); }
.product-thumb { aspect-ratio: 1; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); font-family: var(--font-serif); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 10px 12px 12px; }
.product-name { font-size: .95rem; margin: 0 0 2px; }
.product-meta { font-size: .8rem; color: var(--muted); }
.price-row { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-weight: 600; }
.price-ref { color: var(--muted); text-decoration: line-through; font-size: .85rem; }
.badge { display: inline-block; font-size: .72rem; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: #7A5B16; }
.badge-deal { background: #3D3428; color: #F3EBDC; }

.empty-state { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty-state h2 { font-family: var(--font-serif); color: var(--ink); }

/* ---------- Ficha de producto ---------- */
.product-detail { display: grid; grid-template-columns: 1fr; gap: 22px; margin: 18px 0 40px; }
.product-gallery { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-card); }
.product-gallery img { width: 100%; display: block; }
.product-buy h1 { font-family: var(--font-serif); font-size: 1.6rem; margin: 0 0 6px; }
.variant-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.variant-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 12px; cursor: pointer; font: inherit;
}
.variant-chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.variant-chip:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; margin: 14px 0 30px; }
table.zs { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .92rem; }
table.zs th, table.zs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.zs th { background: #F6F2EA; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.zs tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; background: var(--accent-soft); color: #7A5B16; }
.pill-ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill-warn { background: #FFF7E6; color: #7A5B16; }
.pill-err { background: var(--err-bg); color: var(--err-ink); }
.pill-mut { background: #EFECE6; color: var(--muted); }

/* ---------- Carrito / checkout ---------- */
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.cart-thumb { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.totals { margin: 16px 0; display: grid; gap: 6px; max-width: 22rem; margin-left: auto; }
.totals .row { display: flex; justify-content: space-between; }
.totals .row.grand { font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; }

/* ---------- Administración ---------- */
.admin-title { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; margin: 22px 0; }
.admin-title h1 { font-family: var(--font-serif); margin: 0; font-size: 1.6rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 10px 0 26px; }
.stat { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 1.7rem; font-weight: 700; font-family: var(--font-serif); }
.stat .l { font-size: .8rem; color: var(--muted); }
.form-grid { display: grid; gap: 10px; max-width: 40rem; }
.form-grid label { font-size: .88rem; color: var(--ink-soft); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.section-note { color: var(--muted); font-size: .88rem; max-width: 46rem; }

/* ---------- Pie ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 44px; background: var(--bg-card); }
.foot-grid { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.foot-nav { justify-content: center; }
.foot-brand { margin: 0; font-family: var(--font-serif); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; }
.foot-nav a { color: var(--ink-soft); text-decoration: none; }
.foot-nav a:hover { color: var(--accent); }
.foot-note { font-size: .8rem; margin: 0; }

/* ---------- Móvil → tablet → escritorio ---------- */
@media (min-width: 640px) {
  .card-actions { flex-direction: row; justify-content: center; }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .product-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .filters { grid-template-columns: repeat(5, 1fr) auto; align-items: end; }
  .foot-grid { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
