:root {
  --lime: #cdff3f;
  --ink: #0a0a0a;
  --grey: #6b6b6b;
  --line: #e9e9e9;
  --bg: #ffffff;
  --card: #f6f6f6;
  --tg-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

h1, h2, h3 { letter-spacing: -0.02em; }
button { font-family: inherit; }

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--grey); }
.header__right { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  border: 1px solid var(--ink);
  background: none;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}
.lang-toggle:hover { background: var(--lime); }

.cart-btn {
  position: relative;
  border: 1px solid var(--ink);
  background: none;
  font-size: 15px;
  padding: 4px 10px;
  cursor: pointer;
}
.cart-btn:hover { background: var(--lime); }
.cart-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  background: var(--ink);
  color: var(--lime);
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  padding: 13px 22px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--wide { width: 100%; }

/* ---------- marquee ---------- */
.marquee { background: var(--ink); color: var(--lime); overflow: hidden; padding: 8px 0; }
.marquee__track {
  display: inline-flex;
  gap: 44px;
  white-space: nowrap;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  animation: scroll 22s linear infinite;
}
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- layout / views ---------- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 110px;
}
.view-title {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--lime);
  display: inline-block;
  padding: 0 8px;
  margin-bottom: 16px;
}
.section__note { color: var(--grey); font-size: 13px; margin: -10px 0 16px; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 7px 13px;
  cursor: pointer;
}
.chip--active { background: var(--ink); color: var(--lime); }

/* ---------- grid / card ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.loading { color: var(--grey); grid-column: 1 / -1; }
.card { cursor: pointer; }
.card__media {
  aspect-ratio: 1;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__name { font-weight: 700; font-size: 13px; margin-top: 8px; }
.card__price { font-weight: 900; font-size: 13px; margin-top: 1px; }
.card__price b { background: var(--lime); padding: 0 3px; }
.card:hover .card__name { background: var(--lime); }

/* ---------- prose / reviews / contacts ---------- */
.prose { white-space: pre-wrap; font-size: 14px; }
.reviews { display: grid; gap: 12px; margin-bottom: 18px; }
.review { border: 1px solid var(--line); padding: 14px; background: var(--card); }
.review__stars { font-weight: 800; }
.review__name { font-weight: 800; margin: 4px 0 2px; }
.review__text { font-size: 13px; color: #333; }
.contacts { white-space: pre-wrap; font-size: 14px; }
.contacts a { color: var(--ink); background: var(--lime); font-weight: 700; }

/* ---------- forms ---------- */
.form { display: grid; gap: 12px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
  margin-bottom: 4px;
}
.field input, .field textarea, .field select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid var(--ink);
  background: #fff;
  border-radius: 0;
  -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--lime); }

/* ---------- cart ---------- */
.cart-row {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 10px;
  margin-bottom: 10px;
  background: #fff;
}
.cart-row__media {
  width: 56px;
  height: 56px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-row__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-row__info { flex: 1; min-width: 0; }
.cart-row__name { font-weight: 700; font-size: 13px; }
.cart-row__meta { font-size: 12px; color: var(--grey); }
.cart-row__price { font-weight: 900; font-size: 13px; white-space: nowrap; }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--ink);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}
.qty button:hover { background: var(--lime); }
.qty span { font-weight: 700; min-width: 16px; text-align: center; }
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 900;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
  margin: 14px 0;
}
.cart-total b { background: var(--lime); padding: 0 6px; }

/* ---------- orders ---------- */
.order-card { border: 2px solid var(--ink); margin-bottom: 14px; background: #fff; }
.order-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 13px;
}
.order-card__status { background: var(--lime); color: var(--ink); padding: 1px 8px; font-size: 11px; text-transform: uppercase; }
.order-card__body { padding: 10px 12px; font-size: 13px; }
.order-card__body .muted { color: var(--grey); }

/* ---------- success ---------- */
.success {
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 26px 20px;
  text-align: center;
  background: var(--lime);
}
.success h3 { font-size: 20px; font-weight: 900; text-transform: uppercase; margin-bottom: 8px; }

/* ---------- more / rows ---------- */
.rows { display: grid; gap: 10px; }
.row-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--ink);
  padding: 15px 14px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
}
.row-link:hover { background: var(--lime); }

/* ---------- tg prompt ---------- */
.tg-prompt {
  border: 2px dashed var(--ink);
  padding: 22px 16px;
  text-align: center;
  background: var(--card);
}
.tg-prompt p { margin-bottom: 14px; font-size: 14px; }

/* ---------- stars input ---------- */
.stars-in { display: flex; gap: 4px; margin-bottom: 12px; }
.stars-in button {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--line);
}
.stars-in button.on { color: var(--ink); }

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  background: #fff;
  border-top: 2px solid var(--ink);
  padding-bottom: var(--tg-safe-bottom);
}
.bottom-nav button {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 4px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--grey);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.bottom-nav button .ico { font-size: 19px; }
.bottom-nav button.active { color: var(--ink); background: var(--lime); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.modal__card {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-top: 2px solid var(--ink);
}
.modal__media {
  aspect-ratio: 16/10;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 18px 16px 26px; }
.modal__title { font-size: 22px; font-weight: 900; }
.modal__price { font-size: 18px; font-weight: 900; margin: 6px 0 10px; }
.modal__price b { background: var(--lime); padding: 0 5px; }
.modal__desc { color: #333; font-size: 14px; margin-bottom: 14px; }
.modal__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey); margin-bottom: 6px; }
.sizes { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.size {
  border: 1px solid var(--ink);
  padding: 7px 13px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}
.size--active { background: var(--ink); color: var(--lime); }
.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: #fff;
  border: 2px solid var(--ink);
  width: 36px;
  height: 36px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.modal__close:hover { background: var(--lime); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(76px + var(--tg-safe-bottom));
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: var(--lime);
  font-weight: 800;
  font-size: 13px;
  padding: 10px 18px;
  border: 2px solid var(--lime);
}
.toast[hidden] { display: none; }
