/* =========================================================================
   VitalCigar home redesign (OpenSpec rediseno-tienda).
   Design tokens + home-only layout. Loaded ONLY when $GLOBALS["home"] is set,
   after the legacy stylesheets so it wins the cascade without !important.
   Every class is namespaced vc-home-* (guide: no collisions with legacy CSS).
   Tokens are the seed reused by later redesign phases (listados, ficha...).
   ========================================================================= */

/* Font faces and design tokens now live in css/vc-core.css, loaded sitewide
   before this sheet: the topbar and the sidebar promo cards on the rest of the
   store consume the same tokens, so there is a single source of truth. */

/* Neutralise legacy container chrome around the redesigned home only
   (modern-browser nicety; older engines just keep a 39px left padding). */
body:has(> .vc-topbar--home) .cont_index { padding-left: 0; width: 100%; float: none; }
body:has(> .vc-topbar--home) .bdcn { margin-bottom: 0; }

/* ---- Base scope ---- */
.vc-home {
  font-family: var(--vc-font);
  color: var(--vc-text);
  line-height: 1.55;
}
.vc-home *,
.vc-home *::before,
.vc-home *::after { box-sizing: border-box; }
.vc-home img { max-width: 100%; height: auto; }
.vc-home a { color: var(--vc-green-dark); }
.vc-home h1, .vc-home h2, .vc-home h3 { line-height: 1.25; margin: 0 0 0.5em; }
.vc-home h2 { font-size: 1.45rem; font-weight: 600; }

.vc-home__section {
  max-width: var(--vc-maxw);
  margin: 0 auto 44px;
  padding: 0 16px;
}

/* The benefits topbar is a sitewide component: see .vc-topbar in vc-core.css. */

/* ---- Hero ---- */
.vc-home-hero {
  text-align: center;
  padding: 44px 16px 36px;
  background: linear-gradient(180deg, var(--vc-bg-soft) 0%, var(--vc-bg) 100%);
}
.vc-home-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 14px;
}
.vc-home-hero__sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--vc-text-soft);
  max-width: 640px;
  margin: 0 auto 26px;
}
.vc-home-hero__ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.vc-home-btn {
  display: inline-block;
  font-family: var(--vc-font);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 30px;
  border-radius: var(--vc-radius);
  text-decoration: none;
  transition: background 0.15s ease;
}
.vc-home-btn--primary { background: var(--vc-action); color: #fff !important; }
.vc-home-btn--primary:hover { background: var(--vc-action-dark); }
.vc-home-btn--secondary {
  background: #fff;
  color: var(--vc-green-dark) !important;
  border: 2px solid var(--vc-green);
}
.vc-home-btn--secondary:hover { background: var(--vc-bg-soft); }

/* ---- Trust row ---- */
.vc-home-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 16px 12px;
  background: var(--vc-bg);
}
.vc-home-trust__item { text-align: center; font-size: 0.88rem; color: var(--vc-text-soft); }
.vc-home-trust__item strong { display: block; color: var(--vc-text); font-weight: 600; font-size: 0.95rem; }
.vc-home-trust__icon { display: block; margin: 0 auto 6px; width: 26px; height: 26px; color: var(--vc-green); }
@media (max-width: 760px) {
  .vc-home-trust { grid-template-columns: repeat(2, 1fr); gap: 16px 8px; }
}

/* ---- Category grid ----
   The card frame lives on the <li>, never on the inner <a>: the legacy sheet
   styles bare <a> as a block-level box on hover states elsewhere in the site,
   so every property here is stated explicitly rather than relying on the
   cascade to leave the frame alone. */
.vc-home-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.vc-home-cats > li {
  border: 1px solid var(--vc-border);
  border-radius: 12px;
  background: var(--vc-bg);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.vc-home-cats > li:hover {
  border-color: var(--vc-green);
  box-shadow: var(--vc-shadow-lift);
  transform: translateY(-2px);
}
.vc-home-cats__main {
  display: block;
  padding: 18px 16px 16px;
  text-decoration: none;
}
/* Selector carries .vc-home-cats__main so it outranks the generic
   `.vc-home-cats__main span { display: block }` rule below, which would
   otherwise un-flex the badge and push the glyph off-centre. */
.vc-home-cats__main .vc-home-cats__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 11px;
  border-radius: 10px;
  background: var(--vc-green-soft);
  color: var(--vc-green);
  transition: background 0.15s ease, color 0.15s ease;
}
.vc-home-cats__icon svg { width: 22px; height: 22px; }
.vc-home-cats > li:hover .vc-home-cats__icon { background: var(--vc-green); color: #fff; }
.vc-home-cats strong {
  display: block;
  color: var(--vc-text);
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 3px;
}
.vc-home-cats strong::after {
  content: " →";
  color: var(--vc-green);
  display: inline-block;
  transition: transform 0.15s ease;
}
.vc-home-cats > li:hover strong::after { transform: translateX(3px); }
.vc-home-cats__main span { display: block; color: var(--vc-text-soft); font-size: 0.85rem; }
@media (max-width: 900px) { .vc-home-cats { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ---- Product sections ---- */
.vc-home-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 900px) { .vc-home-products { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.vc-home-card {
  position: relative;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  background: var(--vc-bg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: box-shadow 0.15s ease;
}
.vc-home-card:hover { box-shadow: var(--vc-shadow); }
.vc-home-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--vc-green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 8px;
  z-index: 1;
}
.vc-home-card__badge--sale { background: var(--vc-sale); }
.vc-home-card__media { display: block; margin-bottom: 10px; }
.vc-home-card__media img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.vc-home-card__name {
  color: var(--vc-text) !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 2.6em;
  margin-bottom: 6px;
}
.vc-home-card__price { font-size: 1.1rem; font-weight: 700; color: var(--vc-action); margin: 0 0 10px; }
.vc-home-card__price-old { color: var(--vc-text-soft); font-weight: 400; font-size: 0.85rem; margin-left: 6px; }
.vc-home-card__cta {
  margin-top: auto;
  display: inline-block;
  background: var(--vc-action);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  padding: 9px 0;
  text-decoration: none;
}
.vc-home-card__cta:hover { background: var(--vc-action-dark); }

.vc-home__more { text-align: center; margin-top: 18px; }
.vc-home__more a { font-weight: 600; }

/* ---- House promo (70€) ---- */
.vc-home-promo {
  background: var(--vc-green);
  border-radius: var(--vc-radius);
  color: #fff;
  text-align: center;
  padding: 34px 22px;
}
.vc-home-promo h2 { color: #fff; font-size: 1.5rem; font-weight: 700; }
.vc-home-promo p { max-width: 620px; margin: 0 auto 18px; opacity: 0.95; }
.vc-home-promo small { display: block; margin-top: 12px; opacity: 0.8; font-size: 0.78rem; }
.vc-home-promo .vc-home-btn--primary { background: #fff; color: var(--vc-green-dark) !important; }
.vc-home-promo .vc-home-btn--primary:hover { background: var(--vc-bg-soft); }

/* ---- SEO block + FAQ ---- */
.vc-home-seo { color: var(--vc-text); }
.vc-home-seo h2 { font-size: 1.25rem; margin-top: 1.4em; }
.vc-home-seo p { color: var(--vc-text-soft); }
.vc-home .faq-block h2 { font-size: 1.45rem; margin-bottom: 18px; }
.vc-home .faq-item {
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--vc-bg);
}
.vc-home .faq-q { font-size: 1rem; font-weight: 600; margin: 0 0 6px; }
.vc-home .faq-a { color: var(--vc-text-soft); font-size: 0.92rem; }
.vc-home .faq-a p { margin: 0 0 8px; }

/* ---- Blog ---- */
.vc-home-blog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.vc-home-blog a {
  display: block;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 16px;
  text-decoration: none;
  background: var(--vc-bg);
}
.vc-home-blog a:hover { border-color: var(--vc-green); }
.vc-home-blog strong { display: block; color: var(--vc-text); font-weight: 600; margin-bottom: 4px; }
.vc-home-blog span { color: var(--vc-text-soft); font-size: 0.82rem; }
@media (max-width: 760px) { .vc-home-blog { grid-template-columns: 1fr; } }
