/* Site header (menu bar) — Maiwand Pizza. Replaces Blocksy's header (inc/header.php). */

.mw-own-header #header,
.mw-own-header #offcanvas { display: none !important; }

.mw-hd { --mwh-brand: var(--maiwand-brand, var(--theme-palette-color-1, #d62828)); --mwh-ink: #19232e; --mwh-muted: #5b6670; --mwh-line: #f0e4da; --mwh-soft: #f6efe8;
  position: sticky; z-index: 60; top: var(--wp-admin--admin-bar--height, 0px); border-bottom: 1px solid var(--mwh-line); background: #fff; color: var(--mwh-ink); font-family: inherit; transition: box-shadow .2s ease; }
.mw-hd.is-scrolled { box-shadow: 0 4px 16px rgb(25 35 46 / 8%); }
.mw-hd.is-open { z-index: 1000; } /* above the menu page's cart bar */
.mw-hd *, .mw-hd *::before, .mw-hd *::after { box-sizing: border-box; }
.mw-hd [hidden] { display: none !important; }
.mw-hd a { text-decoration: none; }
.mw-hd a:focus-visible, .mw-hd button:focus-visible { outline: 3px solid var(--mwh-brand); outline-offset: 2px; }
.mw-hd .screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.mw-hd .maiwand-icon { flex: none; width: 20px; height: 20px; }

.mw-hd__bar { position: relative; display: flex; align-items: center; gap: 18px; max-width: var(--theme-block-max-width, 1290px); min-height: 76px; margin: 0 auto; padding: 10px 24px; background: #fff; }

/* Logo */
.mw-hd__brand { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 10px; min-width: 0; color: var(--mwh-ink) !important; }
.mw-hd__logo { flex: none; }
.mw-hd__logo { display: block; width: 52px; height: 52px; }
.mw-hd__name { overflow: hidden; font-size: 22px; font-style: italic; font-weight: 900; letter-spacing: .3px; line-height: 1.1; text-transform: uppercase; white-space: nowrap; }
.mw-hd__name-a { color: var(--mwh-ink); }
.mw-hd__name-b { color: var(--mwh-brand); }

/* Links */
.mw-hd__nav { margin-left: auto; }
.mw-hd__nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.mw-hd__link { display: block; padding: 9px 14px; border-radius: 999px; color: var(--mwh-ink) !important; font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.mw-hd__link:hover { background: var(--mwh-soft); }
.mw-hd__link.is-current { background: #fdeceb; color: var(--mwh-brand) !important; }
/* « Fidélité »: a small red gift in front. */
.mw-hd__link--loyalty { display: inline-flex; align-items: center; gap: 6px; }
.mw-hd .mw-hd__link--loyalty .maiwand-icon, .mw-hd .mw-hd__panel-link--loyalty .maiwand-icon { width: 18px; height: 18px; color: var(--mwh-brand); }
.mw-hd__panel-links a.mw-hd__panel-link--loyalty { gap: 10px; }

/* Phone, Commander, cart, menu button */
.mw-hd__actions { display: flex; flex: none; align-items: center; gap: 10px; }
.mw-hd__phone { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 6px; color: var(--mwh-ink) !important; font-size: 15px; font-weight: 700; white-space: nowrap; }
.mw-hd__phone .maiwand-icon { width: 18px; height: 18px; color: var(--mwh-brand); }
.mw-hd__phone:hover .mw-hd__phone-text { text-decoration: underline; }
/* Two numbers on large screens: one under the other, the icon in front of the first. */
.mw-hd__phones { display: flex; flex-direction: column; justify-content: center; }
.mw-hd__phones.has-more .mw-hd__phone { min-height: 22px; font-size: 14.5px; line-height: 1.15; }
.mw-hd__phone--more { padding-left: 31px !important; }
.mw-hd__cta { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--mwh-brand); box-shadow: 0 6px 16px rgb(214 40 40 / 25%); color: #fff !important; font-size: 15px; font-weight: 800; white-space: nowrap; transition: filter .15s ease, transform .15s ease; }
.mw-hd__cta:hover { filter: brightness(.93); }
.mw-hd__cta:active { transform: translateY(1px); }
.mw-hd__cart { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 8px; border-radius: 999px; color: var(--mwh-ink) !important; }
.mw-hd__cart:hover { background: var(--mwh-soft); }
.mw-hd__cart .maiwand-icon { width: 24px; height: 24px; }
.mw-hd__cart-dyn { display: inline-flex; align-items: center; }
.mw-hd__count { position: absolute; top: 3px; left: 24px; display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: var(--mwh-brand); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.mw-hd__amount { font-size: 14px; font-weight: 800; white-space: nowrap; }
/* 10+ items (v0.17.0): the bubble is wider, so the amount moves right and is never covered. */
.mw-hd__cart-dyn.is-wide .mw-hd__amount { margin-left: 15px; }
.mw-hd__cart-dyn.is-max .mw-hd__amount { margin-left: 23px; }
.mw-hd__amount:empty { display: none; }
/* Customer account (v0.15.4): « Se connecter » or the first name, green dot once signed in. */
.mw-hd__account { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 10px 0 8px; border-radius: 999px; color: var(--mwh-ink) !important; font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.mw-hd__account:hover { background: var(--mwh-soft); }
.mw-hd__account-icon { position: relative; display: inline-flex; flex: none; }
.mw-hd .mw-hd__account-icon .maiwand-icon { width: 22px; height: 22px; }
.mw-hd .is-signed-in .mw-hd__account-icon::after { position: absolute; right: -3px; bottom: -2px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #1f8a4c; content: ''; }
.mw-hd__account-text { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.mw-hd__burger { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 12px; background: var(--mwh-soft); color: var(--mwh-ink); cursor: pointer; }
.mw-hd__burger-lines { position: relative; display: block; width: 20px; height: 14px; }
.mw-hd__burger-lines span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.mw-hd__burger-lines span:nth-child(1) { top: 0; }
.mw-hd__burger-lines span:nth-child(2) { top: 6px; }
.mw-hd__burger-lines span:nth-child(3) { top: 12px; }
.mw-hd.is-open .mw-hd__burger-lines span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.mw-hd.is-open .mw-hd__burger-lines span:nth-child(2) { opacity: 0; }
.mw-hd.is-open .mw-hd__burger-lines span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Phone menu panel */
.mw-hd__panel { position: absolute; top: 100%; right: 0; left: 0; max-height: calc(100vh - 80px); overflow-y: auto; padding: 8px 16px 20px; border-bottom: 1px solid var(--mwh-line); background: #fff; box-shadow: 0 12px 24px rgb(25 35 46 / 12%); }
.mw-hd__panel-links { margin: 0 0 14px; padding: 0; list-style: none; }
.mw-hd__panel-links li + li { border-top: 1px solid var(--mwh-line); }
.mw-hd__panel-links a { display: flex; align-items: center; min-height: 52px; color: var(--mwh-ink) !important; font-size: 18px; font-weight: 800; }
.mw-hd__panel-links a.is-current { color: var(--mwh-brand) !important; }
.mw-hd__panel-cta { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 14px; background: var(--mwh-brand); color: #fff !important; font-size: 17px; font-weight: 800; }
.mw-hd__panel-phone { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: 10px; border: 1px solid var(--mwh-line); border-radius: 14px; color: var(--mwh-ink) !important; font-size: 16px; font-weight: 800; }
.mw-hd__panel-phone .maiwand-icon { color: var(--mwh-brand); }
.mw-hd__backdrop { position: fixed; z-index: -1; inset: 0; background: rgb(25 35 46 / 35%); }
html.mw-hd-open { overflow: hidden; }

/* Phone menu: who is signed in, or « Se connecter » */
.mw-hd__panel-account { display: flex; align-items: center; gap: 12px; margin: 8px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--mwh-soft); color: var(--mwh-ink) !important; }
.mw-hd__panel-account .mw-hd__account-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--mwh-brand); }
.mw-hd__panel-account.is-signed-in .mw-hd__account-icon::after { right: 0; bottom: 0; }
.mw-hd__panel-account-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mw-hd__panel-account-text strong { overflow: hidden; font-size: 17px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.mw-hd__panel-account-text span { color: var(--mwh-muted); font-size: 14px; font-weight: 600; }
.mw-hd__panel-account-text a { color: var(--mwh-brand) !important; font-weight: 800; text-decoration: none; }
.mw-hd__panel-account-text a:hover { text-decoration: underline; }

/* FR | EN (v0.17.0, shown only with TranslatePress): the current language in red, the other one a link. */
.mw-lang { display: inline-flex; flex: none; align-items: center; gap: 2px; font-size: 13px; font-weight: 800; letter-spacing: .4px; line-height: 1; }
.mw-lang__item { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 0 6px; border-radius: 999px; color: var(--mwh-muted) !important; }
a.mw-lang__item:hover { background: var(--mwh-soft); color: var(--mwh-ink) !important; }
.mw-lang__item.is-current { color: var(--mwh-brand) !important; }
.mw-lang__sep { color: #c9ced4; font-weight: 400; }
.mw-lang--bar .mw-lang__item { min-width: 40px; min-height: 40px; padding: 0 8px; border: 1px solid var(--mwh-line); color: var(--mwh-ink) !important; }
.mw-lang--bar a.mw-lang__item:hover { border-color: #e2d4c6; }
.mw-lang--panel { display: flex; justify-content: center; gap: 6px; margin-top: 12px; font-size: 15px; }
.mw-lang--panel .mw-lang__item { min-width: 64px; min-height: 44px; border: 1px solid var(--mwh-line); border-radius: 12px; }
.mw-lang--panel .mw-lang__item.is-current { border-color: var(--mwh-brand); background: #fdeceb; }
.mw-lang--panel .mw-lang__sep { display: none; }

/* Tablet and phone */
@media (max-width: 999.98px) {
  .mw-hd__bar { min-height: 64px; padding: 8px 16px; gap: 10px; }
  .mw-hd__nav, .mw-hd__cta, .mw-hd__account, .mw-lang--bar { display: none; }
  .mw-hd__actions { margin-left: auto; gap: 6px; }
  /* Three equal square buttons: call, cart, menu. */
  .mw-hd__phone, .mw-hd__cart { justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; background: var(--mwh-soft); }
  .mw-hd__phone .maiwand-icon { width: 20px; height: 20px; }
  .mw-hd__phone-text { display: none; }
  .mw-hd__phone--more { display: none !important; }
  .mw-hd__phones.has-more .mw-hd__phone { min-height: 44px; }
  .mw-hd__cart .maiwand-icon { width: 22px; height: 22px; }
  .mw-hd__count { top: -5px; right: -5px; left: auto; }
  .mw-hd__amount { display: none; }
  .mw-hd__burger { display: inline-flex; }
}
@media (max-width: 600px) {
  .mw-hd { top: 0; } /* The WordPress toolbar scrolls away on phones. */
  .mw-hd__bar { padding: 8px 12px; gap: 8px; }
  .mw-hd__brand { gap: 8px; }
  .mw-hd__logo { width: 42px; height: 42px; }
  .mw-hd__name { font-size: 17px; }
}
@media (max-width: 379.98px) {
  .mw-hd__name { font-size: 15px; letter-spacing: 0; }
  .mw-hd__actions { gap: 5px; }
}
/* Narrow phones: MAIWAND over PIZZA. */
@media (max-width: 359.98px) {
  .mw-hd__name { display: flex; flex-direction: column; gap: 1px; font-size: 16px; line-height: 1; }
}
@media (max-width: 339.98px) {
  .mw-hd__logo { width: 38px; height: 38px; }
  .mw-hd__phone, .mw-hd__cart, .mw-hd__burger { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
  .mw-hd__phones.has-more .mw-hd__phone { min-height: 40px; }
}
/* Small laptops: the phone number becomes a call button to leave room for the links. */
@media (min-width: 1000px) and (max-width: 1199.98px) {
  .mw-hd__bar { gap: 10px; }
  .mw-hd__link { padding: 9px 9px; }
  .mw-hd__actions { gap: 8px; }
  .mw-hd__amount { display: none; } /* the red count stays on the bag */
  .mw-hd__phone { justify-content: center; width: 44px; padding: 0; border-radius: 12px; background: var(--mwh-soft); }
  .mw-hd__phones.has-more .mw-hd__phone { min-height: 44px; }
  .mw-hd__phone--more { display: none !important; }
  .mw-hd__phone-text { display: none; }
}
@media (min-width: 1000px) {
  .mw-hd__panel, .mw-hd__backdrop { display: none !important; }
}
/* Account (v0.15.4): the first name only on wide screens; below, the icon (green dot when signed in). */
@media (min-width: 1000px) and (max-width: 1359.98px) {
  .mw-hd__account { justify-content: center; width: 44px; padding: 0; border-radius: 12px; background: var(--mwh-soft); }
  .mw-hd__account-text { display: none; }
}
@media (min-width: 1200px) {
  .mw-hd__bar { gap: 14px; }
  .mw-hd__link { padding: 9px 11px; }
  /* 10+ items (v0.17.0): the wider count + amount take a few pixels from the spacing, so the name is never cut. */
  .mw-hd__bar:has(.mw-hd__cart-dyn.is-wide), .mw-hd__bar:has(.mw-hd__cart-dyn.is-max) { gap: 10px; }
  .mw-hd__bar:has(.mw-hd__cart-dyn.is-wide) .mw-hd__actions, .mw-hd__bar:has(.mw-hd__cart-dyn.is-max) .mw-hd__actions { gap: 6px; }
  .mw-hd__bar:has(.mw-hd__cart-dyn.is-wide) .mw-hd__link, .mw-hd__bar:has(.mw-hd__cart-dyn.is-max) .mw-hd__link { padding: 9px 9px; }
}

/* Room for the language button (v0.17.0, only when it is shown): no gift in front of « Fidélité », slightly tighter spacing. */
.mw-hd__bar:has(.mw-lang--bar) .mw-hd__link--loyalty .maiwand-icon { display: none; }
@media (min-width: 1000px) and (max-width: 1199.98px) {
  .mw-hd__bar:has(.mw-lang--bar) .mw-hd__link { padding: 9px 6px; }
  .mw-hd__bar:has(.mw-lang--bar) .mw-hd__actions { gap: 6px; }
}
@media (min-width: 1200px) {
  .mw-hd__bar:has(.mw-lang--bar) .mw-hd__link { padding: 9px 9px; }
  .mw-hd__bar:has(.mw-lang--bar) .mw-hd__actions { gap: 8px; }
  .mw-hd__bar:has(.mw-lang--bar):has(.mw-hd__cart-dyn.is-wide) .mw-hd__actions, .mw-hd__bar:has(.mw-lang--bar):has(.mw-hd__cart-dyn.is-max) .mw-hd__actions { gap: 5px; }
  .mw-hd__bar:has(.mw-lang--bar):has(.mw-hd__cart-dyn.is-wide) .mw-hd__link { padding: 9px 8px; }
  .mw-hd__bar:has(.mw-lang--bar):has(.mw-hd__cart-dyn.is-max) .mw-hd__link { padding: 9px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .mw-hd, .mw-hd *, .mw-hd *::before, .mw-hd *::after { transition: none !important; }
}
.mw-hd__panel-whatsapp .maiwand-icon { color: #1f8a4c; }
