/* Alumeco Mega Menu — scoped under [data-amm] to avoid theme collisions */

:root {
	--amm-red: #e4002b;
	--amm-red-dark: #c40025;
	--amm-ink: #1a1a1a;
	--amm-gray: #6b6b6b;
	--amm-border: #e7e7e7;
	--amm-bg-hover: #f7f7f7;
}

[data-amm] {
	position: relative;
	display: inline-block;
	font-family: inherit;
}

.amm-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	cursor: pointer;
	font-weight: 700;
	font-size: 15px;
	color: var(--amm-ink);
	padding: 8px 2px;
}

.amm-trigger:hover,
.amm-trigger[aria-expanded='true'] {
	color: var(--amm-red);
}

.amm-trigger__chevron {
	transition: transform 0.15s ease;
}

.amm-trigger[aria-expanded='true'] .amm-trigger__chevron {
	transform: rotate(180deg);
}

.amm-panel {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	z-index: 100;
	width: min(920px, 92vw);
	background: #fff;
	border: 1px solid var(--amm-border);
	border-radius: 4px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Tabs row: Aluminium / Copper / Brass ... */
.amm-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 14px 20px 0;
	border-bottom: 1px solid var(--amm-border);
}

.amm-tab {
	background: none;
	border: none;
	padding: 8px 14px 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--amm-ink);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.amm-tab:hover {
	color: var(--amm-red);
}

.amm-tab.is-active {
	color: var(--amm-red);
	border-bottom-color: var(--amm-red);
}

.amm-body {
	padding: 20px;
}

.amm-tabpanel {
	display: flex;
	gap: 28px;
	align-items: flex-start;
}

/* Left column: Прокат (Лист / Пруток / Плита ...) */
.amm-col--forms {
	flex: 0 0 220px;
	border-right: 1px solid var(--amm-border);
	padding-right: 20px;
}

.amm-form-list {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.amm-form-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: none;
	text-align: left;
	padding: 9px 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--amm-ink);
	cursor: pointer;
	border-radius: 3px;
}

.amm-form-item:hover {
	background: var(--amm-bg-hover);
}

.amm-form-item.is-active {
	color: var(--amm-red);
	background: var(--amm-bg-hover);
}

.amm-count {
	font-size: 12px;
	font-weight: 400;
	color: var(--amm-gray);
}

.amm-showall {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	font-weight: 700;
	color: var(--amm-red);
	text-decoration: none;
	text-transform: uppercase;
}

.amm-showall:hover {
	text-decoration: underline;
}

/* Right side: filter columns (Марка / Товщина / Ширина / Довжина) */
.amm-col--filters {
	flex: 1;
	min-width: 0;
}

.amm-hint {
	color: var(--amm-gray);
	font-size: 14px;
	margin: 10px 0 0;
}

.amm-filters__title {
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--amm-gray);
	margin-bottom: 12px;
}

.amm-filters__columns {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}

.amm-filter-col {
	min-width: 130px;
}

.amm-filter-col__title {
	font-weight: 700;
	font-size: 13px;
	color: var(--amm-ink);
	margin-bottom: 8px;
}

.amm-filter-col__scroll {
	max-height: 220px;
	overflow-y: auto;
	padding-right: 6px;
}

.amm-filter-option {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: var(--amm-ink);
	padding: 4px 0;
	cursor: pointer;
}

.amm-filter-option input {
	accent-color: var(--amm-red);
}

.amm-apply {
	margin-top: 18px;
	background: var(--amm-red);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 10px 22px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
}

.amm-apply:hover {
	background: var(--amm-red-dark);
}

.amm-empty {
	color: var(--amm-gray);
	font-size: 14px;
}

/* Mobile: click-to-expand, single column, no absolute positioning */
@media (max-width: 782px) {
	.amm-panel {
		position: static;
		width: auto;
		box-shadow: none;
		border-left: none;
		border-right: none;
	}

	.amm-tabpanel {
		flex-direction: column;
	}

	.amm-col--forms {
		border-right: none;
		border-bottom: 1px solid var(--amm-border);
		padding-right: 0;
		padding-bottom: 16px;
		width: 100%;
	}

	.amm-filters__columns {
		gap: 16px;
	}

	.amm-filter-col__scroll {
		max-height: 160px;
	}
}
