/* ── Base CUBE CSS Card Component ── */
.card {
  --local-card-bg: var(--surface);
  --local-card-color: var(--text-main);
  --local-card-border-color: var(--surface-border);
  --local-card-radius: var(--radius-brand);
  --local-card-shadow: inset 0 1px 0 0 oklch(100% 0 0 / 15%), var(--shadow-sm);
  --local-card-min-height: auto;
  --local-card-max-height: none;
  --local-card-height: auto;
  --local-card-max-width: var(--card-max-width);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  background-color: var(--local-card-bg);
  color: var(--local-card-color);
  border: 1px solid var(--local-card-border-color);
  border-radius: var(--local-card-radius);
  box-shadow: var(--local-card-shadow);
  min-height: var(--local-card-min-height);
  width: 100%;
  max-width: var(--local-card-max-width);
  max-height: var(--local-card-max-height);
  height: var(--local-card-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Card Internal Layout Invariants: Headers, footers and meta bars with .repel
   must retain horizontal extreme separation (space-between) across viewports,
   avoiding premature or centered stacking inside compact card containers. */
.card :is(.repel, [class*="repel"]) {
  --local-flex-dir: row;
  --local-align: center;
  --local-justify: space-between;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Bento Grid Context & Multi-Column Spans: Uncap max-width so cards fill their assigned grid columns */
:is([class*="grid-bento"], .grid-bento) > .card,
.card:is(.bento-wide, .bento-hero, .bento-full, .bento-tall, .bento-col-2, .bento-col-3, .bento-col-4, .card-feature-bento, .card-wide) {
  --local-card-max-width: 100%;
}

.card.bg-dark,
.bg-dark .card {
  --local-card-bg: var(--surface-elevated);
  --local-card-color: var(--text-main);
  --local-card-border-color: var(--surface-border);
  --local-card-shadow: inset 0 1px 0 0 oklch(100% 0 0 / 15%), var(--shadow-md);
}

.bg-dark .card.surface-glass,
.card.surface-glass {
  --local-card-bg: oklch(100% 0 0 / 10%);
  --local-card-color: var(--text-main);
  --local-card-border-color: var(--surface-border);
}

/* Card Island: Tarjeta clara de alto contraste sobre escenarios oscuros (SSOT: card-2col-project-showcase-grid-dark-stage.png) */
.card.card-island,
.bg-dark .card.card-island,
.card.bg-island,
.bg-dark .card.bg-island {
  --local-card-bg: var(--surface-island);
  --local-card-color: var(--surface-island-on);
  --local-card-border-color: var(--surface-island-border);
  --local-card-shadow: 0 1rem 2.25rem -0.75rem oklch(0% 0 0 / 25%);
  --local-card-max-width: min(var(--wrapper-narrow), 100%);
  --text-main: var(--surface-island-on);
  --text-muted: oklch(44% 0.018 var(--dark-h));
  /* Restaura la escala de superficie clara para controles anidados
     (favorite-btn, badges, botones outline…) que leen --surface-*. */
  --surface: var(--surface-island);
  --surface-elevated: var(--surface-island);
  --surface-border: var(--surface-island-border);
}

:is(.card.card-island, .card.bg-island, .bg-dark .card.card-island, .bg-dark .card.bg-island) .kicker {
  --local-kicker-color: var(--brand);
}

/* ── Houdini Hardware-Accelerated Interactive Glow Card Modifier ── */
/* ── Clean Perimetral Glow Card Modifier (Zero Fan Bleeding) ── */
.card-glow {
  position: relative;
  isolation: isolate;
}

.card-glow:hover {
  --local-card-border-color: var(--brand-accent);
  --local-card-shadow: 0 0 0 0.0625rem var(--brand-accent), 0 0 1.25rem oklch(86% var(--accent-c) var(--accent-h) / 25%);
}

/* ── Direct Oxygen Class-First Card Heading ──
   Font sizes are governed by utility classes (.text-2xl, .text-xl, .h2, .h3) or tag defaults */
.card-title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  margin-block-end: var(--space-2xs);
  text-wrap: balance;
  color: inherit;
}

/* ── Clickable Card Surface ──
   The media wrapper and the card title link to the listing. The anchor must
   fill the media box (percentage image sizing resolves against it), otherwise
   the image collapses once wrapped. */
.media-link {
  display: block;
  width: 100%;
  height: 100%;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--brand);
}

/* Sovereign title color for cards (immune to dark section link colors) */
:is(.card, .card-island, .card-product-spec, .card-entity-profile, .card-media-bleed):not(.bg-dark):not(.stage-dark) .card-title,
:is(.card, .card-island, .card-product-spec, .card-entity-profile, .card-media-bleed):not(.bg-dark):not(.stage-dark) .card-title a,
:is(.bg-dark, .stage-dark) :is(.card-island, .card-product-spec, .card-entity-profile, .card-media-bleed, .card:not(.bg-dark):not(.stage-dark)) .card-title,
:is(.bg-dark, .stage-dark) :is(.card-island, .card-product-spec, .card-entity-profile, .card-media-bleed, .card:not(.bg-dark):not(.stage-dark)) .card-title a {
  color: var(--text-main);
}

:is(.card, .card-island, .card-product-spec, .card-entity-profile, .card-media-bleed):not(.bg-dark):not(.stage-dark) .card-title a:hover,
:is(.bg-dark, .stage-dark) :is(.card-island, .card-product-spec, .card-entity-profile, .card-media-bleed, .card:not(.bg-dark):not(.stage-dark)) .card-title a:hover {
  color: var(--brand);
}

/* Featured / Bento Card Heading Variant */
.card-title-lg {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  margin-block-end: var(--space-2xs);
  text-wrap: balance;
  hyphens: none;
}

/* Compact Card Heading Variant */
.card-title-sm {
  font-family: var(--font-display);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  margin-block-end: var(--space-2xs);
  text-wrap: balance;
  hyphens: none;
}

/* Metric & KPI Numeric Headings in Cards */
.card .kpi-number {
  font-family: var(--font-display);
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-block-end: 0.25rem;
}

/* ── 1. Media Bleed Archetype (.card-media-bleed) ──
   Used for: Blog Articles, Technical Guides, Case Studies */
.card-media-bleed {
  --local-card-border-color: var(--surface-border);
  --local-card-shadow: inset 0 1px 0 0 oklch(100% 0 0 / 15%), var(--shadow-sm);
  padding: 0;
  overflow: hidden;
  text-decoration: none;
}

.card-media-bleed:hover {
  transform: translateY(-2px);
  --local-card-shadow: inset 0 1px 0 0 oklch(100% 0 0 / 15%), var(--shadow-md);
  --local-card-border-color: var(--surface-border);
}

/* Direct Oxygen Class-First Elements (Zero Combinator Over-Engineering) */

.card-body {
  background-color: var(--surface);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1 1 auto;
}

.card-desc {
  font-size: var(--font-size-sm);
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.55em * 3);
}

.card-desc :is(p, span, div) {
  display: inline;
  margin: 0;
}

.card-media-bleed :is(.card-footer, .repel:last-child) {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-top: 1px solid var(--surface-border);
  border-inline: none;
  border-bottom: none;
  padding-top: var(--space-xs);
  margin-top: auto;
  box-sizing: border-box;
}

:is(.card-footer, .card-footer-bar) :is(p, span, div, .caption) {
  margin: 0;
}

/* ── Editorial Media Box & Technical Caption Bar ── */
.featured-media-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: calc(var(--radius-brand) * 1.33);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
  gap: 0;
}

.featured-media-box img,
.featured-media-box .ct-image {
  display: block;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0;
  padding: 0;
}

/* ── 2. Product Spec Archetype (.card-product-spec) ──
   Used for: Vehicles, Inventory, Plans, Hardware Specs */
.card-product-spec {
  padding: var(--space-3xs);
  overflow: hidden;
}

.card-product-spec:hover {
  transform: translateY(-2px);
  --local-card-shadow: inset 0 1px 0 0 oklch(100% 0 0 / 15%), var(--shadow-md), var(--shadow-lg);
  --local-card-border-color: var(--brand-accent);
}

/* Boosted listing marker — payment/active boost SSOT drives the class in PHP/JS. */
.card.is-boosted,
.card-product-spec.is-boosted {
  --local-card-bg: var(--surface-elevated);
  --local-card-border-color: var(--brand-accent);
}

.card.is-boosted--featured,
.card-product-spec.is-boosted--featured {
  --local-card-border-color: var(--brand-accent);
}

.card.is-boosted--priority,
.card-product-spec.is-boosted--priority {
  --local-card-border-color: var(--brand);
  box-shadow: 0 0 1.25rem oklch(0.7 0.15 145 / 0.15);
}

/* Badge rail: en-flow badges stack at the top-left (FEATURED/boost above
   TOAD READY via order); media + action buttons overlay absolutely. */
.card-product-spec .media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: calc(var(--radius-brand) - 0.25rem);
  background-color: var(--surface-elevated);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--space-2xs);
  padding: var(--space-2xs);
  box-sizing: border-box;
}

.card-product-spec .media-wrap> :is(.media-link, img, .ct-image, picture) {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.card-product-spec .media-wrap img,
.card-product-spec .media-wrap .ct-image,
.card-product-spec .media-wrap picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: calc(var(--radius-brand) - 0.25rem);
}

.card-product-spec .media-wrap> .badge {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  z-index: 10;
  width: auto;
  max-width: calc(100% - 3.5rem); /* Clearance for top-right media-actions-wrap */
  height: auto;
  white-space: nowrap;
  align-self: flex-start;
  /* Media-shield defense: Always crisp and readable over unpredictable vehicle photography */
  --local-bg: oklch(16.2% 0.02 var(--dark-h) / 88%);
  --local-color: var(--white);
  --local-border-color: oklch(100% 0 0 / 22%);
  --local-shadow: 0 0.125rem 0.5rem oklch(0% 0 0 / 24%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.card-product-spec .media-wrap> .badge.badge-accent {
  --local-color: var(--accent-gold);
  --local-border-color: oklch(71.2% 0.145 82 / 40%);
}

/* Boost/Featured (solid intent) rides above the product-state badge. */
.card-product-spec .media-wrap> .badge.badge-solid {
  order: -1;
  --local-bg: var(--brand);
  --local-color: var(--white);
  --local-border-color: transparent;
  --local-shadow: var(--shadow-sm);
}

/* Proximity distance pill: floating badge on the media plate bottom-left */
.card-product-spec .media-wrap> .badge.badge-distance,
.card-product-spec .badge.badge-distance {
  position: absolute !important;
  bottom: var(--space-2xs) !important;
  left: var(--space-2xs) !important;
  top: auto !important;
  right: auto !important;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-mono);
  --local-bg: oklch(16.2% 0.02 var(--dark-h) / 88%);
  --local-color: var(--white);
  --local-border-color: oklch(100% 0 0 / 22%);
  --local-shadow: 0 0.125rem 0.5rem oklch(0% 0 0 / 24%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: var(--border-width) solid var(--local-border-color);
  border-radius: var(--radius-control);
  padding: var(--space-3xs) var(--space-2xs);
  box-shadow: var(--local-shadow);
  color: var(--local-color);
  background-color: var(--local-bg);
}

.card-product-spec .card-body {
  --local-body-pad: var(--space-xs) var(--space-sm) var(--space-sm) var(--space-sm);
  padding: var(--local-body-pad);
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  flex-grow: 1;
  width: 100%;
  box-sizing: border-box;
}

.card-product-spec .card-body .card-title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0;
}

.card-product-spec .card-body .card-desc {
  font-size: var(--font-size-sm);
  line-height: 1.38;
  color: var(--text-muted);
  margin: 0;
}

.card-product-spec .spec-grid {
  --card-min: 8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: var(--space-2xs) var(--space-xs);
  padding-block: var(--space-2xs);
  border-top: none;
  border-bottom: none;
  margin-block: var(--space-3xs);
  box-sizing: border-box;
  align-items: start;
}

.card-product-spec .spec-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--space-3xs);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--text-main);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.card-product-spec .spec-item :is(.icon, svg) {
  width: 0.875rem;
  height: 0.875rem;
  min-width: 0.875rem;
  min-height: 0.875rem;
  flex-shrink: 0;
  margin-top: calc(var(--space-3xs) * 0.5);
  color: var(--brand-accent);
  display: inline-block;
  vertical-align: middle;
}

.card-product-spec .spec-item :is(p, .ct-text-block:not(.icon), div) {
  margin: 0;
  padding: 0;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.card-product-spec .spec-item :is(p, .ct-text-block:not(.icon), div) :is(span, .ct-span) {
  display: inline;
  line-height: inherit;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.card-product-spec .card-body .repel {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: var(--space-2xs);
  margin-top: auto;
}

/* Vehicle price — second scan target after title; display scale stays reserved for KPI heroes */
.card-product-spec .card-body .repel .kpi-number {
  font-family: var(--font-mono);
  font-size: var(--font-size-h3);
  letter-spacing: -0.02em;
  margin-block-end: 0;
}

/* Official manufacturer source link (flat-towing spec provenance) */
.spec-source {
  --local-source-color: var(--text-muted);
  --local-source-border-color: var(--surface-border);
  display: flex;
  align-items: center;
  width: 100%;
  margin-block-start: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  letter-spacing: 0.03em;
}

.spec-source a {
  color: var(--local-source-color);
  text-decoration: none;
  border-bottom: 0.0625rem solid var(--local-source-border-color);
  transition: color var(--motion), border-color var(--motion);
}

.spec-source:hover {
  --local-source-color: var(--brand-accent);
  --local-source-border-color: var(--brand-accent);
}

/* ── Owner Provenance Dossier & Vehicle Note Cards ── */
.card-dossier-note {
  border-left: 3px solid var(--brand-accent);
  background-color: var(--surface-subtle);
  padding: var(--space-sm);
  border-radius: var(--radius-control);
}

.card-dossier-metric {
  border-left: 3px solid var(--brand);
  background-color: var(--surface-subtle);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-control);
}

/* ── Showcase Section & Header Custom Proportions ── */

/* ── 3. Entity Profile Archetype (.card-entity-profile) ──
   Used for: Service Centers, Directories, Team Members, Partners */
.card-entity-profile {
  --local-card-bg: var(--surface-elevated);
  --local-card-color: var(--text-main);
  --local-card-border-color: var(--surface-border);
  --local-card-shadow: var(--shadow-md), inset 0 1px 0 0 oklch(100% 0 0 / 15%);
  --local-card-radius: var(--radius-card);
  --local-card-dir: column;
  --local-repel-wrap: nowrap;
  --local-card-max-width: var(--card-max-width);

  container-type: inline-size;
  container-name: card-container;
  display: flex;
  flex-direction: var(--local-card-dir);
  width: min(100%, var(--local-card-max-width));
  align-self: stretch;

  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.card-entity-profile:hover {
  transform: translateY(-2px);
  --local-card-border-color: var(--brand-accent);
  --local-card-shadow: var(--shadow-lg), inset 0 1px 0 0 oklch(100% 0 0 / 15%);
}

/* Isla sobre dark: .bg-dark remapea --surface / --surface-elevated /
   --surface-border a tonos oscuros (utilities.css "Canonical dark scene").
   La isla restaura la escala de superficie clara a nivel de custom props para
   que paneles y badges no salgan oscuros sobre la tarjeta clara.
   --surface-island-on no hace falta: lo aporta .card-island (regla base). */
.bg-dark .card.card-entity-profile.card-island {
  --local-card-radius: var(--radius-card);
  --surface: var(--surface-island);
  --surface-elevated: var(--surface-island);
  --surface-border: var(--surface-island-border);
}

/* ── Media Panel (16:9 Top Bleed) ── */
.card-entity-profile .card-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  overflow: hidden;
  background-color: var(--surface-elevated);
  margin: 0;
  padding: 0;
}

.card-entity-profile .card-media-wrap img,
.card-entity-profile .card-media-wrap .ct-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

/* Superimposed Badges & Actions over 16:9 Media */
.card-entity-profile .media-actions-wrap {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  margin: 0;
}

.card-entity-profile .media-badge-wrap {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  margin: 0;
}

/* ── Content Body Panel ──
   Ritmo denso aprobado (Install Center): gap --space-2xs — declaración única
   del físico gap en la regla base ([single-property-declaration-law]). */
.card-entity-profile .card-body-panel {
  position: relative;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: stretch;
  gap: var(--space-2xs);
  background-color: var(--surface-elevated);
  color: var(--text-main);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Telemetry & Subhead Meta */
.card-entity-profile .repel,
.card-entity-profile .card-body-panel .repel {
  color: var(--text-muted);
}

/* Brand accent inside entity cards: the card body is always --surface-elevated
   (L 92.5%), so the token must be the container-ink variant. --brand-accent is
   L 92.5% too and collapsed to a ~1:1 ratio against the card surface. */
.card-entity-profile :is(.text-brand, .repel .text-brand) {
  color: var(--brand-on-container);
}

.card-entity-profile .text-muted,
.card-entity-profile .card-body-panel .text-muted,
.card-entity-profile .card-body-panel p {
  color: var(--text-muted);
}

/* Spec Chips & Clusters */
.card-entity-profile .cluster .spec-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  font-size: var(--font-size-sm);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background-color: oklch(100% 0 0 / 8%);
  padding: var(--space-3xs) var(--space-2xs);
  border-radius: calc(var(--radius-brand) * 0.5);
}

/* ── Action Floor Row (X-Axis Extremes, Y-Axis Floor) ── */
.card-entity-profile .actions-row {
  --local-repel-border: 1px solid oklch(100% 0 0 / 8%);
  --local-repel-padding: var(--space-xs) 0 0 0;
  margin-top: auto;
  display: flex;
  flex-wrap: var(--local-repel-wrap);
  justify-content: space-between;
  align-items: center;
}

.card-entity-profile .actions-row> :first-child {
  margin-right: 0;
  margin-left: 0;
}

.card-entity-profile .actions-row> :last-child {
  margin-left: auto;
  margin-right: 0;
}

@media (max-width: 39.98rem) {
  .card-entity-profile .actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
    width: 100%;
  }

  .card-entity-profile .actions-row > :is(:first-child, :last-child, .btn, a) {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    text-align: center;
  }
}

@container (max-width: 26rem) {
  .card-entity-profile .actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
    width: 100%;
  }

  .card-entity-profile .actions-row > :is(:first-child, :last-child, .btn, a) {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    text-align: center;
  }
}

/* ═══ Install Center — Formato canónico aprobado ═══
   Bloque "FIX FASE 1 + FORMATO CANÓNICO" de
   previews/install-center-section-canonical.html, trasladado a producción.
   (El gap del panel --space-2xs vive en la regla base .card-body-panel.) */

/* Ritmo vertical del panel: filas compactas (denso, sin huecos). */
.card-entity-profile .card-body-panel .cluster.cluster-xs {
  row-gap: var(--space-3xs);
}

/* Fila de spec con atom de icono — tratamiento canónico universal */
.spec-row,
.ct-div-block.spec-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-main);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.spec-row > :last-child,
.spec-row .ct-text-block:not(.icon) {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.spec-row > :last-child :is(span, .ct-text-block, p),
.spec-row span:not(.icon) {
  min-width: 0;
  max-width: 100%;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.spec-row .icon {
  flex-shrink: 0;
  color: var(--brand-accent);
}

.card-entity-profile .spec-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  width: 100%;
  min-width: 0;
}
.card-entity-profile .spec-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-main);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.card-entity-profile .spec-row > :last-child,
.card-entity-profile .spec-row .ct-text-block:not(.icon) {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}
.card-entity-profile .spec-row > :last-child :is(span, .ct-text-block, p),
.card-entity-profile .spec-row span:not(.icon) {
  min-width: 0;
  max-width: 100%;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.card-entity-profile .spec-row .icon {
  flex-shrink: 0;
  color: var(--brand-accent);
}

/* Meta-strip (rating + ciudad): ritmo denso SIN bordes — los bordes fueron
   eliminados por el usuario; no reintroducir border-t / border-b. */
.card-entity-profile .meta-strip {
  padding-block: var(--space-3xs);
}
.card-entity-profile .meta-city {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3xs);
}

/* Chips de acción sobre media (réplica del oxy-kore_favorite_button). */
.card-entity-profile .fav-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-control);
  background: var(--surface-island);
  color: var(--brand);
  border: 1px solid var(--surface-island-border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* Ultra-Narrow Card Container Query Responsiveness */
@container (max-width: 360px) {
  .card-entity-profile {
    --local-repel-wrap: wrap;
  }
}

/* ── Diptych Row Photo-Split Archetype (.card-row-split) ──
   Used for: Dashboard Vehicles, Projects, Outfitter Listings, Watchlists */
.card-row-split {
  --local-grid-cols: 1fr; /* mobile-first */
  --local-card-max-width: 100%;
  display: grid;
  grid-template-columns: var(--local-grid-cols);
  overflow: hidden;
}

.card-row-split:hover {
  transform: translateY(-2px);
  --local-card-border-color: var(--brand);
  --local-card-shadow: var(--shadow-md), inset 0 1px 0 0 oklch(100% 0 0 / 15%);
}

.card-row-split .card-body-panel {
  padding: clamp(1.25rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-sm);
  box-sizing: border-box;
  min-width: 0;
}

.card-row-split .card-title,
.card-row-split .card-title a {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.2;
  margin: 0;
}

.card-row-split .card-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.card-row-split .spec-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding-block: 0.625rem;
  border-top: 1px dashed var(--surface-border);
  border-bottom: 1px dashed var(--surface-border);
  margin-block: 0.25rem;
  width: 100%;
  box-sizing: border-box;
}

.card-row-split .spec-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main);
}

.card-row-split .card-footer-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2xs);
  margin-top: auto;
  border-top: 1px solid var(--surface-border);
  width: 100%;
  box-sizing: border-box;
}

.card-row-split .card-media-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 15rem;
  overflow: hidden;
  background-color: var(--surface-elevated);
  --local-media-min-height: 12rem;
  order: -1;
}

.card-row-split .card-media-wrap img,
.card-row-split .card-media-wrap .ct-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* mobile-first: media arriba en viewport estrecho */


@media (min-width: 768px) {
  .card-row-split {
    --local-grid-cols: 1.15fr 1fr;
  }

  .card-row-split .card-media-wrap {
    --local-media-min-height: auto;
    order: 0;
  }

  .card {
    width: auto;
  }
}

/* ── 4. Feature Bento Archetype (.card-feature-bento) ──
   Used for: Value Props, How-It-Works (1-2-3), Bento Grids */
.card-feature-bento {
  --local-card-border-color: var(--surface-border);
  --local-card-shadow: inset 0 1px 0 0 oklch(100% 0 0 / 15%), var(--shadow-sm);
  justify-content: var(--local-justify, space-between);
  gap: var(--local-gap, var(--space-md));
}

.card-feature-bento:hover {
  transform: translateY(-2px);
  --local-card-border-color: var(--surface-border);
  --local-card-shadow: inset 0 1px 0 0 oklch(100% 0 0 / 15%), var(--shadow-md);
}

/* ── Mobile Ergonomics ── */
/* mobile-first padding is already in body; desktop restores larger pad via min-width if needed */

/* ── 5. Hero Installer Archetype (.card-installer-hero) ──
   Used for: Featured & Search Result Install Centers & Certified Hubs */
.card-installer-hero {
  --local-hero-cols: 1fr; /* mobile-first */
  display: grid;
  grid-template-columns: var(--local-hero-cols);
  background-color: var(--surface-elevated);
  color: var(--text-main);
  --local-hero-border-color: var(--surface-border);
  --local-hero-shadow: var(--shadow-md);
  border: 1px solid var(--local-hero-border-color);
  border-radius: var(--radius-brand);
  overflow: hidden;
  box-shadow: var(--local-hero-shadow);
  transition: transform var(--duration-normal) ease, box-shadow var(--duration-normal) ease, border-color var(--duration-normal) ease;
  position: relative;
  width: 100%;
}

.card-installer-hero:hover {
  transform: translateY(-2px);
  --local-hero-shadow: var(--shadow-lg);
  --local-hero-border-color: var(--brand-accent);
}

.card-installer-hero .card-hero__content {
  padding: var(--local-content-pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
  background-color: var(--surface-elevated);
  z-index: 2;
  /* Pad ganador (block anterior declaraba --space-lg/--space-xl y quedaba
     sombreado): se conserva el valor efectivo actual, sin cambio de render. */
  --local-content-pad: var(--space-md) var(--space-lg);
}

.card-installer-hero .card-hero__title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin: 0;
}

.card-installer-hero .card-hero__title a {
  color: inherit;
  text-decoration: none;
}

.card-installer-hero .installer-telemetry-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin-block: 0.25rem;
}

.card-installer-hero .installer-telemetry-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-xs);
  padding-block: 0.625rem;
  border-bottom: 1px solid oklch(100% 0 0 / 10%);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-installer-hero .installer-telemetry-item:last-child {
  border-bottom: none;
}

.card-installer-hero .installer-telemetry-item svg {
  width: 1rem;
  height: 1rem;
  color: var(--brand-accent);
  flex-shrink: 0;
}

.card-installer-hero .card-hero__media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: var(--local-media-min-h);
  max-height: var(--local-media-max-h);
  overflow: hidden;
  background-color: var(--canvas);
  order: -1;
  /* Valores ganadores (se declaraban dos veces en el mismo block; se elimina
     el par sombreado 16.25rem/none para preservar el render actual). */
  --local-media-min-h: 12.5rem;
  --local-media-max-h: 15rem;
}

.card-installer-hero .card-hero__media img,
.card-installer-hero .card-hero__media .ct-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile & Tablet Responsiveness for Installer Hero Cards */
/* mobile-first */


@media (min-width: 850px) {
  .card-installer-hero {
    --local-hero-cols: 1.1fr 0.9fr;
  }

  .card-installer-hero .card-hero__media {
    order: 0;
    --local-media-min-h: auto;
    --local-media-max-h: none;
  }
}

/* ── Executive Statutory Summary Console (BLUF) ── */
.executive-declaration-console {
  background-color: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-brand);
  box-shadow: var(--shadow-sm);
}

.executive-declaration-console .quote-content {
  color: var(--text-main);
  font-size: var(--font-size-body);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════════════════════
   5. CANONICAL CTA STAGE CARD (.card-cta)
   Architectural high-conversion banners inspired by references/cta-*
   ══════════════════════════════════════════════════════════════════════════ */
.card-cta {
  --local-card-bg: var(--surface-elevated);
  --local-card-color: var(--text-main);
  --local-card-border-color: var(--surface-border);
  --local-card-shadow: var(--shadow-md), inset 0 1px 0 0 oklch(100% 0 0 / 15%);
  --local-card-max-width: 100%;
  --local-cta-pad-block: var(--space-xl);
  --local-cta-pad-inline: var(--space-lg);
  --local-cta-flex-dir: column;
  --local-cta-justify: flex-start;
  --local-cta-align: stretch;
  --local-cta-gap: var(--space-md);

  position: relative;
  display: flex;
  flex-direction: var(--local-cta-flex-dir);
  justify-content: var(--local-cta-justify);
  align-items: var(--local-cta-align);
  padding-block: var(--local-cta-pad-block);
  padding-inline: var(--local-cta-pad-inline);
  background-color: var(--local-card-bg);
  color: var(--local-card-color);
  border: 1px solid var(--local-card-border-color);
  border-radius: var(--radius-brand);
  box-shadow: var(--local-card-shadow);
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  gap: var(--local-cta-gap);
}

/* Variant: Stage Dark (Canonical high-impact dark surface) */
.card-cta.bg-dark,
.bg-dark .card-cta {
  --local-card-bg: var(--surface-elevated);
  --local-card-border-color: var(--surface-border);
  --local-card-shadow: var(--shadow-md), inset 0 1px 0 0 oklch(100% 0 0 / 15%);
  --local-card-color: var(--text-main);
}

/* Variant: Orbital Glow (Stage Dark CTA Banner with subtle radial atmosphere) */
.card-cta.card-cta--orbital {
  --local-card-bg: var(--surface-elevated);
  --local-card-border-color: var(--surface-border);
  --local-card-shadow: var(--shadow-lg), inset 0 1px 0 0 oklch(100% 0 0 / 15%);
  --local-card-color: var(--text-main);
  --local-orbital-glow: radial-gradient(circle at 50% 0%, oklch(33.5% var(--brand-c) var(--brand-h) / 0.18) 0%, transparent 70%);
  position: relative;
  overflow: hidden;
}

.card-cta.card-cta--orbital::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--local-orbital-glow);
}

/* Variant: Split 60/40 (Content left, Actions right on desktop) */
.card-cta.card-cta--split {
  --local-cta-flex-dir: row;
  --local-cta-justify: space-between;
  --local-cta-align: center;
  --local-cta-gap: var(--space-lg);
  flex-wrap: wrap;
}

.card-cta__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  width: 100%;
}

.card-cta__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text-main);
  text-wrap: balance;
}

.card-cta__body {
  font-size: var(--font-size-body);
  line-height: 1.65;
  margin: 0;
  color: var(--text-muted);
  max-width: 44rem;
}

.card-cta__actions {
  --local-actions-flex-dir: row;
  --local-actions-align: center;
  --local-actions-gap: var(--space-md);

  display: flex;
  flex-direction: var(--local-actions-flex-dir);
  flex-wrap: wrap;
  align-items: var(--local-actions-align);
  gap: var(--local-actions-gap);
  margin-block-start: var(--space-2xs);
  width: 100%;
}

.card-cta__telemetry {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── 6. Capsule Horizon Archetype (.card-cta__capsules) ──
   Implements canonical archetype cta-inverse-dark-stage-capsule-gallery
   governed by [cta-stage-card-capsule-horizon-law].
   Mobile: 2x2 grid. Desktop: asymmetric 22fr - 15fr - 38fr - 20fr rhythmic horizon. */
:is(.card-cta .card-cta__capsules, .ct-div-block.card-cta__capsules, .card-cta__capsules) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  width: 100%;
  align-items: center;
  box-sizing: border-box;
}

:is(.card-cta .card-cta__capsules, .ct-div-block.card-cta__capsules, .card-cta__capsules) > * {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius-full);
  position: relative;
  width: 100%;
  min-width: 0;
}

/* mobile-first: base already column; desktop unlocks row at ≥48rem */
@media (min-width: 48rem) {
  .card-cta {
    --local-cta-pad-block: var(--space-xl);
    --local-cta-pad-inline: var(--space-lg);
  }

  .card-cta.card-cta--split {
    --local-cta-flex-dir: row;
    --local-cta-align: center;
  }

  .card-cta__actions {
    --local-actions-flex-dir: row;
    --local-actions-align: center;
  }

  :is(.card-cta .card-cta__capsules, .ct-div-block.card-cta__capsules, .card-cta__capsules) {
    grid-template-columns: 22fr 15fr 38fr 20fr;
    gap: var(--space-md);
  }
}

.card-product-spec .media-wrap .media-actions-wrap {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  left: auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3xs);
  width: auto;
}

/* Icon badge centering & hover transform stabilization */

/* Card Footer CTA Alignment */
.card-media-bleed :is(.card-footer, .repel:last-child)> :last-child,
.card-footer> :last-child,
.card-footer .oxy-kore-button-container {
  margin-left: auto;
  margin-right: 0;
}

/* ── Orbital CTA Card Archetype (.card-cta--orbital) ── */
.card-cta--orbital {
  position: relative;
  overflow: hidden;
}

.card-cta--orbital>* {
  position: relative;
  z-index: 2;
}

.card-cta--orbital::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(oklch(100% 0 0 / 8%) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  mask-image: radial-gradient(ellipse at 80% 50%, black 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 50%, black 20%, transparent 72%);
  opacity: 0.9;
}

.card-cta--orbital::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 26rem;
  height: 26rem;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 75% 50%, oklch(33.5% var(--brand-c) var(--brand-h) / 0.18) 0%, transparent 70%);
}

/* mobile-first: decoración orbital solo ≥48rem */
.card-cta--orbital::after,
.card-cta--orbital::before {
  display: none;
}

@media (min-width: 48rem) {
  .card-cta--orbital::after,
  .card-cta--orbital::before {
    display: block;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card-cta--orbital::after {
    animation: kore-dot-drift 28s linear infinite;
  }

  .card-cta--orbital::before {
    animation: kore-ambient-pulse 14s ease-in-out infinite;
    will-change: transform, opacity;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
 * ARQUETIPO: Card Dealer (.card-dealer) — Ficha Canónica de Dealership
 * Base compartida con hero seller card (single-toad-dealer). El layout de
 * grilla (alturas iguales + footer anclado) vive en .card-dealer--grid.
 *
 * Condicionales CSS-ready (render condicional sin PHP):
 *   .card-dealer[data-verified="true"]  → VERIFIED badge visible
 *   .card-dealer[data-verified="false"] → VERIFIED badge oculto (display:none)
 *   .card-dealer__meta-row:empty        → meta row oculta si sin datos
 * ────────────────────────────────────────────────────────────────────────── */
.card-dealer {
  /* Control panel: muta SOLO --local-card-* (físicas declaradas una vez en .card)
     [single-property-declaration-law]. padding/border/radius/transition hereda
     de .card (mismos valores); gap es la única física propia (card sin .stack
     en el hero seller). */
  --local-card-bg: var(--surface-elevated);
  --local-card-shadow: var(--shadow-md), inset 0 1px 0 0 oklch(100% 0 0 / 15%);
  --local-gap: var(--space-sm);

  gap: var(--local-gap);
}

.card-dealer:hover {
  transform: translateY(-2px);
  --local-card-border-color: var(--brand-on-container);
  --local-card-shadow: var(--shadow-lg), inset 0 1px 0 0 oklch(100% 0 0 / 15%);
}

/* ── Grid variant: layout column + alturas iguales + footer anclado ──
   Usar junto con .stack (gap vertical) para el grifo de spacing.
   El footer se ancla a la base con margin-top:auto → alturas iguales. */
.card-dealer.card-dealer--grid {
  flex-direction: column;
  min-height: 100%;
}

/* ── Header: identity cluster + VERIFIED badge (repel) ── */
.card-dealer__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  min-width: 0;
}

.card-dealer__identity {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}

/* ── Avatar: circle, fixed scale, never expand to 100% ── */
.card-dealer__avatar {
  flex-shrink: 0;
}

/* ── Name / Company eyebrow / Description ── */
.card-dealer__name {
  min-width: 0;
  margin: 0;
  font-weight: var(--font-weight-medium);
  text-wrap: balance;
}

.card-dealer__company {
  color: var(--text-muted);
  min-width: 0;
}

/* Descripción: body copy clamped a 4 líneas con ellipsis [spec: line-clamp-4].
   Declarado aquí (componente, carga tras utilities.css) para que el clamp-4
   gobierne aunque el markup aún cargue line-clamp-3; migrar el nodo JSON a
   line-clamp-4 y este bloque podrá reducirse a min-width. */
.card-dealer__desc {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── VERIFIED badge: solo visible con data-verified="true" ── */
.card-dealer[data-verified="false"] .card-dealer__verified,
.card-dealer:not([data-verified]) .card-dealer__verified {
  display: none;
}

/* ── Meta row: dirección + inventario con iconos Solar Duotone ── */
.card-dealer__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}

.card-dealer__meta-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  min-width: 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: var(--leading-normal);
}

.card-dealer__meta-row .ct-svg-icon,
.card-dealer__meta-row svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: var(--space-3xs);
}

/* Empty state: meta row oculta si no hay contenido (render condicional CSS) */
.card-dealer__meta-row:empty {
  display: none;
}

/* ── Footer actions: ancho completo del grid variant ── */
.card-dealer--grid .card-dealer__footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding-top: var(--space-xs);
  border-top: var(--border-width) solid var(--local-card-border-color);
}

/* En viewport estrecho, los CTAs se apilan a ancho completo */
@media (max-width: 30rem) {
  .card-dealer--grid .card-dealer__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .card-dealer--grid .card-dealer__footer .btn {
    justify-content: center;
    width: 100%;
  }
}