/* ===========================================================================
   GENZ — Navidad 2026 · Tarjetas de producto de todo el sitio
   Lo carga layout/theme.liquid con la piel de Navidad (class "theme-navidad"
   en <html>). Solo estilos: el markup es el de siempre
   (sections/showcase-model-product.liquid y sus variantes de promoción,
   compra conjunta y modelo 16), igual que la lógica de compra, precios,
   descuentos y disponibilidad.

   1. Botón «Comprar»: ya no aparece encima de la imagen al pasar el cursor;
      está siempre visible, en el flujo, debajo del precio y al pie de la
      tarjeta (alineado en todas las tarjetas de la fila: el pie ya baja al
      final de la tarjeta, theme-custom.css).
   2. Precios: el de dólares (.showcase-prices_price, «US$ …») un poco más
      grande que el de guaraníes (.showcase-prices-price_real, «Gs. …»);
      colores y formatos de siempre.
   3. Imagen: más aire entre la imagen y el borde de la tarjeta (la imagen
      nunca se agranda ni se deforma: solo se limita su tamaño máximo).
   4. Botón navideño: verde de Navidad con un filo dorado; dentro, la
      nieve al pasar el cursor la dibuja assets/theme-navidad-hover.js (un
      <canvas> con z-index -1: sobre el fondo del botón y bajo el texto).
   La tarjeta no se anima desde aquí (la inclina el JS de la interacción).
   ======================================================================== */

.theme-navidad .showcase-product {
  /* Verde de Navidad (el rojo se leía como advertencia), filo dorado y azul
     de la noche. Texto blanco: contraste de 5,4:1 o más en todo el degradado. */
  --xc-green: #1d7a45;
  --xc-green-deep: #146536;
  --xc-green-hover: #166238;
  --xc-green-hover-deep: #0e4a27;
  --xc-gold: #ffd27a;
  --xc-navy: #0a1a3d;
  --xc-navy-deep: #040a1e;
  /* Aire entre la imagen y los bordes de su caja. */
  --xc-img-pad: 24px;
}

/* ---------------------------------------------------------------------------
   3. Imagen con más aire
   La imagen del tema va centrada en una caja fija (290 px; 180 / 150 px en
   pantallas chicas) y con tamaño máximo del 100 %: se le quita ese aire a
   los lados y arriba/abajo. Sigue con su proporción (contain).
   ------------------------------------------------------------------------ */
.theme-navidad .showcase-product .showcase-product_link__image img {
  max-height: calc(100% - 2 * var(--xc-img-pad));
  max-width: calc(100% - 2 * var(--xc-img-pad));
  object-fit: contain;
}

/* ---------------------------------------------------------------------------
   1. Pie de la tarjeta: precios y, debajo, el botón
   ------------------------------------------------------------------------ */
.theme-navidad .showcase-product .card-footer {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.theme-navidad .showcase-product .card-footer .showcase-prices {
  align-content: flex-start;
  float: none;
  height: auto;
  width: 100%;
}

/* El «a consultar» y el «sin stock» siguen centrados en su renglón. */
.theme-navidad .showcase-product .card-footer .showcase-prices.showcase-prices_center {
  align-content: center;
}

/* ---------------------------------------------------------------------------
   2. Precios: dólares un poco más grande que guaraníes
   ------------------------------------------------------------------------ */
.theme-navidad .showcase-product .showcase-prices_price {
  font-size: 19px;
  height: auto;
  line-height: 23px;
}

.theme-navidad .showcase-product .showcase-prices_price span {
  font-size: 14px;
}

.theme-navidad .showcase-product .showcase-prices-price_real {
  font-size: 13px;
  line-height: 16px;
  padding-top: 4px;
}

/* «Sin stock» y «a consultar» conservan su tamaño de mensaje. */
.theme-navidad .showcase-product .showcase-prices_out-of-stock .showcase-prices_price {
  font-size: 16px;
  line-height: 18px;
}

/* ---------------------------------------------------------------------------
   4. Botón «Comprar» navideño, siempre visible y en el flujo
   (position: relative + overflow: hidden + isolation: la nieve del JS queda
   dentro del botón, sobre su fondo y bajo el texto).
   ------------------------------------------------------------------------ */
.theme-navidad .showcase-product .showcase-product_buy {
  align-items: center;
  background-color: var(--xc-green-deep);
  background-image: linear-gradient(180deg, var(--xc-green) 0%, var(--xc-green-deep) 100%);
  border: 0;
  border-radius: 10px;
  bottom: auto;
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 122, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 16px -10px rgba(20, 101, 54, 0.7);
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  float: none;
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
  height: 44px;
  isolation: isolate;
  justify-content: center;
  left: auto;
  letter-spacing: 0.05em;
  line-height: 20px;
  margin: 0;
  max-width: none;
  opacity: 1;
  overflow: hidden;
  padding: 0 16px;
  position: relative;
  right: auto;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  text-transform: uppercase;
  top: auto;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  width: 100%;
}

.theme-navidad .showcase-product .showcase-product_buy:hover,
.theme-navidad .showcase-product .showcase-product_buy:focus {
  background-color: var(--xc-green-hover-deep);
  background-image: linear-gradient(180deg, var(--xc-green-hover) 0%, var(--xc-green-hover-deep) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 122, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 18px -10px rgba(14, 74, 39, 0.8);
  color: #fff;
  opacity: 1;
  text-decoration: none;
}

.theme-navidad .showcase-product .showcase-product_buy:active {
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 122, 0.9),
    inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.theme-navidad .showcase-product .showcase-product_buy:focus {
  outline: none;
}

/* Foco con teclado: anillo azul marino con borde blanco (se ve sobre la
   tarjeta blanca y sobre el verde). */
.theme-navidad .showcase-product .showcase-product_buy:focus-visible {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--xc-navy),
    inset 0 0 0 1px rgba(255, 210, 122, 0.9);
  outline: 2px solid transparent;
}

/* Iniciar sesión para comprar: azul de la noche con el filo dorado, para no
   confundirlo con comprar. */
.theme-navidad .showcase-product .showcase-product_buy.showcase-product_login {
  background-color: var(--xc-navy-deep);
  background-image: linear-gradient(180deg, var(--xc-navy) 0%, var(--xc-navy-deep) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 122, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 16px -10px rgba(4, 10, 30, 0.7);
}

.theme-navidad .showcase-product .showcase-product_buy.showcase-product_login:hover,
.theme-navidad .showcase-product .showcase-product_buy.showcase-product_login:focus {
  background-color: #000;
  background-image: linear-gradient(180deg, #13285a 0%, var(--xc-navy) 100%);
}

/* Sin stock (tarjetas de promoción): gris. */
.theme-navidad .showcase-product .showcase-product_buy.showcase-product_buy_out-of-stock {
  background-color: #5b6273;
  background-image: none;
  box-shadow: none;
}

/* Deshabilitado: el tema lo deja al 40 % (opacity con !important). */
.theme-navidad .showcase-product .showcase-product_buy.disabled {
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   Pantallas chicas
   ------------------------------------------------------------------------ */
@media (max-width: 991px) {
  .theme-navidad .showcase-product {
    --xc-img-pad: 16px;
  }
}

@media (max-width: 575px) {
  .theme-navidad .showcase-product {
    --xc-img-pad: 12px;
  }

  .theme-navidad .showcase-product .card-footer {
    gap: 10px;
  }

  .theme-navidad .showcase-product .showcase-prices_price {
    font-size: 16px;
    line-height: 20px;
  }

  .theme-navidad .showcase-product .showcase-prices_price span {
    font-size: 12px;
  }

  .theme-navidad .showcase-product .showcase-prices-price_real {
    font-size: 12px;
    line-height: 15px;
    padding-top: 3px;
  }

  .theme-navidad .showcase-product .showcase-product_buy {
    border-radius: 8px;
    font-size: 12px;
    gap: 6px;
    height: 38px;
    letter-spacing: 0.03em;
    padding: 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-navidad .showcase-product .showcase-product_buy {
    transition: none;
  }
}
