.etge-box { margin: 32px 0; padding: 20px; background: #121212; border-radius: 16px; color: #f3f3f3; font-family: inherit; }
.etge-title { margin: 0 0 16px; font-size: 1.35rem; line-height: 1.25; color: #fff; }
.etge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.etge-card { display: flex; flex-direction: column; background: #1e1e1e; border: 2px solid #3a3a3a; border-radius: 14px; overflow: hidden; }
.etge-diamond { border-color: #f5a623; box-shadow: 0 0 0 1px rgba(245, 166, 35, .35); }
.etge-gold { border-color: #d4a017; }
.etge-top { border-color: #8a8a8a; }
.etge-photo { position: relative; display: block; aspect-ratio: 3 / 4; background: #2a2a2a; overflow: hidden; }
.etge-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etge-badge { position: absolute; top: 10px; left: 10px; background: #f5a623; color: #1a1a1a; font-size: .68rem; font-weight: 800; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; }
.etge-gold .etge-badge { background: #d4a017; }
.etge-top .etge-badge { background: #c9c9c9; }
.etge-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: .72rem; padding: 3px 8px; border-radius: 999px; }
.etge-body { padding: 12px 14px 8px; flex: 1; }
.etge-name { display: block; color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none; margin-bottom: 4px; }
.etge-place { color: #a8a8a8; font-size: .85rem; margin-bottom: 8px; }
.etge-pill { display: inline-block; background: rgba(245, 166, 35, .15); color: #f5a623; font-size: .68rem; font-weight: 700; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.etge-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid #2f2f2f; }
.etge-wa, .etge-profile { font-weight: 800; font-size: .8rem; padding: 7px 12px; border-radius: 8px; text-decoration: none; }
.etge-wa { background: #25d366; color: #0b2b16; }
.etge-profile { background: #ffd21f; color: #1a1a1a; }
.etge-empty { padding: 10px; background: #fff3cd; color: #664d03; border-radius: 6px; }
@media (max-width: 640px) {
	.etge-box { padding: 14px; }
	.etge-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.etge-body { padding: 10px; }
	.etge-foot { padding: 8px 10px 10px; }
}

/* Blocco: aria sotto, cosi' il titolo che segue non tocca il bordo */
.etge-theme, .etge-box { margin-bottom: 48px; }
.etge-theme { margin-top: 32px; }
.etge-theme .diamond-inner { padding-bottom: 8px; }

/* Pulsante finale */
.etge-more { margin: 40px 0 20px; text-align: center; clear: both; }
.etge-theme .etge-more .etge-more-btn,
.etge-box .etge-more .etge-more-btn {
	display: inline-block;
	background: #ffd21f;
	color: #1a1205 !important;
	font-weight: 800;
	font-size: 1rem;
	line-height: 1.3;
	text-decoration: none !important;
	border: 0;
	padding: 17px 40px;
	border-radius: 10px;
	box-shadow: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.etge-theme .etge-more .etge-more-btn:hover,
.etge-box .etge-more .etge-more-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(255, 210, 31, .3);
	color: #1a1205 !important;
}
@media (max-width: 640px) {
	.etge-more .etge-more-btn { display: block; padding: 14px 18px; }
}

/* Griglia a 3 colonne; oltre 3 profili diventa carosello */
.etge-theme .diamond-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.etge-carousel { position: relative; }
.etge-carousel .diamond-grid, .etge-carousel .etge-grid {
	display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
	scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 4px 2px 8px;
}
.etge-carousel .diamond-grid::-webkit-scrollbar, .etge-carousel .etge-grid::-webkit-scrollbar { display: none; }
.etge-carousel .diamond-grid > *, .etge-carousel .etge-grid > * {
	flex: 0 0 calc((100% - 32px) / 3); scroll-snap-align: start;
}
.etge-prev, .etge-next {
	position: absolute; top: 38%; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
	border: 2px solid #ffd21f; background: rgba(18,18,18,.92); color: #ffd21f; font-size: 26px; line-height: 1;
	cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 3px;
}
.etge-prev { left: -10px; } .etge-next { right: -10px; }
.etge-prev:disabled, .etge-next:disabled { opacity: .3; cursor: default; }
@media (max-width: 640px) {
	.etge-theme .diamond-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.etge-carousel .diamond-grid > *, .etge-carousel .etge-grid > * { flex-basis: calc((100% - 12px) / 2); }
	.etge-prev { left: -4px; } .etge-next { right: -4px; }
}

/* Distanza dal blocco card (il tema azzera i margini dei paragrafi) */
.etge-theme .etge-more, .etge-box .etge-more {
	display: flex !important; justify-content: center; width: 100%;
	margin: 0 !important; padding: 44px 0 24px !important; box-sizing: border-box;
}
.etge-theme .etge-more .etge-more-btn, .etge-box .etge-more .etge-more-btn { margin: 0 !important; }
@media (max-width: 640px) {
	.etge-theme .etge-more, .etge-box .etge-more { padding: 32px 0 16px !important; }
}

/* Vetrina nell'articolo: niente bordi sopra/sotto (evita il doppio bordo con
   la vetrina automatica del tema che segue) */
.etge-theme.diamond-section { border-top: 0 !important; border-bottom: 0 !important; padding-left: 0; padding-right: 0; }

/* Spazi compatti: poco vuoto sotto il pulsante e verso la vetrina successiva */
.etge-theme.diamond-section { padding-top: 32px !important; padding-bottom: 12px !important; margin-top: 0; margin-bottom: 24px; }
.etge-theme .diamond-inner { padding-bottom: 0; }
.etge-theme .etge-more { padding-bottom: 0 !important; }
@media (max-width: 640px) {
	.etge-theme.diamond-section { padding-top: 24px !important; padding-bottom: 8px !important; margin-bottom: 16px; }
}

/* Carosello: il contenitore non deve mai superare la larghezza della pagina,
   cosi' scorre solo la fila di card (non tutta la pagina) */
.etge-theme, .etge-theme .diamond-inner, .etge-carousel, .etge-box { min-width: 0; max-width: 100%; box-sizing: border-box; }
.etge-theme { overflow: hidden; }
.etge-carousel { width: 100%; overflow: hidden; }
.etge-carousel .diamond-grid, .etge-carousel .etge-grid {
	display: flex !important; width: 100%; min-width: 0; max-width: 100%;
	overflow-x: auto !important; overflow-y: hidden;
	overscroll-behavior-x: contain; touch-action: pan-x pan-y;
	-webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; box-sizing: border-box;
}
.etge-carousel .diamond-grid > *, .etge-carousel .etge-grid > * { min-width: 0; }
.etge-prev { left: 6px; } .etge-next { right: 6px; }
@media (max-width: 640px) {
	.etge-prev { left: 4px; } .etge-next { right: 4px; }
	.etge-carousel .diamond-grid > *, .etge-carousel .etge-grid > * { flex: 0 0 calc((100% - 12px) / 2) !important; }
}

/* La vetrina non deve mai allargare la colonna dell'articolo: contribuisce
   con larghezza 0 e poi si espande a tutta la colonna */
.etge-theme, .etge-box { width: 0; min-width: 100%; max-width: 100%; contain: inline-size; }
.etge-theme .dm-card, .etge-theme .dm-body, .etge-theme .dm-footer { min-width: 0; }
.etge-theme .dm-footer { flex-wrap: wrap; }

/* Mobile: pulsante delle stesse dimensioni degli altri della pagina */
@media (max-width: 640px) {
	.etge-theme .etge-more .etge-more-btn, .etge-box .etge-more .etge-more-btn {
		display: inline-block !important; width: auto; font-size: 13.12px; line-height: 1.3;
		padding: 10px 20px; border-radius: 7px;
	}
	.etge-theme .etge-more, .etge-box .etge-more { padding: 22px 0 4px !important; }
}

/* Griglia fissa a righe (niente slider): 4 o 3 per riga, poi nuove righe */
.etge-theme .diamond-grid, .etge-box .etge-grid { display: grid !important; overflow: visible !important; gap: 16px; }
.etge-theme .diamond-grid.etge-cols-4, .etge-box .etge-grid.etge-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.etge-theme .diamond-grid.etge-cols-3, .etge-box .etge-grid.etge-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.etge-theme .diamond-grid > *, .etge-box .etge-grid > * { flex: none; min-width: 0; }
@media (max-width: 900px) {
	.etge-theme .diamond-grid.etge-cols-4, .etge-box .etge-grid.etge-cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.etge-theme .diamond-grid.etge-cols-4, .etge-theme .diamond-grid.etge-cols-3,
	.etge-box .etge-grid.etge-cols-4, .etge-box .etge-grid.etge-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
