/* RTL grid: column 1 is physically right, column 3 physically left.
   Retain the theme's desktop/mobile track sizes, controls and logo. */
html[dir="rtl"] #hd.site-header > .bar{direction:rtl}
html[dir="rtl"] #hd.site-header > .bar > .tools:not(.end){grid-column:3;grid-row:1;justify-content:flex-end}
html[dir="rtl"] #hd.site-header > .bar > .logo{grid-column:2;grid-row:1}
html[dir="rtl"] #hd.site-header > .bar > .tools.end{grid-column:1;grid-row:1;flex-direction:row-reverse;justify-content:flex-end}

/* Product navigation drawer follows its right-hand trigger. */
html[dir="rtl"] #hd.site-header > #panel.panel{right:0;left:auto;transform:translateX(101%);box-shadow:-14px 0 46px rgba(0,0,0,.14)}
html[dir="rtl"] #hd.site-header.open > #panel.panel,
html[dir="rtl"] .open #hd.site-header > #panel.panel{transform:none;visibility:visible}
@media(prefers-reduced-motion:reduce){html[dir="rtl"] #hd.site-header > #panel.panel{transition:none}}

/* -------------------------------------------------------------------------
 * Phones: real tap targets in the header
 *
 * Measured at 390px before this rule: cart 41x40, account 38x40, search 38x40,
 * menu 38x40 — every control was under 44px in BOTH dimensions, while the same
 * controls already measure 44x44 from 768px up. These four sit on every page
 * and are the first thing a shopper touches, so they get the same 44px floor
 * the rest of the project uses.
 *
 * The side columns switch from fixed fractions to `auto` so the wider controls
 * get exactly the room they need and the logo absorbs the difference instead of
 * either group overflowing. At 390px the maths is: 2x44 + 2x44 = 176px of
 * controls, 20px of padding, leaving ~194px for a 130px logotype.
 *
 * padding-block drops to 2px so the header keeps its current height (49px)
 * rather than growing by the 4px the taller controls would otherwise add.
 * ---------------------------------------------------------------------- */
@media (max-width: 767px) {
	html[dir="rtl"] #hd.site-header > .bar {
		grid-template-columns: auto 1fr auto;
		padding-block: 2px;
	}

	#hd.site-header .bar > .tools > * {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}

	/* The header search dropdown's own two buttons were 36x36. */
	#hd.site-header .sbar button {
		width: 44px;
		height: 44px;
	}
}

/* Very narrow phones (320-359px): the two 44px groups leave 124px in the
 * middle, and the logotype sits at 130px there — it would spill a few pixels
 * over the menu and account buttons. The parent theme already intends a
 * smaller mark at this size; this restates it on the element that actually
 * carries the type so the middle column fits with room to spare. */
@media (max-width: 359px) {
	html[dir="rtl"] #hd.site-header .logo,
	html[dir="rtl"] #hd.site-header .logo-text {
		font-size: 12px;
		letter-spacing: 0.1em;
	}
}