/* SOO Magic Menu 5 - front-end styles */
.smm {
  --smm-accent: #4f46e5;
  --smm-accent-fg: #ffffff;
  --smm-bg: #ffffff;
  --smm-fg: #0f172a;
  --smm-muted: #64748b;
  --smm-panel: #ffffff;
  --smm-panel-fg: #0f172a;
  --smm-border: rgba(15, 23, 42, .09);
  --smm-hover: rgba(15, 23, 42, .055);
  --smm-radius: 14px;
  --smm-duration: 170ms;
  --smm-container: 1180px;
  --smm-icon: 20px;
  --smm-panel-width: 860px;
  --smm-bar-h: 58px;
  --smm-ease: cubic-bezier(.22, .61, .36, 1);
  --smm-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 24px 60px -20px rgba(15, 23, 42, .24);
  position: relative;
  z-index: 100;
  box-sizing: border-box;
  color: var(--smm-fg);
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.smm *,
.smm *::before,
.smm *::after { box-sizing: inherit; }
.smm__sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.smm__icon { width: var(--smm-icon); height: var(--smm-icon); flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.smm__bar { position: relative; background: var(--smm-bg); border-bottom: 1px solid var(--smm-border); }
.smm--transparent .smm__bar { background: transparent; border-color: transparent; }
.smm--sticky { position: sticky; top: 0; }
.smm__container {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--smm-container);
  min-height: var(--smm-bar-h);
  margin-inline: auto;
  padding-inline: 16px;
}
.smm__root { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.smm--align-center .smm__root { margin-inline: auto; }
.smm--align-right .smm__root { margin-inline-start: auto; }
.smm__item { position: relative; min-width: 0; }
.smm__row { display: flex; align-items: center; min-width: 0; }
.smm__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--smm-duration) var(--smm-ease), color var(--smm-duration) var(--smm-ease);
}
.smm__link:hover { background: var(--smm-hover); color: var(--smm-accent); }
.smm__link--static { cursor: default; }
.smm__sub { display: block; font-size: 11px; font-weight: 500; color: var(--smm-muted); }
.smm__label + .smm__sub { margin-inline-start: 0; }
.smm__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: .55;
  transition: opacity var(--smm-duration) var(--smm-ease), background var(--smm-duration) var(--smm-ease);
}
.smm__row:hover .smm__toggle { opacity: 1; }
.smm__toggle:hover { background: var(--smm-hover); }
.smm__caret { width: 15px; height: 15px; transition: transform var(--smm-duration) var(--smm-ease); }
.smm__item[data-open="true"] > .smm__row .smm__caret { transform: rotate(180deg); }
.smm__item.is-active > .smm__row .smm__link { color: var(--smm-accent); }
.smm__item.is-active > .smm__row .smm__link::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--smm-accent);
}
.smm__item.is-active > .smm__row { position: relative; }

/* Badges */
.smm__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--smm-accent);
  color: var(--smm-accent-fg);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.smm__badge[data-tone="hot"] { background: #b91c1c; color: #fff; }
.smm__badge[data-tone="new"] { background: #047857; color: #fff; }
.smm__badge[data-tone="sale"] { background: #f59e0b; color: #111827; }
.smm__badge[data-tone="dark"] { background: #0f172a; color: #fff; }
.smm__badge[data-tone="light"] { background: rgba(15, 23, 42, .08); color: inherit; }

/* Mega panel */
.smm__panel {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  z-index: 50;
  min-width: 260px;
  max-width: min(92vw, var(--smm-panel-width));
  border: 1px solid var(--smm-border);
  border-radius: var(--smm-radius);
  background: var(--smm-panel);
  color: var(--smm-panel-fg);
  box-shadow: var(--smm-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity var(--smm-duration) var(--smm-ease),
    transform var(--smm-duration) var(--smm-ease),
    visibility 0s linear var(--smm-duration);
}
.smm__item[data-open="true"] > .smm__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.smm__panel--full {
  position: fixed;
  inset-inline: 0;
  top: var(--smm-top, var(--smm-bar-h));
  width: 100vw;
  max-width: 100vw;
  border-radius: 0 0 var(--smm-radius) var(--smm-radius);
  border-inline: 0;
}
.smm__panel-in { padding: 18px; }
.smm__panel--full .smm__panel-in { max-width: var(--smm-container); margin-inline: auto; }
.smm__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px 26px;
}
.smm__grid[data-layout="list"] {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 240px;
}
.smm__grid[data-layout="list"] .smm__block { inline-size: 100%; }

/* Blocks */
.smm__block { grid-column: span var(--smm-span, 3); min-width: 0; }
.smm__heading {
  margin: 0 0 8px;
  padding-inline: 8px;
  color: var(--smm-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
}
.smm__block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 8px;
  color: var(--smm-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}
a.smm__block-title:hover { color: var(--smm-accent); }
.smm__list { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; list-style: none; }
.smm__leaf-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  color: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: background var(--smm-duration) var(--smm-ease), color var(--smm-duration) var(--smm-ease);
}
.smm__leaf-link:hover { background: var(--smm-hover); color: var(--smm-accent); }
.smm__leaf.is-active > .smm__leaf-link { color: var(--smm-accent); font-weight: 600; }
.smm__leaf-text { display: flex; flex-direction: column; min-width: 0; }
.smm__leaf-title { overflow-wrap: anywhere; }
.smm__leaf-sub { color: var(--smm-muted); font-size: 11.5px; font-weight: 400; }
.smm__list--sub { margin-inline-start: 20px; }

/* Tiles + rows */
.smm__block--tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background var(--smm-duration) var(--smm-ease);
}
.smm__block--tile:hover { background: var(--smm-hover); }
.smm__thumb { flex: 0 0 auto; display: block; width: 42px; height: 42px; overflow: hidden; border-radius: 9px; background: var(--smm-hover); }
.smm__thumb img { width: 100%; height: 100%; object-fit: cover; }
.smm__tile-body { display: flex; flex-direction: column; min-width: 0; }
.smm__tile-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.smm__tile-sub { color: var(--smm-muted); font-size: 11.5px; line-height: 1.35; }
.smm__grid[data-layout="list"] .smm__block--tile { padding: 8px; }

/* Rich content */
.smm__prose { color: inherit; font-size: 13px; line-height: 1.55; }
.smm__prose p { margin: 0 0 8px; }
.smm__prose p:last-child { margin-bottom: 0; }
.smm__prose a { color: var(--smm-accent); }
.smm__prose img { max-width: 100%; height: auto; border-radius: 8px; }
.smm__align-center { text-align: center; }
.smm__align-right { text-align: end; }
.smm__divider { height: 1px; margin: 4px 0; background: var(--smm-border); grid-column: 1 / -1; }
.smm__sep { flex: 0 0 auto; width: 1px; height: 22px; margin-inline: 6px; background: var(--smm-border); }

/* Banners */
.smm__banner {
  position: relative;
  display: flex;
  min-height: 132px;
  overflow: hidden;
  aspect-ratio: var(--smm-banner-ratio, auto);
  border-radius: 10px;
  background: var(--smm-hover);
  color: #fff;
  text-decoration: none;
}
.smm__banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.smm__banner-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 16px 18px;
}
.smm__banner--left .smm__banner-body { align-items: flex-start; text-align: start; }
.smm__banner--center .smm__banner-body { align-items: center; text-align: center; }
.smm__banner--right .smm__banner-body { align-items: flex-end; text-align: end; }
.smm__banner-body.has-overlay { background: linear-gradient(180deg, rgba(2, 6, 23, .1), rgba(2, 6, 23, .62)); }
.smm__banner-title { font-size: 15px; font-weight: 800; line-height: 1.25; }
.smm__banner-sub { font-size: 12px; line-height: 1.35; opacity: .92; }

/* Product grids */
.smm__products { display: grid; grid-template-columns: repeat(var(--smm-pcols, 3), minmax(0, 1fr)); gap: 10px; }
.smm__product {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background var(--smm-duration) var(--smm-ease);
}
.smm__product:hover { background: var(--smm-hover); }
.smm__product-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--smm-hover);
}
.smm__product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--smm-ease); }
.smm__product:hover .smm__product-media img { transform: scale(1.045); }
.smm__product-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.smm__product-price { color: var(--smm-accent); font-size: 12.5px; font-weight: 800; }
.smm__block--products .smm__heading,
.smm__block--brands .smm__heading { margin-bottom: 10px; }

/* Brand wall */
.smm__brands { display: grid; grid-template-columns: repeat(var(--smm-bcols, 4), minmax(0, 1fr)); gap: 8px; }
.smm__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 9px;
  border: 1px solid var(--smm-border);
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--smm-duration) var(--smm-ease), background var(--smm-duration) var(--smm-ease);
}
.smm__brand:hover { border-color: var(--smm-accent); background: var(--smm-hover); }
.smm__brand-media { display: flex; align-items: center; justify-content: center; max-height: 34px; }
.smm__brand-media img { max-width: 100%; max-height: 34px; width: auto; height: auto; object-fit: contain; }
.smm__brands--gray .smm__brand-media img { filter: grayscale(1); opacity: .72; transition: filter var(--smm-duration) var(--smm-ease), opacity var(--smm-duration) var(--smm-ease); }
.smm__brands--gray .smm__brand:hover .smm__brand-media img { filter: none; opacity: 1; }
.smm__brand-name { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-align: center; }

/* Mobile chrome */
.smm__burger,
.smm__drawer-head,
.smm__scrim { display: none; }
.smm__burger {
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--smm-border);
  border-radius: 11px;
  background: none;
  color: inherit;
  cursor: pointer;
}
.smm__burger-lines { position: relative; display: block; width: 18px; height: 12px; }
.smm__burger-lines span {
  position: absolute;
  inset-inline: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--smm-duration) var(--smm-ease), opacity var(--smm-duration) var(--smm-ease), top var(--smm-duration) var(--smm-ease);
}
.smm__burger-lines span:nth-child(1) { top: 0; }
.smm__burger-lines span:nth-child(2) { top: 5px; }
.smm__burger-lines span:nth-child(3) { top: 10px; }
.smm[data-open="true"] .smm__burger-lines span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.smm[data-open="true"] .smm__burger-lines span:nth-child(2) { opacity: 0; }
.smm[data-open="true"] .smm__burger-lines span:nth-child(3) { top: 5px; transform: rotate(-45deg); }
.smm__drawer-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.smm__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--smm-hover);
  color: inherit;
  cursor: pointer;
}

/* Focus visibility */
.smm a:focus-visible,
.smm button:focus-visible { outline: 2px solid var(--smm-accent); outline-offset: 2px; }
.smm a:focus:not(:focus-visible),
.smm button:focus:not(:focus-visible) { outline: none; }

/* Uppercase option */
.smm--upper .smm__label { letter-spacing: .04em; text-transform: uppercase; font-size: 12.5px; }

/* ---------- Panel entrance variants ---------- */
@media (min-width: 1200px) {
  .smm[data-animation="fade"] .smm__panel { transform: translateY(-6px); }
  .smm[data-animation="slide"] .smm__panel { transform: translateY(-16px); }
  .smm[data-animation="scale"] .smm__panel { transform: scale(.985) translateY(-4px); }
}

/* ---------- Compact / mobile layout ---------- */
@media (max-width: 1199.98px) {
  .smm__bar { border-bottom: 1px solid var(--smm-border); }
  .smm__container { min-height: 54px; padding-inline: 12px; }
  .smm__burger { display: inline-flex; }
  .smm__drawer {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: min(88vw, 360px);
    max-width: 100vw;
    background: var(--smm-panel);
    color: var(--smm-panel-fg);
    box-shadow: 0 0 48px rgba(2, 6, 23, .28);
    transform: translateX(-102%);
    transition: transform var(--smm-duration) var(--smm-ease);
    overflow: hidden;
    visibility: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  [dir="rtl"] .smm__drawer { transform: translateX(102%); }
  .smm[data-open="true"] .smm__drawer { transform: none; visibility: visible; }
  .smm--mobile-full .smm__drawer { width: 100vw; }
  .smm__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px 12px 16px;
    border-bottom: 1px solid var(--smm-border);
  }
  .smm__root {
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .smm__item { width: 100%; }
  .smm__sep { width: 100%; height: 1px; margin: 6px 0; }
  .smm--mobile-hidden { display: none; }
  .smm__row { justify-content: space-between; }
  .smm__item.is-active > .smm__row .smm__link::after { display: none; }
  .smm__link { flex: 1; padding: 13px 10px; font-size: 15px; white-space: normal; }
  .smm__toggle { width: 44px; height: 44px; opacity: .8; }
  .smm__caret { width: 17px; height: 17px; }
  .smm__panel {
    position: static;
    display: grid;
    grid-template-rows: 0fr;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    visibility: visible;
    transform: none;
    transition:
      grid-template-rows var(--smm-duration) var(--smm-ease),
      opacity var(--smm-duration) var(--smm-ease);
  }
  .smm__item[data-open="true"] > .smm__panel { grid-template-rows: 1fr; opacity: 1; }
  .smm__panel-in { overflow: hidden; min-height: 0; padding: 0; }
  .smm__panel--full .smm__panel-in { max-width: none; }
  .smm__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    margin-inline-start: 14px;
    padding: 2px 0 10px;
    border-inline-start: 2px solid var(--smm-border);
  }
  .smm__grid .smm__block { grid-column: 1 / -1; }
  .smm__heading { padding-inline: 8px; }
  .smm__products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smm__brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .smm__banner { min-height: 112px; }
  .smm__scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(2, 6, 23, .48);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--smm-duration) var(--smm-ease), visibility 0s linear var(--smm-duration);
  }
  .smm[data-open="true"] .smm__scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
  body.smm-lock { overflow: hidden; }
}

/* ---------- Colour schemes ---------- */
.smm--scheme-dark {
  --smm-bg: #0b1220;
  --smm-fg: #e8eefb;
  --smm-muted: #93a4be;
  --smm-panel: #101a2b;
  --smm-panel-fg: #e8eefb;
  --smm-border: rgba(255, 255, 255, .09);
  --smm-hover: rgba(255, 255, 255, .07);
  --smm-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 26px 60px -20px rgba(0, 0, 0, .7);
}
.smm--scheme-dark .smm__banner { color: #fff; }
.smm--scheme-auto { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  .smm--scheme-auto {
    --smm-bg: #0b1220;
    --smm-fg: #e8eefb;
    --smm-muted: #93a4be;
    --smm-panel: #101a2b;
    --smm-panel-fg: #e8eefb;
    --smm-border: rgba(255, 255, 255, .09);
    --smm-hover: rgba(255, 255, 255, .07);
    --smm-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 26px 60px -20px rgba(0, 0, 0, .7);
  }
}

/* ---------- Presets ---------- */
.smm--graphite { --smm-bg: #0f172a; --smm-fg: #e8eefb; --smm-muted: #94a3b8; --smm-border: rgba(255, 255, 255, .1); --smm-hover: rgba(255, 255, 255, .09); }
.smm--graphite .smm__panel { --smm-muted: #64748b; }
.smm--graphite .smm__icon { opacity: .9; }
.smm--minimal { --smm-shadow: 0 10px 30px -18px rgba(15, 23, 42, .3); --smm-radius: 8px; }
.smm--minimal .smm__bar { border-bottom: 1px solid var(--smm-border); }
.smm--minimal .smm__link { border-radius: 6px; font-weight: 500; letter-spacing: .01em; }
.smm--glass .smm__bar {
  background: rgba(255, 255, 255, .74);
  border-bottom: 1px solid rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}
.smm--glass.smm--scheme-dark .smm__bar,
.smm--glass.smm--scheme-auto .smm__bar { background: rgba(11, 18, 32, .62); border-color: rgba(255, 255, 255, .08); }
.smm--aurora .smm__bar::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--smm-accent) 55%, transparent), transparent);
  opacity: .7;
}

/* ---------- Accessibility / motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .smm *,
  .smm *::before,
  .smm *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .smm__panel { border: 1px solid CanvasText; }
  .smm__badge { forced-color-adjust: none; }
}
