:root {
  --bg: #0e0f13;
  --bg-soft: #16181f;
  --card: #1b1e27;
  --card-hover: #222633;
  --line: #2a2e3a;
  --text: #f3f4f6;
  --muted: #9aa0ad;
  --accent: #e23b4e;
  --accent-2: #f4a72c;
  --ok: #3ec98a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14,15,19,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.logo { display: flex; gap: 6px; font-weight: 800; font-size: 22px; letter-spacing: 1px; }
.logo__love { color: var(--accent); }
.logo__sushi { color: var(--text); }
.logo--footer { font-size: 20px; }

.nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: .2s;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }
.nav a.active { color: #fff; background: var(--accent); }

.cart-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: .2s;
  flex: none;
}
.cart-btn:hover { background: var(--card-hover); }
.cart-btn__count {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid; place-items: center;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 400px at 80% -10%, rgba(226,59,78,.25), transparent),
    radial-gradient(800px 400px at 10% 0%, rgba(244,167,44,.15), transparent),
    var(--bg);
  padding: 64px 0 56px;
  text-align: center;
}
.hero__title {
  font-size: clamp(40px, 8vw, 84px);
  margin: 0;
  font-weight: 900;
  letter-spacing: 2px;
}
.hero__title span:first-child { color: var(--accent); }
.hero__slogan { font-size: clamp(16px, 2.5vw, 22px); color: var(--text); margin: 12px 0 6px; }
.hero__desc { color: var(--muted); max-width: 640px; margin: 0 auto 24px; }
.hero__cta { margin-bottom: 28px; }
.hero__badges { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.badge {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
}
.badge b { color: var(--accent-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: .2s;
  background: var(--card);
  color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #c92f41; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; border-color: var(--line); }

/* ---------- Catalog ---------- */
.catalog { padding: 40px 0 80px; }
.loader { text-align: center; color: var(--muted); padding: 60px 0; }

.cat-block { margin-bottom: 48px; scroll-margin-top: 80px; }
.cat-block__title {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 8px;
}
.subcat__title {
  font-size: 18px;
  color: var(--accent-2);
  font-weight: 700;
  margin: 24px 0 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: .2s;
}
.card:hover { background: var(--card-hover); border-color: #353a4a; transform: translateY(-2px); box-shadow: var(--shadow); }
.card__image {
  width: calc(100% + 36px);
  height: 170px;
  margin: -18px -18px 14px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
  border-bottom: 1px solid var(--line);
}
.card__name { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.card__desc { font-size: 13px; color: var(--muted); flex: 1; margin: 0 0 12px; }
.card__weight { font-size: 12px; color: var(--muted); opacity: .8; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.card__price { font-size: 20px; font-weight: 800; }
.card__price span { font-size: 14px; color: var(--muted); font-weight: 600; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.qty button {
  width: 32px; height: 36px;
  background: var(--bg-soft);
  border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}
.qty button:hover { background: var(--accent); color: #fff; }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }

.add-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}
.add-btn:hover { background: #c92f41; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding-top: 40px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 28px;
}
.footer__col h4 { margin: 0 0 10px; }
.footer p { color: var(--muted); margin: 4px 0; font-size: 14px; }
.footer__bottom { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 13px; }

/* ---------- Drawer (cart) ---------- */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none;
  transition: .25s;
  z-index: 90;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: .3s;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.drawer__head h3 { margin: 0; }
.drawer__close, .modal__close {
  background: none; border: none; color: var(--muted);
  font-size: 30px; line-height: 1; cursor: pointer;
}
.drawer__close:hover, .modal__close:hover { color: var(--text); }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer__foot { padding: 20px; border-top: 1px solid var(--line); }

.cart-empty { color: var(--muted); text-align: center; padding: 40px 0; }

.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line__info { flex: 1; }
.cart-line__name { font-weight: 600; font-size: 14px; }
.cart-line__price { color: var(--muted); font-size: 13px; }
.cart-line__right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-line__remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.cart-line__remove:hover { color: var(--accent); }

.cart-total-row { display: flex; justify-content: space-between; margin: 6px 0; color: var(--muted); }
.cart-total-row.total { color: var(--text); font-size: 20px; font-weight: 800; margin: 12px 0; }
.cart-hint { font-size: 13px; color: var(--accent-2); margin-bottom: 12px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 110;
}
.modal-overlay.open { display: flex; }
.modal {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
}
.modal__close { position: absolute; top: 14px; right: 18px; }
.modal__title { margin: 0 0 18px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__field span { font-size: 13px; color: var(--muted); }
.form__field input, .form__field textarea {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.form__field input:focus, .form__field textarea:focus { outline: none; border-color: var(--accent); }
.form__summary { background: var(--card); border-radius: 10px; padding: 12px 14px; }
.form__summary .row { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin: 3px 0; }
.form__summary .row.total { color: var(--text); font-weight: 800; font-size: 18px; }
.form__pay-info { font-size: 13px; color: var(--muted); }
.form__error { color: var(--accent); font-size: 14px; min-height: 0; }

/* ---------- Pay step ---------- */
.pay { text-align: center; }
.pay__icon { font-size: 48px; }
.pay__title { font-size: 24px; font-weight: 800; margin: 8px 0; }
.pay__order { color: var(--muted); margin-bottom: 18px; }
.pay__card {
  background: linear-gradient(135deg, #1f2330, #2b3142);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  text-align: left;
  margin: 0 auto 18px;
}
.pay__card-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.pay__card-number {
  font-size: 24px; font-weight: 800; letter-spacing: 2px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 6px 0 14px;
}
.copy-btn { background: var(--accent); color:#fff; border:none; border-radius:8px; padding:6px 12px; cursor:pointer; font-size:13px; font-weight:700; }
.pay__card-row { display: flex; justify-content: space-between; font-size: 14px; margin: 4px 0; }
.pay__card-row .muted { color: var(--muted); }
.pay__amount { font-size: 22px; font-weight: 800; color: var(--ok); margin: 10px 0; }
.pay__note { font-size: 13px; color: var(--muted); background: var(--card); border-radius: 10px; padding: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ok);
  color: #07210f;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: .3s;
  z-index: 200;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav { order: 3; width: 100%; margin: 0; padding-bottom: 8px; }
  .header__inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
  .footer__inner { grid-template-columns: 1fr; }
}
