/*
 * SIGMAN announcement bar (1:1 from sgm-announcement.liquid) +
 * header (from sections/header.liquid live settings + sgm-header.liquid).
 * Header layout: navy top row (centered logo, actions right), white nav row
 * with centered bold navy category links; transparent over the home hero;
 * sticky with shadow + white nav bar once scrolled.
 */

/* ── Announcement bar ── */
.sgm-anbar { background: #111; color: #fff; position: relative; z-index: 6; min-height: 40px; contain: layout; }
.sgm-anbar__track {
  position: relative;
  max-width: var(--page-width, 120rem);
  margin-inline: auto;
  height: 40px;
  padding-inline: 16px;
}
.sgm-anbar__msg {
  position: absolute; inset: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--font-body-family);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  line-height: 1.2; opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .sgm-anbar__msg { animation: sgm-anbar 16s infinite; }
  .sgm-anbar__msg:nth-child(1) { animation-delay: 0s; }
  .sgm-anbar__msg:nth-child(2) { animation-delay: 4s; }
  .sgm-anbar__msg:nth-child(3) { animation-delay: 8s; }
  .sgm-anbar__msg:nth-child(4) { animation-delay: 12s; }
}
@media (prefers-reduced-motion: reduce) { .sgm-anbar__msg:first-child { opacity: 1; } }
@keyframes sgm-anbar {
  0% { opacity: 0; transform: translateY(6px); }
  3% { opacity: 1; transform: translateY(0); }
  22% { opacity: 1; transform: translateY(0); }
  25% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 0; }
}
@media screen and (max-width: 749px) {
  .sgm-anbar { min-height: 36px; }
  .sgm-anbar__msg { font-size: 0.64rem; letter-spacing: 0.08em; }
  .sgm-anbar__track { height: 36px; }
}

/* Blue Friday Announcement Pill */
.sgm-anbar__bf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 30%, #b38728 70%, #aa771c 100%);
  color: #040e21;
  font-weight: 900;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
@media screen and (max-width: 749px) {
  .sgm-anbar__bf-pill { font-size: 0.6rem; padding: 1px 6px; margin-right: 5px; }
}

/* ── Header ── */
#header-component {
  position: sticky; top: 0; z-index: 50;
  transition: box-shadow 0.4s ease, background-color 0.4s ease;
}
#header-component[data-sticky-state='active'] { box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08); }

.header__row--top { background: var(--color-primary); color: #fff; }
.header__row--top .header__columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  max-width: none;
  padding: 10px var(--page-margin);
  min-height: 58px;
}
.header__column--left { justify-self: start; display: flex; align-items: center; }
.header__column--center { justify-self: center; text-align: center; }
.header__column--right { justify-self: end; display: flex; align-items: center; gap: 6px; }

.header__logo { display: inline-flex; align-items: center; text-decoration: none; }
.header__logo-image { height: 30px; width: auto; display: block; }
.header__logo-text { font-weight: 700; font-size: 1.25rem; letter-spacing: 0.2em; color: #fff; }
@media screen and (max-width: 749px) { .header__logo-image { height: 24px; } }

.header-action, .header__menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  color: #fff; position: relative;
  --icon-stroke-width: 1.2px;
}
.header-action svg, .header__menu-toggle svg { width: 20px; height: 20px; }
.header__menu-toggle { display: none; }
@media screen and (max-width: 749px) { .header__menu-toggle { display: inline-flex; } }

/* Cart / wishlist bubble — custom style from live settings: white bg, navy text */
.header-bubble {
  position: absolute; top: 3px; right: 1px;
  min-width: 16px; height: 16px;
  padding-inline: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffffff; color: var(--color-primary);
  font-size: 0.62rem; font-weight: 700;
  border-radius: 999px;
}

/* ── Category nav row (white, centered, bold navy words + underline) ── */
.header__row--bottom {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  min-height: 42px;
  padding-block: 9px;
}
.header-menu { display: flex; justify-content: center; width: 100%; }
.header-menu ul {
  display: flex; align-items: center; justify-content: center;
  gap: 2.6rem;
  list-style: none; margin: 0; padding: 0;
}
.header-menu a {
  position: relative;
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  text-decoration: none;
  padding-bottom: 7px;
}
.header-menu a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--color-primary);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.28s ease;
}
.header-menu a:hover::after,
.header-menu .current-menu-item a::after { transform: scaleX(1); }

@media screen and (max-width: 749px) {
  .header-menu ul { gap: 10px; }
  .header-menu a { font-size: 0.66rem; letter-spacing: 0.02em; padding-inline: 6px; }
}

/* ── Transparent over the home hero (top of page only) ──
   The header stays sticky in normal flow; the hero is pulled up behind it by
   the measured header height (--sgm-header-h, set by header.js). On scroll the
   sticky state restores the navy top row + white nav row. */
#header-component[transparent][data-sticky-state='inactive'] {
  background: transparent;
  box-shadow: none;
}
#header-component[transparent][data-sticky-state='inactive'] .header__row--top {
  background: transparent;
}
#header-component[transparent][data-sticky-state='inactive'] .header__row--bottom {
  background: transparent;
}
#header-component[transparent][data-sticky-state='inactive'] .header-menu a { color: #fff; }
#header-component[transparent][data-sticky-state='inactive'] .header-menu a::after { background: #fff; }
body.sgm-transparent-header .sgm-hero {
  margin-top: calc(-1 * var(--sgm-header-h, 138px));
}
/* Once scrolled, both rows get their solid backgrounds back instantly. */
#header-component[transparent][data-sticky-state='active'] .header__row--top { background: var(--color-primary); }
#header-component[transparent][data-sticky-state='active'] .header__row--bottom { background: #fff; }

/* ── Mobile drawer ── */
.sgm-drawer { position: fixed; inset: 0; z-index: 100; }
.sgm-drawer[hidden] { display: none; }
.sgm-drawer__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); border: 0; }
.sgm-drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: min(86vw, 360px);
  background: var(--drawer-bg); color: var(--drawer-text);
  padding: 56px 24px 24px;
  overflow-y: auto;
  box-shadow: var(--sgm-shadow-lg);
  transform: translateX(-100%);
  transition: transform 0.3s var(--sgm-ease);
}
/* Open: panel slides in over a fading scrim; close is quicker (header.js). */
.sgm-drawer__overlay { opacity: 0; transition: opacity 0.3s ease; }
.sgm-drawer[data-open] .sgm-drawer__overlay { opacity: 1; transition-duration: 0.4s; }
.sgm-drawer[data-open] .sgm-drawer__panel { transform: none; transition-duration: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .sgm-drawer__panel, .sgm-drawer__overlay { transition: none; }
}
.sgm-drawer__close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  --icon-stroke-width: 1.2px;
}
.sgm-drawer__menu { list-style: none; margin: 0; padding: 0; }
.sgm-drawer__menu > li { border-bottom: 1px solid var(--color-border); }
.sgm-drawer__menu a {
  display: block;
  padding: 14px 4px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  text-decoration: none;
}
.sgm-drawer__menu .sub-menu { list-style: none; padding-left: 14px; }
.sgm-drawer__menu .sub-menu a { font-weight: 500; text-transform: none; letter-spacing: 0; }
.header-bubble { font-variant-numeric: tabular-nums; }

/* ── Language Switcher in Header (Matches SIGMAN Brand Buttons) ── */
.header-action--lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 44px;
  height: 32px;
  padding: 0 12px;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 0; /* Signature SIGMAN sharp brand corners */
  text-decoration: none;
  font-family: var(--font-body-family);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  cursor: pointer;
  line-height: 1;
}
.header-action--lang:hover {
  background: #ffffff;
  color: #111111;
  border-color: #ffffff;
}
#header-component:not([transparent]) .header-action--lang,
#header-component[data-sticky-state="active"] .header-action--lang {
  border-color: #111111;
  color: #111111;
}
#header-component:not([transparent]) .header-action--lang:hover,
#header-component[data-sticky-state="active"] .header-action--lang:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}
.sgm-lang-toggle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

/* ── Global RTL rules when Arabic is active ── */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Cairo', Tahoma, Arial, sans-serif;
}
html[dir="rtl"] .header__column--left {
  justify-self: start;
}
html[dir="rtl"] .header__column--right {
  justify-self: end;
}
html[dir="rtl"] .header-bubble {
  right: auto;
  left: 1px;
}
html[dir="rtl"] .sgm-drawer__panel {
  left: auto;
  right: 0;
  transform: translateX(100%);
}
html[dir="rtl"] .sgm-drawer[data-open] .sgm-drawer__panel {
  transform: none;
}
html[dir="rtl"] .sgm-drawer__close {
  position: static;
}
html[dir="rtl"] .sgm-carousel-controls {
  right: auto;
  left: 0;
}
html[dir="rtl"] .sgm-cd__close {
  margin-inline-end: 0;
  margin-inline-start: -10px;
}

