/*
 * Regole comuni ai widget prodotto: sempre presenti insieme nella scheda, quindi in un solo file.
 * Titolo, marca, valutazione, codici, disponibilità, prezzo, spedizione, azioni, intestazioni, tabelle, riquadri.
 */

/* Intestazione di sezione */
.ev-sec-head { margin-bottom: var(--ev-space-5); }
.ev-sec-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--ev-space-4); }
.ev-sec-head__title { display: flex; align-items: center; gap: var(--ev-space-3); margin: 0; font-size: var(--ev-text-xl); line-height: var(--ev-leading-tight); font-weight: var(--ev-font-weight-bold); color: var(--ev-color-text); }
.ev-sec-head__title .ev-icon { width: 26px; height: 26px; }
.ev-sec-head__sub { margin: var(--ev-space-1) 0 0; font-size: var(--ev-text-sm); color: var(--ev-color-text-muted); }

/* Tabelle etichetta/valore */
.ev-data-table { width: 100%; border-collapse: collapse; font-size: var(--ev-text-sm); }
.ev-data-table th, .ev-data-table td { padding: var(--ev-space-2) var(--ev-space-3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--ev-color-border); }
.ev-data-table th { width: 42%; font-weight: var(--ev-font-weight-regular); color: var(--ev-color-text-muted); }
.ev-data-table tr:nth-child(odd) { background: var(--ev-color-surface); }

/* Riquadri informativi */
.ev-info-box { padding: var(--ev-space-5); border: 1px solid var(--ev-color-border); border-radius: var(--ev-radius-lg); background: #fff; }
.ev-info-box--brand { background: var(--ev-color-brand-soft); border-color: #f6cdd1; }
.ev-info-box--info { background: var(--ev-color-info-soft); border-color: #d3e2f4; }
.ev-info-box__title { margin: 0 0 var(--ev-space-2); font-size: var(--ev-text-base); font-weight: var(--ev-font-weight-bold); line-height: 1.35; color: var(--ev-color-text); }
.ev-info-box__text { margin: 0 0 var(--ev-space-4); font-size: var(--ev-text-sm); color: var(--ev-color-text-muted); }
.ev-info-box .ev-sec-head { margin-bottom: var(--ev-space-3); }
.ev-info-box .ev-sec-head__title { font-size: var(--ev-text-base); }
.ev-info-box .ev-sec-head__title .ev-icon { width: 22px; height: 22px; }

/* Veicoli indicati */
.ev-vlist { display: grid; gap: var(--ev-space-2); margin: 0 0 var(--ev-space-3); padding: 0; list-style: none; }
.ev-vlist__item { padding: var(--ev-space-3); background: #fff; border: 1px solid var(--ev-color-border); border-radius: var(--ev-radius-md); font-size: var(--ev-text-sm); font-weight: var(--ev-font-weight-semibold); }
.ev-vlist__source { margin: 0 0 var(--ev-space-3); font-size: var(--ev-text-xs); color: var(--ev-color-text-muted); }

/* Titolo, marca */
.ev-product-title { margin: 0; font-size: var(--ev-text-2xl); line-height: 1.15; font-weight: var(--ev-font-weight-bold); color: var(--ev-color-text); }
.ev-product-brand { display: inline-block; margin: 0; font-size: var(--ev-text-lg); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ev-color-brand); text-decoration: none; }
a.ev-product-brand:hover { text-decoration: underline; }

/* Stelle */
.ev-stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.ev-star { width: 16px; height: 16px; }
.ev-star__bg { fill: var(--ev-color-border-strong); }
.ev-star__fg { fill: var(--ev-color-rating); }
.ev-rating { display: inline-flex; align-items: center; gap: var(--ev-space-2); font-size: var(--ev-text-sm); color: var(--ev-color-text-muted); text-decoration: none; }
.ev-rating strong { color: var(--ev-color-text); }
a.ev-rating:hover .ev-rating__text { text-decoration: underline; }

/* Codici */
.ev-pmeta { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--ev-space-4); margin: 0; font-size: var(--ev-text-sm); }
.ev-pmeta dt { color: var(--ev-color-text-muted); }
.ev-pmeta dd { margin: 0; font-weight: var(--ev-font-weight-medium); }

/* Disponibilità */
.ev-pstock { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ev-space-2); padding-block: var(--ev-space-3); border-block: 1px solid var(--ev-color-border); font-size: var(--ev-text-sm); }
.ev-pstock__qty { color: var(--ev-color-text-muted); }

/* Prezzo */
.ev-pprice { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ev-space-2) var(--ev-space-3); margin: 0; }
.ev-pprice__current { color: var(--ev-color-brand); font-size: var(--ev-text-price); font-weight: var(--ev-font-weight-bold); line-height: 1; }
.ev-pprice__regular { color: var(--ev-color-text-muted); font-size: var(--ev-text-lg); }
.ev-pprice__saving { padding: 2px 8px; border-radius: var(--ev-radius-sm); background: var(--ev-color-brand-soft); color: var(--ev-color-brand); font-size: var(--ev-text-xs); font-weight: var(--ev-font-weight-bold); }
.ev-pprice__tax { flex-basis: 100%; font-size: var(--ev-text-xs); color: var(--ev-color-text-muted); }

/* Spedizione */
.ev-ship { display: flex; gap: var(--ev-space-3); align-items: flex-start; font-size: var(--ev-text-sm); }
.ev-ship > .ev-icon { width: 28px; height: 28px; flex: none; color: var(--ev-color-text); }
.ev-ship__title { display: block; }
.ev-ship__text { display: block; color: var(--ev-color-text-muted); }

/* Azioni */
.ev-pactions { display: flex; flex-wrap: wrap; gap: var(--ev-space-2) var(--ev-space-5); }
.ev-pactions__link { display: inline-flex; align-items: center; gap: var(--ev-space-2); padding: 0; border: 0; background: none; font: inherit; font-size: var(--ev-text-sm); color: var(--ev-color-text); text-decoration: none; cursor: pointer; }
.ev-pactions__link:hover { color: var(--ev-color-brand); text-decoration: underline; }
.ev-pactions__link:focus-visible { outline: 2px solid var(--ev-color-focus); outline-offset: 2px; }
.ev-pactions__link .ev-icon { width: 18px; height: 18px; }

/* Testo lungo */
.ev-prose { font-size: var(--ev-text-sm); line-height: 1.65; color: var(--ev-color-text-muted); }
.ev-prose > * { margin: 0; }
.ev-prose > * + * { margin-top: var(--ev-space-3); }
.ev-prose :where(a) { color: var(--ev-color-brand); }
.ev-prose :where(img) { max-width: 100%; height: auto; }
