/* מתחם הריהוט — header chrome: announcement · main · nav+mega · countdown.
 * From the approved Paper design. RTL. */

.mr-header { position: relative; z-index: 50; }

/* ---- Announcement bar (seamless ticker) ---- */
/* Sticky at the very top; the main bar + nav stack below it (offsets in the
 * sticky blocks). z above headmain so it always covers scrolled content. */
.mr-announce { background: var(--mr-ink); position: sticky; top: 0; z-index: 91; }
/* Ticker viewport: clips the moving track. JS replaces .mr-ticker__set with a
 * track (unit + clone) it measures per-viewport; --mr-shift = one unit's width. */
.mr-announce__inner {
	overflow: hidden; height: 38px; direction: ltr;
	font-size: 13px; line-height: 38px; font-weight: var(--fw-medium);
	color: var(--mr-white); letter-spacing: .01em;
}
.mr-ticker__track { display: flex; width: max-content; will-change: transform;
	animation: mrTicker var(--mr-ticker-dur, 30s) linear infinite; }
.mr-ticker__unit, .mr-ticker__set { display: flex; flex: 0 0 auto; align-items: center; white-space: nowrap; }
.mr-announce__item { padding-inline: 18px; direction: rtl; }
.mr-announce__sep { opacity: .4; direction: rtl; }
.mr-announce__item--gold { color: var(--mr-gold); font-weight: var(--fw-bold); }
@keyframes mrTicker { from { transform: translateX(0); } to { transform: translateX(calc(-1 * var(--mr-shift, 50%))); } }
@media (prefers-reduced-motion: reduce) { .mr-ticker__track { animation: none; } }

/* ---- Main header ---- */
/* display:contents reparents the header rows to <body> so sticky bars stick for
 * the whole page (both desktop and mobile). */
.mr-header { display: contents; }

/* Desktop sticky: pin announcement (38px) + main bar (96px) + department nav;
 * each offset = the summed height of the bars above it. Countdown scrolls away. */
@media (min-width: 901px) {
	.mr-headmain { position: sticky; top: 38px; z-index: 90; }
	nav.mr-nav { position: sticky; top: 134px; z-index: 89; }
}

.mr-headmain {
	display: flex; align-items: center; justify-content: space-between;
	gap: 40px; height: 96px; padding-inline: 56px;
	background: var(--mr-white); border-bottom: 1px solid var(--mr-hairline);
}
.mr-headmain__logo { display: inline-flex; align-items: center; height: 60px; flex-shrink: 0; }
.mr-headmain__logo .mr-logo { height: 52px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.mr-headmain__logotext { font-size: 22px; font-weight: var(--fw-black); color: var(--mr-navy); }

/* Search */
.mr-search {
	display: flex; align-items: center; gap: 12px;
	flex: 1 1 0; max-width: 560px; height: 48px;
	padding-inline: 20px; border-radius: var(--r-pill);
	background: var(--mr-field); border: 1px solid var(--mr-hairline);
}
.mr-search__btn { display: inline-flex; padding: 0; border: 0; background: none; color: #9A9A9A; cursor: pointer; }
.mr-search__input {
	flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none;
	font-family: var(--mr-font); font-size: 15px; color: var(--mr-ink);
}
.mr-search__input::placeholder { color: #9A9A9A; }

/* Actions */
.mr-actions { display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
.mr-action {
	display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
	position: relative; color: var(--mr-ink);
}
.mr-action:hover { color: var(--mr-navy); }
.mr-action__label { font-size: 11px; font-weight: var(--fw-medium); line-height: 14px; color: var(--mr-muted); }
.mr-action__badge {
	position: absolute; top: -6px; inset-inline-start: -8px;
	min-width: 18px; height: 18px; padding-inline: 4px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: var(--r-pill); background: var(--mr-red);
	font-size: 11px; font-weight: var(--fw-bold); line-height: 1; color: var(--mr-white);
}
.mr-action__badge.is-empty { display: none; }

/* ---- Department nav ---- */
.mr-nav {
	position: relative;
	display: flex; align-items: stretch; gap: 4px; height: 54px;
	padding-inline-end: 12px;
	background: var(--mr-white); border-bottom: 1px solid var(--mr-hairline);
}
.mr-nav__mega-trigger {
	display: inline-flex; align-items: center; gap: 10px;
	padding-inline: 24px 22px; border: 0; cursor: pointer;
	background: var(--mr-navy); color: var(--mr-white);
	font-family: var(--mr-font); font-size: 15px; font-weight: var(--fw-bold);
}
.mr-nav__links { display: flex; align-items: center; }
.mr-nav__menu { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.mr-nav__menu a, .mr-nav__deal {
	display: inline-block; padding-inline: 13px;
	font-size: 15px; font-weight: 600; line-height: 18px; color: var(--mr-nav-ink);
}
.mr-nav__menu a:hover { color: var(--mr-navy); }
.mr-nav__deal { font-weight: var(--fw-black); color: var(--mr-red); }
.mr-nav__deal:hover { color: var(--mr-red); text-decoration: underline; }
.mr-nav__spacer { flex: 1 1 0; }
.mr-nav__aux { display: inline-flex; align-items: center; padding-inline: 12px; font-size: 14px; font-weight: var(--fw-medium); color: var(--mr-muted); }
.mr-nav__aux:hover { color: var(--mr-navy); }
/* Contact CTA — emphasised so it stands out on the left of the nav. */
.mr-nav__aux--cta { align-self: center; margin-inline-start: 10px; padding: 6px 16px; border-radius: 999px; background: var(--mr-navy); color: var(--mr-white); font-weight: var(--fw-bold); font-size: 13.5px; line-height: 1.3; }
.mr-nav__aux--cta:hover { background: var(--mr-orange); color: var(--mr-white); }

/* Mega-menu (Paper 39W-0): rail (right) · panels (סוג/מחיר/פופולרי) · featured card (left) */
.mr-nav__mega-trigger[aria-expanded="true"] { background: #1c2266; }
.mr-megamenu {
	position: absolute; inset-inline: 0; top: 100%;
	background: var(--mr-white); border-top: 1px solid var(--mr-hairline);
	box-shadow: var(--sh-md); z-index: 60;
}
.mr-megamenu[hidden] { display: none; }
.mr-mega { display: flex; align-items: stretch; min-height: 340px; max-width: var(--mr-container); margin-inline: auto; }

/* Department rail (right) */
.mr-mega__rail { flex: 0 0 250px; list-style: none; margin: 0; padding: 14px; background: var(--mr-cream); }
.mr-mega__dept {
	width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 12px 14px; border: 0; background: transparent; border-radius: var(--r-sm);
	font-family: var(--mr-font); font-size: 15px; font-weight: var(--fw-medium); color: var(--mr-ink);
	cursor: pointer; text-align: start; transition: background var(--mr-transition), color var(--mr-transition);
	box-sizing: border-box; text-decoration: none;
}
.mr-mega__dept svg { flex-shrink: 0; color: var(--mr-muted); }
.mr-mega__dept:hover, .mr-mega__dept.is-active { background: var(--mr-navy); color: var(--mr-white); }
.mr-mega__dept:hover svg, .mr-mega__dept.is-active svg { color: var(--mr-white); }

/* Panels (left of rail) */
.mr-mega__body { flex: 1 1 auto; }
.mr-mega__panel { display: none; padding: 28px 32px; gap: 32px; }
.mr-mega__panel.is-active { display: flex; }
.mr-mega__cols { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 28px; flex: 1 1 auto; }
.mr-mega__h { margin: 0 0 14px; font-size: 12px; font-weight: var(--fw-black); letter-spacing: .06em; color: var(--mr-muted); }
.mr-mega__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mr-mega__links a { font-size: 15px; font-weight: var(--fw-medium); color: var(--mr-ink); }
.mr-mega__links a:hover { color: var(--mr-navy); }
.mr-mega__links a.is-accent { color: var(--mr-red); font-weight: var(--fw-bold); }

/* Featured card (far left) */
.mr-mega__feature { flex: 0 0 230px; display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(160deg, var(--mr-navy), #3a1a6e); color: var(--mr-white); text-decoration: none; transition: transform var(--mr-transition); }
.mr-mega__feature:hover { transform: translateY(-2px); }
.mr-megafeat__media { display: block; height: 128px; background: rgba(255,255,255,.08); overflow: hidden; }
.mr-megafeat__img { width: 100%; height: 100%; object-fit: cover; }
.mr-megafeat__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; }
.mr-megafeat__eyebrow { font-size: 11px; font-weight: var(--fw-bold); letter-spacing: .04em; color: var(--mr-gold-soft); }
.mr-megafeat__title { font-size: 24px; font-weight: var(--fw-black); line-height: 1.1; }
.mr-megafeat__sub { font-size: 14px; opacity: .85; }
.mr-megafeat__cta { margin-top: 10px; font-size: 13px; font-weight: var(--fw-bold); }

@media (max-width: 960px) { .mr-megamenu { display: none !important; } }

/* ---- Countdown bar ---- */
.mr-countdown {
	display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
	gap: 20px; padding: 13px 24px; background: var(--mr-red); color: var(--mr-white);
}
.mr-countdown__lead { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: var(--fw-black); }
.mr-countdown__clock { display: inline-flex; align-items: center; gap: 7px; }
.mr-countdown__box {
	display: inline-flex; flex-direction: column; align-items: center;
	min-width: 50px; padding: 4px 11px; border-radius: var(--r-sm); background: var(--mr-white);
}
.mr-countdown__box b { font-size: 21px; font-weight: var(--fw-black); line-height: 1.05; color: var(--mr-red); }
.mr-countdown__box small { font-size: 10px; font-weight: 600; line-height: 12px; color: var(--mr-ink); }
.mr-countdown__colon { font-size: 20px; font-weight: var(--fw-black); }
.mr-countdown__note { font-size: 14px; font-weight: var(--fw-bold); color: var(--mr-gold-soft); }

/* ---- Mobile drawer ---- */
.mr-headmain__burger { display: none; padding: 0; border: 0; background: none; color: var(--mr-ink); cursor: pointer; flex-shrink: 0; }
.mr-drawer-backdrop { position: fixed; inset: 0; z-index: 98; background: rgba(20,20,22,.5); opacity: 0; transition: opacity .25s ease; }
.mr-drawer-backdrop.is-open { opacity: 1; }
.mr-drawer {
	position: fixed; z-index: 99; top: 0; bottom: 0; inset-inline-end: 0;
	width: min(320px, 86vw); background: var(--mr-white); box-shadow: -8px 0 24px rgba(0,0,0,.14);
	display: flex; flex-direction: column; padding: 16px 20px 24px; overflow-y: auto;
	transform: translateX(100%); transition: transform .28s ease;
}
[dir="rtl"] .mr-drawer { transform: translateX(-100%); }
.mr-drawer.is-open { transform: translateX(0); }
.mr-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mr-drawer__logo .mr-logo { height: 40px; width: auto; }
.mr-drawer__close { padding: 0; border: 0; background: none; color: var(--mr-ink); cursor: pointer; }
.mr-drawer__search { display: flex; align-items: center; gap: 8px; height: 44px; padding-inline: 14px; border-radius: var(--r-pill); background: var(--mr-field); border: 1px solid var(--mr-hairline); margin-bottom: 20px; }
.mr-drawer__search input { flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none; font-family: var(--mr-font); font-size: 15px; }
.mr-drawer__search button { border: 0; background: none; color: #9A9A9A; cursor: pointer; display: inline-flex; }
.mr-drawer__label { display: block; font-size: 12px; font-weight: var(--fw-bold); letter-spacing: .1em; color: var(--mr-muted); margin-bottom: 8px; }
.mr-drawer__nav ul, .mr-drawer__aux { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; }
.mr-drawer__nav a { display: block; padding: 11px 0; font-size: 16px; font-weight: 600; color: var(--mr-nav-ink); border-bottom: 1px solid var(--mr-line); }
.mr-drawer__deal { color: var(--mr-red) !important; font-weight: var(--fw-black) !important; }
.mr-drawer__aux { border-top: 1px solid var(--mr-line); padding-top: 14px; }
.mr-drawer__aux a { padding: 9px 0; font-size: 15px; color: var(--mr-muted); }
.mr-drawer__aux a:hover { color: var(--mr-navy); }
body.mr-drawer-open { overflow: hidden; }

/* ---- Responsive: collapse chrome on mobile ---- */
@media (max-width: 900px) {
	/* TWO rows only. Row 1: burger (right) · logo (centred) · icons (left) —
	 * burger and icons each flex:1 so the logo sits dead-centre between them.
	 * Row 2: full-width search. No absolute positioning. */
	.mr-headmain { height: auto; min-height: 60px; padding: 10px 14px; column-gap: 8px; row-gap: 10px; flex-wrap: wrap; align-items: center;
		position: sticky; top: 38px; z-index: 90; background: var(--mr-white); box-shadow: 0 2px 10px rgba(30,30,30,.07); }
	.mr-header, .mr-headmain, .mr-search { max-width: 100%; box-sizing: border-box; }
	.mr-headmain__burger { display: inline-flex; order: 1; flex: 1 1 0; justify-content: flex-start; }
	.mr-headmain__logo { order: 2; flex: 0 0 auto; margin: 0; }
	.mr-headmain__logo .mr-logo { height: 34px; width: auto; }
	.mr-actions { order: 3; flex: 1 1 0; justify-content: flex-end; gap: 16px; }
	.mr-search { order: 4; flex: 1 1 100%; width: 100%; max-width: none; height: 46px; }
	/* 16px prevents iOS Safari from zooming the page when the field is focused. */
	.mr-search__input, .mr-drawer__search input { font-size: 16px; }
	.mr-action__label { display: none; }
	.mr-nav { display: none; }
	.mr-announce__inner { font-size: 12px; }
	.mr-announce__item { padding-inline: 12px; }
	.mr-countdown__lead { font-size: 15px; }
}
@media (min-width: 901px) { .mr-drawer, .mr-drawer-backdrop { display: none !important; } }
@media (max-width: 560px) {
	.mr-headmain__logo .mr-logo { height: 30px; }
	.mr-headmain { padding-inline: 12px; gap: 8px; }
	.mr-actions { gap: 14px; }
	.mr-search { height: 44px; }
}
@media (max-width: 380px) {
	.mr-headmain__logo .mr-logo { height: 26px; }
	.mr-actions { gap: 12px; }
}
