/**
 * Header + footer chrome, shared by all header/footer template variants
 * and by custom Elementor-built ron_header / ron_footer CPTs.
 */

/* Top bar */

.ron-topbar {
	background: var(--ron-color-secondary);
	color: #fff;
	font-size: 0.85em;
	padding: 8px 0;
}

.ron-topbar .ron-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.ron-topbar a { color: #fff; }
.ron-topbar .ron-social-link { width: 26px; height: 26px; background: rgba(255,255,255,0.12); color: #fff; }

/* Round C, item 4: Phone/Email/Address, printed directly after the Top
   Bar Text (see codelabit_topbar() in inc/template-tags.php). Both
   `.ron-topbar-text` and `.ron-topbar-contact` share this `.ron-topbar-
   left` group so `.ron-topbar .ron-container`'s own `justify-content:
   space-between` (above) still only ever splits the bar into two
   clusters — text+contact on the left, menu+social on the right — with
   the contact info visually right next to (after) the text rather than
   getting pulled over to the far side of the bar. */
.ron-topbar-left {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.ron-topbar-contact {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.ron-topbar-contact-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.95em;
	white-space: nowrap;
}

.ron-topbar-contact-item i {
	font-size: 0.9em;
	opacity: 0.85;
}

/* Top bar menu + social icons print together on the right (see
   codelabit_topbar()) — a small vertical divider separates the two
   groups only when both are actually present. */
.ron-topbar-right {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.ron-topbar-nav:not(:last-child) {
	padding-right: 16px;
	border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.ron-topbar-nav ul.ron-reset {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.ron-topbar-nav a {
	font-size: 0.95em;
}

/* Header */

.ron-header {
	background: #fff;
	border-bottom: 1px solid #ececec;
	position: relative;
	z-index: 100;
}

.ron-sticky-header .ron-header--sticky-active {
	position: sticky;
	top: 0;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Header Layout 1 specifically switches from `position: sticky` to
   `position: fixed` (plus the `.ron-header-spacer` element ron-theme.js
   inserts right after it, kept in sync with the header's own rendered
   height via ResizeObserver). Every other header layout keeps the plain
   `position: sticky` above untouched — they don't change height once
   stuck, so they were never at risk of the reflow-jump this works around
   (see the long comment in ron-theme.js's initStickyHeader()). Selector
   specificity (three classes vs. two) is what makes this win over the
   generic rule without needing `!important`. */
.ron-sticky-header .ron-header--logo-search-cart.ron-header--sticky-active {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
}

/* WordPress pins its own admin toolbar at the very top of the viewport
   for logged-in users (`#wpadminbar`, `position: fixed`) and shifts the
   whole document down to make room for it (`html { margin-top: 32px }`,
   core's own rule) — which a `position: sticky` element naturally
   respects since it's still relative to the in-flow document, but a
   `position: fixed` element is not, and would render at the literal
   viewport top, underneath/behind the toolbar. `body.admin-bar` is the
   class WP core itself adds whenever that toolbar is showing, and its
   height drops from 32px to 46px under WP's own 782px breakpoint — both
   values match WP core's own admin-bar CSS, not a guess. */
body.admin-bar .ron-sticky-header .ron-header--logo-search-cart.ron-header--sticky-active {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .ron-sticky-header .ron-header--logo-search-cart.ron-header--sticky-active {
		top: 46px;
	}
}

/* Reserves the space the header would otherwise occupy now that it's
   `position: fixed` (out of flow). Height is set inline by ron-theme.js
   and kept live via ResizeObserver, so it always matches the header's
   current rendered height — full or stuck — with no fixed number here. */
.ron-header-spacer {
	display: block;
}

/* Header Layout 1 (Logo + Search + Cart) is 3 stacked rows (top bar, logo/
   search/actions, full menu) — once actually scrolled/stuck at the top of
   the viewport (`.ron-header--stuck`, toggled in ron-theme.js, with
   hysteresis between the stick/unstick scroll positions so a small
   scroll jitter near one point can't flip it back and forth), drop the
   top bar and the search row so the pinned header only shows logo +
   primary menu + account/cart actions instead of its full height.
   Originally an instant `display: none` — since `position: sticky`
   means this header's own height change shifts the page content under
   it, an un-transitioned jump read as a visible "blink" while
   scrolling, and could even feed back into the scroll position itself
   near the threshold. `max-height` + `opacity`, both transitioned, turn
   that jump into an actual collapse animation instead. The "open"
   max-height (120px) is intentionally generous — bigger than either
   element ever naturally is — so normal content never gets clipped;
   only the collapsed (0) state clips anything, which is exactly the
   collapse itself. */
.ron-header--logo-search-cart .ron-topbar {
	max-height: 120px;
	opacity: 1;
	overflow: hidden;
	transition: max-height 0.28s ease, opacity 0.18s ease, padding-top 0.28s ease, padding-bottom 0.28s ease;
}

.ron-header--logo-search-cart.ron-header--stuck .ron-topbar {
	max-height: 0;
	opacity: 0;
	padding-top: 0;
	padding-bottom: 0;
	pointer-events: none;
}

/* NOTE: no `overflow: hidden` here, deliberately — `.ron-header-search`
   is an ancestor of `.ron-search-cat-panel` (the category dropdown; see
   `.ron-search-form` below for the original version of this same lesson,
   from Session 10). This rule briefly had `overflow: hidden` added to
   mask the search bar shrinking to 0 width when the header sticks, which
   silently clipped the category panel to invisibility the moment it
   opened — the same bug, one element further up the tree. The opacity
   transition (faster than the width one) already fades the content out
   well before the width collapse finishes, so the brief moment of
   unclipped width during that transition isn't visually noticeable. */
.ron-header--logo-search-cart .ron-header-search {
	opacity: 1;
	transition: opacity 0.18s ease, flex-basis 0.28s ease, max-width 0.28s ease, margin 0.28s ease;
}

.ron-header--logo-search-cart.ron-header--stuck .ron-header-search {
	opacity: 0;
	flex-basis: 0;
	max-width: 0;
	margin: 0;
	pointer-events: none;
}

.ron-header--logo-search-cart .ron-header-row {
	transition: padding 0.28s ease;
}

.ron-header--logo-search-cart.ron-header--stuck .ron-header-row {
	padding: 12px 0;
}

/* The menu stays in its own row below the header row whenever
   ron-theme.js hasn't moved it in (narrow screens, per the
   inlineBreakpoint check there, or the instant before that JS runs). */
.ron-header--logo-search-cart.ron-header--stuck .ron-primary-nav--below:not(.ron-primary-nav--inlined) {
	border-top: 1px solid #ececec;
}

/* Once ron-theme.js has actually moved the menu into the header row
   (`.ron-primary-nav--inlined`), it fills the middle flex slot the
   now-hidden search bar left behind — logo, then menu, then account/cart
   — instead of the blank gap + separate menu row underneath the CSS-only
   approach left behind. Its own inner `.ron-container` (needed when the
   nav sits full-width on its own, to line its width up with the rest of
   the page) would otherwise double up width-capping/padding once nested
   inside the header row's own already-constrained container, so it's
   neutralized here. */
.ron-header-row .ron-primary-nav--inlined {
	flex: 1;
	min-width: 0;
}

.ron-header-row .ron-primary-nav--inlined .ron-container {
	max-width: none;
	margin: 0;
	padding: 0;
}

.ron-header-row .ron-primary-nav--inlined ul.ron-reset {
	justify-content: center;
}

/* `position: relative` here is deliberate and load-bearing, not
   decorative — it fixes a CSS containing-block bug reported as "when
   header sticky then main menu sub menu did not get full wide, after
   show 2 menus white background are missing for rest of menus".
   ron-theme.js's setNavInlined() moves the `<nav class="ron-primary-nav">`
   INTO this row once the header is stuck on desktop (see
   initStickyHeader()'s doc comment there); ron-megamenu.css then targets
   `.ron-header-row .ron-menu-item.ron-has-megamenu:hover .ron-submenu-wrap`
   with `width: 100%; max-width: var(--ron-container-width)`, clearly
   intending "100% of this wide header row". But a percentage width on a
   `position: absolute` element resolves against its CSS containing
   block — the nearest positioned ancestor — which is
   `.ron-primary-nav .ron-menu-item { position: relative }` (a single
   narrow `<li>`), NOT whatever a selector's ancestor combinators imply.
   Without a positioned ancestor any closer than `<body>`, the wrap fell
   back to its own `min-width: 220px` floor (confirmed live via
   getComputedStyle: `width: "220px"`) regardless of what "100%" was
   supposed to mean. The megamenu grid inside it (`.ron-megamenu.
   ron-megamenu-full { width: 100% }`, sized relative to THIS wrap) then
   had real multi-column content that can't shrink to fit a 220px box —
   CSS Grid's default `min-width: auto` per track means the grid renders
   at its own wider min-content size regardless, overflowing past its own
   too-narrow wrap. Since the wrap is what paints the white
   background/shadow, that overflow is exactly the reported "white
   background missing" — the visible menu content extends past the small
   box that's actually painted white behind it. Making this row
   `position: relative` gives `.ron-submenu-wrap` the correct, wide
   containing block once it's inlined here, so `width: 100%` finally
   means 100% of the header row (capped at --ron-container-width) as
   originally intended, and the megamenu's own columns get real space to
   lay out in — no more overflow, no more missing background. Safe at all
   other times: the primary nav only ever lives inside this row in that
   one stuck+inlined state (see setNavInlined()) — un-stuck, `.ron-menu-
   item` isn't a descendant of `.ron-header-row` at all, so this has
   nothing to do there. */
.ron-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px 0;
	position: relative;
}

/* `position: relative` on `.ron-header-row` above is necessary but not,
   on its own, sufficient — a `position: absolute` element's containing
   block is its NEAREST positioned ancestor, and `.ron-primary-nav
   .ron-menu-item { position: relative }` (a narrow `<li>`) is still
   closer than this row regardless of the row also being positioned now.
   Stripping the mega-menu item's own positioning in this one inlined
   scenario is what actually promotes `.ron-header-row` to be the
   `<li>`'s `.ron-submenu-wrap` child's containing block instead — see
   the long comment above `.ron-header-row` for the rest of this bug.
   Scoped tightly to `.ron-has-megamenu` items that are actual
   descendants of this row (only true once stuck+inlined, per
   setNavInlined() in ron-theme.js): plain dropdown items keep their own
   `.ron-menu-item { position: relative }` anchor untouched, since their
   `.ron-submenu-wrap` is a small panel meant to hang directly under
   THAT item (`top: 100%; left: 0`), not span the whole row.

   Follow-up fix: scoped to `.ron-mega-width-full` in addition to
   `.ron-has-megamenu` — reported live: "need to add grid css for
   .ron-megamenu-half, if i set half then showing full width". A half or
   3-column mega item never needed this promotion at all: it isn't
   asking to span the row edge-to-edge, only to be WIDER than a default
   220px dropdown, which the width variant's own `min-width` (ron-
   megamenu.css) already provides while staying anchored under its own
   trigger — exactly like a plain dropdown. Promoting it anyway moved its
   `.ron-submenu-wrap` containing block up to this wide, padded row,
   which is what made the width-forcing rule below (previously
   unconditional for every `.ron-has-megamenu`) stretch it to the full
   container width regardless of the "Half width"/"3-Column width"
   setting chosen in Appearance > Menus. */
.ron-header-row .ron-menu-item.ron-has-megamenu.ron-mega-width-full {
	position: static;
}

/* Header Layout 1 specifically ("Logo + Search + Cart") keeps its primary
   nav in its OWN separate row below `.ron-header-row` at all times except
   the stuck+inlined case above — see `.ron-primary-nav--below` in
   templates/header/logo-search-cart.php, a structure unique to this one
   layout. Header Layouts 2/3 ("Logo + Menu + Account" and "Minimal") put
   the nav directly inside `.ron-header-row` unconditionally, so they were
   already covered by the two rules above and always rendered their
   mega-menu at full width — reported directly: "Normally, Header layouts
   2 and 3 mega submenu at full width, but for Header layout 1 it's not
   show the mega submenu at full width." Layout 1's separate nav row was
   simply never matched by the `.ron-header-row`-scoped selectors at all
   (it isn't a descendant of that row except once stuck+inlined), so its
   `.ron-submenu-wrap` fell back to the same narrow `.ron-menu-item`
   containing block described in the long comment above. Same fix, same
   reasoning, applied to this row too: strip the mega item's own
   positioning so the search continues up to `.ron-header` itself
   (`position: relative` in its own base rule, further up this file) —
   `.ron-header` is either full viewport width (default layout) or
   already centered via its own ancestor's `margin: 0 auto` (Boxed
   layout), so centering the panel with `left: 50%; transform:
   translateX(-50%)` against THAT containing block still lands it
   centered on the page either way, exactly like the `.ron-header-row`
   case above — verified with a local reproduction of both scenarios.
   Follow-up fix: also scoped to `.ron-mega-width-full` only — same
   reasoning as the `.ron-header-row` rule above. */
.ron-primary-nav--below .ron-menu-item.ron-has-megamenu.ron-mega-width-full {
	position: static;
}

.ron-logo-text {
	font-family: var(--ron-font-heading);
	font-weight: 700;
	font-size: 1.5em;
	color: var(--ron-color-secondary);
}

.ron-logo-image {
	max-height: 48px;
	width: auto;
}

.ron-header-search {
	flex: 1;
	max-width: 560px;
}

.ron-search-form-wrap {
	position: relative;
}

/* "Search for products [Select Category ▾] [🔍]" — one bordered pill
   split into three zones, matching the CodelabIT header-1 reference.
   NOTE: this container must NOT use `overflow: hidden` to achieve the
   pill clipping — the category panel below is an absolutely-positioned
   descendant of this element, and `overflow: hidden` here would clip it
   to invisibility the moment it opens. The rounded-pill look is instead
   achieved by rounding just the two end elements (input, submit button)
   to match the container's own border-radius. */
.ron-search-form {
	display: flex;
	align-items: stretch;
	border: 1px solid #e2e2e2;
	border-radius: var(--ron-radius-pill, 999px);
	background: #fff;
}

.ron-search-input {
	flex: 1;
	min-width: 0;
	border: none;
	background: transparent;
	padding: 11px 18px;
	font-size: 0.95em;
	font-family: inherit;
	border-radius: var(--ron-radius-pill, 999px) 0 0 var(--ron-radius-pill, 999px);
}

.ron-search-input:focus {
	outline: none;
}

/* Category dropdown — a button + custom panel (not a native <select>) so
   it can show parent categories with children indented underneath and a
   product-count badge per row; see initSearchCategoryPanel() in
   ron-theme.js. */
.ron-search-cat {
	position: relative;
	flex: 0 0 auto;
	border-left: 1px solid #e2e2e2;
}

.ron-search-cat-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 100%;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ron-color-secondary);
	max-width: 180px;
	padding: 11px 16px;
	cursor: pointer;
}

.ron-search-cat-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ron-search-cat-caret {
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border-right: 2px solid #999;
	border-bottom: 2px solid #999;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s ease;
}

.ron-search-cat-toggle[aria-expanded="true"] .ron-search-cat-caret {
	transform: rotate(-135deg) translateY(1px);
}

.ron-search-cat-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 300px;
	max-height: 420px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: var(--ron-border-radius);
	box-shadow: var(--ron-shadow-md, 0 14px 30px rgba(20, 20, 43, 0.14));
	padding: 10px;
	z-index: 200;
}

.ron-search-cat-parent:not(:first-child) {
	margin-top: 4px;
	padding-top: 8px;
	border-top: 1px solid #f2f2f2;
}

.ron-search-cat-tree a,
.ron-search-cat-children a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--ron-border-radius);
	color: var(--ron-color-secondary);
	font-size: 0.92em;
}

.ron-search-cat-parent > a {
	font-weight: 700;
}

.ron-search-cat-tree a:hover,
.ron-search-cat-children a:hover {
	background: #faf5f8;
	color: var(--ron-color-primary);
}

.ron-search-cat-children {
	margin-left: 14px;
	border-left: 2px solid #f2f2f2;
}

.ron-search-cat-children a {
	font-weight: 500;
	font-size: 0.88em;
	padding-top: 6px;
	padding-bottom: 6px;
}

.ron-search-cat-count {
	flex: 0 0 auto;
	min-width: 22px;
	padding: 1px 7px;
	border-radius: var(--ron-radius-pill, 999px);
	background: #f0f0f0;
	color: #888;
	font-size: 0.75em;
	text-align: center;
}

.ron-search-cat-tree a:hover .ron-search-cat-count,
.ron-search-cat-children a:hover .ron-search-cat-count {
	background: var(--ron-color-primary);
	color: #fff;
}

.ron-search-submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	border: none;
	background: var(--ron-color-primary);
	color: #fff;
	cursor: pointer;
	border-radius: 0 var(--ron-radius-pill, 999px) var(--ron-radius-pill, 999px) 0;
}

.ron-header-actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.ron-header-action {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	font-size: 0.8em;
	color: var(--ron-color-secondary);
}

.ron-header-action .ron-count {
	position: absolute;
	top: -6px;
	right: -10px;
	background: var(--ron-color-primary);
	color: #fff;
	font-size: 10px;
	min-width: 16px;
	height: 16px;
	line-height: 16px;
	text-align: center;
	border-radius: 50%;
}

/* Primary nav */

/* Matches the top-level menu <ul> (menu_class="ron-reset") wherever it
   sits — a direct child of `.ron-primary-nav` (Header 2/minimal) or one
   level deeper inside an inner `.ron-container` (Header 1, which wraps
   its nav row to line up with the rest of the header's width). Nested
   submenu <ul>s (`.ron-submenu`) never carry the `ron-reset` class, so
   this can safely be a descendant selector without also flexing dropdowns. */
.ron-primary-nav ul.ron-reset {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ron-primary-nav .ron-menu-link {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 14px 14px;
	color: var(--ron-color-secondary);
	font-weight: 500;
}

.ron-primary-nav .ron-menu-highlight > .ron-menu-link {
	color: var(--ron-color-primary);
	font-weight: 700;
}

/* Round C, item 3: this rule never existed before — the icon `<span>` the
   walker emitted (class-ron-mega-menu.php) had no styling of its own at
   all, so even once a font actually rendered the glyph (see the
   'ron-fontawesome' enqueue in class-codelabit-theme.php) it would have
   been full text-size and misaligned. `.ron-menu-link` is already
   `display: flex; align-items: center; gap: 6px` above, so the icon just
   needs its own font-size — the flex gap handles spacing from the label,
   and align-items:center keeps it vertically centered against the text. */
.ron-primary-nav .ron-menu-icon {
	display: inline-flex;
	font-size: 14px;
	line-height: 1;
}

/* Follow-up feature: per-sub-item thumbnail image (class-ron-mega-menu.php
   `start_el()` — see its long comment on `$has_thumb`). A thumb link gets
   a second nested flex row (`.ron-menu-link-row`, in ron-megamenu.css)
   for the icon/label/badge instead of `.ron-menu-link`'s normal single
   row, so the base `.ron-menu-link` rule above is untouched for every
   link WITHOUT a thumbnail — only these two rules are new. */
.ron-primary-nav .ron-menu-link--thumb {
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.ron-primary-nav .ron-menu-item-thumb {
	display: block;
	width: 100%;
	border-radius: var(--ron-border-radius);
	overflow: hidden;
}

.ron-primary-nav .ron-menu-item-thumb img {
	display: block;
	width: 100%;
	height: 100px;
	min-height: 100px;
	object-fit: cover;
}

.ron-primary-nav .ron-menu-badge {
	background: var(--ron-color-link-hover);
	color: #fff;
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 10px;
	line-height: 1.6;
}

.ron-menu-caret {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-left: 2px;
}

.ron-primary-nav .ron-menu-item {
	position: relative;
}

/* Item 2 (Round C): "the mega submenu comes up, but it hides when I go to
   click a menu item ... if mouse movement slow." Root cause is a dead,
   unhoverable strip between the visible menu link and the dropdown panel
   below it, introduced as a side effect of the `position: static`
   promotion above (Session 19/20, `.ron-has-megamenu { position: static }`
   in this file) — that promotion moves `.ron-submenu-wrap`'s containing
   block up from the `<li>` itself to `.ron-header-row`, which is exactly
   what full-width sizing needs, but `.ron-header-row` also has its own
   `padding: 18px 0` (or `12px 0` stuck) and vertically CENTERS its flex
   children (`align-items: center` — see the row's own rule further
   below). So the `<li>`/link sit narrower and centered inside a taller
   padded row, while `.ron-submenu-wrap`'s `top: 100%` correctly measures
   100% of that taller row and lands flush with the ROW's bottom edge —
   below the row's own padding and the item's centering slack. Neither the
   `<li>` (the `:hover` trigger) nor the wrap (a descendant of it) covers
   that gap, so a mouse travelling slowly through it loses `:hover` and
   the panel closes before a click on a category link lands.
   Fix: stretch nav → its row-wrapping element → the item list to fill
   the full header-row height, instead of being centered within it, so
   every top-level `<li>`'s own (invisible) hit-box already reaches all
   the way down to the row's bottom edge — exactly where the dropdown
   begins, leaving no dead strip in between. The link text itself stays
   visually centered (it already uses `display: flex; align-items:
   center;` below); only the surrounding hover target grows. This also
   happens to make plain (non-mega) dropdowns hang from the same row-
   bottom edge instead of the smaller link box, closing the identical gap
   for them pre-emptively. Harmless where nav isn't inside `.ron-header-
   row` at all (Header 1's un-stuck `.ron-primary-nav--below` row, which
   has no padding/centering of its own to begin with — see the long
   containing-block comment above `.ron-header-row` further below). */
.ron-header-row .ron-primary-nav {
	align-self: stretch;
	display: flex;
	align-items: stretch;
}

.ron-header-row .ron-primary-nav > .ron-container {
	display: flex;
	align-items: stretch;
}

.ron-primary-nav .ron-submenu-wrap {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	box-shadow: 0 12px 28px rgba(0,0,0,0.12);
	border-radius: var(--ron-border-radius);
	z-index: 50;
	min-width: 220px;
}

.ron-primary-nav .ron-menu-item.ron-has-dropdown:hover > .ron-submenu-wrap,
.ron-primary-nav .ron-menu-item.ron-has-megamenu:hover > .ron-submenu-wrap,
.ron-primary-nav .ron-menu-item.ron-touch-open > .ron-submenu-wrap {
	display: block;
}

.ron-primary-nav .ron-submenu {
	padding: 10px 0;
}

.ron-primary-nav .ron-submenu .ron-menu-link {
	padding: 8px 20px;
}

.ron-primary-nav .ron-submenu .ron-submenu-wrap {
	top: -10px;
	left: 100%;
}

/* Footer */

.ron-footer {
	background: var(--ron-color-secondary);
	color: rgba(255,255,255,0.75);
	margin-top: 60px;
}

.ron-footer a { color: rgba(255,255,255,0.85); }
.ron-footer a:hover { color: #fff; }

.ron-footer-widgets {
	display: grid;
	gap: 32px;
	padding: 56px 0 32px;
	grid-template-columns: repeat(var(--ron-footer-columns, 4), 1fr);
}

@media (max-width: 900px) {
	.ron-footer-widgets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.ron-footer-widgets { grid-template-columns: 1fr; }
}

.ron-footer-widgets .ron-widget-title {
	color: #fff;
	border-bottom-color: rgba(255,255,255,0.2);
}

.ron-footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding: 20px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.85em;
}

.ron-newsletter-form {
	display: flex;
	max-width: 420px;
	margin-top: 14px;
}

.ron-newsletter-form input[type="email"] {
	flex: 1;
	border: none;
	border-radius: var(--ron-border-radius) 0 0 var(--ron-border-radius);
	padding: 12px 14px;
}

.ron-newsletter-form button {
	border-radius: 0 var(--ron-border-radius) var(--ron-border-radius) 0;
}

/* Mobile nav toggle */

.ron-mobile-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

.ron-mobile-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--ron-color-secondary);
	margin: 4px 0;
}

@media (max-width: 960px) {
	.ron-primary-nav { display: none; }
	.ron-mobile-toggle { display: block; }
	.ron-header-search { display: none; }

	/* "left side show logo and right side show menu bar; accounts show
	   in the bottom of mobile screen" — the account/wishlist/compare/cart
	   icons that used to sit next to the hamburger are hidden here so the
	   header row reduces to just logo (left) + menu button (right); the
	   same icons reappear in `.ron-mobile-bottom-bar` below, a fixed bar
	   printed once by codelabit_mobile_bottom_bar() (see
	   inc/template-tags.php and footer.php), independent of which header
	   layout/template is active. */
	.ron-header-actions .ron-header-action {
		display: none;
	}

	.ron-header-actions {
		gap: 0;
	}
}

/* Mobile bottom action bar — Home / Account / Wishlist / Compare / Cart.
   Hidden on desktop; reuses the exact same action-link functions the
   desktop header calls (codelabit_account_action_link() and friends are
   safe to call a second time — see the doc comment on
   codelabit_mobile_bottom_bar() in inc/template-tags.php). Each item's
   own `.ron-sr-only` label — hidden in the header, where the icon alone
   is enough — is deliberately made visible again here: a fixed bottom
   tab bar needs on-screen labels the header icons never did, and doing
   it this way means no PHP changes to the shared action-link functions
   at all, just this widget's own presentation. */
.ron-mobile-bottom-bar {
	display: none;
}

@media (max-width: 960px) {
	.ron-mobile-bottom-bar {
		display: flex;
		align-items: stretch;
		justify-content: space-around;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 500;
		background: #fff;
		border-top: 1px solid #ececec;
		box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
	}

	.ron-mobile-bottom-bar .ron-header-action {
		flex: 1 1 0;
		padding: 4px 2px;
		gap: 3px;
	}

	.ron-mobile-bottom-bar .ron-sr-only {
		position: static !important;
		width: auto !important;
		height: auto !important;
		overflow: visible !important;
		clip: auto !important;
		display: block;
		font-size: 10px;
		line-height: 1.2;
	}

	/* Reserves the bottom bar's own height so it never overlaps the last
	   bit of real page content (a fixed element, like the sticky header
	   in ron-theme.js, takes up no flow space on its own) — generous on
	   purpose so it covers icon + label + padding at any normal
	   font-size. */
	.ron-site-wrapper {
		padding-bottom: 62px;
	}
}
