/* OZ Cotizador — Design pack "vitofarma" (admin: Vitofarma)
 *
 * Cards de loop (tienda / categorías / relacionados / sliders) bajo
 * `.ozc-product-card--pack-vitofarma`.
 *
 * Referencia de diseño (imagen del cliente):
 * - Card blanca, esquinas redondeadas (16px) y sombra suave.
 * - Imagen del producto centrada (contain) sobre fondo blanco.
 * - Título azul de marca, centrado, hasta 2 líneas.
 * - Precio rojo de marca, centrado, destacado (formato WooCommerce USD: $59.99).
 * - Botón azul "Add to cart" a todo el ancho (pill) con selector de cantidad.
 *
 * Solo estilo visual: la estructura/orden la define loop-product-card.php
 * y las secciones visibles se controlan en OZ Cotizador → Loops.
 *
 * Paleta de marca: azul #00266f · rojo #bc0811
 */

/* =========================================================
   VARIABLES DEL PACK
   ========================================================= */
.ozc-product-card--pack-vitofarma {
  --vf-blue: #00266f;
  --vf-blue-hover: #001b52;
  --vf-red: #bc0811;
  --vf-text: #14181f;
  --vf-muted: #6b7280;
  --vf-border: #eef0f2;
  --vf-surface: #ffffff;
  --vf-radius: 16px;
  --vf-btn-radius: 999px;
  --vf-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  --vf-shadow-hover: 0 14px 30px rgba(15, 23, 42, 0.12);

  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%; /* llena la altura del slide para igualar todas las tarjetas */
  background: var(--vf-surface);
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius);
  box-shadow: var(--vf-shadow);
  padding: 18px 18px 20px;
  text-align: center;
  color: var(--vf-text);
  font-family: var(--OZ-Font-Base, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.ozc-product-card--pack-vitofarma *,
.ozc-product-card--pack-vitofarma *::before,
.ozc-product-card--pack-vitofarma *::after {
  box-sizing: border-box;
}

.ozc-product-card--pack-vitofarma:hover,
.ozc-product-card--pack-vitofarma:focus-within {
  border-color: #e2e5e8;
  box-shadow: var(--vf-shadow-hover);
  transform: translateY(-2px);
}

/* =========================================================
   IMAGEN (centrada, contain sobre fondo blanco)
   ========================================================= */
.ozc-product-card--pack-vitofarma .ozc-product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  /* Sin tope de altura (loops.css ponía max-height:200px y achataba la imagen).
     Media cuadrado real para que la foto se vea completa y cuadrada. */
  max-height: none !important;
  height: auto !important;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 16px 0;
  text-decoration: none;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__media img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  /* Imagen completa dentro del cuadrado (sin recorte) */
  object-fit: contain !important;
  object-position: center;
  transition: transform 0.35s ease;
}

.ozc-product-card--pack-vitofarma:hover .ozc-product-card__media img {
  transform: scale(1.03);
}

.ozc-product-card--pack-vitofarma .ozc-product-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: #f3f4f6;
  border-radius: 10px;
}

/* La marca como badge sobre la imagen NO aplica en este pack */
.ozc-product-card--pack-vitofarma .ozc-product-card__media .ozc-product-card__badge {
  display: none;
}

/* =========================================================
   SECCIONES (resetea padding/márgenes del base)
   ========================================================= */
.ozc-product-card--pack-vitofarma .ozc-product-card__section {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  margin: 0;
  border: 0;
}

/* Categoría, marca y extracto no se muestran en esta card */
.ozc-product-card--pack-vitofarma .ozc-product-card__category,
.ozc-product-card--pack-vitofarma .ozc-product-card__brand,
.ozc-product-card--pack-vitofarma .ozc-product-card__excerpt {
  display: none;
}

/* =========================================================
   TÍTULO (azul de marca, centrado, hasta 2 líneas)
   ========================================================= */
.ozc-product-card--pack-vitofarma .ozc-product-card__title {
  margin: 0 0 12px 0;
  padding: 0 4px;
  font-family: var(--OZ-Font-Base, 'Inter', system-ui, sans-serif);
  font-size: 18px;
  font-weight: 600;
  /* line-height con aire suficiente para que las colas de las letras (g, j, z,
     y…) queden DENTRO de la caja de línea. Con 1.3 se salían y el overflow del
     line-clamp las recortaba, dando el efecto de "1 línea y media". */
  line-height: 1.45;
  color: var(--vf-blue);
  text-align: center;

  /* Exactamente 2 líneas completas; si el título es más largo => "…" */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Reserva 2 líneas para uniformar el grid. SIN max-height (ver bloque de
     abajo): un tope fijo dejaba la caja más corta que 2 líneas reales cuando el
     tema impone un line-height mayor, y la 2ª línea desbordaba sobre el precio.
     El line-clamp:2 ya limita a 2 líneas con "…". */
  min-height: calc(1.45em * 2);
}

.ozc-product-card--pack-vitofarma .ozc-product-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__title a:hover {
  color: var(--vf-blue-hover);
}

/* Fix 2 líneas exactas: el line-height del <a> interno debe coincidir con el
   del título (algunos temas lo inflan y hacían que la 2ª línea se cortara o
   que se asomara una 3ª). Se fuerza y se refuerza el clamp para que sea
   estable también dentro del slider de la home.
   line-height 1.45 (no 1.3): con 1.3 las colas de las letras (g, j, z…) se
   salían de la caja de línea y el overflow del clamp cortaba la 2ª línea. */
.ozc-product-card--pack-vitofarma .ozc-product-card__title,
.ozc-product-card--pack-vitofarma .ozc-product-card__title a {
  line-height: 1.45 !important;
}
.ozc-product-card--pack-vitofarma .ozc-product-card__title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  /* SIN max-height: el line-clamp:2 ya trunca a 2 líneas con "…", y sin tope
     la caja crece a la altura REAL de esas 2 líneas (sea cual sea el
     line-height que imponga el tema). Así el precio siempre queda debajo y la
     2ª línea nunca se corta ni se solapa. min-height reserva 2 líneas para que
     el grid quede parejo aunque el título sea de 1 sola línea. */
  min-height: calc(1.45em * 2);
}

/* =========================================================
   PRECIO (rojo de marca, destacado, centrado)
   Sale del precio WooCommerce (wc_price) en USD: $59.99
   ========================================================= */
/* El CSS base del plugin (loops.css) oculta el precio en modo cotización
   (`.ozc-product-card__price { display:none !important }`). En Vitofarma SÍ
   queremos mostrar el precio en dólares manteniendo el botón de cotización,
   así que se reactiva su visualización con un selector más específico. */
.ozc-product-card--pack-vitofarma .ozc-product-card__price {
  display: block !important;
  margin: 0 0 14px 0;
  color: var(--vf-red);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__price .amount,
.ozc-product-card--pack-vitofarma .ozc-product-card__price bdi {
  color: var(--vf-red);
}

.ozc-product-card--pack-vitofarma .ozc-product-card__price del,
.ozc-product-card--pack-vitofarma .ozc-product-card__price del .amount {
  margin-right: 6px;
  color: var(--vf-muted);
  font-size: 14px;
  font-weight: 400;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__price ins,
.ozc-product-card--pack-vitofarma .ozc-product-card__price ins .amount {
  text-decoration: none;
  color: var(--vf-red);
}

/* =========================================================
   ACCIONES (cantidad arriba centrada + botón azul a todo ancho)
   ========================================================= */
.ozc-product-card--pack-vitofarma .ozc-product-card__actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px;
  margin-top: auto;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0 !important;
}

/* =========================================================
   QTY STEPPER (pill blanco centrado con borde)
   ========================================================= */
.ozc-product-card--pack-vitofarma .ozc-product-card__qty {
  display: inline-flex !important;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  height: 40px;
  padding: 0 6px;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 999px;
  box-sizing: border-box;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__qty-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  border: 0;
  color: var(--vf-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.12s ease;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__qty-btn:hover {
  color: var(--vf-blue);
}

.ozc-product-card--pack-vitofarma .ozc-product-card__qty-btn:active {
  transform: scale(0.9);
}

.ozc-product-card--pack-vitofarma .ozc-product-card__qty-input {
  width: 38px !important;
  min-width: 0 !important;
  flex: 0 0 auto;
  height: 32px;
  padding: 0 !important;
  margin: 0;
  background: transparent;
  border: 0;
  outline: 0;
  text-align: center;
  color: var(--vf-text);
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 600;
  line-height: 1;
  -moz-appearance: textfield;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__qty-input::-webkit-outer-spin-button,
.ozc-product-card--pack-vitofarma .ozc-product-card__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* =========================================================
   BOTÓN "Add to cart" (azul de marca, pill, a todo el ancho)
   ========================================================= */
.ozc-product-card--pack-vitofarma .ozc-product-card__btn,
.ozc-product-card--pack-vitofarma .ozc-product-card__btn--primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  min-width: 0;
  height: 52px;
  padding: 0 24px !important;
  background: var(--vf-blue) !important;
  border: 0 !important;
  border-radius: var(--vf-btn-radius) !important;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 17px !important;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__btn:hover,
.ozc-product-card--pack-vitofarma .ozc-product-card__btn--primary:hover {
  background: var(--vf-blue-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 38, 111, 0.30);
}

.ozc-product-card--pack-vitofarma .ozc-product-card__btn:active,
.ozc-product-card--pack-vitofarma .ozc-product-card__btn--primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__btn:focus-visible,
.ozc-product-card--pack-vitofarma .ozc-product-card__btn--primary:focus-visible {
  outline: 2px solid var(--vf-blue);
  outline-offset: 2px;
}

/* Estado "Agregado" (WooCommerce ajax_add_to_cart) */
.ozc-product-card--pack-vitofarma .ozc-product-card__btn--added::before {
  content: '✓';
  font-weight: 900;
  margin-right: 8px;
}

.ozc-product-card--pack-vitofarma .ozc-product-card__btn--loading {
  opacity: 0.75;
  pointer-events: none;
}

/* =========================================================
   WHATSAPP — oculto en el loop de este pack (botón fuera de la card)
   ========================================================= */
.ozc-product-card--pack-vitofarma .ozc-product-card__wa {
  display: none !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .ozc-product-card--pack-vitofarma {
    padding: 14px 14px 16px;
  }

  .ozc-product-card--pack-vitofarma .ozc-product-card__title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .ozc-product-card--pack-vitofarma .ozc-product-card__price {
    font-size: 18px;
  }

  .ozc-product-card--pack-vitofarma .ozc-product-card__btn,
  .ozc-product-card--pack-vitofarma .ozc-product-card__btn--primary {
    height: 46px;
    /* !important para ganar al font-size:17px!important de la regla base;
       el texto puede partir en 2 líneas para no desbordar en cards estrechas. */
    font-size: 13px !important;
    padding: 0 10px !important;
    white-space: normal !important;
    line-height: 1.15;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .ozc-product-card--pack-vitofarma {
    padding: 12px 12px 14px;
  }

  .ozc-product-card--pack-vitofarma .ozc-product-card__title {
    font-size: 15px;
  }

  .ozc-product-card--pack-vitofarma .ozc-product-card__btn,
  .ozc-product-card--pack-vitofarma .ozc-product-card__btn--primary {
    height: auto;
    min-height: 44px;
    font-size: 12px !important;
    padding: 8px 8px !important;
    white-space: normal !important;
    line-height: 1.15;
  }
}

/* =========================================================
   PAGINACIÓN de la tienda (WooCommerce) al estilo del pack:
   botones redondeados navy, página actual rellena, hover.
   ========================================================= */
.ozc-loops--replace .woocommerce-pagination {
  margin: 34px 0 10px;
  text-align: center;
}
.ozc-loops--replace .woocommerce-pagination ul.page-numbers {
  display: inline-flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  list-style: none;
}
.ozc-loops--replace .woocommerce-pagination ul.page-numbers li {
  margin: 0;
  border: 0 !important;
  overflow: visible;
}
.ozc-loops--replace .woocommerce-pagination ul.page-numbers li .page-numbers {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px !important;
  border: 1px solid var(--vf-blue, #00266f) !important;
  border-radius: 10px !important;
  background: #fff;
  color: var(--vf-blue, #00266f);
  font-family: var(--OZ-Font-Base, 'Inter', system-ui, sans-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.ozc-loops--replace .woocommerce-pagination ul.page-numbers li a.page-numbers:hover,
.ozc-loops--replace .woocommerce-pagination ul.page-numbers li a.page-numbers:focus-visible {
  background: var(--vf-blue, #00266f);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 38, 111, 0.22);
}
.ozc-loops--replace .woocommerce-pagination ul.page-numbers li .page-numbers.current {
  background: var(--vf-blue, #00266f);
  border-color: var(--vf-blue, #00266f) !important;
  color: #fff;
}
.ozc-loops--replace .woocommerce-pagination ul.page-numbers li .page-numbers.dots {
  border-color: transparent !important;
  background: transparent;
  min-width: 24px;
  padding: 0 4px !important;
}
