/* Crochet de Colibrí · estilos de la tienda */

:root {
  --bg: #faf6f0;
  --paper: #fffdf9;
  --sand: #f3ede5;          /* mismo beige del fondo de las fotos de catálogo */
  --ink: #2b2420;
  --ink-2: #5a4e45;
  --muted: #85786d;
  --line: #e8dfd3;
  --brand: #2f5d50;         /* verde colibrí */
  --brand-hover: #264d42;
  --brand-soft: #e4ede8;
  --accent: #c0533a;        /* hibisco */
  --accent-soft: #f8e5dd;
  --ok: #2d6a43;
  --ok-bg: #e1f0e4;
  --wait: #85560a;
  --wait-bg: #fbedd2;
  --sold: #6b625a;
  --sold-bg: #ece6df;
  --danger: #a8341f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(43, 36, 32, .05), 0 10px 30px rgba(43, 36, 32, .07);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wing: var(--accent);
  --wing-2: #e8a58f;
  --eye: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
em { font-style: italic; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.brand-name em, .footer-brand em { font-weight: 400; color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 6px; }
.nav-link { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav-link:hover { background: var(--sand); }
.cart-button {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 8px 16px 8px 12px; cursor: pointer; font-weight: 700; font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
}
.cart-button:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cart-button svg { width: 22px; height: 22px; }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .78rem; display: inline-grid; place-items: center;
}
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.3); } }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 28px; display: grid; gap: 28px; grid-template-columns: 1.15fr .85fr; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--accent); margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 16ch; }
.hero h1 em { font-weight: 400; color: var(--brand); }
.hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 46ch; margin: 18px 0 0; }
.legend { display: grid; gap: 12px; }
.legend-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.legend-item .dot { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.legend-item .dot svg { width: 22px; height: 22px; }
.legend-item strong { display: block; font-size: 1rem; }
.legend-item span { color: var(--muted); font-size: .92rem; }
.dot.ok { background: var(--ok-bg); color: var(--ok); }
.dot.wait { background: var(--wait-bg); color: var(--wait); }

/* ---------- Filtros ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 22px; flex-wrap: wrap; }
.toolbar h2 { font-size: 1.6rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .n { opacity: .65; margin-left: 4px; font-weight: 400; }

/* ---------- Grilla ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 22px; }
.card { text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.card-media {
  position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: var(--sand); box-shadow: var(--shadow);
}
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .35s ease; }
.card-media img.alt { opacity: 0; }
.card:hover .card-media img { transform: scale(1.035); }
.card:hover .card-media img.alt { opacity: 1; }
.card.is-sold .card-media img { filter: grayscale(.35); opacity: .8; }
.card-media .badge { position: absolute; left: 12px; top: 12px; }
.card-body { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 0 2px; }
.card-body h3 { font-size: 1.12rem; }
.card-sub { font-size: .86rem; color: var(--muted); margin: 2px 0 0; }
.recent { margin-top: 18px; font-size: .9rem; }
.recent a { display: block; color: var(--brand); font-weight: 700; margin-top: 4px; }
.price { font-weight: 700; white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 5px 11px 5px 9px; font-size: .78rem; font-weight: 700; letter-spacing: .01em;
  backdrop-filter: blur(6px);
}
.badge svg { width: 14px; height: 14px; }
.badge-inmediata { background: color-mix(in srgb, var(--ok-bg) 92%, transparent); color: var(--ok); }
.badge-encargo { background: color-mix(in srgb, var(--wait-bg) 92%, transparent); color: var(--wait); }
.badge-agotado { background: color-mix(in srgb, var(--sold-bg) 92%, transparent); color: var(--sold); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty svg { width: 54px; height: 54px; color: var(--brand); margin: 0 auto 10px; }

/* ---------- Cómo comprar ---------- */
.how { margin: 72px 0 24px; padding: 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; scroll-margin-top: 90px; }
.how h2 { font-size: 1.8rem; margin-bottom: 26px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-family: var(--font-display); font-weight: 600; margin-bottom: 12px;
}
.steps strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 13px 22px; font-weight: 700; font-size: 1rem; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:disabled { background: var(--muted); cursor: not-allowed; }
.btn-secondary { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-whatsapp { background: #1f7a4d; color: #fff; }
.btn-whatsapp:hover { background: #18653f; }
.btn-block { width: 100%; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.icon-button { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.icon-button:hover { background: var(--sand); }
.icon-button svg { width: 22px; height: 22px; }

/* ---------- Producto ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; margin: 22px 0 18px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.back svg { width: 18px; height: 18px; }
.back:hover { color: var(--ink); }
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: start; padding-bottom: 40px; }
.gallery-main { aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: var(--sand); box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumb { width: 76px; height: 76px; flex: none; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--sand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--brand); }
.info { position: sticky; top: 92px; }
.info h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 14px 0 6px; }
.info .price { font-size: 1.5rem; font-weight: 700; }
.avail-box { display: flex; gap: 12px; padding: 16px; border-radius: var(--radius); margin: 22px 0; font-size: .96rem; }
.avail-box svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.avail-box p { margin: 0; }
.avail-box strong { display: block; }
.avail-inmediata { background: var(--ok-bg); color: #1f4d30; }
.avail-encargo { background: var(--wait-bg); color: #6a4508; }
.avail-agotado { background: var(--sold-bg); color: var(--ink-2); }
.buy { display: grid; gap: 12px; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.qty button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.qty button:hover:not(:disabled) { background: var(--sand); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty button svg { width: 18px; height: 18px; }
.qty output { min-width: 26px; text-align: center; font-weight: 700; }
.also { font-size: .93rem; color: var(--ink-2); margin: 4px 0 0; }
.description { margin-top: 26px; color: var(--ink-2); white-space: pre-line; }
.perks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; }
.perks li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: .95rem; }
.perks svg { width: 20px; height: 20px; color: var(--brand); flex: none; }

/* ---------- Carrito ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(43, 36, 32, .35); animation: fade .2s ease; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(430px, 100%);
  background: var(--bg); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(43, 36, 32, .15);
  animation: slide .25s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.4rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer-foot { padding: 18px 20px 22px; border-top: 1px solid var(--line); background: var(--paper); }
.drawer-foot .row { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: 4px; }
.drawer-foot .note { font-size: .85rem; color: var(--muted); margin: 0 0 14px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line:last-child { border-bottom: 0; }
.line img, .line .ph { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--sand); }
.line h3 { font-family: var(--font-body); font-size: .98rem; font-weight: 700; }
.line h3 a { text-decoration: none; }
.line .kind { font-size: .84rem; color: var(--muted); margin: 2px 0 8px; }
.line .issue { font-size: .85rem; color: var(--danger); margin: 0 0 8px; }
.line .side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; height: 100%; }
.line .remove { color: var(--muted); }
.cart-empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.cart-empty svg { width: 48px; height: 48px; margin: 0 auto 10px; color: var(--brand); }

/* ---------- Checkout ---------- */
.page-title { margin: 30px 0 24px; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 36px; align-items: start; padding-bottom: 56px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.25rem; margin-bottom: 16px; }
.fields { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field .error { color: var(--danger); font-size: .84rem; margin: 0; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 14px; cursor: pointer; background: var(--bg); transition: border-color .15s, background .15s;
}
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.option input { margin-top: 4px; accent-color: var(--brand); }
.option > div { flex: 1; min-width: 0; }
.option strong { display: block; }
.option span { color: var(--muted); font-size: .9rem; }
.option .opt-price { margin-left: auto; font-weight: 700; white-space: nowrap; }
.summary { position: sticky; top: 92px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .95rem; }
.summary-line small { display: block; color: var(--muted); }
.summary-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.15rem; font-weight: 700; }
.form-error { background: var(--accent-soft); color: var(--danger); border-radius: 12px; padding: 12px 14px; font-size: .93rem; margin: 0 0 14px; }
.fine { font-size: .84rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- Pedido ---------- */
.order { max-width: 760px; margin: 0 auto; padding: 36px 0 60px; }
.order-hero { text-align: center; margin-bottom: 28px; }
.order-hero .seal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--brand-soft); color: var(--brand); }
.order-hero .seal svg { width: 32px; height: 32px; }
.order-hero h1 { font-size: clamp(1.9rem, 3.5vw, 2.5rem); }
.order-hero p { color: var(--ink-2); margin: 10px auto 0; max-width: 52ch; }
.bank { display: grid; gap: 2px; margin: 6px 0 18px; }
.bank-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.bank-row:last-child { border-bottom: 0; }
.bank-row span { color: var(--muted); font-size: .9rem; }
.bank-row > div { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.bank-row b { font-weight: 700; text-align: right; word-break: break-word; }
.bank-row .copy { margin-left: 8px; width: 32px; height: 32px; }
.bank-row .copy svg { width: 18px; height: 18px; }
.bank-row.highlight b { color: var(--brand); font-size: 1.15rem; }
.timeline { display: flex; justify-content: space-between; gap: 6px; list-style: none; padding: 0; margin: 6px 0 4px; position: relative; }
.timeline::before { content: ''; position: absolute; top: 15px; left: 8%; right: 8%; height: 2px; background: var(--line); }
.timeline li { position: relative; flex: 1; text-align: center; font-size: .84rem; color: var(--muted); }
.timeline .pip { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 8px; background: var(--paper); border: 2px solid var(--line); display: grid; place-items: center; }
.timeline .pip svg { width: 16px; height: 16px; }
.timeline li.done { color: var(--ink); font-weight: 600; }
.timeline li.done .pip { background: var(--brand); border-color: var(--brand); color: #fff; }
.timeline li.current .pip { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.status-note { text-align: center; padding: 14px; border-radius: 14px; background: var(--sold-bg); color: var(--ink-2); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Footer y toast ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 0 40px; background: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-brand { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin: 0; }
.footer-inner p { margin: 2px 0 0; }
.footer-links { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .92rem; }
.footer-links a:hover { border-color: var(--ink-2); }
.footer-links svg { width: 18px; height: 18px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2); display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px);
  animation: toast-in .25s ease;
}
.toast button { background: none; border: 0; color: #f3c9b8; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .product, .checkout { grid-template-columns: 1fr; gap: 28px; }
  .info, .summary { position: static; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .how { padding: 28px 22px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { height: 60px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.12rem; }
  .nav-link, .cart-label { display: none; }
  .cart-button { padding: 8px 12px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .card-body { flex-direction: column; gap: 2px; }
  .card-body h3 { font-size: 1rem; }
  .card-media .badge { left: 8px; top: 8px; font-size: .72rem; padding: 4px 9px 4px 7px; }
  .fields { grid-template-columns: 1fr; }
  .panel { padding: 20px 18px; }
  /* En celular el catálogo debe asomarse en la primera pantalla */
  .hero { padding: 24px 0 8px; gap: 18px; }
  .hero p.lead { font-size: 1rem; margin-top: 12px; }
  .legend { grid-template-columns: 1fr 1fr; gap: 8px; }
  .legend-item { padding: 10px 12px; gap: 10px; align-items: center; }
  .legend-item .dot { width: 30px; height: 30px; border-radius: 9px; }
  .legend-item .dot svg { width: 18px; height: 18px; }
  .legend-item strong { font-size: .86rem; line-height: 1.25; }
  .legend-item span { display: none; }
  .toolbar { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
