/* ============================================================
   MANAII — LAYOUT & GLOBAL CHROME
   Container / sections / header / mega menu / drawer / search / footer.
   Desktop values only; responsive.css recomposes below 1024/900/600.
   ============================================================ */

/* ---- Container & sections ---- */
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-rhythm); position: relative; }
.section--brand { padding-block: var(--section-rhythm-brand); }
.is-commerce .section, .section--commerce { padding-block: 56px; }

.ground-cream { background: var(--color-cream); }
.ground-teal { background: var(--color-teal); }
.ground-green { background: var(--color-green-dark); color: var(--color-cream); }
.ground-white { background: var(--color-white); }

.skip-target { scroll-margin-top: 24px; }

/* ============================================================
   Announcement bar
   ============================================================ */
.announce {
  background: var(--color-burgundy); color: var(--color-cream);
  height: 52px; display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 15px; text-align: center; position: relative; z-index: var(--z-announce);
}
.announce a { color: var(--color-cream); text-decoration: underline; }
.announce svg { width: 24px; height: 24px; flex: none; }

/* ============================================================
   Header — desktop
   ============================================================ */
.site-header {
  background: var(--color-cream); height: 96px;
  position: relative; z-index: var(--z-header);
}
.site-header__inner {
  max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter);
  height: 100%; display: flex; align-items: center; gap: 36px;
}
.site-logo { width: 74px; height: 74px; flex: none; display: block; }
.site-logo img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }

.nav-desktop { display: flex; align-items: center; gap: 30px; }
.nav-desktop a {
  position: relative; font-size: 16px; font-weight: 600; color: var(--color-ink);
  padding-block: 6px; display: inline-flex; align-items: center; gap: 6px;
}
.nav-desktop a::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -18px;
  height: 3px; width: 100%; background: var(--color-gold); border-radius: 2px;
  transform: scaleX(0); transform-origin: inline-start;
  transition: transform var(--dur-fade) var(--ease-out);
}
.nav-desktop a:hover, .nav-desktop a[aria-current="page"], .nav-desktop a.is-open { color: var(--color-teal-deep); }
.nav-desktop a:hover::after, .nav-desktop a[aria-current="page"]::after, .nav-desktop a.is-open::after { transform: scaleX(1); }
.nav-desktop .caret { width: 16px; height: 16px; }

.utility { margin-inline-start: auto; display: flex; align-items: center; gap: 22px; }
.utility__btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; color: var(--color-ink); padding: 4px; }
.utility__btn svg { width: 24px; height: 24px; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; position: relative; color: var(--color-ink); }
.cart-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--color-teal-deep); color: var(--color-cream);
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  position: absolute; top: -6px; inset-inline-start: -6px;
}
.cart-total { font-size: 15px; font-weight: 600; }

/* Account dropdown */
.account { position: relative; }
.account__menu {
  position: absolute; top: calc(100% + 12px); inset-inline-end: 0; width: 250px;
  background: var(--color-white); border-radius: 18px; box-shadow: var(--shadow-float);
  padding: 10px; z-index: var(--z-account);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur-fade) var(--ease), transform var(--dur-fade) var(--ease), visibility var(--dur-fade);
}
.account:hover .account__menu, .account__menu.is-open, .account:focus-within .account__menu { opacity: 1; visibility: visible; transform: none; }
.account__menu a { display: flex; align-items: center; height: 42px; padding-inline: 14px; border-radius: 12px; color: var(--color-ink); font-size: 15px; }
.account__menu a:hover { background: var(--color-tint-sand); color: var(--color-teal-deep); }
.account__menu a.is-muted { color: var(--color-muted); }

/* ============================================================
   Mega menu — desktop only
   ============================================================ */
.mega {
  position: absolute; inset-inline: 0; top: 100%; margin-top: 28px;
  display: flex; justify-content: center; z-index: var(--z-mega);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-fade) var(--ease);
}
.mega.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mega__overlay {
  position: fixed; inset: 0; background: rgba(37,37,37,.14); z-index: -1;
  opacity: 0; transition: opacity var(--dur-fade) var(--ease);
}
.mega.is-open .mega__overlay { opacity: 1; }
.mega__panel {
  width: 1120px; max-width: calc(100vw - 80px);
  background: var(--color-cream); border-radius: 24px; padding: 36px 40px 40px;
  box-shadow: var(--shadow-modal);
}
.mega__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.mega__head .end { color: var(--color-muted); font-size: 14px; }
.mega__grid { display: grid; grid-template-columns: 270px 1fr 1fr 240px; gap: 32px; }
.mega__rail { background: var(--color-white); border-radius: 16px; padding: 8px; }
.mega__rail button, .mega__rail a {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding-inline: 14px;
  background: none; border: 0; border-radius: 12px; cursor: pointer; text-align: start;
  font-size: 16px; font-weight: 600; color: var(--color-ink); font-family: inherit;
}
.mega__rail button:hover, .mega__rail button[aria-selected="true"], .mega__rail a:hover, .mega__rail a[aria-selected="true"], .mega__rail a:focus-visible { background: var(--color-tint-sand); color: var(--color-teal-deep); font-weight: 700; }
.mega__art { display: none; }
.mega__art.is-active { display: block; }
.mega__art figure { margin: 0; }
.mega__art img { width: 100%; height: 220px; object-fit: cover; border-radius: var(--radius-media-sm); background: var(--color-media-bg); }
.mega__art h3 { font-size: 19px; font-weight: 700; margin-top: 14px; }
.mega__art p { font-size: 15px; line-height: 1.9; color: var(--color-ink-muted); margin-top: 6px; }
.mega__story { background: var(--color-green-dark); color: var(--color-cream); border-radius: 18px; padding: 24px; }
.mega__story .kicker { color: var(--color-gold); }
.mega__story p { font-size: 15px; line-height: 1.9; margin: 14px 0; color: rgba(255,246,220,.9); }
.mega__story a { color: var(--color-gold); }

/* ============================================================
   Search overlay — all widths
   ============================================================ */
.search-overlay {
  position: absolute; inset-inline: 0; top: 100%; z-index: var(--z-search);
  background: var(--color-white); box-shadow: var(--shadow-float);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--dur-fade) var(--ease), transform var(--dur-fade) var(--ease), visibility var(--dur-fade);
}
.search-overlay.is-open { opacity: 1; visibility: visible; transform: none; }
.search-overlay__inner { max-width: var(--container); margin: 0 auto; padding: 36px 40px 40px; }
.search-row { display: flex; align-items: center; gap: 16px; min-height: 44px; border-bottom: 2px solid var(--color-teal-deep); padding-bottom: 14px; }
.search-row svg { width: 24px; height: 24px; color: var(--color-teal-deep); flex: none; }
.search-row input { flex: 1; border: 0; font-family: inherit; font-size: 22px; font-weight: 600; background: none; }
.search-row input:focus { outline: none; }
.search-close { flex: none; min-height: 44px; padding-inline: 20px; border-radius: 999px; background: var(--color-tint-sand); border: 0; font-family: inherit; font-size: 15px; cursor: pointer; }
.search-body { display: grid; grid-template-columns: 230px 1fr; gap: 40px; margin-top: 28px; }
.search-body h3 { font-size: 15px; font-weight: 700; color: var(--color-muted); margin-bottom: 12px; }
.search-recent a { display: flex; align-items: center; min-height: 44px; color: var(--color-ink); }
.search-suggest { display: grid; gap: 12px; }
.suggest-card { display: flex; align-items: center; gap: 14px; background: var(--color-tint-sand); border-radius: 16px; padding: 12px; min-height: 44px; color: var(--color-ink); }
.suggest-card img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; background: var(--color-media-bg); }

/* ============================================================
   Mobile header + drawer
   ============================================================ */
.header-mobile { display: none; height: 68px; background: var(--color-cream); align-items: center; gap: 12px; padding-inline: var(--gutter); position: relative; z-index: var(--z-header); }
.header-mobile .site-logo { width: 48px; height: 48px; }
.header-mobile__controls { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.mbtn { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; background: var(--color-white); color: var(--color-ink); position: relative; }
.mbtn--menu { background: var(--color-green-dark); color: var(--color-cream); }
.mbtn svg { width: 22px; height: 22px; }

.drawer-scrim { position: fixed; inset: 0; background: rgba(6,73,58,.45); z-index: calc(var(--z-drawer) - 1); opacity: 0; visibility: hidden; transition: opacity var(--dur-drawer) var(--ease); }
.drawer-scrim.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; width: min(88vw, 360px);
  background: var(--color-cream); box-shadow: var(--shadow-drawer); z-index: var(--z-drawer);
  /* `inset-inline-end: 0` resolves to `left: 0` on this RTL page — `transform:
     translateX(100%)` is a PHYSICAL rightward shift regardless of that logical
     anchor, so it only moved the drawer from [0, width] to [width, 2×width]:
     still partly inside a narrow (e.g. 390px) viewport, not off-screen. It
     needs to shift LEFTWARD (negative) to actually clear the left edge it's
     anchored to. This was leaving the closed drawer permanently visible,
     overlapping page content by (width − viewport-width) on every page at
     narrow widths. */
  transform: translateX(-100%); transition: transform var(--dur-drawer) var(--ease-out);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.is-open { transform: none; }
.drawer__head { background: var(--color-green-dark); color: var(--color-cream); display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.drawer__head .site-logo { width: 52px; height: 52px; }
.drawer__close { width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: var(--color-cream); cursor: pointer; font-size: 20px; }
.drawer__body { padding: 20px; }
.drawer__group-card { background: var(--color-white); border-radius: 16px; padding: 6px; margin-block: 12px 20px; }
.drawer__cat { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-inline: 14px; border-radius: 12px; color: var(--color-ink); font-weight: 600; }
.drawer__cat .chev { margin-inline-start: auto; }
.drawer__links a { display: flex; align-items: center; min-height: 52px; font-size: 17px; font-weight: 700; color: var(--color-ink); border-top: var(--rule-dashed); }
.drawer__account { background: var(--color-green-dark); color: var(--color-cream); border-radius: 18px; padding: 20px; margin-top: 20px; }
.drawer__account .kicker { color: var(--color-gold); margin-bottom: 12px; }
.drawer__account a { display: flex; align-items: center; min-height: 46px; color: var(--color-cream); }
.drawer__cart { margin-top: 16px; font-weight: 700; }

/* ============================================================
   Footer — closing brand moment
   ============================================================ */
.site-footer { position: relative; }
.footer-brand { background: var(--color-green-dark); color: var(--color-cream); }
.footer-brand__inner { max-width: var(--container); margin: 0 auto; padding: 56px var(--gutter) 0; display: grid; grid-template-columns: 1fr 420px; gap: 64px; align-items: end; }
.footer-brand .kicker { color: var(--color-gold); }
.footer-brand h2 { font-size: 40px; line-height: 1.35; font-weight: 800; color: var(--color-cream); margin-top: 16px; }
.footer-brand p.lead { font-size: 16px; line-height: 2; color: rgba(255,246,220,.85); max-width: 520px; margin-top: 20px; }
.footer-newsletter { display: flex; gap: 12px; margin-top: 24px; max-width: 520px; }
.footer-newsletter input { flex: 1; min-width: 0; height: 56px; border-radius: 999px; border: 0; padding-inline: 22px; font-family: inherit; font-size: 16px; background: var(--color-cream); }
.footer-newsletter button { height: 56px; padding-inline: 32px; border-radius: 999px; border: 0; background: var(--color-gold); color: var(--color-ink); font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.footer-consent { font-size: 14px; line-height: 1.9; color: rgba(255,246,220,.75); margin-top: 16px; }
.footer-consent a { color: var(--color-gold); }
.footer-naneh { align-self: end; }
.footer-naneh img { display: block; width: 100%; }

.footer-util { background: var(--color-yellow); }
.footer-util__inner { max-width: var(--container); margin: 0 auto; padding: 8px var(--gutter); display: grid; grid-template-columns: auto 1fr auto; gap: 48px; align-items: center; }
.footer-util__logo { width: 74px; height: 74px; border-radius: 999px; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--color-plum); font-size: 15px; font-weight: 600; }
.footer-links .sep { width: 1px; height: 14px; background: rgba(122,31,94,.35); }
.footer-socials { width: 40px; }
.footer-rule { height: 22px; background: url(../images/wave-rule-teal.svg) no-repeat center / 100% 100%; opacity: .55; }
.footer-baseline { max-width: var(--container); margin: 0 auto; padding: 16px var(--gutter) 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; color: var(--color-ink); }
.footer-baseline .copy { justify-self: start; font-size: 13px; }
.footer-baseline .enamad { justify-self: center; }
.footer-baseline .enamad img { width: 110px; }
.footer-baseline .made { justify-self: end; font-size: 13px; text-align: end; }

/* ============================================================
   Mobile chrome swap (mirrors responsive.css data-m hooks)
   ============================================================ */
@media (max-width: 900px) {
  .site-header, .nav-desktop, .mega { display: none !important; }
  .header-mobile { display: flex; }
  .footer-brand__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-util__inner { grid-template-columns: 1fr; justify-items: center; gap: 20px; text-align: center; }
  .footer-links { flex-direction: row; }
  .footer-baseline { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-baseline .copy, .footer-baseline .made { justify-self: center; text-align: center; }
  .search-body { grid-template-columns: 1fr; }
}
@media (min-width: 901px) {
  .header-mobile, .drawer, .drawer-scrim { display: none !important; }
}
