/* OZ Cotizador — Design pack "aov" (admin: AOV)
 * Cards de catálogo: .ozc-product-card__* bajo .ozc-product-card--pack-aov
 *
 * SOLO ESTILOS. El comportamiento (qué partes se muestran, el orden,
 * el precio o la categoría) lo controla el plugin OZ Cotizador.
 */

.ozc-product-card--pack-aov {
  --aov-accent: #014a7d;     /* azul AOV (marca) */
  --aov-blue: #016fac;       /* azul precio / enlaces */
  --aov-cyan: #00a4d2;       /* celeste acento */
  --aov-surface: #ffffff;
  --aov-border: #e5e7eb;
  --aov-title: #18293b;      /* título (azul muy oscuro) */
  --aov-muted: #6b7280;
  --aov-btn-bg: #f1f2f4;     /* botones gris claro */
  --aov-btn-bg-hover: #e7eaee;
  --aov-btn-text: #46515e;
  --aov-btn-border: #e1e4e8;
  --aov-radius: 10px;
  --aov-btn-radius: 8px;
  --aov-btn-h: 2.4rem;       /* altura común (compacta) de "Añadir al carrito" y WhatsApp */

  box-sizing: border-box;
  display: grid;             /* grid estable: contenido a la izq + WhatsApp al lado del botón */
  grid-template-columns: 1fr auto;
  align-content: start;
  height: auto;              /* la tarjeta mide su contenido: sin alto de sobra abajo */
  gap: 0.6rem;
  background: var(--aov-surface);
  border: 1px solid var(--aov-border);
  border-radius: var(--aov-radius);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  padding: 0.85rem 0.95rem 1rem;
  text-align: center;
  color: var(--aov-title);
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.ozc-product-card--pack-aov:hover,
.ozc-product-card--pack-aov:focus-within {
  border-color: #cfe0ec;
  box-shadow: 0 14px 30px rgba(1, 74, 125, 0.12);
  transform: translateY(-2px);
}

/* Por defecto, cada parte ocupa TODO el ancho (una fila completa). */
.ozc-product-card--pack-aov > .ozc-product-card__media,
.ozc-product-card--pack-aov > .ozc-product-card__section {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  border-top: none;
}

/* ---------- Imagen (incluye el branding ya incrustado en la imagen) ---------- */
.ozc-product-card--pack-aov .ozc-product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0.25rem;
  text-decoration: none;
  color: inherit;
}
.ozc-product-card--pack-aov .ozc-product-card__media .ozc-product-card__badge {
  display: none;             /* sin badge de marca sobre la imagen */
}
.ozc-product-card--pack-aov .ozc-product-card__media img,
.ozc-product-card--pack-aov .ozc-product-card__placeholder {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  margin: 0 auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}
.ozc-product-card--pack-aov:hover .ozc-product-card__media img {
  transform: scale(1.03);
}
.ozc-product-card--pack-aov .ozc-product-card__placeholder {
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(145deg, #f6f6f6, #ececec);
}

/* ---------- Categoría (si el plugin la muestra) ---------- */
.ozc-product-card--pack-aov .ozc-product-card__category {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aov-blue);
}

/* ---------- Título ---------- */
.ozc-product-card--pack-aov .ozc-product-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0;
  max-height: 2.6em;             /* exactamente 2 líneas (line-height 1.3): nunca asoma una 3ª */
  font-size: 16px !important;    /* !important: vence al tamaño que impone el tema */
  font-weight: 500 !important;
  line-height: 1.3 !important;   /* fijo, para que el max-height de 2 líneas sea exacto */
  color: var(--aov-blue);        /* azul de marca, igual que en la captura */
  word-break: break-word;
}
.ozc-product-card--pack-aov .ozc-product-card__title a {
  color: inherit;
  text-decoration: none;
}
.ozc-product-card--pack-aov .ozc-product-card__title a:hover,
.ozc-product-card--pack-aov .ozc-product-card__title a:focus-visible {
  color: var(--aov-accent);      /* azul más oscuro al pasar el mouse */
}

/* ---------- Marca (texto) ---------- */
.ozc-product-card--pack-aov .ozc-product-card__brand {
  font-size: 0.8rem;
  color: var(--aov-muted);
}

/* ---------- Extracto ---------- */
.ozc-product-card--pack-aov .ozc-product-card__excerpt {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--aov-muted);
}

/* ---------- Precio ---------- */
.ozc-product-card--pack-aov .ozc-product-card__price {
  text-align: left;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: var(--aov-blue);
}
.ozc-product-card--pack-aov .ozc-product-card__price .woocommerce-Price-amount {
  font-weight: inherit;
}

/* ===== Fila de acciones: "Añadir al carrito" + WhatsApp en la misma línea ===== */
.ozc-product-card--pack-aov > .ozc-product-card__actions {
  grid-column: 1;            /* columna izquierda */
  align-self: stretch;       /* misma altura que el WhatsApp de al lado */
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}
/* El botón de WhatsApp va a la DERECHA, en la MISMA fila que "Añadir al carrito" */
.ozc-product-card--pack-aov > .ozc-product-card__section:has(.ozc-product-card__wa) {
  grid-column: 2;
  align-self: stretch;       /* misma altura que "Añadir al carrito" */
  display: flex;
  width: auto;
  margin: 0;
}

/* Botón "Añadir al carrito" (gris con icono de carrito) */
.ozc-product-card--pack-aov .ozc-product-card__btn--primary {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;               /* anula el width:100% base: que el grid controle el ancho */
  min-height: var(--aov-btn-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--aov-btn-border);
  border-radius: var(--aov-btn-radius);
  background: var(--aov-btn-bg);
  color: var(--aov-btn-text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;       /* no parte el texto: altura estable = igual al WhatsApp */
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ozc-product-card--pack-aov .ozc-product-card__btn--primary::after {
  content: none;
  display: none;
}
.ozc-product-card--pack-aov .ozc-product-card__btn--primary::before {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1.003 1.003 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1.003 1.003 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ozc-product-card--pack-aov .ozc-product-card__btn--primary:hover {
  background: var(--aov-btn-bg-hover);
  color: var(--aov-accent);
  border-color: #d4dae0;
}
.ozc-product-card--pack-aov .ozc-product-card__btn--primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(1, 74, 125, 0.16);
}

/* Botón WhatsApp: cuadrado, solo icono (se oculta el texto "WhatsApp") */
.ozc-product-card--pack-aov .ozc-product-card__wa {
  width: auto;
  height: 100%;              /* llena la fila: misma altura que "Añadir al carrito" */
  display: flex;
}
.ozc-product-card--pack-aov .ozc-product-card__wa-btn {
  width: var(--aov-btn-h);   /* ancho = altura del botón (cuadrado) */
  min-width: var(--aov-btn-h);
  height: 100%;              /* iguala la altura de "Añadir al carrito" siempre */
  min-height: var(--aov-btn-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--aov-btn-border);
  border-radius: var(--aov-btn-radius);
  background: var(--aov-btn-bg);   /* mismo gris que "Añadir al carrito" */
  color: var(--aov-btn-text);      /* icono gris a juego */
  font-size: 0;              /* oculta el texto del botón */
  line-height: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ozc-product-card--pack-aov .ozc-product-card__wa-btn::after {
  content: "";
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.435 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.435 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ozc-product-card--pack-aov .ozc-product-card__wa-btn:hover {
  background: var(--aov-btn-bg-hover);
  color: #1f9d55;            /* el icono se torna verde al pasar el mouse (detalle) */
  border-color: #d4dae0;
}

/* Cantidad (si el plugin la muestra dentro de acciones) */
.ozc-product-card--pack-aov .ozc-product-card__qty {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: stretch;
  min-height: 2.7rem;
  border: 1px solid var(--aov-btn-border);
  border-radius: var(--aov-btn-radius);
  background: #fff;
  overflow: hidden;
}
.ozc-product-card--pack-aov .ozc-product-card__qty-btn {
  width: 1.8rem;
  color: var(--aov-accent);
  background: transparent;
}
.ozc-product-card--pack-aov .ozc-product-card__qty-input {
  width: 2rem;
  background: transparent;
  color: var(--aov-title);
  font-weight: 700;
  text-align: center;
}

/* Responsive: en pantallas muy chicas, botón y WhatsApp uno bajo otro */
@media (max-width: 360px) {
  .ozc-product-card--pack-aov {
    grid-template-columns: 1fr;
  }
  .ozc-product-card--pack-aov > .ozc-product-card__actions,
  .ozc-product-card--pack-aov > .ozc-product-card__section:has(.ozc-product-card__wa) {
    grid-column: 1 / -1;
  }
}
