/* Souci Mall — mobile drawer + bottom tab bar + age gate scrim */

/* Age gate */
.sm-age-gate {
  position: fixed; inset: 0; z-index: 2000;
  background: color-mix(in srgb, var(--sm-bg) 70%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sm-age-gate[hidden] { display: none; }
.sm-age-gate__panel {
  max-width: 440px;
  width: 100%;
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--sm-shadow-lg);
}

/* Drawer */
.sm-drawer {
  position: fixed; inset: 0; z-index: 1100;
  pointer-events: none;
}
.sm-drawer.is-open { pointer-events: auto; }
.sm-drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity .2s ease;
}
.sm-drawer.is-open .sm-drawer__scrim { opacity: 1; }
.sm-drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: min(340px, 88vw);
  background: var(--sm-bg);
  border-right: 1px solid var(--sm-line);
  transform: translateX(-100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}
.sm-drawer.is-open .sm-drawer__panel { transform: translateX(0); }
.sm-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px;
  border-bottom: 1px solid var(--sm-line);
}
.sm-drawer__close {
  width: 38px; height: 38px;
  border-radius: 19px;
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sm-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 100px;
}
.sm-drawer__section { padding: 20px 18px 0; }
.sm-drawer__section h5 { margin: 0 0 10px; }
.sm-drawer__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sm-drawer__list li { border-bottom: 1px solid var(--sm-line); }
.sm-drawer__list a {
  display: block;
  padding: 14px 18px;
  color: var(--sm-ink);
  font-size: 14px;
  font-weight: 500;
}
.sm-drawer__list .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--sm-surface);
}
.sm-drawer__list .sub-menu a {
  padding-left: 32px;
  font-size: 13px;
  color: var(--sm-ink-soft);
}

/* Bottom tab bar */
.sm-tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--sm-bg) 96%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-top: 1px solid var(--sm-line);
  padding: 6px 4px max(8px, env(safe-area-inset-bottom));
  justify-content: space-around;
}
.sm-tabbar__item {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--sm-ink-muted);
  text-align: center;
}
.sm-tabbar__item.is-on { color: var(--sm-accent); }
.sm-tabbar__item--center {
  position: relative;
  color: var(--sm-accent-ink);
}
.sm-tabbar__fab {
  width: 40px; height: 40px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--sm-accent-2), var(--sm-accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-top: -18px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--sm-accent-2) 45%, transparent);
}
.sm-tabbar__item--center span:last-child { color: var(--sm-ink); }
.sm-tabbar__cart {
  position: fixed;
  right: 14px; bottom: calc(68px + env(safe-area-inset-bottom));
  width: 52px; height: 52px;
  border-radius: 26px;
  background: var(--sm-accent);
  color: var(--sm-accent-ink);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--sm-accent) 50%, transparent);
}
.sm-tabbar__cart .sm-badge {
  position: absolute;
  top: 2px; right: 2px;
  border-color: var(--sm-bg);
}

@media (max-width: 900px) {
  .sm-tabbar { display: flex; }
  .sm-tabbar__cart { display: inline-flex; }
  body.sm-body { padding-bottom: 80px; }
}
