/* ECS Core — scheda prodotto, card, area download. Colori dalla palette Kadence. */

.ecs-product-top {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
	margin-bottom: 2.5rem;
}
@media (max-width: 860px) {
	.ecs-product-top { grid-template-columns: 1fr; gap: 1.5rem; }
}

.ecs-gallery-main img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	background: var(--global-palette9, #fff);
	border: 1px solid var(--global-palette7, #e6e6e6);
	border-radius: 6px;
}
.ecs-gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: .5rem;
	margin-top: .75rem;
}
.ecs-gallery-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border: 1px solid var(--global-palette7, #e6e6e6);
	border-radius: 4px;
}
.ecs-gallery-thumbs a[aria-current="true"] img { border-color: var(--global-palette1); }

.ecs-lead {
	font-family: var(--global-heading-font-family);
	font-size: 1.25rem;
	line-height: 1.45;
	font-weight: 600;
	color: var(--global-palette3);
	margin-top: 0;
}
.ecs-h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.ecs-features { margin: 0 0 1.5rem; padding-left: 1.2em; }
.ecs-features li { margin-bottom: .35rem; }
.ecs-features li::marker { color: var(--global-palette1); }
.ecs-cta { margin-top: .5rem; }

.ecs-product-body { margin-bottom: 2rem; }

.ecs-specs {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 2rem;
}
.ecs-specs th,
.ecs-specs td {
	text-align: left;
	vertical-align: top;
	padding: .6rem .75rem;
	border-bottom: 1px solid var(--global-palette7);
}
.ecs-specs th { width: 38%; font-weight: 600; color: var(--global-palette3); }

.ecs-doclist { list-style: none; margin: 0 0 2rem; padding: 0; }
.ecs-doclist li + li { border-top: 1px solid var(--global-palette7); }
.ecs-doclist a {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .15rem .9rem;
	padding: .75rem .25rem;
	text-decoration: none;
	color: inherit;
}
.ecs-doclist a:hover .ecs-doc-title,
.ecs-doclist a:focus-visible .ecs-doc-title { color: var(--global-palette1); text-decoration: underline; }
.ecs-doc-ext {
	grid-row: span 2;
	align-self: center;
	min-width: 3.2em;
	padding: .35em .5em;
	text-align: center;
	font-size: .75rem;
	font-weight: 700;
	color: var(--global-palette9);
	background: var(--global-palette1);
	border-radius: 4px;
}
.ecs-doc-title { font-weight: 600; }
.ecs-doc-meta { font-size: .875rem; color: var(--global-palette5); }

.ecs-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; padding: 0; }
.ecs-tags li {
	padding: .3rem .8rem;
	border-radius: 999px;
	background: var(--global-palette8);
	color: var(--global-palette3);
	font-size: .9rem;
}

.ecs-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.25rem;
	margin: 0 0 2rem;
}
.ecs-card {
	display: flex;
	flex-direction: column;
	gap: .4rem;
	padding: 1rem;
	background: var(--global-palette9);
	border: 1px solid var(--global-palette7);
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s, box-shadow .15s;
}
.ecs-card:hover,
.ecs-card:focus-visible { border-color: var(--global-palette1); box-shadow: 0 4px 16px rgba(26, 26, 26, .08); }
.ecs-card-img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.ecs-card-title { font-family: var(--global-heading-font-family); font-weight: 700; color: var(--global-palette3); }
.ecs-card-text { font-size: .9rem; color: var(--global-palette5); }

.ecs-family + .ecs-family { margin-top: 3rem; }
.ecs-family h2 a,
.ecs-family h3 a { text-decoration: none; color: inherit; }

/* Area download */
.ecs-filters {
	display: grid;
	grid-template-columns: 2fr repeat(3, 1fr);
	gap: .75rem;
	margin-bottom: 1rem;
}
@media (max-width: 860px) { .ecs-filters { grid-template-columns: 1fr 1fr; } .ecs-filters input { grid-column: 1 / -1; } }
@media (max-width: 480px) { .ecs-filters { grid-template-columns: 1fr; } }
.ecs-filters input,
.ecs-filters select { width: 100%; }
.ecs-table-wrap { overflow-x: auto; }
.ecs-doctable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ecs-doctable th,
.ecs-doctable td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--global-palette7); vertical-align: top; }
.ecs-doctable thead th { font-family: var(--global-heading-font-family); color: var(--global-palette3); border-bottom-width: 2px; }
.ecs-dl-cell { white-space: nowrap; text-align: right; }
.ecs-dl {
	display: inline-block;
	padding: .25rem .6rem;
	border-radius: 4px;
	background: var(--global-palette1);
	color: var(--global-palette9) !important;
	font-size: .8rem;
	font-weight: 600;
	text-decoration: none;
}
.ecs-dl:hover,
.ecs-dl:focus-visible { background: var(--global-palette2); }
@media (max-width: 700px) {
	.ecs-doctable thead { display: none; }
	.ecs-doctable tr { display: block; padding: .75rem 0; border-bottom: 1px solid var(--global-palette7); }
	.ecs-doctable td { display: block; border: 0; padding: .1rem 0; }
	.ecs-doctable td:empty { display: none; }
	.ecs-dl-cell { text-align: left; padding-top: .4rem !important; }
}

/* Selettore lingua */
.ecs-lang ul { list-style: none; margin: 0; padding: 0; }
.ecs-lang details { position: relative; }
.ecs-lang summary {
	cursor: pointer;
	list-style: none;
	font-family: var(--global-heading-font-family);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	padding: .35rem .6rem;
	border: 1px solid var(--global-palette7);
	border-radius: 4px;
	color: var(--global-palette3);
}
.ecs-lang summary::-webkit-details-marker { display: none; }
.ecs-lang summary::after { content: " ▾"; font-size: .8em; }
.ecs-lang details ul {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 1000;
	min-width: 160px;
	padding: .4rem 0;
	background: var(--global-palette9);
	border: 1px solid var(--global-palette7);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(26, 26, 26, .12);
}
.ecs-lang details a { display: block; padding: .4rem .9rem; color: var(--global-palette4); text-decoration: none; font-size: 14px; }
.ecs-lang details a:hover,
.ecs-lang details a:focus-visible,
.ecs-lang a[aria-current="true"] { color: var(--global-palette1); background: var(--global-palette8); }
.ecs-lang--list ul { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin-top: 1rem; }
.ecs-lang--list a { text-decoration: none; font-size: 14px; }
.ecs-lang--list a[aria-current="true"] { font-weight: 700; }
