/* Doscoin дүкені — витрина. Ярче и игровее остальных страниц: аудитория 5–6 класс. */

/* ── шапка-баннер ── */
.shop-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; margin-bottom: 14px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(120deg, #2c9d62 0%, #35b16f 45%, #64c98f 100%);
  color: #fff; position: relative;
}
.shop-hero::after {                       /* мягкие «пузыри» на фоне */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.22) 0 42px, transparent 43px),
    radial-gradient(circle at 74% 82%, rgba(255,255,255,.14) 0 26px, transparent 27px),
    radial-gradient(circle at 96% 62%, rgba(255,255,255,.10) 0 18px, transparent 19px);
  pointer-events: none;
}
.hero-txt h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.hero-txt p { margin: 4px 0 0; font-size: 13.5px; opacity: .92; }
.hero-coin {
  width: 62px; height: 62px; position: relative; z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
  animation: coin-bob 2.6s ease-in-out infinite;
}
@keyframes coin-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@media (prefers-reduced-motion: reduce) { .hero-coin { animation: none } }

/* ── кошелёк ── */
.wallet { padding: 12px 18px; margin-bottom: 16px; }
.wallet-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.wallet .field { min-width: 220px; }
.wallet .field label { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.wallet select {
  font: inherit; font-size: 13.5px; padding: 8px 32px 8px 11px; border-radius: 10px;
  border: 1px solid var(--line); width: 100%;
}
.balance {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #fff6dd, #ffeec2);
  border: 1px solid #f0dda6; border-radius: 14px; padding: 7px 16px 7px 10px;
}
.balance img { width: 34px; height: 34px; }
.balance b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #7a5f1e; }
.balance small { font-size: 10.5px; color: #9a8250; }
.wallet-rank { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.wallet-hint { margin: 0; font-size: 13px; color: var(--ink-3); align-self: center; }

/* ── сетка товаров ── */
.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
}
.goods {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.goods:hover { transform: translateY(-3px); box-shadow: 0 10px 22px -12px rgba(16,22,19,.35); }
.goods.can { border-color: var(--green); }
.goods.no { opacity: .92; }
.goods.out { opacity: .6; filter: grayscale(.5); }

.goods-pic {
  position: relative; aspect-ratio: 1 / 1; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden;
}
.goods-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-pic { font-size: 46px; opacity: .5; }
.ribbon {
  position: absolute; top: 8px; left: 8px; font-size: 10.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: rgba(28,35,33,.78); color: #fff;
}
.ribbon.ok { background: var(--green); }
.qty {
  position: absolute; right: 8px; bottom: 8px; font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink-2);
}

.goods-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.goods-body h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.price { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.price img { width: 22px; height: 22px; }
.price b { font-size: 17px; font-weight: 800; color: #7a5f1e; font-variant-numeric: tabular-nums; }

/* прогресс «сколько ещё копить» */
.need {
  position: relative; height: 20px; border-radius: 999px; background: var(--surface-2);
  font-size: 10.5px; color: var(--ink-3); overflow: hidden;
  display: flex; align-items: center;
}
.need i { position: absolute; left: 0; top: 0; bottom: 0; background: #ffe2a8; border-radius: 999px; }
.need span { position: relative; padding: 0 9px; font-weight: 600; }
.need.ok { background: var(--ok-bg); color: var(--ok); font-weight: 700; padding: 0 9px; }
.need.out { background: var(--low-bg); color: var(--low); font-weight: 600; padding: 0 9px; }

.goods-admin { display: flex; gap: 6px; padding: 0 12px 12px; }
.goods-admin .btn { flex: 1; }

/* пусто */
.shop-empty {
  grid-column: 1 / -1; text-align: center; padding: 48px 20px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: 18px;
}
.se-ic { font-size: 44px; }
.shop-empty b { display: block; margin-top: 8px; font-size: 16px; }
.shop-empty span { font-size: 13px; color: var(--ink-3); }

/* ── админ-панель ── */
.admin-box { margin-top: 18px; padding: 16px 20px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.test-badge {
  font-size: 10px; font-weight: 600; letter-spacing: .03em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--mid-bg); color: var(--mid);
}
.admin-actions { display: flex; gap: 6px; }
.admin-actions .btn { cursor: pointer; }
.admin-form { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.pic-drop {
  width: 132px; height: 132px; flex-shrink: 0; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden;
  font-size: 12px; color: var(--ink-3); text-align: center;
}
.pic-drop:hover { border-color: var(--green); color: var(--green-dark); }
.pic-drop img { width: 100%; height: 100%; object-fit: cover; }
.admin-fields {
  flex: 1; min-width: 240px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 14px; align-items: end;
}
.admin-fields .field label { font-size: 11px; color: var(--ink-3); }
.admin-fields input {
  font: inherit; font-size: 13.5px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 10px; width: 100%;
}
.admin-fields input:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.admin-fields .field--btn { display: flex; flex-direction: row; gap: 6px; }
.admin-fields .field--btn .btn { flex: 1; }

@media (max-width: 640px) {
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .hero-coin { width: 46px; height: 46px; }
}
