/**
 * Lane MENU-UNIFY (3 Nov 2026), D-659 to D-661 and the review round. Loaded only while `eupepsia_menu_unify_v1` is on
 * (inc/enqueue-menu-unify-v1.php, after header v6 and footer v6); every rule is on `body.eup-menu-unify-v1`, doubled
 * with header v6's own classes where header v6 sets the same property (its rules are `body.eup-hd6.eup-hd5 ...`).
 *
 *   - the two search places (drawer top, bar) are layout-neutral wrappers: the form stays the flex item;
 *   - phone drawer head: the shop logo, 40 px tall;
 *   - phone rows read as the desktop menu does (assumption F): SHOP, BODY MAP, THE EUPEPSIA WAY and the SHOP groups
 *     in 600 tracked caps (the bar and the panel rail); Best sellers, New arrivals, All products in 400 tracked caps
 *     (the panel's links row); the groups and links sit under the SHOP word (a label, not a control), 12 px in;
 *   - the Eupepsia group's Brands entry needs nothing: it is the same markup as its neighbours.
 */

body.eup-menu-unify-v1 .eup-mu__search-slot,
body.eup-menu-unify-v1 .eup-mu__search-home {
	display: contents;
}

/* D-660 (owner, 4 Nov): Brands, a group-level row that is a link (no chevron, no panel), in the drawer and the panel. */
body.eup-menu-unify-v1 .eup-hd .eup-mu__group-link,
body.eup-menu-unify-v1 .eup-hd .eup-mu__rail-link {
	text-decoration: none;
}

/* Footer: Brands as a heading-level link under the By Eupepsia group, in the heading's own style. */
body.eup-menu-unify-v1 #footer .eup-mu__ft-brands {
	margin-top: 16px;
}

body.eup-menu-unify-v1 #footer .eup-mu__ft-brands-link {
	color: inherit;
	text-decoration: none;
}

/* Phone footer (headings are disclosure rows, footer-v6.js `is-collapsible`): Brands is a row of its own, with the
   rows' divider above it (footer-v6.css draws them at each group's foot) and the rows' 48 px height. */
body.eup-menu-unify-v1 #footer.eup-ft6 .eup-ft6__group.is-collapsible .eup-mu__ft-brands {
	border-top: 1px solid rgba(220, 186, 140, 0.35);
	margin: 0;
}

body.eup-menu-unify-v1 #footer.eup-ft6 .eup-ft6__group.is-collapsible .eup-mu__ft-brands-link {
	align-items: center;
	display: flex;
	min-height: 48px;
}

body.eup-menu-unify-v1 #footer .eup-mu__ft-brands-link:hover,
body.eup-menu-unify-v1 #footer .eup-mu__ft-brands-link:focus-visible {
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (min-width: 1024px) {
	/* SHOP panel rail: one more row (Brands) above the links row; the open section spans all rail rows. */
	body.eup-menu-unify-v1 .eup-hd3 .eup-hd3__shop {
		grid-template-rows: auto auto auto auto auto 1fr;
	}

	body.eup-menu-unify-v1 .eup-hd3 .eup-hd3__row-6 {
		grid-row: 6;
	}

	body.eup-menu-unify-v1 .eup-hd3 .eup-hd3__shop .eup-hd3__section.eup-hd__panel-inner {
		grid-row: 1 / span 6;
	}

	body.eup-menu-unify-v1 .eup-hd3 .eup-mu__rail-link {
		align-items: center;
		box-sizing: border-box;
		display: flex;
		min-height: 48px;
	}
}

@media (max-width: 1023.98px) {
	/* Drawer head: the logo, a home link (a 44 px target), then the close button. */
	body.eup-menu-unify-v1 .eup-hd .eup-mu__logo {
		align-items: center;
		display: inline-flex;
		min-height: 44px;
		padding: 6px 0;
	}

	body.eup-menu-unify-v1 .eup-hd .eup-mu__logo-img {
		display: block;
		height: 68px; /* the bar's phone lockup height (measured 129 x 68 at 390, 4 Nov) */
		max-width: 220px;
		object-fit: contain;
		object-position: left center;
		width: auto;
	}

	body.eup-menu-unify-v1 .eup-hd .eup-mu__logo:focus-visible {
		outline: 3px solid var(--eup3-focus, #00857a);
		outline-offset: 2px;
	}

	/* Search at the top of the drawer, full width under the head. */
	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd3 .eup-mu__search-slot .eup-hd3__search,
	body.eup-menu-unify-v1 .eup-hd3 .eup-mu__search-slot .eup-hd3__search {
		margin: 16px var(--eup-gutter, 20px) 12px;
	}

	/* Round 5 (owner, 4 Nov): the SHOP row is a disclosure button like the groups (same classes, so the same caps, 48 px
	   height, chevron and turn); its list holds the groups and links, which keep their indent. */
	body.eup-menu-unify-v1 .eup-hd4 .eup-mu__shop-list {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	body.eup-menu-unify-v1 .eup-hd4 .eup-mu__shop-panel[hidden] {
		display: none;
	}

	/* SHOP groups and links, indented under SHOP, in the desktop panel's type (measured on staging at 1440, 4 Nov:
	   rail groups 600 tracked caps, as the drawer rows already are; the links row 400 tracked caps). */
	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd4 .eup-mu__group .eup-hd4__route-btn,
	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd4 .eup-mu__shop-link .eup-hd4__route-link {
		padding-left: calc(var(--eup-gutter, 20px) + 12px);
	}

	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd4 .eup-mu__shop-link .eup-hd4__route-link {
		font-weight: 400;
	}

	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd4 .eup-mu__group .eup-hd4__route-panel {
		padding-left: calc(var(--eup-gutter, 20px) + 12px);
	}

	/* Body Map and The Eupepsia Way: top-level, as in the bar. */
	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd4 .eup-mu__top .eup-hd4__route-link {
		font-weight: 600;
		letter-spacing: var(--eup3-ls-caps, 0.12em);
		text-transform: uppercase;
	}

	/* Owner, 4 Nov: no gold line between the drawer rows (header v6 draws one on top of every row and under the last
	   route and Wishlist); ONE line under BRANDS, as the desktop rail draws it above Best sellers (measured at 1440:
	   1px solid rgb(220, 186, 140), 12 px above and 12 px below, the rail's width), here inset to the rows' text.
	   The drawer head keeps its grey edge (not gold; the bar's own frame on desktop). Open groups keep their panel. */
	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd4 .eup-mu__routes .eup-hd4__route-btn,
	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd4 .eup-mu__routes .eup-hd4__route-link,
	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd3 .eup-hd3__drawer-link,
	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd3 .eup-hd3__drawer-links li:last-child .eup-hd3__drawer-link {
		border-bottom: 0;
		border-top: 0;
	}

	body.eup-menu-unify-v1.eup-hd6.eup-hd5 .eup-hd4 .eup-mu__group--link::after {
		border-top: 1px solid rgb(220, 186, 140);
		content: "";
		display: block;
		margin: 12px var(--eup-gutter, 20px);
	}
}
