/* ProductCard v5: compatible with the existing hydrated and prerendered cards.
   Every selector is restricted to #productos; catalog and expand controls retain their styles.
   The existing id attribute also supplies specificity over legacy brand card rules. */
#productos[id] > .tplab-container > div.grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 36px 28px;
}
#productos[id] > .tplab-container > div.grid > div { min-width: 0; }
#productos[id] article {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: var(--tplab-r-lg);
  background: hsl(var(--card));
  box-shadow: none;
  color: hsl(var(--tplab-stone-950));
  font-family: var(--tplab-font-sans);
}
#productos[id] article .tplab-product-stage {
  display: grid;
  place-items: center;
  margin: 16px 16px 0;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#productos[id] article .tplab-product-stage::before,
#productos[id] article .tplab-product-stage::after { content: none; }
#productos[id] article .tplab-product-stage img {
  width: 100%;
  height: auto;
  max-height: 235px;
  aspect-ratio: 4 / 3;
  padding: 16px;
  transition: transform 180ms ease;
}
#productos[id] article .tplab-product-stage:hover img { transform: scale(1.025); }
#productos[id] article > div.min-w-0 {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 20px 24px 16px;
}
#productos[id] article h3 {
  margin: 0;
  font-family: var(--tplab-font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.035em;
}
#productos[id] article h3 a { color: inherit; text-decoration: none; }
#productos[id] article h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
#productos[id] article .tplab-mono { display: none; }
#productos[id] article .tplab-eyebrow {
  display: block;
  margin: 8px 0 0;
  color: hsl(var(--tplab-stone-600));
  font-family: var(--tplab-font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
}
#productos[id] article .tplab-eyebrow-bar { display: none; }
#productos[id] article p.leading-relaxed:not(dl ~ p) {
  min-height: 3.3em;
  margin: 12px 0 0;
  color: hsl(var(--tplab-stone-700));
  font-size: 14px;
  line-height: 1.65;
}
#productos[id] article dl {
  display: grid;
  min-width: 0;
  gap: 10px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid hsl(var(--border));
}
#productos[id] article dl > div {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 4px 12px;
  font-size: 14px;
  line-height: 1.45;
}
#productos[id] article dt { flex: 1 1 80px; min-width: 0; color: hsl(var(--tplab-stone-600)); }
#productos[id] article dd {
  /* An intrinsic, non-shrinking basis keeps short values on one line.
     Values wider than the row occupy its full width and can wrap. */
  flex: 1 0 max-content;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: hsl(var(--tplab-stone-950));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}
#productos[id] article dl ~ p { display: none; }
#productos[id] article > div > div:empty { margin-top: 0; }
#productos[id] article > div > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}
#productos[id] article > div > div:last-child > a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  height: auto;
  font-family: var(--tplab-font-sans);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: normal;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
#productos[id] article > div > div:last-child > a::before,
#productos[id] article > div > div:last-child > a::after { content: none; }
#productos[id] article > div > div:last-child > a[href^="/marcas/"] {
  order: -1;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid hsl(var(--tplab-navy));
  border-radius: var(--tplab-r-md);
  background: hsl(var(--tplab-navy));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease;
}
#productos[id] article > div > div:last-child > a[href^="/marcas/"]:hover {
  border-color: hsl(var(--tplab-navy-mid));
  background: hsl(var(--tplab-navy-mid));
  box-shadow: none;
}
#productos[id] article > div > div:last-child > a[href^="/marcas/"]:active { transform: translateY(1px); }
#productos[id] article > div > div:last-child > a[href^="https://wa.me/"] {
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: hsl(var(--tplab-stone-600));
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 140ms ease;
}
#productos[id] article > div > div:last-child > a[href^="https://wa.me/"]:is(:hover, :active) {
  background: transparent;
  color: hsl(var(--tplab-stone-950));
  box-shadow: none;
  transform: none;
}
#productos[id] article > div > div:last-child > a[href^="https://wa.me/"] img { display: none; }
#productos[id] article > div > div:last-child > a svg { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; }
#productos[id] article a:focus-visible {
  outline: 2px solid hsl(var(--tplab-navy));
  outline-offset: 4px;
  box-shadow: none;
}
@media (min-width: 640px) {
  #productos[id] > .tplab-container > div.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  #productos[id] > .tplab-container > div.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  #productos[id] > .tplab-container > div.grid { gap: 28px; }
  #productos[id] article > div.min-w-0 { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #productos[id] article :is(a, .tplab-product-stage img) { transition: none !important; }
  #productos[id] article .tplab-product-stage:hover img { transform: none; }
}
