/* ==========================================================================
   MiauGuau — hoja de estilos
   Dirección visual: "etiqueta de envío / paquete de aduana". Superficies de
   papel kraft, rojo sello (acciones), azul airmail (secciones oscuras),
   franja diagonal tipo sobre de correo aéreo como divisor recurrente, y
   tipografía mono para precios/códigos (efecto etiqueta impresa).
   ========================================================================== */

:root {
  /* color */
  --paper: #F3E7CE;
  --paper-deep: #E3CFA5;
  --card: #FFFBF2;
  --ink: #26190F;
  --ink-soft: #5B4A38;
  --stamp: #C13A2E;
  --stamp-dark: #9C2E24;
  --airmail: #24505A;
  --airmail-dark: #1A3B43;
  --tape: #D69A2D;
  --line: rgba(38, 25, 15, 0.16);

  /* type */
  --f-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --f-body: 'Figtree', 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', 'Consolas', monospace;

  /* layout */
  --wrap: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 300;
  transition: top .2s ease;
  font-family: var(--f-mono);
  font-size: .85rem;
}
.skip-link:focus { top: 12px; }

/* focus ring: línea punteada, coherente con la estética de corte de etiqueta */
:focus-visible {
  outline: 2.5px dashed var(--stamp);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--paper);
  border-bottom: 1.5px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.wordmark-mark { color: var(--stamp); flex: none; }

.main-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--stamp); border-color: var(--stamp); }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  flex: none;
}
.cart-btn:hover { background: var(--ink); color: var(--paper); }

.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--stamp);
  color: #fff;
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper);
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: .96rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-stamp {
  background: var(--stamp);
  color: #FFF6EA;
}
.btn-stamp:hover { background: var(--stamp-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-block { width: 100%; }

.link-btn {
  background: none;
  border: none;
  padding: 10px 4px;
  color: var(--ink-soft);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: underline;
  cursor: pointer;
  width: 100%;
}
.link-btn:hover { color: var(--stamp); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--ink); color: var(--paper); }

/* ==========================================================================
   Divisor "airmail" — franja diagonal roja/crema/azul, motivo de marca
   ========================================================================== */

.airmail-divider {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--stamp) 0 18px,
    var(--card) 18px 26px,
    var(--airmail) 26px 44px,
    var(--card) 44px 52px
  );
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding-top: 64px; background: var(--paper); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 56px;
}

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--card);
  border: 1.5px dashed var(--ink);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: 999px;
  margin: 0 0 20px;
}

.hero-accent { color: var(--stamp); }

.hero-sub {
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 30px;
}

.trust-chips {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trust-chips li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: .82rem;
  color: var(--ink-soft);
}
.trust-chips svg { color: var(--airmail); flex: none; }

.hero-art { display: flex; justify-content: center; }
.parcel-illustration { width: 100%; max-width: 420px; height: auto; }

/* ==========================================================================
   Catálogo
   ========================================================================== */

.catalog-section { padding: 64px 0 56px; background: var(--paper); }

.section-eyebrow {
  font-family: var(--f-mono);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stamp);
  margin: 0 0 6px;
  font-weight: 600;
}
.section-eyebrow--light { color: var(--tape); }

.section-lede { max-width: 62ch; font-size: 1.05rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 36px;
}

.product-card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 var(--ink);
}

.product-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-deep);
  border-bottom: 1.5px solid var(--ink);
}
.product-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.ref-tag {
  position: absolute;
  left: 10px; bottom: 10px;
  background: var(--card);
  border: 1.3px dashed var(--ink);
  color: var(--ink-soft);
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 5px;
  transform: rotate(-2.5deg);
}

.product-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-body h3 { margin: 0; }

.product-bullets {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-bullets li {
  font-size: .92rem;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
}
.product-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.product-bullets li.emo::before { background: var(--stamp); }
.product-bullets li.fun::before { background: var(--airmail); }

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1.3px dashed var(--line);
}

.price {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.add-btn:hover { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.add-btn.is-added { background: var(--airmail); border-color: var(--airmail); }

/* ==========================================================================
   Envíos / ruta de seguimiento
   ========================================================================== */

.shipping-section {
  background: var(--airmail);
  color: var(--paper);
  padding: 60px 0 56px;
}
.shipping-section h2 { color: #FFF8E9; max-width: 18ch; }
.shipping-copy { color: #CFE0DF; max-width: 58ch; font-size: 1.05rem; }

.tracking-route {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: relative;
}
.tracking-route::before {
  content: "";
  position: absolute;
  top: 26px; left: 12.5%; right: 12.5%;
  height: 0;
  border-top: 2.5px dashed rgba(243, 231, 206, .45);
}
.tracking-route li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  position: relative;
}
.route-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--airmail-dark);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--tape);
  position: relative;
  z-index: 2;
}
.route-label {
  font-family: var(--f-mono);
  font-size: .88rem;
  letter-spacing: .02em;
  color: #FFF8E9;
  font-weight: 500;
}

/* ==========================================================================
   Confianza
   ========================================================================== */

.trust-section { padding: 64px 0 68px; background: var(--paper); }
.trust-section h2 { max-width: 26ch; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 32px;
}

.trust-card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px;
}
.trust-card svg { color: var(--stamp); margin-bottom: 12px; }
.trust-card h3 { margin-bottom: 6px; }
.trust-card p { margin: 0; }

.trust-disclaimer {
  margin-top: 26px;
  font-family: var(--f-mono);
  font-size: .85rem;
  color: var(--ink-soft);
  border-left: 3px dashed var(--stamp);
  padding-left: 14px;
  max-width: 68ch;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--paper-deep); padding: 44px 0 26px; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 24px;
}
.wordmark--footer { margin-right: 0; }
.footer-tag { max-width: 34ch; margin-top: 10px; font-size: .92rem; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--stamp); }

.footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
}
.footer-whatsapp:hover { background: var(--ink); color: var(--paper-deep); }

.footer-fine {
  border-top: 1.3px solid var(--line);
  padding-top: 18px;
  font-family: var(--f-mono);
  font-size: .76rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ==========================================================================
   Backdrop compartido
   ========================================================================== */

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(38, 25, 15, .5);
  z-index: 200;
  opacity: 0;
  transition: opacity .2s ease;
}
.backdrop.is-visible { opacity: 1; }

/* ==========================================================================
   Carrito (drawer)
   ========================================================================== */

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(400px, 92vw);
  background: var(--paper);
  border-left: 2px solid var(--ink);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s ease;
  padding: 22px 22px 0;
}
.cart-drawer.is-open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.drawer-head h2 { margin: 0; font-size: 1.35rem; }

.cart-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* same cascade-tie issue as .modal above */
.cart-list[hidden] { display: none; }

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1.3px dashed var(--line);
}
.cart-item img {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.3px solid var(--ink);
}
.cart-item-name { font-weight: 700; font-size: .9rem; margin: 0 0 4px; }
.cart-item-price { font-family: var(--f-mono); font-size: .82rem; color: var(--ink-soft); margin: 0; }

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}
.qty-stepper button {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.3px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.qty-stepper button:hover { background: var(--ink); color: var(--paper); }
.qty-stepper span {
  font-family: var(--f-mono);
  font-size: .85rem;
  min-width: 18px;
  text-align: center;
}

.cart-remove {
  grid-column: 3;
  justify-self: end;
  background: none;
  border: none;
  color: var(--stamp);
  font-family: var(--f-mono);
  font-size: .72rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 0;
}

.cart-empty {
  text-align: center;
  padding: 40px 6px;
  color: var(--ink-soft);
}

.drawer-foot {
  border-top: 1.5px solid var(--ink);
  padding: 16px 0 20px;
  background: var(--paper);
}
.cart-subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  font-weight: 700;
}
.cart-subtotal strong {
  font-family: var(--f-mono);
  font-size: 1.25rem;
}

/* ==========================================================================
   Modal de checkout
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
/* [hidden] and .modal{display:flex} share specificity (0,0,1,0); without
   this override the author rule wins the cascade tie and the modal stays
   visible even with the `hidden` attribute set. */
.modal[hidden] { display: none; }

.modal-panel {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 26px 30px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-head h2 { margin: 0; }

.checkout-summary {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkout-summary li {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--ink-soft);
}
.checkout-summary li span:first-child { padding-right: 12px; }
.checkout-summary li span:last-child { font-family: var(--f-mono); white-space: nowrap; }

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  padding: 12px 0;
  border-top: 1.3px dashed var(--line);
  border-bottom: 1.3px dashed var(--line);
  margin-bottom: 18px;
}
.checkout-total strong { font-family: var(--f-mono); font-size: 1.3rem; }

.form-note {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1.3px dashed var(--ink);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 0 0 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: .88rem;
  font-weight: 600;
}
.field input, .field select {
  font-family: var(--f-body);
  font-size: .95rem;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: 2.5px dashed var(--stamp);
  outline-offset: 2px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-row .field { margin-bottom: 0; }

.form-error {
  color: var(--stamp-dark);
  font-weight: 700;
  font-size: .86rem;
  margin: -4px 0 14px;
}

.checkout-confirm {
  text-align: center;
  padding: 20px 10px 6px;
}
.checkout-confirm svg { color: var(--airmail); margin-bottom: 10px; }
.checkout-confirm h3 { margin-bottom: 8px; }
.checkout-confirm p { max-width: 40ch; margin: 0 auto 22px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; margin: 0 auto; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .header-row { gap: 14px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .wordmark { font-size: 1.2rem; }
  .main-nav { gap: 16px; order: 3; width: 100%; }
  .product-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .tracking-route { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .tracking-route::before { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .footer-row { flex-direction: column; }
  .cart-item { grid-template-columns: 48px 1fr; }
  .qty-stepper { grid-column: 1 / -1; justify-self: start; }
  .cart-remove { grid-column: 1 / -1; justify-self: start; }
}

/* ==========================================================================
   Movimiento reducido
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .product-card:hover { transform: none; }
  .btn:hover { transform: none; }
}
