/* Mega menu — base */
.g2-mega {
	display: none;
}

/* Mega menu — desktop */
@media (min-width: 1024px) {
	/* Header aperto */
	.g2-header.is-menu-open {
		height: 182px;
	}

	/* Su pagine static l'header è nel flusso: compensa i 28 px persi */
	body.g2-header--static .g2-header.is-menu-open {
		margin-bottom: 28px;
	}

	body.g2-header--absolute .g2-header.is-menu-open,
	body.g2-header--static .g2-header.is-menu-open {
		background-color: var(--g2-bg);
	}

	.g2-header.is-menu-open .g2-header__bar {
		padding-bottom: 12px;
	}

	.g2-header.is-menu-open .g2-header__link {
		color: #423831;
	}

	.g2-header.is-menu-open .g2-header__logo img {
		content: url('/wp-content/uploads/2026/10/grattoni-logo-header.png');
	}

	.g2-header.is-menu-open .g2-header__icon--user {
		background-color: #423831 !important;
	}

	.g2-header.is-menu-open .bde-mini-cart-toggle__icon {
		background-color: #423831 !important;
	}

	.g2-header.is-menu-open .bde-search-form-v2__icon {
		background-color: #423831 !important;
	}

	.g2-header.is-menu-open .g2-header__burger span {
		background-color: var(--g2-ink);
	}

	/* Pannello */
	.g2-mega {
		display: none;
		position: absolute;
		top: 182px;
		left: 0;
		right: 0;
		height: 278px;
		background-color: var(--g2-bg);
		border-top: 1px solid #786f69;
		z-index: 190;
	}

	.g2-mega.is-open {
		display: block;
	}

	.g2-mega__inner {
		box-sizing: border-box;
		width: min(100% - 164px, 1276px);
		margin: 0 auto;
		padding: 32px 30px 0 max(0px, calc((min(100% - 164px, 1276px) - 1150px) / 2));
	}

	.g2-mega__panel {
		display: none;
	}

	.g2-mega__panel.is-active {
		display: block;
	}

	.g2-mega__row {
		display: flex;
		align-items: flex-start;
		gap: 90px;
	}

	.g2-mega__row--media {
		justify-content: space-between;
		flex-wrap: wrap;
		row-gap: 16px;
	}

	.g2-mega__links {
		display: flex;
		flex-wrap: wrap;
		gap: 90px;
	}

	.g2-mega__link {
		color: #423831;
		font: 400 18px/28px "Lato", sans-serif;
		text-decoration: none;
		white-space: nowrap;
	}

	.g2-mega__link:hover,
	.g2-mega__link:focus {
		text-decoration: underline;
	}

	.g2-mega__media {
		display: block;
		width: 252px;
		margin-left: auto;
		color: #423831;
		text-decoration: none;
	}

	.g2-mega__media img {
		display: block;
		width: 252px;
		height: 174px;
		object-fit: cover;
	}

	.g2-mega__media span {
		display: block;
		margin-top: 8px;
		font: 400 18px/28px "Lato", sans-serif;
		text-decoration: underline;
	}

	.g2-mega__cols {
		display: grid;
		grid-template-columns: 314px 338px;
		gap: 85px;
	}

	.g2-mega__head {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-bottom: 14px;
	}

	.g2-mega__heading {
		color: #423831;
		font: 400 18px/28px "Lato", sans-serif;
		letter-spacing: 0.02em;
		text-transform: uppercase;
	}

	.g2-mega__rule {
		flex: 0 0 24px;
		width: 24px;
		height: 1px;
		background-color: #786f69;
	}

	.g2-mega__view {
		color: #423831;
		font: 400 18px/28px "Lato", sans-serif;
		text-decoration: none;
	}

	.g2-mega__view:hover,
	.g2-mega__view:focus {
		text-decoration: underline;
	}

	.g2-mega__list {
		display: flex;
		flex-direction: column;
		gap: 6px;
	}

	.g2-mega__panel[data-panel="bottega"] .g2-mega__row {
		width: min(100%, 1030px);
		justify-content: space-between;
		gap: 0;
	}

	.g2-mega__panel[data-panel="partner"] .g2-mega__row {
		width: min(100%, 326px);
		justify-content: space-between;
		gap: 0;
	}

	.g2-mega__panel[data-panel="shop"] .g2-mega__row {
		width: min(100%, 1081px);
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 0;
		row-gap: 6px;
	}
}

@media (min-width: 1024px) and (max-width: 1279px) {
	.g2-mega__row,
	.g2-mega__links {
		gap: 40px;
	}

	.g2-mega__panel[data-panel="shop"] .g2-mega__row {
		row-gap: 6px;
	}

	.g2-mega__media {
		display: none;
	}
}
