/* ─────────────────────────────────────────────────────────────
   Витрина @DdDdoogg_bot — стиль сайта «Жидкости» (02.10.2026):
   монохром, мягкий свет на чёрном, Liquid Glass.
   Стекло с блюром — только плавающий UI (верхняя панель, шторка, попап, тост):
   под ними прокручивается контент. Карточки — статичный вариант материала.
   Админка этот файл НЕ использует (у неё style.css).
   Откат: в index.html вернуть style.css?v=20260925f (или бэкап
   /root/channel_shop_bot_backup_20261002_before_restyle.tgz).
   ───────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #000;
  --text: #f5f5f4;
  --text-dim: rgba(245, 245, 244, .64);
  --text-faint: rgba(245, 245, 244, .4);
  --line: rgba(255, 255, 255, .1);
  --hl: rgba(255, 255, 255, .22);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, 0) 42%);

  --glass: rgba(14, 14, 16, .55);
  --glass-thick: rgba(14, 14, 16, .78);
  --static: rgba(255, 255, 255, .045);
  --blur: 20px;

  --radius: 20px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --display: 'Inter Tight', 'Golos Text', -apple-system, sans-serif;

  /* --tg-safe-top ставит app.js (телефон + кнопки Telegram); без него — системный отступ */
  --safe-top: calc(var(--tg-safe-top, env(safe-area-inset-top, 0px)) + 6px);
  --safe-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tg-safe-bottom, 0px));
  color-scheme: dark;
}

html, body {
  margin: 0; padding: 0;
  height: 100%; height: 100dvh;
  overflow: hidden; overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* мягкий рассеянный свет — как фон сайта; неподвижный, стеклу есть что «размыть» */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(70% 45% at 15% 0%, rgba(255, 255, 255, .14), transparent 70%),
    radial-gradient(55% 40% at 100% 60%, rgba(255, 255, 255, .06), transparent 70%),
    radial-gradient(70% 40% at 30% 110%, rgba(255, 255, 255, .07), transparent 70%),
    linear-gradient(180deg, #0d0d0e, #000 55%);
}

/* свой скролл-контейнер: iOS-«резинка» не показывает пустоту над панелью */
#app {
  position: relative;
  height: 100%; height: 100dvh;
  overflow-y: auto; overscroll-behavior-y: contain;
  padding: 16px;
  padding-top: calc(var(--top-bar-height, 0px) + 18px);
  padding-bottom: calc(48px + var(--safe-bottom));
  transition: filter .25s var(--ease);
}
body.privacy-blur #app, body.privacy-blur .sheet-panel { filter: blur(24px); }
/* запрет выделения/копирования текста и сохранения фото долгим нажатием (скриншоты веб-страница запретить не может) */
body, img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* ── Верхняя панель: настоящее стекло, под ней едет каталог ── */
#top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: var(--safe-top) 16px 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(120%);
  backdrop-filter: blur(var(--blur)) saturate(120%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06), 0 12px 40px rgba(0, 0, 0, .35);
}
#top-bar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent);
}
.header { display: flex; flex-direction: column; gap: 4px; padding: 2px 2px 12px; }
.header h1 { margin: 0; font: 600 30px/1 var(--display); letter-spacing: -.045em; }
.header p { margin: 0; color: var(--text-dim); font-size: 13px; letter-spacing: .02em; }

.tabs-wrap { padding-bottom: 2px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; appearance: none; cursor: pointer; white-space: nowrap;
  border: 0; border-radius: 999px; padding: 9px 15px;
  font: 500 13px 'Golos Text', sans-serif; color: var(--text-dim);
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), transform .15s var(--ease);
}
.tab:active { transform: scale(.96); }
.tab.active {
  background: rgba(255, 255, 255, .92); color: #050506; font-weight: 600;
  box-shadow: inset 0 1px 0 #fff, 0 4px 16px rgba(255, 255, 255, .12);
}
#tabs-subcategory .tab, #tabs-subsubcategory .tab { padding: 7px 13px; font-size: 12.5px; }

/* ── Каталог ── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 4px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative; cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, .05));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 40px rgba(0, 0, 0, .4);
  animation: rise .7s var(--ease) backwards;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: var(--sheen); }
.card:active { transform: scale(.97); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.card-photo {
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-faint); font-size: 12px;
}
.card-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, rgba(0, 0, 0, .55) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, rgba(0, 0, 0, .55) 78%, transparent 100%);
}
.card.is-out .card-photo img, .sheet-photo.is-out img { filter: grayscale(1) brightness(.5); }
.card.is-out .card-name, .card.is-out .card-price { color: var(--text-dim); }

.badge-out, .badge-popular, .badge-bell {
  position: absolute;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.badge-out {
  left: 8px; bottom: 32px; padding: 5px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--text);
  background: rgba(10, 10, 12, .7); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.badge-out-lg { left: 16px; bottom: 44px; font-size: 13px; padding: 7px 13px; }
/* «Популярное» — светлое тонированное стекло вместо оранжевого градиента */
.badge-popular {
  top: 8px; left: 8px; max-width: calc(100% - 44px);
  padding: 5px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: #050506;
  background: rgba(255, 255, 255, .88); box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(0, 0, 0, .35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge-popular-lg { top: 16px; left: 16px; font-size: 13px; padding: 7px 13px; }
.badge-bell {
  top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: rgba(10, 10, 12, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.card-body { position: relative; z-index: 1; margin-top: -26px; padding: 11px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font: 600 14px/1.25 var(--display); letter-spacing: -.015em; }
.card-desc { font-size: 12px; color: var(--text-dim); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-flavor, .card-mg { font-size: 12px; color: var(--text-dim); }
.card-mg { font-weight: 500; }
.card-price { margin-top: auto; padding-top: 6px; font: 600 15px var(--display); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }

.cat-group { margin-bottom: 30px; }
.cat-heading { margin: 0 0 12px; }
.cat-heading-1 { font: 600 24px/1.1 var(--display); letter-spacing: -.04em; padding-top: 6px; }
.cat-heading-2 { font: 600 17px/1.2 var(--display); letter-spacing: -.02em; color: var(--text); margin-top: 20px; }
.cat-heading-3 { font: 500 11px 'Golos Text', sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); margin-top: 14px; }

.empty { text-align: center; color: var(--text-faint); padding: 64px 16px; font-size: 14px; }

/* ── Шторка товара: толстое стекло ── */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .35s var(--ease); }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100dvh - var(--safe-top) + 24px);
  overflow-y: auto; overscroll-behavior: contain;
  border-radius: 28px 28px 0 0;
  background: var(--glass-thick);
  -webkit-backdrop-filter: blur(28px) saturate(120%); backdrop-filter: blur(28px) saturate(120%);
  box-shadow: inset 0 1px 0 var(--hl), inset 0 0 0 1px var(--line), 0 -20px 60px rgba(0, 0, 0, .5);
  padding-bottom: calc(24px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform .5s var(--ease), filter .25s var(--ease);
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: translateY(0); }
.sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  color: var(--text); font-size: 14px;
  background: rgba(10, 10, 12, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.sheet-photo {
  position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 46dvh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-faint); font-size: 13px;
  border-radius: 28px 28px 0 0;
}
.sheet-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, rgba(0, 0, 0, .5) 82%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, rgba(0, 0, 0, .5) 82%, transparent 100%);
}
.sheet-body { position: relative; margin-top: -34px; padding: 20px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.sheet-name { font: 600 26px/1.05 var(--display); letter-spacing: -.04em; }
.sheet-flavor { font-size: 15px; color: var(--text-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip { font-size: 12px; color: var(--text-dim); border-radius: 999px; padding: 5px 11px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); }
.sheet-price { margin-top: 6px; font: 600 24px var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sheet-desc { margin-top: 6px; font-size: 14px; line-height: 1.6; color: rgba(245, 245, 244, .86); white-space: pre-wrap; }

/* ── Кнопки ── */
.btn {
  appearance: none; border: 0; cursor: pointer;
  border-radius: var(--radius-sm); padding: 12px 16px;
  font: 600 14px 'Golos Text', sans-serif;
  background: rgba(255, 255, 255, .92); color: #050506;
  box-shadow: inset 0 1px 0 #fff, 0 6px 20px rgba(255, 255, 255, .1);
  transition: opacity .25s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-secondary { background: rgba(255, 255, 255, .06); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-block { width: 100%; margin-top: 14px; padding: 15px 16px; font-size: 15px; border-radius: 16px; }

.notify-done {
  margin-top: 14px; padding: 15px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--hl);
  font-size: 14px; line-height: 1.45; color: var(--text-dim);
  animation: rise .5s var(--ease);
}
.notify-done-title { color: var(--text); font: 600 16px var(--display); letter-spacing: -.02em; margin-bottom: 4px; }
.link-btn { align-self: center; background: none; border: 0; cursor: pointer; padding: 10px 0 0; color: var(--text-faint); font-size: 13px; }

/* ── Попап разрешения ── */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .3s var(--ease); }
.modal-box {
  position: relative; width: 100%; max-width: 340px; text-align: center;
  padding: 26px 20px 20px; border-radius: 26px;
  background: var(--glass-thick);
  -webkit-backdrop-filter: blur(28px) saturate(120%); backdrop-filter: blur(28px) saturate(120%);
  box-shadow: inset 0 1px 0 var(--hl), inset 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .6);
  transform: scale(.94); opacity: 0;
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-box { transform: scale(1); opacity: 1; }
.modal-icon { font-size: 34px; }
.modal-title { margin-top: 8px; font: 600 20px var(--display); letter-spacing: -.03em; }
.modal-text { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--text-dim); }
.modal-box .btn-block + .btn-block { margin-top: 8px; }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(24px + var(--safe-bottom)); z-index: 70;
  padding: 13px 16px; border-radius: 16px; text-align: center; font-size: 14px; color: var(--text);
  background: var(--glass-thick);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 var(--hl), inset 0 0 0 1px var(--line), 0 12px 40px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translateY(0); }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  #top-bar, .sheet-panel, .modal-box, .toast { background: rgba(16, 16, 18, .97); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
