/* header.css — JS-toggled states only. Cannot be Tailwind utilities. */

/* Announcement strip */
.ann-strip        { transition: height .22s ease; }
.ann-strip.closed { height: 0 !important; min-height: 0 !important; padding-block: 0 !important; overflow: hidden; }
/* Every announcement sits in the same grid cell and only the current one shows */
.ann-text         { display: grid; min-width: 0; }
.ann-item         { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; white-space: nowrap;
                    opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.ann-item.is-on   { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease .12s, transform .18s ease .12s; }
#ann-text .ann-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  /* Phones: a long announcement wraps onto a second line instead of being cut off */
  .ann-item          { justify-content: center; white-space: normal; text-align: center; }
  #ann-text .ann-msg { overflow: visible; font-size: 11px; line-height: 1.35; }
  #ann-text .ann-icon { width: 13px; height: 13px; }
}
.ann-dot          { width: 4px; height: 4px; border: none; cursor: pointer; padding: 0; background: white; border-radius: 999px; transition: width .2s; }
.ann-dot-active   { width: 14px; }

/* Mega menu */
#mega-menu          { display: none; pointer-events: none; }
#mega-menu.open     { display: block; pointer-events: all; }
.mega-panel         { display: none; grid-template-columns: 1fr 260px; gap: 20px; }
.mega-panel.visible { display: grid; }

/* Dropdowns */
#search-drop        { display: none; }
#search-drop.open   { display: block; }
#dist-picker        { display: none; }
#dist-picker.open   { display: block; }

/* Live search suggestions — the panel header.js fills while you type. */
#search-results,
#search-default       { max-height: min(64vh, 520px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }
/* The empty-box panel shows what fits without scrolling */
#search-default .sg-group > a.sg-row:nth-of-type(n+6) { display: none; }
@media (max-width: 639px) {
  #search-default .sg-group > a.sg-row:nth-of-type(n+4) { display: none; }
}
#search-results[hidden],
#search-default[hidden] { display: none; }
/* Nothing to show (an empty box with nothing picked in WordPress): no empty white dropdown either. */
#search-drop.open:has(> #search-results[hidden]):has(> #search-default[hidden]) { display: none; }

/* The empty-box panel: top outlets beside top products on a wide screen */
@media (min-width: 640px) {
  #search-default.sg-panel--two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  #search-default.sg-panel--two > .sg-group { border-bottom: 0; }
  #search-default.sg-panel--two > .sg-group + .sg-group { align-self: stretch; border-left: 1px solid #E8ECF0; }
}
#search-default > .sg-group { padding-bottom: 10px; }

.sg-group             { padding: 10px 10px 4px; border-bottom: 1px solid #E8ECF0; }
.sg-group:last-of-type { border-bottom: 0; }
.sg-title {
  margin: 0 0 4px; padding: 0 6px;
  font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  color: #64748B;
}

.sg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px;
  color: #1F2937; font-size: 13px; text-decoration: none;
  transition: background .12s;
}
.sg-row:hover { background: #EBF4FF; }

.sg-dot  { width: 6px; height: 6px; flex: 0 0 auto; margin: 0 9px; border-radius: 50%; background: #0966B3; }
.sg-logo, .sg-thumb {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #F1F5F9; border: 1px solid #E8ECF0; overflow: hidden;
}
.sg-logo img, .sg-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
/* A department without a picture keeps its blue dot, in the same frame. */
.sg-thumb .sg-dot { margin: 0; }

.sg-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.sg-name {
  flex: 1; min-width: 0; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sg-row--product .sg-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sg-meta  { flex: 0 0 auto; color: #94A3B8; font-size: 11.5px; font-weight: 500; }
.sg-row--product .sg-meta { flex: none; }
/* A product that comes with a free gift (header.js, sgProductRow). */
.sg-gift { align-self: flex-start; flex: none; margin-top: 2px; padding: 1px 7px; color: #fff; background: #7c3aed; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; line-height: 1.5; text-transform: uppercase; white-space: nowrap; }
.sg-price { flex: 0 0 auto; color: #0F172A; font-size: 13px; font-weight: 800; }

.sg-empty { margin: 0; padding: 18px 16px; color: #64748B; font-size: 13px; text-align: center; }

/* While a search is on its way: the rows above in grey (the shimmer is .skel in global.css). */
.sg-skel-row, .sg-skel-row:hover { background: none; }
.sg-skel-title { width: 96px; height: 10px; margin: 3px 6px 9px; }
.sg-skel-line  { height: 11px; }
.sg-skel-thumb { width: 34px; height: 34px; border-radius: 8px; }
.sg-skel-meta  { width: 30%; height: 9px; margin-top: 6px; }
.sg-skel-price { width: 58px; height: 12px; }

.sg-all {
  /* Pinned to the foot of the panel */
  position: sticky; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-top: 1px solid #E8ECF0; background: #F8FAFC;
  color: #0966B3; font-size: 13px; font-weight: 700; text-decoration: none;
}
.sg-all:hover { background: #EBF4FF; }
.sg-arrow { font-size: 15px; line-height: 1; }

/* Mobile drawer */
#mob-overlay {
  display: none;
  align-items: stretch;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity .28s ease;
}
#mob-overlay.open { display: flex !important; opacity: 1; }
/* The whole width of the screen: the menu is a page of its own on a phone. */
#mob-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  border-left: 0;
  transform: translate3d(108%, 0, 0) !important;
  transition: transform .34s cubic-bezier(.22, .61, .36, 1);
  visibility: hidden;
  pointer-events: none;
}
#mob-overlay.open #mob-drawer,
#mob-drawer.open {
  transform: translate3d(0, 0, 0) !important;
  visibility: visible;
  pointer-events: auto;
}
.mobile-drawer-panel {
  overflow: hidden;
  background: #fff;
}
/* The logo is the top of the list and scrolls away with it, edge to edge. */
.drawer-header {
  display: flex;
  min-height: 66px;
  align-items: center;
  margin: -14px -16px 14px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
/* Stays in the panel's corner while the list scrolls under it, so it keeps its own white backing. */
.drawer-close {
  position: absolute;
  top: 13px;
  right: 14px;
  z-index: 2;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  color: #1f2937;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 10px rgba(8, 45, 88, .15);
  cursor: pointer;
}
.drawer-close:hover { background: #f4f6fa; }
/* The everyday logo, never the seasonal artwork: small and level with the ×. */
.drawer-brand-logo {
  display: block;
  width: auto;
  height: 28px;
  max-width: 150px;
  object-fit: contain;
  object-position: left center;
}
.drawer-scroll-area {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
/* The drawer's <section>s must not take the global `section { margin-bottom: var(--section-gap) }` */
#mob-drawer .drawer-account-card { margin-bottom: 0 !important; }

/* The menu's pages: the one on top fills the panel */
.drawer-views { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.drawer-view {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  transition: transform .28s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .28s;
}
.drawer-view.is-current { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.22, .61, .36, 1); }
.drawer-view.is-behind { transform: translate3d(-24%, 0, 0); }
@media (prefers-reduced-motion: reduce) { .drawer-view { transition: none !important; } }

/* A page's top bar: ‹ back, and the page's name */
.drawer-view-bar {
  position: sticky;
  top: -14px;
  z-index: 1;
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 6px;
  margin: -14px -16px 12px;
  padding: 10px 64px 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
.drawer-back {
  display: flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: #f4f6fa;
  color: #1f2937;
  cursor: pointer;
}
.drawer-back:hover { background: #eaf4fd; color: #0966b3; }
.drawer-back svg { width: 20px; height: 20px; }
.drawer-view-title { min-width: 0; overflow: hidden; color: #1F2937; font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

/* Rows straight under the bar: its own line is the one above them. */
.drawer-view-bar + nav { margin-top: -12px; border-top: 0; }

/* A group's categories (or a one-group department's): full-width rows. */
.drawer-links { margin-bottom: 12px; border-top: 1px solid #e2e8f0; }
.drawer-link-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
  border-bottom: 1px solid #e7edf4;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.drawer-link-row:hover { color: #0966b3; }
.drawer-link-row svg { width: 16px; height: 16px; flex: 0 0 auto; color: #7b96b0; }

/* Account: an avatar, who they are (or the invitation to sign in), then the buttons across the card. */
.drawer-account-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 14px;
  border: 1px solid #e3edf7;
  border-radius: 16px;
  background: #f6f9fd;
}
.drawer-account-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #0966b3;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.drawer-account-avatar svg { width: 20px; height: 20px; }
.drawer-account-copy { min-width: 0; }
.drawer-account-copy p {
  margin: 0;
  color: #1F2937;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.drawer-account-copy span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
}
.drawer-account-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  margin-top: 12px;
}
.drawer-account-card a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid #0966b3;
  border-radius: 10px;
  background: #fff;
  color: #0966b3;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.drawer-account-card a:first-child {
  background: #0966b3;
  color: #fff;
}
.drawer-account-card a:hover { background: #074e8b; border-color: #074e8b; color: #fff; }

/* Shortcuts, four to a row: an icon tile with its label underneath. */
.drawer-quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 6px;
  margin: 20px 0 4px;
}
.drawer-quick-links a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #1F2937;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: color .18s ease;
}
.drawer-quick-links a:hover { color: #0966b3; }
.drawer-quick-icon {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: #eaf4fd;
  color: #0966b3;
  transition: background-color .18s ease;
}
.drawer-quick-links a:hover .drawer-quick-icon { background: #d6ecfb; }
.drawer-quick-icon svg { width: 21px; height: 21px; }
/* A live count (Staff Wanted, Shops for Sale) on the tile's corner. */
.drawer-quick-count {
  position: absolute;
  top: -5px;
  right: -7px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  box-shadow: 0 0 0 2px #fff;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
}
.drawer-quick-label {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.drawer-heading {
  margin: 22px 2px 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
}
.drawer-sections {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  border-top: 1px solid #e2e8f0;
}
.drawer-sections--sub { margin-bottom: 12px; }
/* One row per department (or group): it opens that page. */
.drawer-section-toggle {
  display: flex;
  width: 100%;
  min-height: 50px;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid #e7edf4;
  background: transparent;
  color: #1F2937;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.drawer-section-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eaf4fd;
  color: #0966b3;
}
.drawer-section-icon svg { width: 16px; height: 16px; }
.drawer-section-copy { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* The same ink, size and weight as the desktop ribbon's labels (.ribbon-nav-item). */
.drawer-section-copy strong { overflow: hidden; color: #1F2937; font-size: 14px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.drawer-chevron { width: 16px; height: 16px; margin-left: auto; flex: 0 0 auto; color: #7b96b0; }
.drawer-section-toggle:hover .drawer-chevron { color: #0966b3; }
/* The mega menu's banners, featured products, brands and outlets under the links. */
.drawer-mega-block { padding: 10px 10px 12px; border-top: 1px solid #e8f0f8; }
.drawer-scroll-row { scrollbar-width: none; }
.drawer-scroll-row::-webkit-scrollbar { display: none; }
.drawer-link-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 99px;
  background: #e91e4f;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.drawer-view-all {
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border-top: 1px solid #e1ebf5;
  background: #edf6fe;
  color: #0966b3;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.drawer-view-all:hover { background: #dceeff; }
.drawer-view .drawer-view-all { min-height: 42px; margin-top: 12px; border: 0; border-radius: 10px; font-size: 12.5px; }
.drawer-view-all svg { width: 14px; height: 14px; }
.drawer-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 0 0 auto;
  /* Clear of the home bar on phones that have one. */
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.drawer-bottom-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.drawer-bottom-actions svg { width: 15px; height: 15px; flex: 0 0 auto; }
/* One line on the narrowest phones too. */
@media (max-width: 380px) { .drawer-bottom-actions a { gap: 5px; font-size: 11px; } }
.drawer-list-outlet { background: #e91e4f; color: #fff; }
.drawer-list-outlet:hover { background: #cf1643; }
.drawer-whatsapp { border: 1px solid #14a94f; background: #effbf3; color: #07843c; }
.drawer-whatsapp:hover { background: #dff6e7; }
.mobile-menu-trigger:focus-visible,
.drawer-close:focus-visible,
.drawer-account-card a:focus-visible,
.drawer-quick-links a:focus-visible,
.drawer-section-toggle:focus-visible,
.drawer-back:focus-visible,
.drawer-view a:focus-visible,
.drawer-bottom-actions a:focus-visible { outline: 3px solid rgba(9, 102, 179, .28); outline-offset: 2px; }

/* Search focus state */
#search-box.focused        { border-color: #0966B3; box-shadow: 0 0 0 3px rgba(9,102,179,.12); }
#search-input::placeholder { color: #94A3B8; }
#search-input              { caret-color: #0966B3; outline: none; }

/* dist-btn active state — toggled by JS */
.dist-btn-active { background: #EEF4FF; color: #0966B3; font-weight: 600; }

/* Shimmer — pseudo-element, can't be Tailwind */
.shimmer { position: relative; overflow: hidden; }
.shimmer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,transparent,rgba(255,255,255,.15),transparent); transform: translateX(-110%); transition: transform .6s; }
.shimmer:hover::after { transform: translateX(110%); }

/* Desktop ribbon nav — synced with mobile drawer style */
.ribbon-nav-item {
  color: #1F2937;
  font-size: 14px;
  font-weight: 700;
}
.ribbon-nav-item:hover { background: #eaf4fd; color: #0966b3; }
.ribbon-nav-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #eaf4fd;
  color: #0966b3;
  transition: background .15s, color .15s;
}
.ribbon-nav-icon svg { width: 15px; height: 15px; }
.ribbon-nav-item:hover .ribbon-nav-icon { background: #d6ecfb; }
.ribbon-nav-label { font-size: 14px; font-weight: 700; color: inherit; line-height: 1; }
.ribbon-nav-chevron { color: #7b96b0; transition: transform .2s ease, color .2s ease; }
.ribbon-nav-item:hover .ribbon-nav-chevron { color: #0966b3; }

/* Match utility actions to the softer footer-link treatment. */
.header-actions > a.header-action { color: #112a46; }
.header-action-label { font-weight: 700; }

/* Ribbon: categories scroll rather than being clipped */
.ribbon-cats { overflow-x: auto; scrollbar-width: none; }
.ribbon-cats::-webkit-scrollbar { display: none; }
.ribbon-biz { position: relative; margin-left: auto; padding-left: 6px; border-left: 1px solid #e2e8f0; }
/* Softens the last category where the strip scrolls under the divider. */
.ribbon-biz::before { content: ''; position: absolute; top: 0; bottom: 0; left: -26px; width: 26px; background: linear-gradient(to right, rgba(255,255,255,0), #fff); pointer-events: none; }
