/* Fixture Download – sezione scheda prodotto
 *
 * Il box non impone colori propri: eredita il colore del testo dal tema
 * (`currentColor`) e ricava superficie, bordi e testi secondari da quello.
 * Così sta bene sia sul fondo nero di Lamposhop/Baton sia su un tema chiaro.
 * Le classi .lpd-theme-light / .lpd-theme-dark forzano l'uno o l'altro.
 */

.lpd-downloads {
	--lpd-accent: #f0c020;
	--lpd-accent-text: #000;

	/* Fallback per browser senza color-mix() */
	--lpd-surface: rgba(127, 127, 127, .07);
	--lpd-line: rgba(127, 127, 127, .3);

	box-sizing: border-box;
	margin: 22px 0 10px;
	padding: 20px 24px 10px;
	border: 1px solid var(--lpd-line);
	border-radius: 16px;
	background: var(--lpd-surface);
	color: inherit;
	font-family: inherit;
	line-height: 1.35;
	clear: both;
}

@supports (background: color-mix(in srgb, currentColor 5%, transparent)) {
	.lpd-downloads {
		--lpd-surface: color-mix(in srgb, currentColor 5%, transparent);
		--lpd-line: color-mix(in srgb, currentColor 17%, transparent);
	}
}

.lpd-downloads.lpd-theme-light {
	--lpd-surface: #fff;
	--lpd-line: rgba(0, 0, 0, .1);
	color: #14161a;
}

.lpd-downloads.lpd-theme-dark {
	--lpd-surface: rgba(255, 255, 255, .05);
	--lpd-line: rgba(255, 255, 255, .15);
	color: #fff;
}

.lpd-downloads * {
	box-sizing: border-box;
}

/* Titolo -------------------------------------------------------------- */

.lpd-downloads .lpd-downloads__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	padding: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: inherit;
	opacity: .62;
	line-height: 1.2;
	border: 0;
}

.lpd-downloads .lpd-downloads__title-icon {
	display: inline-flex;
	color: var(--lpd-accent);
	opacity: 1;
}

.lpd-downloads .lpd-downloads__title-icon svg {
	width: 19px;
	height: 19px;
}

/* Lista --------------------------------------------------------------- */

.lpd-downloads .lpd-downloads__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lpd-downloads .lpd-file {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 16px 0;
	border-top: 1px solid var(--lpd-line);
	list-style: none;
}

.lpd-downloads .lpd-file:first-child {
	border-top: 0;
}

.lpd-downloads .lpd-file__badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 13px;
	background: #4b5563;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .03em;
}

.lpd-downloads .lpd-file__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.lpd-downloads .lpd-file__name {
	font-size: 17px;
	font-weight: 700;
	color: inherit;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.lpd-downloads .lpd-file__meta {
	font-size: 14px;
	color: inherit;
	opacity: .55;
}

/* Bottone ------------------------------------------------------------- */

.lpd-downloads .lpd-file__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 28px;
	border: 0;
	border-radius: 50px;
	background: var(--lpd-accent);
	color: var(--lpd-accent-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
	white-space: nowrap;
	transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

/* Variante "CTA da sito": maiuscolo con tracking, come i bottoni Lamposhop */
.lpd-downloads.lpd-caps .lpd-file__btn {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 17px 30px;
}

.lpd-downloads .lpd-file__btn:hover,
.lpd-downloads .lpd-file__btn:focus {
	color: var(--lpd-accent-text);
	text-decoration: none;
	transform: translateY(-2px);
	filter: brightness(1.08);
	box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}

@supports (box-shadow: 0 0 0 color-mix(in srgb, red 40%, transparent)) {
	.lpd-downloads .lpd-file__btn:hover,
	.lpd-downloads .lpd-file__btn:focus {
		box-shadow: 0 10px 26px color-mix(in srgb, var(--lpd-accent) 40%, transparent);
	}
}

.lpd-downloads .lpd-file__btn:focus-visible {
	outline: 2px solid var(--lpd-accent);
	outline-offset: 3px;
}

.lpd-downloads .lpd-file__btn:active {
	transform: translateY(0);
}

.lpd-downloads .lpd-file__btn svg {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

/* Colori per estensione ------------------------------------------------ */

.lpd-downloads .lpd-ext-pdf { background: #d93025; }
.lpd-downloads .lpd-ext-zip,
.lpd-downloads .lpd-ext-rar,
.lpd-downloads .lpd-ext-7z { background: #b45309; }
.lpd-downloads .lpd-ext-doc,
.lpd-downloads .lpd-ext-docx,
.lpd-downloads .lpd-ext-txt { background: #1d4ed8; }
.lpd-downloads .lpd-ext-xls,
.lpd-downloads .lpd-ext-xlsx,
.lpd-downloads .lpd-ext-csv { background: #15803d; }
.lpd-downloads .lpd-ext-dwg,
.lpd-downloads .lpd-ext-dxf { background: #7c3aed; }
.lpd-downloads .lpd-ext-jpg,
.lpd-downloads .lpd-ext-jpeg,
.lpd-downloads .lpd-ext-png,
.lpd-downloads .lpd-ext-webp { background: #0891b2; }
.lpd-downloads .lpd-ext-exe,
.lpd-downloads .lpd-ext-bin,
.lpd-downloads .lpd-ext-hex { background: #334155; }

/* Fixture e fotometrie: badge nel colore brand */
.lpd-downloads .lpd-ext-gdtf,
.lpd-downloads .lpd-ext-mvr,
.lpd-downloads .lpd-ext-ies,
.lpd-downloads .lpd-ext-ldt,
.lpd-downloads .lpd-ext-ift,
.lpd-downloads .lpd-ext-r20,
.lpd-downloads .lpd-ext-lib,
.lpd-downloads .lpd-ext-ssl2,
.lpd-downloads .lpd-ext-d4 {
	background: var(--lpd-accent);
	color: var(--lpd-accent-text);
}

.lpd-downloads .lpd-ext-gdtf,
.lpd-downloads .lpd-ext-ssl2 { font-size: 12px; }

/* Mobile -------------------------------------------------------------- */

@media (max-width: 480px) {
	.lpd-downloads {
		padding: 16px 16px 6px;
	}

	.lpd-downloads .lpd-file {
		flex-wrap: wrap;
		gap: 12px;
	}

	.lpd-downloads .lpd-file__badge {
		width: 46px;
		height: 46px;
		border-radius: 11px;
		font-size: 11px;
	}

	.lpd-downloads .lpd-ext-gdtf,
	.lpd-downloads .lpd-ext-ssl2 { font-size: 10px; }

	.lpd-downloads .lpd-file__info {
		flex: 1 1 60%;
	}

	.lpd-downloads .lpd-file__name {
		font-size: 16px;
		-webkit-line-clamp: 3;
	}

	.lpd-downloads .lpd-file__btn {
		flex: 1 1 100%;
		justify-content: center;
		padding: 16px 20px;
	}
}

/* =====================================================================
 * Fascia in fondo alla scheda prodotto: download + console compatibili
 * ================================================================== */

.lpd-band {
	--lpd-accent: #f0c020;
	--lpd-accent-text: #000;

	box-sizing: border-box;
	/* A tutta larghezza anche dentro un container del tema */
	width: 100vw;
	max-width: 100vw;
	margin: 56px 0 0;
	margin-left: calc(50% - 50vw);
	padding: 62px 0 70px;
	background: var(--lpd-accent);
	color: var(--lpd-accent-text);
	font-family: inherit;
	overflow: hidden;
}

.lpd-band--preview {
	width: auto;
	max-width: none;
	margin: 0;
	padding: 34px 0 40px;
	border-radius: 12px;
}

.lpd-band * { box-sizing: border-box; }

.lpd-band__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 26px;
}

.lpd-band .lpd-band__heading {
	margin: 0 0 22px;
	padding: 0;
	font-size: 34px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.01em;
	color: inherit;
	border: 0;
}

.lpd-band .lpd-band__heading--brands {
	margin-top: 52px;
}

/* Elenco download ------------------------------------------------------ */

.lpd-band__card {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.lpd-band__row {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 22px 28px;
	border-top: 1px solid #edeff2;
	color: #14161a;
}

.lpd-band__row:first-child { border-top: 0; }

.lpd-band__icon {
	flex: 0 0 auto;
	display: inline-flex;
	color: #6b7280;
}

.lpd-band__icon svg { width: 24px; height: 24px; }

.lpd-band__name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 17px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.lpd-band__size {
	flex: 0 0 auto;
	font-size: 15px;
	color: #6b7280;
	white-space: nowrap;
}

.lpd-band .lpd-band__login {
	flex: 0 0 auto;
	font-size: 16px;
	font-weight: 700;
	color: #14161a;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 2px;
	white-space: nowrap;
	transition: opacity .2s ease;
}

.lpd-band .lpd-band__login:hover { opacity: .6; color: #14161a; }

.lpd-band .lpd-band__dl {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 13px 24px;
	border-radius: 50px;
	background: #14161a;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .2s ease, opacity .2s ease;
}

.lpd-band .lpd-band__dl:hover {
	color: #fff;
	transform: translateY(-2px);
	opacity: .9;
}

/* Vetrina console / software ------------------------------------------- */

/* Flex invece di grid: le card si adattano al numero di loghi disponibili e
   l'ultima riga resta centrata invece di lasciare un buco a destra. */
.lpd-band__brands {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lpd-band .lpd-brand {
	flex: 1 1 168px;
	max-width: 240px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	margin: 0;
	padding: 22px 14px;
	min-height: 104px;
	background: #fff;
	border-radius: 14px;
	list-style: none;
	text-align: center;
	color: #14161a;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

/* Card scure: obbligatorie se i loghi sono nella versione bianca */
.lpd-band__brands--dark .lpd-brand {
	background: #14161a;
	color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

/* I loghi hanno proporzioni molto diverse (wordmark larghi vs marchi quadrati):
   il doppio limite altezza/larghezza li porta a un peso ottico simile. */
.lpd-band .lpd-brand__logo {
	max-width: 74%;
	max-height: 40px;
	width: auto;
	height: auto;
	margin-bottom: 8px;
	object-fit: contain;
}

.lpd-band .lpd-brand--logo { justify-content: center; }

.lpd-band .lpd-brand__name {
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .01em;
	line-height: 1.2;
}

.lpd-band .lpd-brand__sub {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	opacity: .55;
}

@media (max-width: 780px) {
	.lpd-band { padding: 46px 0 52px; }
	.lpd-band .lpd-band__heading { font-size: 27px; }
	.lpd-band .lpd-band__heading--brands { margin-top: 40px; }
	.lpd-band__row { flex-wrap: wrap; gap: 8px 14px; padding: 18px 20px; }
	.lpd-band__name { flex: 1 1 70%; font-size: 16px; }
	.lpd-band__size { order: 3; flex: 1 1 auto; }
	.lpd-band .lpd-band__login,
	.lpd-band .lpd-band__dl { order: 4; }
}

@media (max-width: 520px) {
	.lpd-band__inner { padding: 0 16px; }
	.lpd-band__brands { gap: 12px; }
	.lpd-band .lpd-brand { flex-basis: calc(50% - 6px); max-width: none; }
	.lpd-band .lpd-brand { min-height: 88px; padding: 18px 10px; }
	.lpd-band .lpd-band__dl { width: 100%; justify-content: center; }
}
