/* Home de tienda (home.js). Mismo lenguaje que las plantillas de CJ Intellia:
   foto a sangre, tipografía grande, bandas oscuras y tarjetas limpias. */
:root {
  --hx-ink: #0B0B10;
  --hx-ink-2: #16161D;
  --hx-paper: #FAFAF9;
  --hx-card: #F2F2F0;
  --hx-muted: #6B6B76;
  --hx-red: #E11D2E;
  --hx-red-2: #B5121F;
  --hx-radius: 22px;
}

#page-home { background: var(--hx-paper); }
#page-home .container { max-width: 1280px; }
/* La barra de progreso de scroll competía con el nav: fuera */
#scroll-progress { display: none !important; }

/* ── Hero ── */
.hx-hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: var(--hx-ink);
  isolation: isolate;
}
.hx-hero-bg, .hx-hero-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hx-hero-bg img {
  object-fit: cover; object-position: 70% 30%;
  animation: hxZoom 14s ease-out both;
}
@keyframes hxZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hx-hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,11,16,.92) 0%, rgba(11,11,16,.72) 38%, rgba(11,11,16,.12) 72%, rgba(11,11,16,0) 100%),
    linear-gradient(0deg, rgba(11,11,16,.75) 0%, rgba(11,11,16,0) 45%);
}
.hx-hero-inner {
  position: relative; z-index: 1;
  padding-top: 150px; padding-bottom: 88px;
}
.hx-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.85);
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
}
.hx-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--hx-red); box-shadow: 0 0 0 4px rgba(225,29,46,.25); }
.hx-hero-title {
  font-size: clamp(3rem, 7.4vw, 6.6rem);
  line-height: .95; font-weight: 800; letter-spacing: -.035em;
  margin: 26px 0 22px; color: #fff; max-width: 11ch;
}
.hx-hero-title em { font-style: normal; color: transparent; -webkit-text-stroke: 2px #fff; }
.hx-hero-sub {
  font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.6;
  color: rgba(255,255,255,.78); max-width: 34rem; margin: 0 0 30px;
}
.hx-hero-sub b { color: #fff; font-weight: 700; }
.hx-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 34rem; padding: 7px 7px 7px 20px;
  background: #fff; border-radius: 999px; color: var(--hx-ink);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6);
}
.hx-search svg { flex: none; color: var(--hx-muted); }
.hx-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 500 1rem var(--font); color: var(--hx-ink); padding: 10px 0;
}
.hx-search input::-webkit-search-cancel-button { display: none; }
.hx-search button {
  border: 0; cursor: pointer; border-radius: 999px; padding: 13px 24px;
  font: 700 .95rem var(--font); color: #fff; background: var(--hx-red);
  transition: background .2s;
}
.hx-search button:hover { background: var(--hx-red-2); }
.hx-hero-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }

/* ── Botones ── */
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; cursor: pointer;
  font: 700 .98rem var(--font); text-decoration: none; border: 1px solid transparent;
  transition: transform .25s var(--ease), background .2s, color .2s, box-shadow .25s;
}
.hx-btn:hover { transform: translateY(-2px); }
.hx-btn-primary { background: #fff; color: var(--hx-ink); box-shadow: 0 14px 30px -14px rgba(255,255,255,.55); }
.hx-btn-primary svg { transition: transform .25s var(--ease); }
.hx-btn-primary:hover svg { transform: translateX(4px); }
.hx-btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.06); backdrop-filter: blur(6px); }
.hx-btn-ghost:hover { background: rgba(255,255,255,.14); }
.hx-btn-light { background: #fff; color: var(--hx-ink); }
.hx-btn-dark { background: var(--hx-ink); color: #fff; }
.hx-btn-dark:hover { background: var(--hx-red); }

/* ── Franja ── */
.hx-marquee { background: var(--hx-red); color: #fff; overflow: hidden; padding: 16px 0; }
.hx-marquee-track {
  display: flex; align-items: center; gap: 34px; width: max-content;
  animation: hxMarquee 38s linear infinite;
  font-weight: 800; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.hx-marquee-track i { font-style: normal; opacity: .6; font-size: .8rem; }
@keyframes hxMarquee { to { transform: translateX(-50%); } }

/* ── Secciones ── */
.hx-section { padding: 104px 0 0; }
.hx-section-tight { padding-top: 96px; }
#page-home > .hx-section:last-child { padding-bottom: 110px; }
.hx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.hx-head-center { flex-direction: column; align-items: center; text-align: center; }
.hx-kicker { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--hx-red); margin-bottom: 10px; }
.hx-title { font-size: clamp(2.1rem, 4vw, 3.3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; margin: 0; color: var(--hx-ink); }
.hx-link { font-weight: 700; color: var(--hx-ink); text-decoration: none; white-space: nowrap; padding-bottom: 4px; border-bottom: 2px solid currentColor; }
.hx-link span { display: inline-block; transition: transform .25s var(--ease); }
.hx-link:hover { color: var(--hx-red); }
.hx-link:hover span { transform: translateX(4px); }
.hx-center { display: flex; justify-content: center; margin-top: 44px; }

/* ── Bento de categorías ── */
.hx-bento {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px; gap: 16px;
}
.hx-tile {
  position: relative; display: block; overflow: hidden; border-radius: var(--hx-radius);
  background: var(--hx-ink-2); color: #fff; text-decoration: none; isolation: isolate;
}
.hx-tile-xl { grid-column: span 2; grid-row: span 2; }
.hx-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .9s var(--ease);
}
.hx-tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(11,11,16,.82) 0%, rgba(11,11,16,.15) 55%, rgba(11,11,16,0) 100%);
}
.hx-tile:hover img { transform: scale(1.07); }
.hx-tile-info { position: absolute; left: 22px; right: 70px; bottom: 20px; display: flex; flex-direction: column; gap: 4px; }
.hx-tile-info strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hx-tile-xl .hx-tile-info { left: 32px; bottom: 30px; }
.hx-tile-xl .hx-tile-info strong { font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
.hx-tile-info small { font-size: .9rem; color: rgba(255,255,255,.78); font-weight: 500; }
.hx-tile-go {
  position: absolute; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--hx-ink);
  transform: scale(.85); opacity: .92; transition: transform .3s var(--ease), background .2s, color .2s;
}
.hx-tile:hover .hx-tile-go { transform: scale(1); background: var(--hx-red); color: #fff; }

/* ── Tarjetas de producto ── */
.hx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.hx-card { cursor: pointer; min-width: 0; }
.hx-grid.is-in .hx-card { animation: hxUp .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes hxUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hx-card-media {
  position: relative; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden;
  background: #fff; border: 1px solid rgba(11,11,16,.06);
}
.hx-card-media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease);
}
.hx-card-media img.is-fallback { object-fit: contain; padding: 30%; opacity: .5; }
.hx-card:hover .hx-card-media img { transform: scale(1.05); }
.hx-badge {
  position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--hx-ink); color: #fff;
}
.hx-card-add {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--hx-ink); color: #fff; font: 700 .9rem var(--font);
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .3s var(--ease), background .2s;
}
.hx-card:hover .hx-card-add, .hx-card-add:focus-visible { opacity: 1; transform: none; }
.hx-card-add:hover { background: var(--hx-red); }
.hx-card-add.is-added { background: #0E9F6E; opacity: 1; transform: none; }
.hx-card-add.is-added span { font-size: 0; }
.hx-card-add.is-added span::after { content: "Agregado"; font-size: .9rem; }
.hx-card-body { padding: 14px 4px 0; }
.hx-card-cat { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hx-muted); }
.hx-card-name {
  margin: 5px 0 8px; font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--hx-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
}
.hx-card-price { font-size: 1.12rem; font-weight: 800; color: var(--hx-ink); letter-spacing: -.01em; }
.hx-card-price small { font-size: .72rem; font-weight: 600; color: var(--hx-muted); }
.hx-card-price s { font-size: .85rem; font-weight: 500; color: var(--hx-muted); margin-left: 6px; }

/* ── Banda oscura ── */
.hx-promo {
  display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden;
  border-radius: 28px; background: var(--hx-ink); color: #fff; min-height: 520px;
}
.hx-promo-text { padding: 64px 60px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hx-tag { padding: 7px 14px; border-radius: 999px; background: #fff; color: var(--hx-ink); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hx-promo h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 22px 0 30px; color: #fff; }
.hx-steps { list-style: none; margin: 0 0 36px; padding: 0; display: grid; gap: 20px; }
.hx-steps li { display: flex; gap: 18px; align-items: flex-start; }
.hx-steps b { font-size: .85rem; font-weight: 800; color: var(--hx-red); padding-top: 3px; min-width: 22px; }
.hx-steps strong { display: block; font-size: 1.08rem; font-weight: 700; }
.hx-steps span { color: rgba(255,255,255,.66); font-size: .95rem; }
.hx-promo-media { position: relative; min-height: 320px; }
.hx-promo-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ── Pestañas de destacados ── */
.hx-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  padding: 6px; border-radius: 999px; background: #fff; border: 1px solid rgba(11,11,16,.08);
}
.hx-tab {
  border: 0; cursor: pointer; padding: 11px 20px; border-radius: 999px;
  font: 600 .95rem var(--font); color: var(--hx-muted); background: transparent; transition: background .2s, color .2s;
}
.hx-tab:hover { color: var(--hx-ink); }
.hx-tab.active { background: var(--hx-ink); color: #fff; }

/* ── Confianza ── */
.hx-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hx-trust > div {
  padding: 30px 26px; border-radius: var(--hx-radius); background: #fff; border: 1px solid rgba(11,11,16,.07);
  display: flex; flex-direction: column; gap: 8px;
}
.hx-trust svg { color: var(--hx-red); margin-bottom: 8px; }
.hx-trust strong { font-size: 1.1rem; color: var(--hx-ink); }
.hx-trust span { color: var(--hx-muted); font-size: .94rem; line-height: 1.5; }

/* ── Responsivo ── */
@media (max-width: 1024px) {
  .hx-grid { grid-template-columns: repeat(3, 1fr); }
  .hx-bento { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; }
  .hx-trust { grid-template-columns: repeat(2, 1fr); }
  .hx-promo-text { padding: 48px 40px; }
}
@media (max-width: 760px) {
  .hx-hero { min-height: 100svh; }
  .hx-hero-bg img { object-position: 62% 20%; }
  .hx-hero-shade { background: linear-gradient(0deg, rgba(11,11,16,.95) 0%, rgba(11,11,16,.7) 45%, rgba(11,11,16,.15) 80%); }
  .hx-hero-inner { padding-top: 120px; padding-bottom: 118px; } /* libra el dock flotante */
  .hx-hero-title { font-size: clamp(2.7rem, 13vw, 3.6rem); margin: 20px 0 16px; }
  .hx-hero-title em { -webkit-text-stroke: 1.5px #fff; }
  .hx-search button { padding: 12px 18px; }
  .hx-hero-btns .hx-btn { flex: 1 1 auto; }
  .hx-marquee { padding: 12px 0; }
  .hx-marquee-track { font-size: .85rem; gap: 24px; }
  .hx-section { padding-top: 72px; }
  .hx-head { flex-direction: column; align-items: flex-start; margin-bottom: 26px; }
  .hx-head-center { align-items: center; }
  .hx-bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; gap: 10px; }
  .hx-tile-xl { grid-column: span 2; grid-row: span 2; }
  .hx-tile-info { left: 14px; bottom: 14px; right: 48px; }
  .hx-tile-info strong { font-size: 1.1rem; }
  .hx-tile-info small { font-size: .78rem; }
  .hx-tile-go { width: 34px; height: 34px; right: 12px; bottom: 12px; }
  .hx-tile-xl .hx-tile-info { left: 20px; bottom: 20px; }
  .hx-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .hx-card-add { opacity: 1; transform: none; left: auto; right: 8px; bottom: 8px; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
  .hx-card-add span { display: none; }
  .hx-card-add.is-added span { display: none; }
  .hx-card-name { font-size: .92rem; }
  .hx-promo { grid-template-columns: 1fr; border-radius: 22px; }
  .hx-promo-text { padding: 40px 26px; }
  .hx-promo-media { min-height: 260px; order: -1; }
  .hx-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; justify-content: flex-start; scrollbar-width: none; }
  .hx-tabs::-webkit-scrollbar { display: none; }
  .hx-tab { white-space: nowrap; padding: 10px 16px; }
  .hx-trust { grid-template-columns: 1fr; }
  #page-home > .hx-section:last-child { padding-bottom: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-hero-bg img, .hx-marquee-track, .hx-grid.is-in .hx-card { animation: none; }
}
