/* Вінницькі Бджоли — тема «вулик»: мед/бурштин на темному графіті.
   Mobile-first: базові стилі для телефона, @media (min-width: 720px) — десктоп. */

:root {
  --bg: #faf6ec;
  --card: #ffffff;
  --fg: #221c12;
  --border: #e7dcc4;
  --muted: #82796a;
  --honey: #f2b024;        /* фірмовий бурштин */
  --honey-deep: #d99a0b;
  --hive: #1c1917;         /* графіт вулика: шапка, низ */
  --hive-fg: #f5efe2;
  --ok: #2b7a3f;
  --warn: #9a6700;
  --bad: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --card: #211c14;
    --fg: #f0e9da;
    --border: #3b3426;
    --muted: #a1977f;
    --honey: #f2b024;
    --honey-deep: #ffc445;
    --hive: #100e0a;
    --hive-fg: #f0e9da;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

/* ---------- шапка ---------- */
header {
  background: var(--hive);
  color: var(--hive-fg);
  border-bottom: 3px solid var(--honey);
}
.topbar {
  max-width: 960px; margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.topbar img.logo { height: 36px; width: auto; flex: none; }
.brand-name { font-weight: 800; letter-spacing: 0.02em; line-height: 1.15; }
.brand-name small { display: block; font-weight: 500; color: var(--honey); font-size: 0.72rem; }
.unit-chip {
  margin-left: auto;
  background: rgba(242, 176, 36, 0.15);
  color: var(--honey);
  border: 1px solid var(--honey);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.82rem; font-weight: 600;
  white-space: nowrap;
}
.logout button {
  background: none; border: none; color: var(--hive-fg);
  opacity: 0.7; cursor: pointer; padding: 0.4rem; display: flex;
}
.logout button:hover { opacity: 1; }
.logout svg { width: 20px; height: 20px; }

/* ---------- навігація: на мобілці — таб-бар знизу ---------- */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  background: var(--hive);
  border-top: 3px solid var(--honey);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.5rem 0 0.45rem;
  color: var(--hive-fg); opacity: 0.65;
  text-decoration: none; font-size: 0.7rem;
}
nav.tabs a svg { width: 22px; height: 22px; }
nav.tabs a.active { color: var(--honey); opacity: 1; }

main {
  max-width: 960px; margin: 0 auto;
  padding: 1.1rem 1rem 5.5rem;  /* низ — під таб-бар */
}

/* десктоп: навігація вгору, під шапку */
@media (min-width: 720px) {
  nav.tabs {
    position: static;
    grid-template-columns: repeat(5, auto);
    justify-content: center; gap: 0.5rem;
    background: var(--hive);
    border-top: none;
    padding-bottom: 0;
  }
  nav.tabs a {
    flex-direction: row; gap: 0.45rem;
    font-size: 0.95rem; padding: 0.55rem 1.1rem;
    border-bottom: 3px solid transparent;
  }
  nav.tabs a.active { border-bottom-color: var(--honey); }
  nav.tabs a svg { width: 18px; height: 18px; }
  main { padding-bottom: 3rem; }
}

h1 { font-size: 1.35rem; margin: 0.4rem 0 1rem; }

/* ---------- кнопки ---------- */
button.primary {
  background: var(--honey); color: #221c12;
  border: none; border-radius: 10px;
  padding: 0.65rem 1.5rem;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 0 var(--honey-deep);
}
button.primary:active { transform: translateY(1px); box-shadow: none; }

/* ---------- картки входу/активації ---------- */
.center-card {
  max-width: 400px; margin: 8vh auto 0;
  background: var(--card);
  border: 1px solid var(--border); border-top: 4px solid var(--honey);
  border-radius: 16px; padding: 2rem 1.5rem; text-align: center;
}
/* Блідо-лимонний логотип на білій картці невидимий — темна підкладка-«вулик» */
.logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hive);
  border-radius: 18px;
  padding: 0.8rem 1.1rem;
  margin-bottom: 0.6rem;
}
.center-card img.logo { height: 68px; width: auto; display: block; }
.center-card h1 { font-size: 1.25rem; }
.msg { min-height: 1.2rem; color: var(--bad); font-size: 0.92rem; }
.hint { color: var(--muted); font-size: 0.88rem; }

/* ---------- медовий фон (соти, що наливаються медом) ---------- */
.honey-bg {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---------- бджілки-гості ---------- */
.bee {
  position: fixed;
  z-index: 20;              /* над контентом: інакше картки ховають бджілку */
  margin: -15px 0 0 -15px;
  pointer-events: none;     /* кліки проходять крізь неї */
  animation: bee-pop 0.5s ease-out; /* поява — CSS, видимість не залежить від JS-анімацій */
}
@keyframes bee-pop {
  from { opacity: 0; transform: scale(0.5) translateY(-14px); }
  to   { opacity: 1; transform: none; }
}
.bee-wing { fill: rgba(255, 255, 255, 0.78); stroke: #d99a0b; stroke-width: 0.8; }
.bee-wings {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: bee-flutter 0.28s infinite alternate ease-in-out;
}
.bee-flee .bee-wings { animation-duration: 0.08s; }  /* панічне тріпотіння на зльоті */
.bee-sleep .bee-wings { animation-duration: 0.9s; }  /* ліниві крильця сонної бджілки */
@keyframes bee-flutter {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0.5); }
}
@media (prefers-reduced-motion: reduce) {
  .bee { animation: none; }        /* просто з'являється, без стрибка */
  .bee-wings { animation: none; }  /* крильця складені */
}

/* ---------- статистика (баланс) ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.stat {
  background: var(--card);
  border: 1px solid var(--border); border-left: 4px solid var(--honey);
  border-radius: 14px; padding: 1rem 0.6rem; text-align: center;
}
.stat-value { font-size: 2rem; font-weight: 800; }
.stat-label { color: var(--muted); font-size: 0.82rem; }
.stat-rank { grid-column: span 2; }
.rank-hex {
  width: 58px; height: 64px;
  display: inline-flex; align-items: center; justify-content: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, #ffc94d, #e8960b);
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}
.rank-hex.rank-none {
  background: color-mix(in srgb, var(--muted) 22%, var(--bg));
  color: var(--muted); font-weight: 800;
}
.rank-name { font-size: 1.25rem; font-weight: 800; }
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(3, 260px); }
  .stat-value { font-size: 2.4rem; }
  .stat-rank { grid-column: auto; }
}

/* ---------- заявки: шапка сторінки і форма подачі ---------- */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.8rem; flex-wrap: wrap;
}
.btn-link {
  display: inline-block;
  background: var(--honey); color: #221c12;
  border-radius: 10px; padding: 0.5rem 1.1rem;
  font-weight: 700; text-decoration: none;
  box-shadow: 0 2px 0 var(--honey-deep);
}
.btn-link:active { transform: translateY(1px); box-shadow: none; }
.claim-form {
  background: var(--card);
  border: 1px solid var(--border); border-top: 4px solid var(--honey);
  border-radius: 14px;
  padding: 1rem;
  max-width: 560px;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.3rem; }
.form-field > span { font-weight: 600; font-size: 0.92rem; }
.form-field input, .form-field select, .form-field textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--fg);
  font-size: 1rem; font-family: inherit;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--honey);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 25%, transparent);
}
.claim-form button { align-self: flex-start; }

/* ---------- промо-банер на балансі ---------- */
.promo-banner {
  display: flex; align-items: center; justify-content: center; gap: 2rem;
  background: var(--card);
  border: 1px solid var(--honey); border-radius: 20px;
  padding: 1.6rem 1.8rem;
  margin: 1.2rem 0;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--honey) 25%, transparent);
  min-height: 40vh;   /* помітний, але не домінує */
}
.promo-img {
  width: min(38%, 300px); height: auto; flex: none;
  transform: rotate(-3deg);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}
.promo-title {
  font-weight: 800;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.25;
  margin-bottom: 0.4rem;
}
.promo-banner .hint { font-size: clamp(0.95rem, 1.8vw, 1.15rem); }
@media (max-width: 560px) {
  .promo-banner { flex-direction: column; text-align: center; gap: 1.2rem; }
  .promo-img { width: 88%; }
}

/* ---------- залишки продукції ---------- */
.section-title { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; }
.saved-note { color: var(--ok); font-weight: 600; }
.stock-card {
  background: var(--card);
  border: 1px solid var(--border); border-top: 4px solid var(--honey);
  border-radius: 14px;
  padding: 0.4rem 1rem 1rem;
  margin-bottom: 1rem;
  max-width: 560px;
}
.stock-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.stock-name { font-weight: 600; }
.stock-qty { width: 5.5rem; }
.stock-card button { margin-top: 0.9rem; }

/* ---------- коментар обліку (1С) у заявках ---------- */
.note-1c {
  margin-top: 0.35rem;
  padding: 0.3rem 0.55rem;
  background: color-mix(in srgb, var(--honey) 12%, var(--card));
  border-left: 3px solid var(--honey);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--fg);
  max-width: 260px;
  white-space: normal;
}
.note-1c.note-bad {
  background: color-mix(in srgb, var(--bad) 10%, var(--card));
  border-left-color: var(--bad);
}

/* ---------- соти слави (сторінка здобутків) ---------- */
.fame-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.4rem;
}
.fame-count { font-size: 1.05rem; }
.fame-bar {
  height: 10px; max-width: 560px;
  background: color-mix(in srgb, var(--honey) 12%, var(--bg));
  border-radius: 999px; overflow: hidden;
  margin-bottom: 1.6rem;
}
.fame-grid {
  display: flex; flex-wrap: wrap; gap: 1.1rem 1.4rem;
  justify-content: center;
}
.fame-cell {
  position: relative;
  width: 150px; text-align: center;
}
/* легкий «стільниковий» зсув кожної другої плитки */
@media (min-width: 560px) {
  .fame-cell:nth-child(even) { transform: translateY(16px); }
  .fame-cell.fresh:nth-child(even) { transform: none; } /* анімація має свій transform */
}
.fame-hex {
  width: 86px; height: 96px;
  display: inline-flex; align-items: center; justify-content: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: color-mix(in srgb, var(--muted) 16%, var(--bg));
  color: var(--muted);
  font-size: 2rem; font-weight: 800;
  margin-bottom: 0.45rem;
}
.fame-cell.earned .fame-hex {
  background: linear-gradient(160deg, #ffc94d, #e8960b);
  color: #221c12;
  font-size: 2.3rem;
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--honey) 45%, transparent));
}
.fame-name { font-weight: 800; font-size: 0.95rem; line-height: 1.2; }
.fame-secret { color: var(--muted); }
.fame-desc { color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
.fame-mini-bar {
  height: 6px; margin: 0.4rem auto 0.15rem; max-width: 110px;
  background: color-mix(in srgb, var(--honey) 12%, var(--bg));
  border-radius: 999px; overflow: hidden;
}
.fame-pct { color: var(--muted); font-size: 0.75rem; }
.fame-cell .reveal-tag {
  position: absolute; top: -0.7rem; left: 50%;
  transform: translateX(-50%);
  margin: 0; z-index: 1;
}
.fame-cell.fresh { animation: card-reveal 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.12) both; }
@media (prefers-reduced-motion: reduce) { .fame-cell.fresh { animation: none; } }

/* ---------- профіль: банер рейтингу ---------- */
.top-banner {
  display: flex; align-items: center; gap: 0.9rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--honey) 22%, var(--card)), var(--card));
  border: 1px solid var(--honey);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 3px 14px color-mix(in srgb, var(--honey) 20%, transparent);
}
.top-banner-icon { font-size: 1.9rem; }
.top-banner-title { font-weight: 800; font-size: 1.05rem; }

/* ---------- ачівки ---------- */
.ach-title { font-size: 1.15rem; margin: 1.6rem 0 0.8rem; }
.ach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
@media (min-width: 540px) { .ach-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .ach-grid { grid-template-columns: repeat(3, 1fr); } }
.ach {
  position: relative;
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--card);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 0.8rem 0.9rem;
}
.ach-hex {
  width: 52px; height: 58px; flex: none;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: color-mix(in srgb, var(--muted) 22%, var(--bg));
  color: var(--muted);
  font-size: 1.5rem; font-weight: 800;
}
.ach.earned {
  border-color: var(--honey);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--honey) 22%, transparent);
}
.ach.earned .ach-hex {
  background: linear-gradient(160deg, #ffc94d, #e8960b);
  color: #221c12;
  font-size: 1.65rem;
}
.ach-body { flex: 1; min-width: 0; }
.ach-name { font-weight: 700; }
.ach:not(.earned) .ach-name { color: var(--muted); }
.ach-desc { color: var(--muted); font-size: 0.85rem; }
.ach-bar {
  height: 6px; margin-top: 0.45rem;
  background: color-mix(in srgb, var(--honey) 12%, var(--bg));
  border-radius: 999px; overflow: hidden;
}
.ach-progress { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }
.ach .reveal-tag {
  position: absolute; top: -0.6rem; right: 0.7rem;
  margin: 0;
}
.ach.fresh { animation: card-reveal 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.12) both; }
@media (prefers-reduced-motion: reduce) { .ach.fresh { animation: none; } }

/* ---------- таблиці: на мобілці скролляться всередині ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--card); min-width: 480px; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
th {
  color: var(--muted); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--honey) 8%, var(--card));
}

.badge {
  display: inline-block; padding: 0.12rem 0.6rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  border: 1px solid var(--border); color: var(--muted);
  white-space: nowrap;
}
.badge-confirmed { color: var(--ok); border-color: var(--ok); }
.badge-processing, .badge-pending { color: var(--warn); border-color: var(--warn); }
.badge-shipped { color: var(--honey-deep); border-color: var(--honey-deep); }
.badge-rejected { color: var(--bad); border-color: var(--bad); }
@media (prefers-color-scheme: dark) {
  .badge-shipped { color: var(--honey); border-color: var(--honey); }
}

/* ---------- магазин: підтвердження замовлення ---------- */
.confirm-dialog {
  border: 1px solid var(--honey); border-top: 4px solid var(--honey);
  border-radius: 16px;
  background: var(--card); color: var(--fg);
  padding: 1.4rem 1.5rem;
  max-width: min(90vw, 380px);
  text-align: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}
.confirm-dialog::backdrop {
  background: rgba(20, 16, 10, 0.55);
  backdrop-filter: blur(2px);
}
.confirm-icon { font-size: 2rem; margin-bottom: 0.3rem; }
.confirm-text { font-weight: 600; font-size: 1.05rem; margin: 0 0 1.1rem; }
.confirm-actions { display: flex; gap: 0.7rem; justify-content: center; }
.btn-ghost {
  background: none;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted);
  padding: 0.6rem 1.4rem; font-size: 1rem; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--muted); color: var(--fg); }

/* ---------- магазин: фільтр категорій ---------- */
.cat-filter {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.cat-filter label { color: var(--muted); font-size: 0.9rem; }
/* Нативний select — лише як no-JS fallback і носій значення форми */
.cat-select {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--fg);
  font-size: 1rem;
  min-width: 11rem;
}
.dd-native-hidden { display: none; }

/* Кастомний дропдаун у стилі «вулика» */
.dd { position: relative; min-width: 12.5rem; }
.dd-btn {
  width: 100%;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  font-size: 1rem; font-family: inherit;
  background: var(--card); color: var(--fg);
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dd-btn:hover { border-color: var(--honey); }
.dd.open .dd-btn {
  border-color: var(--honey);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 25%, transparent);
}
.dd-btn:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.dd-hex {
  width: 13px; height: 15px; flex: none;
  background: var(--honey);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.dd-label { flex: 1; text-align: left; font-weight: 600; }
.dd-arrow {
  width: 0.5rem; height: 0.5rem; flex: none;
  border-right: 2.5px solid var(--honey-deep);
  border-bottom: 2.5px solid var(--honey-deep);
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.2s ease;
}
.dd.open .dd-arrow { transform: rotate(225deg) translate(-1px, -1px); }
.dd-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  margin: 0; padding: 0.35rem; list-style: none;
  background: var(--card);
  border: 1px solid var(--border); border-top: 3px solid var(--honey);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  max-height: 55vh; overflow: auto;
  opacity: 0; transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.dd.open .dd-list { opacity: 1; transform: none; pointer-events: auto; }
.dd-item {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px; cursor: pointer;
}
.dd-item::before {
  content: "";
  width: 10px; height: 12px; flex: none;
  background: var(--border);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  transition: background 0.12s;
}
.dd-item:hover, .dd-item:focus-visible {
  background: color-mix(in srgb, var(--honey) 14%, transparent);
  outline: none;
}
.dd-item:hover::before, .dd-item:focus-visible::before { background: var(--honey); }
.dd-item.selected { font-weight: 700; }
.dd-item.selected::before { background: var(--honey); }
@media (prefers-reduced-motion: reduce) {
  .dd-list, .dd-arrow { transition: none; }
}

/* ---------- магазин: анімація розкриття нової позиції ---------- */
.card.reveal {
  border-color: var(--honey);
  animation: card-reveal 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.12) both;
}
@keyframes card-reveal {
  0% {
    transform: scale(0.55) rotate(-5deg);
    opacity: 0;
    filter: brightness(1.7) saturate(1.5);
    box-shadow: 0 0 0 rgba(242, 176, 36, 0);
  }
  45% {
    opacity: 1;
    filter: brightness(1.35);
    box-shadow: 0 0 42px rgba(242, 176, 36, 0.6);
  }
  60% { transform: scale(1.06) rotate(1.5deg); }
  78% { transform: scale(0.98) rotate(-0.6deg); }
  100% {
    transform: none;
    filter: none;
    box-shadow: 0 6px 20px rgba(242, 176, 36, 0.28);
  }
}
.reveal-tag {
  align-self: flex-start;
  background: var(--honey); color: #221c12;
  font-size: 0.75rem; font-weight: 700;
  border-radius: 999px; padding: 0.15rem 0.7rem;
  margin-bottom: 0.5rem;
  animation: reveal-tag-pulse 1.6s ease-in-out 1.1s 3;
}
@keyframes reveal-tag-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  .card.reveal, .reveal-tag { animation: none; }
}

/* ---------- магазин: приховані позиції ---------- */
.card.locked {
  border-style: dashed; border-color: var(--honey-deep);
  align-items: center; text-align: center;
  background:
    linear-gradient(color-mix(in srgb, var(--card) 88%, transparent),
                    color-mix(in srgb, var(--card) 88%, transparent)),
    url("/static/hex.svg") var(--card);
}
.lock-q {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--hive); color: var(--honey);
  font-size: 1.9rem; font-weight: 800;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  margin-bottom: 0.4rem;
}
.card.locked h3 { color: var(--muted); }
.card.locked .card-footer { width: 100%; }
.unlock-bar {
  width: 100%; height: 8px;
  background: color-mix(in srgb, var(--honey) 12%, var(--bg));
  border-radius: 999px; overflow: hidden; margin-bottom: 0.7rem;
}
.unlock-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #e8960b, #ffc94d);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.cat-tag {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 600;
  color: var(--honey-deep);
  border: 1px solid color-mix(in srgb, var(--honey) 45%, transparent);
  border-radius: 999px; padding: 0.05rem 0.55rem;
  margin-bottom: 0.45rem;
}
@media (prefers-color-scheme: dark) { .cat-tag { color: var(--honey); } }

/* ---------- магазин ---------- */
.shop-grid { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
@media (min-width: 540px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 1rem; display: flex; flex-direction: column;
}
.card.disabled { opacity: 0.55; }
.card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.card p { flex: 1; color: var(--muted); font-size: 0.9rem; margin: 0 0 0.8rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.card-footer form { display: flex; gap: 0.45rem; align-items: center; }
.card-footer button.primary { padding: 0.5rem 1rem; font-size: 0.92rem; }
.price { font-weight: 800; color: var(--honey-deep); }
@media (prefers-color-scheme: dark) { .price { color: var(--honey); } }
.qty {
  width: 3.6rem; padding: 0.45rem 0.3rem; text-align: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--fg); font-size: 1rem;
}

a { color: var(--honey-deep); }
@media (prefers-color-scheme: dark) { a { color: var(--honey); } }
