/* =========================================================================
   VitalCigar interior pages (OpenSpec rediseno-tienda, batch 2 / P0.3).
   Loaded on every page EXCEPT home (home.css covers that one). Consumes the
   tokens from vc-core.css, which always loads first. Every class is
   namespaced vc-* and no legacy element selector is touched here, so this
   sheet is inert until interior markup opts in (same rule as vc-core.css).
   ========================================================================= */

/* -------------------------------------------------------------------------
   Product card (P0.2) — single generator, include/funciones/product_card.inc.php.
   Grid container: added as an EXTRA class alongside the legacy
   .listacat_cuadricula / .listado_categoria wrappers (not a replacement), so
   existing JS selectors (AJAX "ver más" pagination) keep working untouched.
   ---------------------------------------------------------------------- */

.vc-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--vc-s4);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 1024px) { .vc-card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .vc-card-grid { grid-template-columns: repeat(2, 1fr); gap: var(--vc-s3); } }

.vc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-lg);
  background: var(--vc-bg);
  padding: var(--vc-s3);
  gap: var(--vc-s2);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.vc-card:hover { box-shadow: var(--vc-shadow-lift); transform: translateY(-2px); }
.vc-card--out { opacity: 0.72; }
.vc-card--out:hover { transform: none; box-shadow: none; }

.vc-card__badges {
  position: absolute;
  top: var(--vc-s3);
  left: var(--vc-s3);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vc-card__badge {
  font-family: var(--vc-font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--vc-text);
  color: #fff;
}
.vc-card__badge--sale { background: var(--vc-sale); }
.vc-card__badge--new { background: var(--vc-green); }

.vc-card__media { display: block; border-radius: var(--vc-radius); overflow: hidden; background: var(--vc-bg-soft); }
.vc-card__media img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }

.vc-card__body { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.vc-card__brand {
  font-family: var(--vc-font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vc-text-soft);
}
.vc-card__name {
  font-family: var(--vc-font);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--vc-text) !important;
  text-decoration: none !important;
  line-height: 1.3;
}
.vc-card__flavour {
  font-family: var(--vc-font);
  font-size: 0.8rem;
  color: var(--vc-text-soft);
}
.vc-card__rating {
  font-family: var(--vc-font);
  font-size: 0.76rem;
  color: var(--vc-text-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}
.vc-card__rating-stars { color: #f5a623; letter-spacing: -1px; }

.vc-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.vc-card__price-now { font-family: var(--vc-font); font-size: 1.15rem; font-weight: 700; color: var(--vc-text); }
.vc-card__price-old { font-family: var(--vc-font); font-size: 0.82rem; color: var(--vc-text-soft); text-decoration: line-through; }
.vc-card__price-unit { font-family: var(--vc-font); font-size: 0.72rem; color: var(--vc-text-soft); }

.vc-card__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vc-card__chip {
  font-family: var(--vc-font);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vc-text);
  border: 1px solid var(--vc-border);
  border-radius: 999px;
  padding: 2px 8px;
}

.vc-card__state { margin: 0; font-family: var(--vc-font); font-size: 0.78rem; }
.vc-card__state--out { color: var(--vc-sale); font-weight: 600; }
.vc-card__state--in { color: var(--vc-green-dark); }

.vc-card__cta {
  margin-top: auto;
  display: block;
  text-align: center;
  background: var(--vc-action);
  color: #fff !important;
  font-family: var(--vc-font);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none !important;
  border-radius: var(--vc-radius);
  padding: 10px;
}
.vc-card__cta:hover { background: var(--vc-action-dark); }

/* List view (rare toggle, defaults to grid): horizontal row instead of the
   grid tile — matches the row layout the legacy list view already had
   (thumbnail left, details right), just restyled onto the same vc-card. */
.vc-card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--vc-s3); }
.vc-card-list .vc-card { flex-direction: row; align-items: flex-start; gap: var(--vc-s4); }
.vc-card-list .vc-card__badges { position: static; flex-direction: row; margin-bottom: var(--vc-s1); }
.vc-card-list .vc-card__media { flex: 0 0 140px; width: 140px; }
.vc-card-list .vc-card__body { flex: 1; }
.vc-card-list .vc-card__cta { display: inline-block; margin-top: var(--vc-s2); padding: 8px 20px; }
@media (max-width: 560px) {
  .vc-card-list .vc-card { flex-direction: column; }
  .vc-card-list .vc-card__media { width: 100%; }
}

/* -------------------------------------------------------------------------
   Flavour-family entry row (batch 3) — replaces sabor-*.jpg banner images.
   ---------------------------------------------------------------------- */

.vc-flavour-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vc-s3);
  margin: var(--vc-s5) 0;
}
.vc-flavour-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--vc-s2);
  border: 1px solid var(--vc-border);
  border-radius: 999px;
  padding: var(--vc-s2) var(--vc-s4);
  background: var(--vc-bg);
  color: var(--vc-text) !important;
  font-family: var(--vc-font);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vc-flavour-chip:hover { border-color: var(--vc-text); box-shadow: var(--vc-shadow); }
.vc-flavour-chip__dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.vc-flavour-chip--tabaco .vc-flavour-chip__dot { background: #b08968; }
.vc-flavour-chip--mentolado .vc-flavour-chip__dot { background: #7fd1ae; }
.vc-flavour-chip--frutal .vc-flavour-chip__dot { background: #ff8fa3; }
.vc-flavour-chip--bebidas .vc-flavour-chip__dot { background: #ffd166; }
.vc-flavour-chip--varios .vc-flavour-chip__dot { background: #b892ff; }

/* -------------------------------------------------------------------------
   Pagination counter (batch 3) — sits inside the existing .paginar block,
   next to "Ver siguientes" / "Ver anteriores".
   ---------------------------------------------------------------------- */

.vc-pager-count {
  display: block;
  margin: 0 0 var(--vc-s3);
  color: var(--vc-text-soft);
  font-family: var(--vc-font);
  font-size: 0.85rem;
}

/* -------------------------------------------------------------------------
   Filter links (batch 3) — reskin only: still one single-dimension landing
   link per chip (categorias_filtros / listados_filtros), not a combinable
   facet engine. See interiores-propuestas.md §6 for the architecture note.
   ---------------------------------------------------------------------- */

.vc-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vc-s2);
  padding: var(--vc-s2) 0;
}
.vc-filter-chips__label {
  font-family: var(--vc-font);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--vc-text-soft);
  margin-right: 4px;
}
.vc-filter-chip {
  display: inline-block;
  border: 1px solid var(--vc-border);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--vc-bg);
  color: var(--vc-text) !important;
  font-family: var(--vc-font);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.vc-filter-chip:hover { border-color: var(--vc-text); background: var(--vc-bg-soft); }

/* -------------------------------------------------------------------------
   Checkout step indicator (batch 4) — replaces img/paso{N}.png, which was
   hidden-phone (mobile had no progress indicator at all). Sits in the same
   header slot as the old image, next to the logo; the legacy .hdcn2 has a
   fixed height built around that flat image, so it's relaxed to auto here.
   ---------------------------------------------------------------------- */

.body-carrito .hdcn2:has(.vc-steps) { height: auto; min-height: 106px; padding-bottom: 10px; }

.vc-steps { flex: 1; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vc-steps__list {
  display: flex;
  align-items: center;
  gap: var(--vc-s2);
  list-style: none;
  margin: var(--vc-s2) 0 0;
  padding: 0;
  white-space: nowrap;
}
.vc-steps__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--vc-font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vc-text-soft);
}
.vc-steps__item:not(:last-child)::after {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--vc-border);
  margin-left: var(--vc-s2);
}
.vc-steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--vc-border);
  background: var(--vc-bg);
  font-size: 0.76rem;
  flex: 0 0 auto;
}
.vc-steps__item.is-done .vc-steps__num { background: var(--vc-green); border-color: var(--vc-green); color: #fff; }
.vc-steps__item.is-on { color: var(--vc-text); }
.vc-steps__item.is-on .vc-steps__num { background: var(--vc-action); border-color: var(--vc-action); color: #fff; }
@media (max-width: 560px) {
  .vc-steps__label { display: none; }
  .vc-steps__item:not(:last-child)::after { width: 10px; }
}
