/* Storefront mega menu (includes/cc-mega-menu.php) — BonApp "Fresh & Airy". */

.cc-mm {
	--mm-leaf: #1f8a4c;
	--mm-leaf-deep: #176e3c;
	--mm-leaf-soft: #e4f3e9;
	--mm-ink: #1c1f1a;
	--mm-mute: #6b7168;
	--mm-line: #ecede8;
	--mm-well: #f3f4f1;
	--mm-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
	--mm-body: 'Figtree', 'Avenir Next', system-ui, sans-serif;

	position: relative;
	z-index: 40;
	width: min(1200px, 100% - 2rem);
	margin: 0 auto;
	font-family: var(--mm-body);
	border-bottom: 1px solid var(--mm-line);
}

/* While on, the bar replaces the header's main menu: the Elementor Nav Menu
   widget 4e8ed47f of the site header template (normal and sticky copies).
   The ElementsKit widget is the phones' hamburger and stays. */
body.cc-mega-menu-on [data-elementor-type="header"] .elementor-element-4e8ed47f {
	display: none !important;
}

.cc-mm *,
.cc-mm *::before,
.cc-mm *::after {
	box-sizing: border-box;
}

.cc-mm__bar {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	margin: 0;
	padding: 0.35rem 0 0.45rem;
	list-style: none;
}

.cc-mm__item {
	margin: 0;
}

/* The highlighted buttons float right as a group: the first one takes the
   free space, the next sits beside it. */
.cc-mm__item:not(.is-cta) + .cc-mm__item.is-cta {
	margin-left: auto;
}

.cc-mm .cc-mm__top {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	height: 2.35rem;
	padding: 0 0.8rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--mm-ink) !important;
	font-family: var(--mm-body) !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-decoration: none !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: background 0.15s ease;
}

.cc-mm .cc-mm__top:hover,
.cc-mm .cc-mm__top[aria-expanded="true"] {
	background: var(--mm-well) !important;
}

.cc-mm .cc-mm__top[aria-current="page"] {
	color: var(--mm-leaf-deep) !important;
}

.cc-mm .is-cta .cc-mm__top {
	background: var(--mm-leaf) !important;
	color: #fff !important;
}

.cc-mm .is-cta .cc-mm__top:hover {
	background: var(--mm-leaf-deep) !important;
}

/* Two highlighted buttons in a row sit together. */
.cc-mm__item.is-cta + .cc-mm__item.is-cta {
	margin-left: 0.4rem;
}

/* Picard's own navy (Picard brand, as in BonApp's Picard ribbon). */
.cc-mm .cc-mm-cta--picard .cc-mm__top {
	background: #002e6d !important;
}

.cc-mm .cc-mm-cta--picard .cc-mm__top:hover {
	background: #00235a !important;
}

.cc-mm__glyph {
	width: 1rem;
	height: 1rem;
	display: block;
}

.cc-mm__caret {
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.2s ease;
}

.cc-mm__top[aria-expanded="true"] .cc-mm__caret {
	transform: rotate(180deg);
}

.cc-mm .cc-mm__top:focus-visible,
.cc-mm a:focus-visible {
	outline: 2px solid var(--mm-leaf);
	outline-offset: 3px;
}

/* ---- Panel ---- */

.cc-mm__panel {
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	right: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	padding: 1.25rem;
	border: 1px solid var(--mm-line);
	border-radius: 1.25rem;
	background: #fff;
	box-shadow: 0 24px 48px -24px rgb(0 0 0 / 0.35);
	animation: cc-mm-in 0.18s ease-out;
}

.cc-mm__panel[hidden] {
	display: none;
}

.cc-mm__panel.is-rich {
	grid-template-columns: 15rem minmax(0, 1fr) 20rem;
}

@keyframes cc-mm-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

.cc-mm .cc-mm__photo {
	display: block;
	border-radius: 1rem;
	overflow: hidden;
	aspect-ratio: 1;
}

.cc-mm__photo img,
.cc-mm__feature img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.cc-mm__photo:hover img,
.cc-mm__feature:hover img {
	transform: scale(1.04);
}

.cc-mm__shelves {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding-top: 0.25rem;
}

.cc-mm .cc-mm__heading {
	margin: 0 0 0.75rem;
	font-family: var(--mm-display);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--mm-ink);
}

.cc-mm__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.15rem 1.5rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.cc-mm__panel:not(.is-rich) .cc-mm__list {
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

.cc-mm__list li {
	margin: 0;
}

.cc-mm .cc-mm__list a {
	display: block;
	padding: 0.45rem 0.6rem;
	margin-left: -0.6rem;
	border-radius: 0.6rem;
	color: var(--mm-ink) !important;
	font-size: 0.98rem;
	font-weight: 500;
	text-decoration: none !important;
	transition: background 0.12s ease, color 0.12s ease;
}

.cc-mm .cc-mm__list a:hover,
.cc-mm .cc-mm__list a[aria-current="page"] {
	background: var(--mm-leaf-soft);
	color: var(--mm-leaf-deep) !important;
}

.cc-mm .cc-mm__all {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: auto;
	color: var(--mm-leaf) !important;
	font-weight: 700;
	text-decoration: none !important;
}

.cc-mm__all svg {
	width: 1.05em;
	height: 1.05em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.15s ease;
}

.cc-mm__all:hover svg {
	transform: translateX(3px);
}

.cc-mm .cc-mm__feature {
	align-self: start;
	display: flex;
	flex-direction: column;
	border-radius: 1rem;
	overflow: hidden;
	background: var(--mm-well);
	color: var(--mm-ink) !important;
	text-decoration: none !important;
}

.cc-mm__feature img {
	height: auto;
	aspect-ratio: 3 / 1;
}

.cc-mm__feature-text {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.85rem 1rem 1rem;
	font-size: 0.9rem;
	line-height: 1.4;
	color: var(--mm-mute);
}

.cc-mm__feature-text strong {
	font-family: var(--mm-display);
	font-size: 1.1rem;
	line-height: 1.15;
	color: var(--mm-ink);
}

/* ---- Docked in the header (mega-menu.js) ----
   The bar takes the hidden menu's place beside the logo and stays sticky
   with the header; panels hang from the header row, at the column's width. */

.cc-mm.is-docked {
	position: static;
	width: 100%;
	margin: 0;
	border-bottom: 0;
}

.cc-mm.is-docked .cc-mm__bar {
	padding: 0;
}

[data-elementor-type="header"] .cc-mm-row {
	position: relative;
}

/* Elementor positions the column around the bar; let the panel reach past it
   to the row, so it spans the whole column width under the logo too. */
[data-elementor-type="header"] .cc-mm-row :is(.elementor-column, .elementor-widget-wrap):has(.cc-mm) {
	position: static;
}

.cc-mm.is-docked .cc-mm__panel {
	top: calc(100% + 0.25rem);
}

/* Narrow desktops: tighter items so the row and its buttons still fit. */
@media (max-width: 1240px) {
	.cc-mm .cc-mm__top {
		padding: 0 0.55rem !important;
		font-size: 0.9rem !important;
	}

	.cc-mm__bar {
		gap: 0;
	}
}

/* Phones and small tablets keep the header's own (hamburger) menu. */
@media (max-width: 1024px) {
	.cc-mm {
		display: none;
	}

	body.cc-mega-menu-on [data-elementor-type="header"] .elementor-element-4e8ed47f {
		display: block !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cc-mm__panel {
		animation: none;
	}

	.cc-mm *,
	.cc-mm *::after {
		transition: none !important;
	}
}

/* ---------- Phone menu: the photo menu's sections (cc-mega-menu-phone.php) ----------
   The header's offcanvas (ElementsKit) styles sub-entries as its desktop
   dropdown: 36px type on a pink gradient. Here they read as a list under
   their aisle, one step smaller and indented. */
#ekit-megamenu-menu-v-2-mobile .elementskit-submenu-panel {
	background: none !important;
	box-shadow: none !important;
	padding: 0.15rem 0 0.6rem !important;
}

#ekit-megamenu-menu-v-2-mobile .elementskit-submenu-panel > li > a {
	padding: 0.45rem 15px 0.45rem 30px !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1.3 !important;
	color: #1a1a1a !important;
	background: none !important;
}

#ekit-megamenu-menu-v-2-mobile .elementskit-submenu-panel > li > a:hover,
#ekit-megamenu-menu-v-2-mobile .elementskit-submenu-panel > li.current-menu-item > a {
	color: #707070 !important;
}
