:root {
  --bg: #232e3c;
  --text: #f4f4f4;
  --muted: #708498;
  --blue: #6ab3f3;
  --blue-dim: #6d93b8;
  --tab: #2a3b4e;
  --search: #373f4d;
  --card: #17212b;
  --cart: #2a3848;
  --stepper: #3d4b5c;
  --danger: #e25b5b;
  --header: 52px;
  --radius: 14px;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #0e1621;
  color: var(--text);
}
button, input { font-family: inherit; }
button { cursor: pointer; }

.stage {
  min-height: 100%;
  display: flex;
  justify-content: center;
}
body.in-telegram {
  background: var(--bg);
}
body.in-telegram .app {
  max-width: none;
}
body.in-telegram .tg-bar {
  display: none;
}
.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tg-bar {
  height: var(--header);
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  padding: 0 6px 0 2px;
  flex-shrink: 0;
}
.tg-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  border-radius: 20px;
  padding: 0;
}
.icon-btn svg { display: block; }
.tg-actions { display: flex; align-items: center; }
.back-slot { width: 44px; }

.screen {
  flex: 1;
  overflow: auto;
  padding-bottom: 42px;
}
.screen::-webkit-scrollbar { width: 0; }

.tabs {
  display: flex;
  justify-content: center;
  gap: 54px;
  padding: 6px 16px 8px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 74px;
  padding: 0;
}
.tab-ico {
  width: 54px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--blue-dim);
}
.tab.active .tab-ico {
  background: var(--tab);
  color: var(--blue);
}
.tab span {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}

.search {
  margin: 6px 16px 14px;
  height: 44px;
  background: var(--search);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #8b98a8;
}
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}
.search input::placeholder { color: #8b98a8; }

.page-title {
  margin: 6px 16px 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.banner {
  margin: 0 16px 12px;
  min-height: 88px;
  border: 0;
  width: calc(100% - 32px);
  border-radius: 16px;
  background: #070707 url("../assets/banner-bg.jpg") center / 100% 100% no-repeat;
  color: #fff;
  text-align: left;
  padding: 14px 18px;
  display: flex;
  align-items: center;
}
.banner span {
  display: block;
  max-width: 68%;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: uppercase;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  margin: 10px 16px 0;
}

.product-card {
  margin: 4px 16px 16px;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
}
.product-card .shot {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: #c46a32;
}
.product-card .shot img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: center 35%;
}
.product-body { padding: 12px 14px 14px; }
.price {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pname {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn {
  border: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.btn-block {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  margin-top: 12px;
}
.btn-center {
  display: block;
  margin: 18px auto 0;
  height: 48px;
  padding: 0 28px;
  border-radius: 14px;
  min-width: 250px;
}

.detail-shot {
  position: relative;
  background: #c46a32;
}
.detail-shot img {
  display: block;
  width: 100%;
  height: min(46vh, 380px);
  object-fit: cover;
  object-position: center 20%;
}
.share {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #3d9adf;
  display: grid;
  place-items: center;
}
.detail-body { padding: 16px 16px 24px; }
.detail-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.btn-cart {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
}
.cart-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.trash {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--danger);
  display: grid;
  place-items: center;
}
.cart-card {
  margin: 0 16px;
  background: #243241;
  border-radius: 16px;
  overflow: hidden;
}
.cart-top {
  display: flex;
  gap: 12px;
  padding: 12px;
}
.cart-top img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.cart-top p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}
.cart-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.stepper {
  display: flex;
  align-items: center;
  background: var(--stepper);
  border-radius: 20px;
  height: 36px;
  padding: 0 4px;
}
.stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.stepper span {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}
.checkout-wrap {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 36px;
}
.checkout-wrap .btn { height: 48px; border-radius: 12px; width: 100%; }

.orders {
  padding-top: 8px;
  text-align: center;
}
.orders h1 {
  margin: 4px 16px 18px;
  text-align: left;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.duck {
  width: 132px;
  height: auto;
  margin: 28px auto 8px;
  display: block;
}
.orders-empty-title {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 800;
}
.orders-sub {
  margin: 6px 24px 0;
  color: var(--muted);
  font-size: 15px;
}
.order-card {
  margin: 0 16px 12px;
  background: #243241;
  border-radius: 16px;
  padding: 14px;
  text-align: left;
}
.order-card .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}
.order-card .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.watermark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  color: #66788c;
  font-size: 13px;
  pointer-events: none;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  background: #111a24;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 5;
}
