/* MakerSpecs — Card Prodotto (design guide §4.6) */

/* Il link wrapper non deve avere stile visivo */
.card-prodotto__link {
  display: block;
  text-decoration: none;
  height: 100%;
  min-width: 0;
}

.card-prodotto {
  background: var(--color-bg-overlay);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card-prodotto__link:hover .card-prodotto,
.card-prodotto:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Immagine 4:3 */
.card-prodotto__image {
  aspect-ratio: 4 / 3;
  width: 100%;
  border: 1px solid #fff;
  overflow: hidden;
  background: #fff;
}

.card-prodotto__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Body */
.card-prodotto__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.card-prodotto__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-end;
}

.card-prodotto__name {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
}

.card-prodotto__meta {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.card-prodotto__meta .sku {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-left: 4px;
}

.card-prodotto__specs {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Footer card: prezzo a sinistra, badge fascia a destra — stessa riga */
.card-prodotto__footer {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: nowrap;
}

.card-prodotto__price {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

/* Il badge non deve mai restringersi */
.card-prodotto__footer .badge-fascia {
  flex-shrink: 0;
}

.price-value {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Conversione USD sotto al prezzo EUR (solo lingua "en"): indicativa, su riga
   propria per non far troncare il prezzo principale sulle card strette. */
.price-value__usd {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-tertiary);
}

/* Conversione imperiale (pollici/libbre) accanto al dato metrico (lingua "en"). */
.data-point__imperial {
  color: var(--color-text-tertiary);
}

/* Fascia stimata: più lunga del prezzo secco, leggermente ridotta e in tono
   secondario per segnalare che è una stima e non il listino ufficiale. */
.price-value--range {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

.price-nd {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
