/* MarketPlus Premium UI — design system (mockup-matched)
   JS hooks preserved: IDs + injected classes (mp-card, mapp-*, mp-slide, mp-brand, …)
*/

:root {
  --pink: #FF0066;
  --pink-mid: #FF2D6B;
  --pink-dark: #E91E63;
  --pink-soft: #FFE4EE;
  --pink-glow: rgba(255, 0, 102, 0.22);
  --ink: #12141A;
  --muted: #6B7280;
  --line: #EEF0F5;
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --green: #22C55E;
  --navy: #0F1219;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --shadow: 0 4px 20px rgba(15, 18, 25, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 18, 25, 0.08);
  --shadow-lg: 0 22px 48px rgba(15, 18, 25, 0.12);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --max: 1200px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --mp-muted: var(--muted);
  --mp-pink: var(--pink);
  --mp-blue: var(--pink);
  --mp-dark: var(--ink);
  --mp-card: var(--card);
  --mp-bg: var(--bg);
  --mp-border: var(--line);
  --mp-blue-soft: var(--pink-soft);
}

[data-theme='dark'] {
  --bg: #0E1016;
  --card: #171A22;
  --ink: #F3F4F6;
  --muted: #9CA3AF;
  --line: #2A2F3A;
  --pink-soft: #3A1524;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 22px 48px rgba(0, 0, 0, 0.5);
  --navy: #0A0C10;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
body.modal-open,
body.sidebar-open,
body.drawer-open { overflow: hidden; }

.ui-wrap {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

/* ========== Buttons ========== */
.ui-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  letter-spacing: -.01em;
  cursor: pointer;
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s ease;
}
.ui-btn:hover { transform: translateY(-2px); }
.ui-btn:active { transform: translateY(0) scale(.98); }
.ui-btn--pink {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 12px 28px var(--pink-glow);
}
.ui-btn--pink:hover { filter: brightness(1.05); box-shadow: 0 16px 34px var(--pink-glow); }
.ui-btn--white { background: #fff; color: var(--pink-dark); }
.ui-btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.ui-btn--sm { padding: 9px 16px; font-size: .82rem; }
.ui-btn--block { width: 100%; }
.ui-link { background: none; border: 0; color: var(--pink); font-weight: 700; cursor: pointer; padding: 0; }
.ui-icon-btn {
  width: 42px; height: 42px; border: 0; border-radius: 14px;
  background: #F3F4F8; cursor: pointer; display: grid; place-items: center;
  transition: background .2s ease, transform .2s var(--ease);
}
.ui-icon-btn:hover { background: var(--pink-soft); transform: translateY(-1px); }
[data-theme='dark'] .ui-icon-btn { background: #222632; }

/* ========== Shell switch ========== */
.ui-m { display: none; }
.ui-d { display: block; }
@media (max-width: 900px) {
  .ui-m { display: block; }
  .ui-d { display: none !important; }
  .ui-chat-fab { display: none !important; }
}

/* ========== Topbar (utility) ========== */
.ui-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: .76rem;
  color: var(--muted);
}
.ui-topbar__inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.ui-topbar__links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ui-topbar__links a { transition: color .15s ease; }
.ui-topbar__links a:hover { color: var(--pink); }
.ui-partner-chip {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 7px 16px !important;
  border-radius: 999px;
  background: linear-gradient(135deg, #FF2D6B, #FF6A3D);
  color: #fff !important;
  font-size: .84rem !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
  box-shadow: 0 8px 20px rgba(255, 45, 107, .28);
  transition: transform .18s var(--ease), box-shadow .18s ease !important;
}
.ui-partner-chip:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255, 45, 107, .38);
}
.ui-partner-chip--ghost { display: none !important; }

/* Partner recruit ad */
.ui-partner-ad {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 20px;
  padding: 22px 26px;
  border-radius: 22px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255,255,255,.2), transparent 50%),
    linear-gradient(120deg, #1B1030 0%, #FF2D6B 55%, #FF8A3D 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(255, 45, 107, .28);
  transition: transform .2s var(--ease), box-shadow .2s ease;
  overflow: hidden;
  position: relative;
}
.ui-partner-ad::after {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  pointer-events: none;
}
.ui-partner-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(255, 45, 107, .36);
  color: #fff;
}
.ui-partner-ad__copy {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; z-index: 1;
}
.ui-partner-ad__badge {
  display: inline-flex; align-self: flex-start;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: .68rem; font-weight: 800; letter-spacing: .06em;
}
.ui-partner-ad__copy strong {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.15;
}
.ui-partner-ad__copy span:last-child,
.ui-partner-ad > span[data-i18n='partner.adSub'] {
  font-size: .92rem; opacity: .92; max-width: 52ch; line-height: 1.4;
}
.ui-partner-ad__cta,
.ui-partner-ad > em {
  position: relative; z-index: 1;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  background: #fff;
  color: #FF2D6B;
  font-size: 1.02rem;
  font-weight: 800;
  font-style: normal;
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.ui-partner-ad--m {
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 18px;
  border-radius: 20px;
}
.ui-partner-ad--m strong { font-size: 1.15rem; }
.ui-partner-ad--m > em { width: 100%; margin-top: 4px; }
.ui-auth__partner {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  color: #FF2D6B !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
}
.ui-lang { display: inline-flex; gap: 3px; background: #F3F4F8; border-radius: 999px; padding: 3px; }
.ui-lang button {
  border: 0; background: transparent; border-radius: 999px; padding: 4px 10px;
  font-size: .7rem; font-weight: 800; cursor: pointer; color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.ui-lang button.is-active {
  background: var(--pink); color: #fff; box-shadow: 0 4px 12px var(--pink-glow);
}

/* ========== Header ========== */
.ui-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(17,24,39,.04);
}
[data-theme='dark'] .ui-header { background: rgba(14,16,22,.94); }
.ui-header__inner {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 88px;
  padding: 14px 0;
}
.ui-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.ui-burger {
  width: 44px; height: 44px; border: 0; border-radius: 14px;
  background: #F3F4F8; cursor: pointer; font-size: 1.15rem;
  transition: background .15s ease;
}
.ui-burger:hover { background: var(--pink-soft); }

/* Brand logo lockup */
.ui-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 10px;
  transition: transform .2s var(--ease), opacity .2s ease;
}
.ui-logo:hover { transform: translateY(-1px); opacity: .96; }
.ui-logo__word { display: none; }
.ui-logo__img {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(220px, 42vw);
  object-fit: contain;
  object-position: left center;
}
.ui-logo__img--dark { display: none; }
[data-theme='dark'] .ui-logo__img--light { display: none; }
[data-theme='dark'] .ui-logo__img--dark { display: block; }

.ui-loc {
  border: 0; background: #F7F8FB; display: inline-flex; gap: 8px; align-items: center;
  cursor: pointer; color: var(--ink); font-weight: 600; padding: 10px 14px;
  border-radius: 14px; max-width: 220px; text-align: left;
  transition: background .15s ease, box-shadow .15s ease;
}
.ui-loc:hover { background: var(--pink-soft); }
.ui-loc__meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ui-loc__meta small { font-size: .68rem; color: var(--muted); font-weight: 600; }
.ui-loc__meta strong {
  font-weight: 800; font-size: .82rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.ui-loc__chev { color: var(--muted); font-size: .7rem; margin-left: 2px; }

.ui-search {
  display: flex; align-items: stretch; background: #F0F1F5;
  border-radius: 999px; overflow: hidden; min-height: 52px;
  transition: background .2s ease, box-shadow .2s ease;
}
.ui-search:focus-within {
  background: #fff;
  box-shadow: 0 0 0 4px var(--pink-glow);
}
.ui-search__select {
  display: flex; align-items: center; padding: 0 4px 0 16px;
  border-right: 1px solid #E4E6EC;
}
.ui-search__select select {
  border: 0; background: transparent; font-weight: 700; color: var(--ink); max-width: 148px;
  cursor: pointer;
}
.ui-search input {
  flex: 1; border: 0; background: transparent; padding: 0 14px; min-width: 0; outline: none;
  font-size: .95rem;
}
.ui-search__btn {
  border: 0; margin: 5px; padding: 0 26px; border-radius: 999px;
  background: var(--pink);
  color: #fff; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 18px var(--pink-glow);
  transition: filter .15s ease, transform .15s ease;
}
.ui-search__btn:hover { filter: brightness(1.06); transform: scale(1.02); }
.ui-search__ghost { display: none; }

.ui-header__actions { display: flex; align-items: center; gap: 2px; }
.ui-action {
  position: relative; border: 0; background: transparent; cursor: pointer;
  padding: 6px 10px; border-radius: 16px; min-width: 72px;
  transition: background .15s ease, transform .15s var(--ease);
}
.ui-action:hover { background: var(--pink-soft); transform: translateY(-1px); }
.ui-action__ico {
  width: 42px; height: 42px; margin: 0 auto 2px; border-radius: 14px;
  background: #F3F4F8; display: grid; place-items: center; font-size: 1.1rem;
  transition: background .15s ease;
}
.ui-action:hover .ui-action__ico { background: #fff; }
.ui-action__lbl { display: block; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.15; }
.ui-action__lbl small { color: var(--muted); font-weight: 500; }
.ui-action__badge {
  position: absolute; top: 2px; right: 16px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px; background: var(--pink); color: #fff;
  font-size: .65rem; font-weight: 800; display: grid; place-items: center;
  border: 2px solid #fff;
  animation: ui-pop .35s var(--ease);
}

/* ========== Main ========== */
.ui-main { padding: 24px 0 72px; }
.ui-stack { display: flex; flex-direction: column; gap: 32px; }
.ui-section__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.ui-section__head h2 {
  margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em;
}
.ui-more {
  color: var(--pink); font-weight: 800; font-size: .9rem;
  transition: transform .15s ease, opacity .15s ease;
}
.ui-more:hover { transform: translateX(3px); opacity: .9; }

/* Hub categories */
.ui-hub__track,
#roundCats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.mp-round-cat {
  border: 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 12px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
  color: inherit;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.mp-round-cat:hover,
.mp-round-cat.is-active {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md), 0 12px 28px var(--pink-glow);
}
.mp-round-cat__ico {
  width: 64px; height: 64px; border-radius: 20px; margin-bottom: 2px;
  display: grid; place-items: center; font-size: 1.85rem;
  background: var(--hub-tone, #F3F4F8);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
  transition: transform .22s var(--ease);
}
.mp-round-cat:hover .mp-round-cat__ico { transform: scale(1.06); }
.mp-round-cat__title { font-size: .92rem; font-weight: 800; text-align: center; line-height: 1.2; }
.mp-round-cat__sub {
  font-size: .72rem; font-weight: 500; font-style: normal;
  color: var(--muted); text-align: center; line-height: 1.25;
}
.mp-round-cat--more .mp-round-cat__ico {
  background: #F3F4F8; color: var(--pink); font-size: 1.5rem; font-weight: 800;
}

/* Hero */
.ui-hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 16px;
}
.ui-hero__main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(ellipse 80% 70% at 75% 50%, rgba(255,0,102,.35), transparent 55%),
    linear-gradient(125deg, #1A0F24 0%, #2C1240 40%, #4A1A55 100%);
}
.ui-hero__track { position: relative; min-height: 320px; }
.mp-slide,
.ui-slide {
  display: none;
  grid-template-columns: 1.15fr .85fr;
  gap: 20px;
  align-items: center;
  min-height: 320px;
  padding: 40px 44px;
  color: #fff;
  animation: ui-fade-in .45s var(--ease);
}
.mp-slide.is-active,
.ui-slide.is-active { display: grid; }
.ui-slide__copy h1 {
  margin: 12px 0 10px; font-size: clamp(1.55rem, 2.6vw, 2.25rem);
  letter-spacing: -.045em; line-height: 1.12; max-width: 15ch; font-weight: 800;
}
.ui-slide__copy p { margin: 0 0 20px; opacity: .9; max-width: 34ch; font-size: .98rem; }
.ui-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  font-size: .72rem; font-weight: 800; letter-spacing: .05em;
}
.ui-slide__media {
  position: relative;
  display: grid; place-items: center;
}
.ui-slide__media img {
  width: 100%; max-height: 230px; object-fit: cover; border-radius: 22px;
  box-shadow: 0 24px 48px rgba(0,0,0,.4);
  filter: saturate(1.05);
}
.ui-hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.95); cursor: pointer; font-size: 1.4rem; z-index: 2;
  box-shadow: var(--shadow);
  transition: transform .15s ease, background .15s ease;
}
.ui-hero__arrow:hover { transform: translateY(-50%) scale(1.06); background: #fff; }
.ui-hero__arrow--prev { left: 14px; }
.ui-hero__arrow--next { right: 14px; }
.ui-hero__dots {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 2;
}
.ui-hero__dots button {
  width: 8px; height: 8px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.4); cursor: pointer;
  transition: width .2s var(--ease), background .2s ease;
}
.ui-hero__dots button.is-active { background: #fff; width: 22px; }

.ui-hero__side { display: grid; gap: 14px; }
.ui-promo {
  position: relative; border-radius: 24px; min-height: 148px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 20px;
  background: center/cover no-repeat var(--img), #2A1840;
  color: #fff; box-shadow: var(--shadow);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.ui-promo:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ui-promo::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(17,24,39,.78), rgba(255,0,102,.28));
}
.ui-promo > * { position: relative; z-index: 1; }
.ui-promo strong { display: block; margin-bottom: 6px; font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.ui-promo span { display: block; font-size: .84rem; opacity: .92; font-weight: 500; max-width: 24ch; }

/* Stores */
.ui-stores,
#brandGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.mp-brand {
  min-height: 152px; border-radius: var(--radius); background: var(--card);
  border: 1px solid transparent; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; padding: 18px 10px;
  color: inherit; cursor: pointer; font: inherit;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.mp-brand:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md), 0 10px 24px var(--pink-glow);
}
.mp-brand__mark {
  width: 52px; height: 52px; border-radius: 18px; margin-bottom: 6px;
  background: linear-gradient(145deg, var(--pink-soft), #fff);
  color: var(--pink); display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem;
  box-shadow: var(--shadow);
}
.mp-brand__name { font-size: .92rem; font-weight: 800; line-height: 1.2; }
.mp-brand__cat { font-size: .72rem; font-weight: 500; color: var(--muted); }
.mp-brand__rating { font-size: .78rem; font-weight: 700; color: #F59E0B; margin-top: 2px; }
.mp-brand--more .mp-brand__mark { background: #F3F4F8; color: var(--muted); font-size: 1.4rem; }
.mp-brand--soon {
  cursor: default; opacity: .85;
  border: 1px dashed #E8EAF0;
  box-shadow: none;
}
.mp-brand--soon:hover { transform: none; box-shadow: none; }
.mp-brand--soon .mp-brand__mark {
  background: #F3F4F8; color: var(--pink); font-size: 1.4rem;
}
.mp-brand--soon .mp-brand__name { color: var(--pink); }

/* Product grids */
.ui-grid { display: grid; gap: 16px; }
.ui-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ui-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ui-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ui-grid--5 { grid-template-columns: repeat(5, 1fr); }

.mp-card,
.mapp-card {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  animation: ui-fade-up .5s var(--ease) both;
}
.mp-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.mp-card__img,
.mapp-card__img {
  position: relative; aspect-ratio: 1; background: #FAFBFD;
  overflow: hidden;
}
.mp-card__img img,
.mapp-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s var(--ease);
  background: linear-gradient(110deg, #f0f1f5 30%, #fafbfd 50%, #f0f1f5 70%);
  background-size: 200% 100%;
}
.mp-card:hover .mp-card__img img { transform: scale(1.04); }
.mp-card__img img.is-fallback,
.mapp-card__img img.is-fallback { object-fit: contain; padding: 22%; background: var(--bg); }
.mp-card__badge,
.mapp-card__badge {
  position: absolute; left: 12px; top: 12px;
  background: var(--green); color: #fff; border-radius: 10px;
  padding: 5px 9px; font-size: .72rem; font-weight: 800;
  box-shadow: 0 4px 12px rgba(34,197,94,.3);
}
.mp-card__wish,
.mapp-card__wish {
  position: absolute; right: 12px; top: 12px;
  width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.95); cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.mp-card__wish:hover,
.mapp-card__wish:hover { transform: scale(1.08); }
.mp-card__wish.is-active,
.mapp-card__wish.is-active { color: var(--pink); background: var(--pink-soft); }
.mp-card__body,
.mapp-card__body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mp-card__title,
.mapp-card__title {
  margin: 0; font-size: .94rem; font-weight: 700; letter-spacing: -.02em;
  line-height: 1.3;
}
.mp-card__unit {
  font-size: .78rem; font-weight: 500; color: var(--muted);
}
.mp-card__rating { font-size: .78rem; color: var(--muted); }
.mp-card__row,
.mapp-card__row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto;
  padding-top: 4px;
}
.mp-card__price,
.mapp-card__price { font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.mp-card__old,
.mapp-card__old { color: #9CA3AF; text-decoration: line-through; font-size: .8rem; }
.mp-card__cart,
.mapp-card__cart {
  width: 40px; height: 40px; border: 0; border-radius: 14px;
  background: var(--pink);
  color: transparent; font-size: 0; cursor: pointer; position: relative;
  box-shadow: 0 10px 20px var(--pink-glow);
  transition: transform .15s var(--ease), box-shadow .15s ease;
}
.mp-card__cart:hover,
.mapp-card__cart:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 28px var(--pink-glow);
}
.mp-card__cart::after,
.mapp-card__cart::after {
  content: '+'; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 1.55rem; font-weight: 700;
}

/* Empty */
.mp-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; min-height: 200px; padding: 40px 24px;
  background: linear-gradient(180deg, #fff, #FFF5F8);
  border: 1px dashed #F8C3D6; border-radius: var(--radius);
}
.mp-empty__icon {
  width: 64px; height: 64px; border-radius: 20px; background: var(--pink-soft);
  display: grid; place-items: center; font-size: 1.6rem;
}
.mp-empty__title { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; color: var(--pink); }
.mp-empty__text { margin: 0; max-width: 36ch; color: var(--muted); font-size: .92rem; }
.mp-empty__soon {
  margin: 8px 0 0; color: #fff; font-weight: 800; font-size: .78rem;
  background: var(--pink); padding: 6px 14px; border-radius: 999px;
}

/* Flash */
.ui-flash {
  display: grid; grid-template-columns: 220px 1fr; gap: 16px;
  background: var(--card); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow);
}
.ui-flash__panel {
  border-radius: 22px; padding: 22px 18px;
  background: linear-gradient(145deg, #FF1A5C, var(--pink) 55%, #C2185B);
  color: #fff; display: flex; flex-direction: column; gap: 14px;
}
.ui-flash__panel h2 { margin: 0; font-size: 1.15rem; }
.ui-countdown { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.ui-countdown div { background: rgba(255,255,255,.16); border-radius: 12px; padding: 8px 10px; text-align: center; }
.ui-countdown small { display: block; font-size: .65rem; font-weight: 600; opacity: .85; }

/* Premium / app / trust */
.ui-promo-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ui-premium {
  border-radius: var(--radius-lg); padding: 32px 36px;
  background:
    radial-gradient(circle at 90% 50%, rgba(255,0,102,.35), transparent 40%),
    linear-gradient(115deg, #1E1235, #3D1858 45%, #6B1B5A);
  color: #fff; display: flex; gap: 24px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-lg);
}
.ui-premium > div:last-child { flex: 1; }
.ui-premium h2 { margin: 0 0 12px; font-size: 1.45rem; letter-spacing: -.03em; }
.ui-premium ul { margin: 0 0 18px; padding-left: 18px; opacity: .95; }
.ui-premium__ico {
  font-size: 3.2rem; width: 88px; height: 88px; border-radius: 28px;
  background: rgba(255,255,255,.1); display: grid; place-items: center;
  flex-shrink: 0;
}
.ui-appcard { display: none; }
.ui-trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: var(--card); border-radius: var(--radius);
  padding: 28px 20px; box-shadow: var(--shadow);
}
.ui-trust__item { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ui-trust__item span {
  width: 52px; height: 52px; border-radius: 18px; background: var(--pink-soft);
  display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 4px;
  transition: transform .2s var(--ease);
}
.ui-trust__item:hover span { transform: translateY(-3px) scale(1.05); }
.ui-trust__item strong { color: var(--ink); font-weight: 800; font-size: .9rem; }
.ui-trust__item small { color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.3; }

/* Footer */
.ui-footer {
  background: var(--navy); color: #E5E7EB; padding: 56px 0 28px; margin-top: 28px;
}
.ui-footer__grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr) 1.1fr; gap: 32px; margin-bottom: 32px;
}
.ui-footer h3 { margin: 0 0 14px; color: #fff; font-size: .88rem; font-weight: 800; letter-spacing: .02em; }
.ui-footer a, .ui-footer p { display: block; color: #A8B0BD; margin: 0 0 10px; font-size: .88rem; }
.ui-footer a:hover { color: #FF7AA8; }
.ui-footer__brand p { max-width: 32ch; line-height: 1.55; }
.ui-footer__social { display: flex; gap: 10px; margin-top: 16px; }
.ui-footer__social a {
  width: 40px; height: 40px; margin: 0; border-radius: 12px;
  background: rgba(255,255,255,.08); display: grid; place-items: center;
  font-size: .95rem; transition: background .15s ease, transform .15s ease;
}
.ui-footer__social a:hover { background: var(--pink); color: #fff; transform: translateY(-2px); }
.ui-footer__apps { display: flex; flex-direction: column; gap: 10px; }
.ui-store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 10px 14px; color: #fff; max-width: 180px;
  transition: background .15s ease, transform .15s ease;
}
.ui-store-badge:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }
.ui-store-badge strong { display: block; font-size: .85rem; }
.ui-store-badge small { display: block; font-size: .65rem; color: #A8B0BD; font-weight: 500; }
.ui-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: #8B93A3; font-size: .82rem; flex-wrap: wrap;
}
.ui-footer__legal { display: flex; gap: 18px; }
.ui-footer__legal a { margin: 0; color: #8B93A3; }
.ui-footer__legal a:hover { color: #FF7AA8; }
.ui-logo--foot .ui-logo__img {
  height: 52px;
  max-width: 220px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.25));
}
.ui-logo--foot:hover { opacity: 1; }

/* Sidebar */
.ui-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 140;
  backdrop-filter: blur(2px);
  animation: ui-fade-in .2s ease;
}
.ui-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 88vw);
  z-index: 150; background: var(--card); transform: translateX(-105%);
  transition: transform .28s var(--ease); display: flex; flex-direction: column;
  border-radius: 0 24px 24px 0; box-shadow: var(--shadow-lg);
}
.ui-sidebar.is-open { transform: translateX(0); }
.ui-sidebar__head {
  display: flex; align-items: center; gap: 10px; padding: 16px 18px;
  background: var(--pink); color: #fff; font-weight: 800;
}
.ui-sidebar__close {
  margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.18); color: #fff; font-size: 1.3rem; cursor: pointer;
}
.ui-sidebar__tools {
  display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.ui-sidebar__list { list-style: none; margin: 0; padding: 8px 0; overflow: auto; flex: 1; }
.ui-sidebar__list a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  font-weight: 600; font-size: .9rem;
  transition: background .15s ease, color .15s ease;
}
.ui-sidebar__list a:hover,
.ui-sidebar__list a.is-active { background: var(--pink-soft); color: var(--pink-dark); }
.ui-sidebar__all {
  display: block; padding: 14px 16px 16px; font-weight: 800; color: var(--pink);
  border-top: 1px solid var(--line);
}

/* Drawers */
.ui-drawer { position: fixed; inset: 0; z-index: 200; }
.ui-drawer__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); }
.ui-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%);
  background: var(--card); display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); border-radius: 24px 0 0 24px;
  animation: ui-slide-in-right .28s var(--ease);
}
.ui-drawer__panel header,
.ui-drawer__panel footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line); gap: 10px;
}
.ui-drawer__panel footer {
  flex-direction: column; align-items: stretch; border-bottom: 0; border-top: 1px solid var(--line);
}
.ui-drawer__panel header h2 { margin: 0; font-size: 1.1rem; }
.ui-drawer__panel header button {
  width: 36px; height: 36px; border: 0; border-radius: 12px; background: #F3F4F8; cursor: pointer; font-size: 1.2rem;
}
.ui-drawer__body { flex: 1; overflow: auto; padding: 16px; }
.ui-cart-total { font-size: 1.05rem; margin-bottom: 10px; font-weight: 600; }
.ui-cart-total strong { font-weight: 800; color: var(--pink); }
.ui-coupon { margin: 8px 0 0; color: var(--muted); font-size: .85rem; }

.mp-cart-line {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 10px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  animation: ui-fade-up .3s var(--ease);
}
.mp-cart-line__img {
  width: 64px; height: 64px; border-radius: 14px; background: #F3F4F8 center/cover no-repeat;
}
.mp-cart-qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.mp-cart-qty button {
  width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--pink-soft);
  color: var(--pink-dark); font-weight: 800; cursor: pointer;
  transition: transform .12s ease;
}
.mp-cart-qty button:hover { transform: scale(1.08); }
.mp-cart-line__remove {
  width: 32px; height: 32px; border: 0; border-radius: 10px; background: #F3F4F8; cursor: pointer;
}

/* Auth */
.ui-modal { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; }
.ui-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(4px); }
.ui-auth {
  position: relative; z-index: 1; width: min(880px, calc(100% - 24px));
  display: grid; grid-template-columns: .95fr 1.05fr; background: var(--card);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  animation: ui-fade-up .3s var(--ease);
}
.ui-auth__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 12px; background: #F3F4F8; cursor: pointer;
}
.ui-auth__aside { position: relative; min-height: 480px; color: #fff; overflow: hidden; }
.ui-auth__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
  transform: scale(1.03);
}
.ui-auth__aside-copy {
  position: relative; z-index: 1; height: 100%; padding: 28px;
  background:
    linear-gradient(180deg, rgba(10,14,24,.25) 0%, rgba(10,14,24,.45) 40%, rgba(10,14,24,.9) 100%),
    linear-gradient(90deg, rgba(255,45,107,.12), transparent 60%);
  display: flex; flex-direction: column; gap: 12px; justify-content: flex-end;
}
.ui-auth__aside-copy p {
  margin: 0;
  max-width: 28ch;
  font-size: .92rem;
  line-height: 1.45;
  color: rgba(255,255,255,.92);
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.ui-auth__aside-copy ul {
  color: rgba(255,255,255,.9);
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.55;
}
.ui-auth__aside-copy img,
.ui-auth__logo {
  width: auto;
  height: 52px;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
}
.ui-auth__aside-copy ul { margin: 0; padding-left: 18px; }
.ui-auth__aside-copy a { color: #FFB3CC; font-weight: 700; }
.ui-auth__main { padding: 28px 26px; }
.ui-auth__brand strong { display: block; font-size: 1.35rem; letter-spacing: -.03em; }
.ui-auth__brand span { color: var(--muted); font-size: .9rem; }
.ui-auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 14px; }
.ui-auth__tabs button {
  border: 0; background: #F3F4F8; border-radius: 999px; padding: 10px; font-weight: 800; cursor: pointer; color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.ui-auth__tabs button.active { background: var(--pink); color: #fff; }
.ui-auth__social { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ui-social {
  border: 1px solid var(--line); background: var(--card); border-radius: 14px;
  padding: 10px; font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.ui-social:hover { border-color: var(--pink); transform: translateY(-1px); }
.ui-auth__divider { text-align: center; color: var(--muted); font-size: .8rem; margin: 14px 0; }
.ui-form { display: flex; flex-direction: column; gap: 12px; }
.ui-field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 700; }
.ui-field input {
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: #F8F9FC; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ui-field input:focus { border-color: rgba(255,0,102,.45); box-shadow: 0 0 0 3px var(--pink-glow); background: #fff; }
.ui-auth__error { color: #b91c1c; background: #fee2e2; padding: 10px 12px; border-radius: 12px; font-size: .85rem; }
.ui-auth__ok { color: #166534; background: #dcfce7; padding: 10px 12px; border-radius: 12px; font-size: .85rem; }
.ui-hint { color: var(--muted); font-size: .88rem; }

/* Chat / toast */
.ui-chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 120;
  width: 56px; height: 56px; border: 0; border-radius: 999px;
  background: var(--pink); color: #fff;
  font-size: 1.3rem; cursor: pointer; box-shadow: 0 14px 30px var(--pink-glow);
  transition: transform .2s var(--ease);
}
.ui-chat-fab:hover { transform: scale(1.08) translateY(-2px); }
.ui-chat {
  position: fixed; right: 22px; bottom: 90px; z-index: 121; width: min(340px, calc(100% - 32px));
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
  border: 1px solid var(--line);
  animation: ui-fade-up .25s var(--ease);
}
.ui-chat header {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 14px;
  background: var(--pink); color: #fff;
}
.ui-chat header button { border: 0; background: transparent; color: #fff; font-size: 1.2rem; cursor: pointer; }
.ui-chat__body { padding: 14px; font-size: .9rem; color: var(--muted); }
.ui-chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ui-chat input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; }
.ui-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px;
  box-shadow: var(--shadow-lg); font-weight: 700; font-size: .9rem;
  animation: ui-fade-up .25s var(--ease);
}

/* ========== Mobile shell ========== */
.ui-m__top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
  padding: 10px 14px 12px; border-bottom: 1px solid rgba(0,0,0,.04);
}
.ui-m__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.ui-m__brand { max-width: 52%; }
.ui-m__brand .ui-logo__img {
  height: 34px;
  max-width: min(168px, 48vw);
}
.ui-m__loc {
  flex: 1; border: 0; background: transparent; text-align: left; cursor: pointer;
  font-size: .78rem; font-weight: 700; color: var(--ink); min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-m__loc small { display: block; color: var(--muted); font-weight: 600; font-size: .68rem; }
.ui-m__actions { display: flex; gap: 8px; flex-shrink: 0; }
.ui-search--m { min-height: 46px; }
.ui-search--m button {
  border: 0; margin: 4px; width: 42px; border-radius: 999px;
  background: var(--pink); color: #fff; cursor: pointer;
}
.ui-m__main { padding: 14px 14px 24px; display: flex; flex-direction: column; gap: 18px; }
.m-screen--home .ui-m__main { padding-bottom: 8px; }
.ui-hero-m {
  position: relative; border-radius: 24px; overflow: hidden; min-height: 200px;
  box-shadow: var(--shadow-lg); color: #fff;
}
.ui-hero-m__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ui-hero-m__copy {
  position: relative; z-index: 1; padding: 24px 18px 22px;
  background: linear-gradient(180deg, transparent, rgba(8,12,20,.85));
  display: flex; flex-direction: column; gap: 6px; min-height: 200px; justify-content: flex-end;
}
.ui-hero-m__copy > span {
  display: inline-flex; width: fit-content; padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.14); font-size: .7rem; font-weight: 800;
}
.ui-hero-m__copy strong { font-size: 1.35rem; letter-spacing: -.03em; }
.ui-hero-m__copy p { margin: 0; opacity: .9; font-size: .9rem; max-width: 28ch; }
.ui-hub-scroll { overflow: hidden; }
.ui-hub-scroll__track,
#mCats {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
#mCats::-webkit-scrollbar { display: none; }
.mapp-cat {
  flex: 0 0 76px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; gap: 6px; padding: 0;
}
.mapp-cat__ico {
  width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center;
  font-size: 1.4rem; box-shadow: var(--shadow); background: #fff;
  transition: transform .2s var(--ease), outline .15s ease;
}
.mapp-cat.is-active .mapp-cat__ico {
  outline: 2px solid var(--pink); box-shadow: 0 10px 22px var(--pink-glow);
  transform: scale(1.04);
}
.mapp-cat span { font-size: .72rem; font-weight: 800; }
.ui-timer {
  background: var(--pink-soft); color: var(--pink-dark); border-radius: 999px;
  padding: 4px 10px; font-size: .75rem; font-weight: 800;
}
.ui-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 32px rgba(17,24,39,.08); border-top: 1px solid rgba(0,0,0,.04);
}
.ui-tab {
  position: relative; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; gap: 2px; min-height: 52px; color: var(--muted); text-decoration: none;
  transition: color .15s ease, transform .15s ease;
}
.ui-tab em { font-style: normal; font-size: .65rem; font-weight: 700; }
.ui-tab.is-active,
.ui-tab.is-active em { color: var(--pink); }
.ui-tab.is-active span { transform: scale(1.08); display: inline-block; }
.ui-tab__badge {
  position: absolute; top: 4px; right: 18px; min-width: 16px; height: 16px;
  border-radius: 999px; background: var(--pink); color: #fff; font-size: .62rem; font-weight: 800;
  display: grid; place-items: center;
}

/* Keyframes (base) */
@keyframes ui-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ui-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ui-slide-in-right {
  from { transform: translateX(24px); opacity: .6; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes ui-pop {
  0% { transform: scale(.6); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
  .ui-wrap { width: min(100% - 32px, var(--max)); }
  .ui-loc { max-width: 180px; }
}

@media (max-width: 1100px) {
  .ui-header__inner { grid-template-columns: auto 1fr auto; gap: 12px; }
  .ui-loc { display: none; }
  .ui-hero { grid-template-columns: 1fr; }
  #roundCats { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 4px; scrollbar-width: none; }
  #roundCats::-webkit-scrollbar { display: none; }
  .mp-round-cat { flex: 0 0 132px; }
  #brandGrid { grid-template-columns: repeat(4, 1fr); }
  .ui-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .ui-flash { grid-template-columns: 1fr; }
  .ui-trust { grid-template-columns: repeat(2, 1fr); }
  .ui-footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ui-premium { flex-direction: column; text-align: center; }
  .ui-premium ul { text-align: left; display: inline-block; }
}

@media (max-width: 760px) {
  .ui-auth { grid-template-columns: 1fr; }
  .ui-auth__aside { display: none; }
  .ui-header__actions .ui-action__lbl { display: none; }
  .ui-action { min-width: 48px; }
  #brandGrid { grid-template-columns: repeat(3, 1fr); }
  .ui-trust { grid-template-columns: repeat(2, 1fr); }
  .mp-slide, .ui-slide { grid-template-columns: 1fr; padding: 28px 22px; }
  .ui-slide__media { display: none; }
  .ui-footer__grid { grid-template-columns: 1fr; }
  .ui-topbar { display: none; }
}

@media (max-width: 900px) {
  .ui-drawer__panel {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    max-height: 88vh; border-radius: 24px 24px 0 0;
    animation: ui-fade-up .28s var(--ease);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
