/* NexMind Offerte: token del child theme (--nx-*), chiaro/scuro automatico.
   Box nell'articolo: foto con bordo, titolo e una riga di dettaglio a
   sinistra, prezzo e bottone a destra separati da una linea sottile.
   Pagina Offerte: schede con foto, titolo, prezzo e bottone. Sempre fondo
   bianco con contorno, niente fondi grigi. */

.nxo-card[hidden] { display: none; }
.nxo-card, .nxo-box { margin: 0; }
.site .nxo-link { color: var(--nx-text, #1d1d1f); text-decoration: none !important; border: 1px solid var(--nx-line, rgba(0, 0, 0, .12)); border-radius: 18px; background: var(--nx-bg, #fff); transition: border-color .2s ease; }
html.nx-dark .site .nxo-link { --nx-line: rgba(255, 255, 255, .16); }
@media (hover: hover) {
	.site .nxo-link:hover { border-color: var(--nx-muted, #6e6e73); }
	.site .nxo-link:hover .nxo-btn { background: var(--nx-button-hover, #a84300); }
}

.nxo-img { display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border: 1px solid var(--nx-line, rgba(0, 0, 0, .12)); border-radius: 12px; }
.site .nxo-img img { width: 100%; height: 100%; margin: 0 !important; padding: 8%; object-fit: contain; box-sizing: border-box; }

.nxo-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nxo-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; font-weight: 600; line-height: 1.35; }
.nxo-meta { font-size: 13px; line-height: 1.4; color: var(--nx-muted, #6e6e73); }

.nxo-buy { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; text-align: right; }
.nxo-was { font-size: 13px; color: var(--nx-muted, #6e6e73); white-space: nowrap; }
.nxo-was s { margin-right: 6px; }
.nxo-off { font-weight: 600; color: #1d7a34; }
html.nx-dark .nxo-off { color: #30d158; }
.nxo-price { font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; }
.nxo-btn { display: inline-block; padding: 9px 20px; border-radius: 999px; background: var(--nx-button, #c24e00); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s ease; }

/* Box nell'articolo */
.nxo-inline { margin: 0 0 1.6em; }
.site .nxo-box .nxo-link { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 0 18px; padding: 14px; }
.nxo-box .nxo-img { width: 84px; height: 84px; }
.nxo-box .nxo-buy { min-width: 132px; padding-left: 18px; border-left: 1px solid var(--nx-line, rgba(0, 0, 0, .12)); align-self: stretch; }

/* Pagina Offerte */
.nxo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin: 0 0 24px; }
.site .nxo-card .nxo-link { display: flex; flex-direction: column; height: 100%; padding: 12px; }
.nxo-card .nxo-img { aspect-ratio: 1; border: 0; }
.nxo-card .nxo-body { flex: 1; padding: 12px 4px 0; }
.nxo-card .nxo-buy { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 12px; padding: 12px 4px 2px; border-top: 1px solid var(--nx-line, rgba(0, 0, 0, .12)); text-align: left; }
.nxo-card .nxo-was { order: 3; flex-basis: 100%; }
.nxo-card .nxo-price { font-size: 19px; }

/* Filtri */
.nxo-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.site .nxo-filters button { padding: 7px 14px; border: 1px solid var(--nx-line, rgba(0, 0, 0, .12)); border-radius: 999px; background: transparent; color: var(--nx-text, #1d1d1f); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.2; cursor: pointer; box-shadow: none; transform: none; }
html.nx-dark .site .nxo-filters button { --nx-line: rgba(255, 255, 255, .2); }
.site .nxo-filters button.is-on { background: var(--nx-text, #1d1d1f); border-color: var(--nx-text, #1d1d1f); color: var(--nx-bg, #fff); }

.nxo-disclosure, .nxo-inline .nxo-disclosure { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--nx-muted, #6e6e73); }
.nxo-empty { color: var(--nx-muted, #6e6e73); }

/* Telefono: nel box il prezzo e il bottone vanno sotto, su una riga */
@media (max-width: 600px) {
	.site .nxo-box .nxo-link { grid-template-columns: 64px minmax(0, 1fr); gap: 12px 14px; padding: 12px; }
	.nxo-box .nxo-img { width: 64px; height: 64px; }
	.nxo-box .nxo-buy { min-width: 0; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--nx-line, rgba(0, 0, 0, .12)); text-align: left; }
	.nxo-box .nxo-was { order: -1; flex-basis: 100%; margin-bottom: -4px; }
	.nxo-box .nxo-btn { margin-left: auto; padding: 10px 22px; }
	.nxo-title { font-size: 15px; }
	.nxo-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* Il tema colora di arancione tutti i link del testo (anche in dark mode) */
.site .entry-content a.nxo-link,
.site .entry-content a.nxo-link:visited { color: var(--nx-text, #1d1d1f) !important; text-decoration: none !important; }
