/* ==========================================================================
   Site chrome — header, mega menu, mobile nav, drawers, footer
   ========================================================================== */

/* ============================ HEADER ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-stuck { box-shadow: 0 2px 18px rgba(43, 40, 38, 0.09); }

/* ---- utility row ---- */

.header-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding-block: 16px;
}

/* brand on the left, readable the moment the page opens (blueprint: +25-40%) */
.header-brand { justify-self: start; order: 1; }
/* 300px overrode the 236px the markup asks for and crowded the search field;
   scaling down keeps the wordmark legible without owning the whole bar */
.header-brand img { width: clamp(112px, 11vw, 156px); height: auto; }

/* the search bar takes roughly half the header */
.header-search { order: 2; position: relative; justify-self: center; width: 100%; max-width: 50vw; }
.header-actions { order: 3; justify-self: end; display: flex; align-items: center; gap: 18px; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding-inline: 14px 10px;
  background: var(--cream-light);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.search-box:focus-within,
.search-box.is-open { background: var(--white); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(177, 137, 63, 0.08); }
.search-box svg { flex: none; color: var(--grey-2); }

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding-inline: 10px;
  background: none;
  border: 0;
  font-size: var(--fs-base);
}

.search-box input:focus { outline: none; }
.search-box input::placeholder { color: var(--grey-3); }
.search-box .mic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; color: var(--gold); }

.header-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-sm);
  color: var(--ink);
  transition: color var(--dur-fast) var(--ease);
}

.header-action:hover { color: var(--gold); }

/* the icons draw at 17px; on a phone that is far too small to hit, so the
   touch area is widened invisibly — kept inside the row gap so two
   neighbouring icons can never claim the same tap */
@media (max-width: 900px) {
  .header-action svg { width: 21px; height: 21px; }
  .header-action::after {
    content: "";
    position: absolute;
    inset: -13px -8px;
  }
  /* the search box is styled further down this file, so it needs naming here
     to clear 16px too */
  .search-box input { font-size: 16px; }
}
.header-action svg { flex: none; }

.header-action .count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  padding-inline: 4px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--white);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.locale-switch { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.locale-switch .flag { width: 19px; height: 19px; border-radius: 50%; object-fit: cover; }
.locale-switch .divider { width: 1px; height: 14px; background: var(--line); }
.locale-switch .ar { font-family: var(--font-ar); }

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 12px;
  background: var(--gold-tint);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gold);
}

.pill-link:hover { background: var(--gold-tint-strong); }

/* ---- primary nav ---- */

.header-nav { border-top: 1px solid var(--line-soft); }

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.nav-item { position: static; }

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 48px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  position: relative;
  transition: color var(--dur-fast) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav-item:hover .nav-link,
.nav-link.is-active { color: var(--gold); }
.nav-item:hover .nav-link::after,
.nav-link.is-active::after { transform: scaleX(1); }

.nav-link.is-sale { color: var(--sale); }

/* ---- mega menu ---- */

.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--white);
  border-top: 1px solid var(--line-soft);
  box-shadow: 0 22px 40px rgba(43, 40, 38, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  z-index: 210;
}

.nav-item:hover .mega,
.nav-item:focus-within .mega { opacity: 1; visibility: visible; transform: translateY(0); }

.mega-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  padding-block: 34px 40px;
}

.mega-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px; }
.mega-col h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--grey-3);
  margin-bottom: 12px;
}

.mega-col li + li { margin-top: 9px; }
.mega-col a { font-size: var(--fs-base); color: var(--ink); transition: color var(--dur-fast) var(--ease), padding-left var(--dur-fast) var(--ease); }
.mega-col a:hover { color: var(--gold); padding-left: 4px; }

.mega-promos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mega-promo { display: block; }
.mega-promo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.mega-promo span {
  display: block;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  text-align: center;
  color: var(--ink);
}
.mega-promo:hover span { color: var(--gold); }

/* ---- mobile header bits ---- */

/* scoped so the generic .icon-btn display rule cannot re-show these on desktop */
.header-top .header-burger,
.site-header .header-mobile-search { display: none; }

@media (max-width: 1100px) {
  .nav-list { gap: 20px; }
  .nav-link { font-size: 12px; letter-spacing: 0.6px; }
  .mega-inner { grid-template-columns: 1fr 300px; gap: 28px; }
}

@media (max-width: 900px) {
  .header-nav { display: none; }
  .header-top { grid-template-columns: auto 1fr auto; gap: 12px; padding-block: 12px; }
  .header-brand { order: 2; }
  .header-brand img { width: 128px; }
  .header-search { display: none; }
  .header-top .header-burger { order: 1; display: inline-flex; align-items: center; justify-self: start; }
  .header-actions { order: 3; gap: 18px; }
  .header-actions .label,
  .header-actions .locale-switch .ar,
  .header-actions .pill-link span { display: none; }
  .site-header .header-mobile-search { display: block; padding-bottom: 12px; }
}

/* on phones, keep only the essential actions so the wordmark gets room */
@media (max-width: 640px) {
  .header-actions { gap: 16px; }
  .header-actions .pill-link,
  .header-actions .locale-switch,
  .header-actions a[aria-label="Track your order"] { display: none; }
  .header-brand img { width: 150px; }
}

/* ============================ DRAWERS ============================ */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(31, 29, 27, 0.48);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
  z-index: 300;
}

.scrim.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--white);
  display: flex;
  flex-direction: column;
  z-index: 310;
  transition: transform var(--dur) var(--ease);
  box-shadow: var(--shadow-lg);
}

.drawer-right { right: 0; transform: translateX(102%); }
.drawer-left { left: 0; transform: translateX(-102%); }
.drawer.is-open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-head h3 { font-size: var(--fs-xl); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer-foot { padding: 18px 22px 24px; border-top: 1px solid var(--line-soft); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease);
}

.icon-btn:hover { background: var(--cream-light); }

/* mobile nav accordion */

.mnav-item { border-bottom: 1px solid var(--line-soft); }
.mnav-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 0;
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: left;
}
.mnav-trigger svg { transition: transform var(--dur-fast) var(--ease); }
.mnav-item.is-open .mnav-trigger { color: var(--gold); }
.mnav-item.is-open .mnav-trigger svg { transform: rotate(180deg); }
.mnav-panel { display: none; padding-bottom: 14px; }
.mnav-item.is-open .mnav-panel { display: block; }
.mnav-panel h4 { font-family: var(--font-sans); font-size: var(--fs-xs); letter-spacing: 1.1px; text-transform: uppercase; color: var(--grey-3); margin: 12px 0 8px; }
.mnav-panel a { display: block; padding: 7px 0 7px 12px; font-size: var(--fs-base); color: var(--grey-1); }
.mnav-panel a:hover { color: var(--gold); }

/* mini cart */

.minicart-line {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.minicart-line img { width: 74px; height: 74px; object-fit: cover; border-radius: var(--radius); background: var(--cream-light); }
.minicart-line h4 { font-family: var(--font-serif); font-size: var(--fs-lg); margin-bottom: 4px; }
.minicart-line .meta { font-size: var(--fs-sm); color: var(--grey-2); }
.minicart-line .price { font-weight: 600; color: var(--gold); }
.minicart-line .remove { font-size: var(--fs-sm); color: var(--grey-3); text-decoration: underline; }
.minicart-line .remove:hover { color: var(--sale); }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty-stepper button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink); }
.qty-stepper button:hover { background: var(--cream-light); color: var(--gold); }
.qty-stepper span { min-width: 26px; text-align: center; font-size: var(--fs-base); font-weight: 500; }

.cart-summary-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: var(--fs-base); }
.cart-summary-row.total { font-size: var(--fs-lg); font-weight: 700; color: var(--ink); }

/* ============================ FOOTER ============================ */

.site-footer { background: var(--white); color: var(--ink); margin-top: 40px; }

.footer-news {
  background: var(--cream);
  padding-block: 44px;
}

.footer-news-inner {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 470px);
  align-items: center;
  gap: 40px;
}

.footer-news h3 { font-size: 30px; line-height: 1.2; }
.footer-news h3 small { display: block; font-family: var(--font-sans); font-size: var(--fs-base); font-weight: 400; color: var(--grey-1); margin-top: 8px; letter-spacing: 0.2px; }

.news-form { display: flex; gap: 10px; }
.news-form .field { flex: 1; height: 50px; border-color: transparent; }
.news-form .btn { flex: none; height: 50px; }

.footer-quote {
  padding-block: 34px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 760px;
  margin-inline: auto;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-block: 20px 44px;
  border-top: 1px solid var(--line-soft);
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 28px 0 16px;
}

.footer-col li + li { margin-top: 10px; }
.footer-col a { font-size: var(--fs-base); color: var(--grey-1); transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--gold); }

.footer-contact { display: grid; gap: 12px; margin-top: 18px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 9px; font-size: var(--fs-base); color: var(--ink); font-weight: 500; }
.footer-contact a:hover { color: var(--gold); }

.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-sm);
  color: var(--grey-2);
}

.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-methods span {
  display: grid;
  place-items: center;
  height: 26px;
  padding-inline: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--grey-1);
  background: var(--white);
}

@media (max-width: 900px) {
  .footer-news-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-quote { font-size: 18px; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
  .news-form { flex-direction: column; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================ TOAST ============================ */

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 400;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  font-size: var(--fs-base);
  box-shadow: var(--shadow);
  animation: toast-in 0.3s var(--ease);
}

.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ============================ SEARCH PANEL ============================ */

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  padding: 26px 28px 22px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(43, 40, 38, 0.35), 0 2px 10px rgba(43, 40, 38, 0.06);
}

.search-panel h4 {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--grey-3);
}

.sp-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.sp-chip:hover { border-color: var(--gold); background: var(--gold-tint); color: var(--gold-dark); }

.sp-list li + li { margin-top: 8px; }
.sp-list a { font-family: var(--font-serif); font-size: var(--fs-lg); color: var(--ink); }
.sp-list a:hover { color: var(--gold-dark); }

.sp-products { padding-top: 18px; }
.sp-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 150px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.sp-track > * { scroll-snap-align: start; }
.sp-card { display: grid; gap: 5px; color: var(--ink); }
.sp-img { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--cream-light); }
.sp-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transition: transform 0.8s var(--ease); }
.sp-card:hover .sp-img img { transform: scale(1.05); }
.sp-name { font-family: var(--font-serif); font-size: var(--fs-base); line-height: 1.25; margin-top: 4px; }
.sp-stars i { color: var(--line); font-style: normal; font-size: 11px; }
.sp-stars i.on { color: var(--gold); }
.sp-price { font-size: var(--fs-sm); font-weight: 600; }
.sp-cta { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }

@media (max-width: 980px) {
  .header-search { max-width: none; }
  .sp-top { grid-template-columns: 1fr; gap: 18px; }
}


/* mobile search box carries the same panel */
.header-mobile-search { position: relative; }
.header-mobile-search .search-panel { padding: 18px 16px 16px; }
.header-mobile-search .sp-track { grid-auto-columns: 132px; gap: 12px; }
.header-mobile-search .sp-list a { font-size: var(--fs-base); }
@media (max-width: 640px) {
  .search-panel { max-height: calc(100vh - 150px); overflow: auto; }
}
