/* CREACH V11 · SISTEMA VISUAL MAESTRO DE TARJETAS DE PRODUCTOS
   Archivo único para cards de brand.php, model.php, category.php,
   catalog.php, Inicio/ofertas, API carrito y relacionados de product.php.
   NO estiliza tarjetas de vehículos, marcas, categorías, ni formularios.
   Modificar estos tokens para actualizar todas las tarjetas a la vez. */
:root {
  --creach-card-surface:#FFFFFF;
  --creach-card-stroke:#D4E0E7;
  --creach-card-stroke-hover:#9CCBD9;
  --creach-card-radius:14px;
  --creach-card-accent:#087BAF;
  --creach-card-accent-hover:#06698F;
  --creach-card-ink:#111418;
  --creach-card-ratio:5 / 4;
}

/* Las dos presentaciones comparten la misma superficie y borde.
   La mini tarjeta solo se diferencia en dimensiones y acciones. */
body article.creach-ui-product-card,
body .catalog-pro-page .catalog-products article.creach-ui-product-card,
body main.creach-product-page article.creach-ui-product-card--compact {
  box-sizing:border-box!important;
  border:1px solid var(--creach-card-stroke)!important;
  border-radius:var(--creach-card-radius)!important;
  background:var(--creach-card-surface)!important;
  background-image:none!important;
  box-shadow:none!important;
  overflow:hidden;
  color:var(--creach-card-ink);
  min-width:0;
}
body article.creach-ui-product-card:hover,
body .catalog-pro-page .catalog-products article.creach-ui-product-card:hover,
body main.creach-product-page article.creach-ui-product-card--compact:hover {
  border-color:var(--creach-card-stroke-hover)!important;
  box-shadow:none!important;
}
body article.creach-ui-product-card--standard {
  display:flex!important;
  flex-direction:column;
  height:100%!important;
  container-type:inline-size;
}

/* 5:4 sin recorte ni fondo gris. Mantener fondo global configurable de fotos
   si existe: nunca fijar background-image sobre [data-creach-product-bg]. */
body article.creach-ui-product-card .creach-card-image {
  display:grid!important;
  place-items:center;
  box-sizing:border-box;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:var(--creach-card-ratio)!important;
  flex:0 0 auto!important;
  overflow:hidden;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background-size:contain!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  position:relative;
}
body article.creach-ui-product-card .creach-card-image:not([data-creach-product-bg="1"]) {
  background-color:var(--creach-card-surface)!important;
  background-image:none!important;
}
body article.creach-ui-product-card .creach-card-image > img.creach-product-media-object {
  display:block;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
}
/* Etiquetas referenciales no se ocultan al cambiar tamaño. */
body article.creach-ui-product-card .creach-reference-label {z-index:2;}

/* Marca y modelo legibles, incluso sobre una chapa celeste clara. */
body article.creach-ui-product-card--standard .product-card-topbar {
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;min-width:0;
}
body article.creach-ui-product-card--standard .product-brand-chip,
body .catalog-pro-page article.creach-ui-product-card--standard .product-brand-chip {
  background:#EAF7FC!important;
  background-image:none!important;
  border:1px solid #D3E9F1!important;
  box-shadow:none!important;
  color:var(--creach-card-ink)!important;
}
body article.creach-ui-product-card--standard .product-brand-chip .brand-chip-logo {
  background:#FFFFFF!important;
}
body article.creach-ui-product-card--standard .product-brand-chip .brand-chip-name,
body .catalog-pro-page article.creach-ui-product-card--standard .product-brand-chip .brand-chip-name {
  color:var(--creach-card-ink)!important;
  font-weight:800!important;
}
body article.creach-ui-product-card--standard .product-brand-chip img {filter:none!important;}
body article.creach-ui-product-card--standard .product-card-vehicle,
body article.creach-ui-product-card--standard .product-card-vehicle :is(span,b),
body article.creach-ui-product-card--standard .catalog-card-info :is(h3,h3 a,.product-meta-top) {
  color:var(--creach-card-ink)!important;
}
body article.creach-ui-product-card--standard .catalog-card-info {
  box-sizing:border-box;
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column;
  min-width:0;
  background:#FFFFFF!important;
}
body article.creach-ui-product-card--standard .catalog-card-info .product-actions-pro {
  margin-top:auto!important;
}

/* Identidad única para botones; los iconos SVG de línea y los iconos
   rellenos (WhatsApp y lupa) usan sus técnicas de pintura correctas. */
body article.creach-ui-product-card--standard .product-actions-pro.two-only {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px!important;
}
body article.creach-ui-product-card--standard .product-actions-pro.two-only .btn {
  box-sizing:border-box;
  display:flex!important;
  align-items:center;justify-content:center;
  gap:6px!important;
  min-width:0;
  padding:8px!important;
  min-height:43px!important;
  border-radius:10px!important;
  font-size:11px!important;
  line-height:1.3!important;
  font-weight:750!important;
  font-family:Montserrat,Arial,sans-serif!important;
  text-align:center;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  box-shadow:none!important;
}
body article.creach-ui-product-card--standard .product-actions-pro.two-only .btn :is(span,svg) {
  overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important;
}
body article.creach-ui-product-card--standard .product-actions-pro.two-only .btn.primary,
body .catalog-pro-page article.creach-ui-product-card--standard .product-actions-pro.two-only .btn.primary {
  background:var(--creach-card-accent)!important;
  background-image:none!important;
  border:1px solid var(--creach-card-accent)!important;
  color:#FFFFFF!important;
}
body article.creach-ui-product-card--standard .product-actions-pro.two-only .btn.primary:hover {
  background:var(--creach-card-accent-hover)!important;
  border-color:var(--creach-card-accent-hover)!important;
}
body article.creach-ui-product-card--standard .product-actions-pro.two-only .btn.outline {
  background:#FFFFFF!important;
  background-image:none!important;
  border:1px solid var(--creach-card-stroke)!important;
  color:var(--creach-card-ink)!important;
}
body article.creach-ui-product-card--standard .product-actions-pro .btn .btn-ico {
  display:inline-flex;justify-content:center;align-items:center;
  flex:0 0 16px;width:16px;height:16px;
  padding:0!important;
  background:none!important;
  border:none!important;
}
body article.creach-ui-product-card--standard .product-actions-pro .btn .btn-ico svg.creach-brand-icon,
body article.creach-ui-product-card--standard .product-actions-pro .btn .btn-ico svg.creach-fa-icon {
  width:16px!important;height:16px!important;
  fill:currentColor!important;stroke:none!important;
}
body article.creach-ui-product-card--standard .product-actions-pro .btn .btn-ico svg.creach-line-icon {
  width:16px!important;height:16px!important;
  fill:none!important;stroke:currentColor!important;
}
/* Icono del carrito mantiene azul corporativo sin tocar el header. */
body article.creach-ui-product-card--standard .product-favorite-floating {
  color:var(--creach-card-accent)!important;
  box-shadow:none!important;
}

/* Variante compacta: misma identidad, misma foto 5:4, pero carrusel
   original y botón + Añadir para no romper sus acciones JS. */
body main.creach-product-page article.creach-ui-product-card--compact {
  display:flex!important;flex-direction:column;
  background:#FFFFFF!important;
  padding:8px!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-card-image {
  width:100%!important;
  border-radius:7px!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-name,
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-price {
  color:var(--creach-card-ink)!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-vehicle {
  margin:0 0 6px;
  color:var(--creach-card-ink)!important;
  font-size:9px;
  font-weight:800;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-add {
  background:var(--creach-card-accent)!important;
  border:1px solid var(--creach-card-accent)!important;
  color:#FFFFFF!important;
  box-shadow:none!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-add:hover {
  background:var(--creach-card-accent-hover)!important;
}

/* El texto breve "Cotizar" permite mantener dos columnas incluso
   en tarjetas estrechas. Nunca apilar los botones de esta tarjeta. */
@media(max-width:600px) {
  body article.creach-ui-product-card--standard .product-card-topbar {padding-inline:9px!important;}
  body article.creach-ui-product-card--standard .catalog-card-info {padding-inline:10px!important;}
}
@media(prefers-reduced-motion:reduce) {
  body article.creach-ui-product-card {transition:none!important;}
}

/* Precedencia explícita: tarjetas en grid/carrusel y CSS de catálogo heredado. */
body .catalog-products article.creach-ui-product-card--standard,
body .brand-related-set article.creach-ui-product-card--standard,
body .catalog-pro-page .catalog-products article.creach-ui-product-card--standard,
body main.creach-product-page article.creach-ui-product-card--compact {
  border:1px solid var(--creach-card-stroke)!important;
  border-radius:var(--creach-card-radius)!important;
}
body .catalog-products article.creach-ui-product-card--standard:hover,
body .brand-related-set article.creach-ui-product-card--standard:hover,
body .catalog-pro-page .catalog-products article.creach-ui-product-card--standard:hover {
  border-color:var(--creach-card-stroke-hover)!important;
}
body .catalog-products article.creach-ui-product-card--standard > .creach-card-image,
body .brand-related-set article.creach-ui-product-card--standard > .creach-card-image,
body .catalog-pro-page .catalog-products article.creach-ui-product-card--standard > .catalog-card-visual.creach-card-image,
body main.creach-product-page article.creach-ui-product-card--compact > .creach-card-image {
  aspect-ratio:5 / 4!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
}
body .product-card.catalog-card-pro.creach-ui-product-card--standard .product-actions-pro.two-only .btn.primary,
body .catalog-pro-page .catalog-products article.creach-ui-product-card--standard .product-actions-pro.two-only .btn.primary {
  background:var(--creach-card-accent)!important;
  color:#FFFFFF!important;
  border:1px solid var(--creach-card-accent)!important;
  box-shadow:none!important;
}
body .product-card.catalog-card-pro.creach-ui-product-card--standard .product-actions-pro.two-only .btn.outline {
  background:#FFFFFF!important;
  color:var(--creach-card-ink)!important;
  border:1px solid var(--creach-card-stroke)!important;
}
/* El color del SVG relleno debe ser siempre visible y homogéneo. */
body .product-card.catalog-card-pro.creach-ui-product-card--standard .product-actions-pro .btn .btn-ico svg.creach-brand-icon,
body .product-card.catalog-card-pro.creach-ui-product-card--standard .product-actions-pro .btn .btn-ico svg.creach-fa-icon {
  fill:currentColor!important; stroke:none!important;
}


/* ========================================================================
   CREACH V13 · ACCIONES EN DOS COLUMNAS: VER FICHA + COTIZAR
   Compartido en Inicio, catálogo, marcas, modelos, categorías y búsquedas.
   Mantener el flujo original quote.php -> registro -> WhatsApp.
   No modifica los botones de páginas ajenas a tarjetas de producto.
   ======================================================================== */
body article.creach-ui-product-card--standard .product-actions-pro.two-only,
body .catalog-pro-page article.creach-ui-product-card--standard .product-actions-pro.two-only,
body .brand-related-set article.creach-ui-product-card--standard .product-actions-pro.two-only {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-flow:row!important;
  gap:7px!important;
  width:100%!important;
}
body article.creach-ui-product-card--standard .product-actions-pro.two-only > a.btn {
  display:inline-flex!important;
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  white-space:nowrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  padding:8px 5px!important;
  font-size:clamp(9px, .77vw, 11px)!important;
  line-height:1.15!important;
  flex:none!important;
}
body article.creach-ui-product-card--standard .product-actions-pro.two-only > a.btn span:last-child {
  display:inline-block!important;
  flex:0 1 auto!important;
  min-width:0;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
}
body article.creach-ui-product-card--standard .product-actions-pro.two-only > a.btn .btn-ico {
  flex:0 0 15px!important;
  width:15px!important;
  height:15px!important;
}
/* En tarjetas muy estrechas gana legibilidad el texto antes que el icono. */
@container (max-width:245px) {
  .creach-ui-product-card--standard .product-actions-pro.two-only > a.btn .btn-ico {
    display:none!important;
  }
  .creach-ui-product-card--standard .product-actions-pro.two-only > a.btn {
    padding-inline:3px!important;
    font-size:10px!important;
  }
}

/* Productos relacionados: diseño compacto con dos CTA.
   "Añadir al carrito" permanece accesible en la esquina superior derecha. */
body main.creach-product-page article.creach-ui-product-card--compact {
  position:relative!important;
  container-type:inline-size;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-cart-add {
  display:grid!important;
  place-items:center!important;
  position:absolute!important;
  right:12px!important;
  top:12px!important;
  z-index:4!important;
  width:30px!important;
  height:30px!important;
  padding:6px!important;
  border:1px solid var(--creach-card-stroke)!important;
  border-radius:50%!important;
  background:#FFFFFF!important;
  color:var(--creach-card-accent)!important;
  cursor:pointer;
  box-shadow:0 2px 8px #00000012!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-cart-add svg {
  display:block;width:17px!important;height:17px!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-card-actions {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  width:100%!important;
  gap:5px!important;
  margin-top:auto!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-card-btn {
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  min-width:0!important;
  min-height:34px!important;
  width:100%!important;
  padding:5px 2px!important;
  border-radius:7px!important;
  text-align:center;
  font-size:9px!important;
  font-weight:750!important;
  line-height:1.15!important;
  font-family:Montserrat,Arial,sans-serif!important;
  white-space:nowrap!important;
  text-decoration:none!important;
  overflow:hidden;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-card-btn svg {
  display:block;
  flex:0 0 12px!important;
  width:12px!important;height:12px!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-card-btn span {
  white-space:nowrap!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-card-btn--detail {
  color:var(--creach-card-ink)!important;
  border:1px solid var(--creach-card-stroke)!important;
  background:#FFFFFF!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-card-btn--quote {
  color:#FFFFFF!important;
  border:1px solid var(--creach-card-accent)!important;
  background:var(--creach-card-accent)!important;
}
body main.creach-product-page article.creach-ui-product-card--compact .creach-related-card-btn--quote:hover {
  background:var(--creach-card-accent-hover)!important;
}
@container (max-width:175px) {
  .creach-related-card-actions .creach-related-card-btn svg {display:none!important;}
}
