/* Стилі плагіна shop — «Ярмарок і гардероб» */
.fox { overflow: visible; }

/* --- Пігулка на сторінці навчання --- */
.shop-top { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 20px; }
.shop-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; border-radius: 99px;
  font-size: 15px; font-weight: 600; color: var(--label);
  background: var(--glass-bg); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--glass-shadow);
  transition: transform .2s var(--ease); }
button.shop-pill:hover { transform: translateY(-1px); }
button.shop-pill:active { transform: scale(.97); }
.shop-pill > svg { width: 18px; height: 18px; color: var(--accent); }
.shop-pill b { display: inline-flex; align-items: center; gap: 3px; color: var(--teal); font-variant-numeric: tabular-nums; }
.shop-pill b svg { width: 14px; height: 14px; }
.shop-pill.boost { color: var(--orange); }
.shop-pill.boost b { color: var(--orange); }

/* --- Вітрина з бобром --- */
.shop-hero { display: flex; align-items: center; gap: 24px; padding: 22px 26px; margin: 0 0 26px; border-radius: 28px; position: relative; overflow: hidden;
  background: var(--glass-bg); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--glass-shadow); }
.shop-hero.has-bg::before { content: ""; position: absolute; inset: 0; background: var(--shop-bg); z-index: 0; }
.shop-hero > * { position: relative; z-index: 1; }
.shop-stage { width: 170px; flex: none; display: grid; place-items: center; padding-top: 6px; }
.shop-stage::after { content: ""; display: block; width: 120px; height: 14px; margin-top: -6px; border-radius: 50%; background: rgba(0, 0, 0, .12); filter: blur(3px); }
.shop-preview { width: 160px; height: auto; display: block; }
.shop-hero-info { flex: 1; min-width: 0; }
.shop-hero-info p { margin: 8px 0 12px; color: var(--label2); font-size: 15px; line-height: 1.4; }
.shop-wallet { display: inline-flex; align-items: baseline; gap: 6px; font-size: 15px; color: var(--label2); }
.shop-wallet svg { width: 24px; height: 24px; color: var(--teal); align-self: center; }
.shop-wallet b { font-size: 34px; font-weight: 700; color: var(--label); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.shop-hero.has-bg .shop-hero-info { background: rgba(255, 255, 255, .72); color: #1d1d1f; padding: 14px 16px; border-radius: 18px; }
.shop-hero.has-bg .shop-hero-info p, .shop-hero.has-bg .shop-wallet { color: rgba(29, 29, 31, .7); }
.shop-hero.has-bg .shop-wallet b { color: #1d1d1f; }
.shop-hero.has-bg.dark .shop-hero-info { background: rgba(10, 12, 30, .55); color: #fff; }
.shop-hero.has-bg.dark .shop-hero-info p, .shop-hero.has-bg.dark .shop-wallet { color: rgba(255, 255, 255, .75); }
.shop-hero.has-bg.dark .shop-wallet b { color: #fff; }
.shop-small { height: 38px; padding: 0 16px; font-size: 15px; }

/* --- Сітка товарів --- */
.shop-group { margin: 0 0 26px; }
.shop-h { font-size: 20px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.01em; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-grid.bonuses { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.shop-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px 14px; border-radius: 22px; text-align: center;
  background: var(--glass-bg); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--glass-shadow);
  transition: transform .25s var(--ease), box-shadow .25s; }
.shop-item:hover { transform: translateY(-2px); }
.shop-item.on { box-shadow: var(--glass-edge), inset 0 0 0 2px var(--accent), var(--glass-shadow); }
.shop-thumb { width: 92px; height: 68px; display: grid; place-items: center; border-radius: 16px; background: var(--fill); overflow: hidden; }
.shop-thumb svg { width: 100%; height: 100%; }
.shop-thumb.bg { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.shop-thumb.emoji { font-size: 40px; line-height: 1; }
.shop-name { font-size: 15px; font-weight: 600; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; overflow-wrap: anywhere; }
.shop-desc { font-size: 13px; color: var(--label2); line-height: 1.35; }
.shop-status { font-size: 13px; color: var(--label2); font-weight: 600; font-variant-numeric: tabular-nums; }
.shop-status b { color: var(--orange); }
.shop-btn { height: 38px; padding: 0 14px; font-size: 15px; width: 100%; gap: 5px; margin-top: auto; }
.shop-btn svg { width: 15px; height: 15px; }
.shop-btn.confirm { animation: shopPulse 1s ease-in-out infinite; }
.shop-hint { font-size: 12px; color: var(--label2); margin-top: -2px; }
.shop-badge { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
  background: var(--green-tint); color: var(--green); }
.shop-item.on .shop-badge { background: var(--accent); color: #fff; }
.shop-foot { color: var(--label2); font-size: 13px; text-align: center; margin: 4px 0 0; }
@keyframes shopPulse { 50% { transform: scale(1.04); } }

/* --- Профіль --- */
.shop-prof { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.shop-prof-fox { width: 64px; flex: none; }
.shop-prof p { margin: 0; color: var(--label2); font-size: 14px; }

/* --- Телефон --- */
@media (max-width: 700px) {
  .shop-top { margin: -8px 0 18px; }
  .shop-hero { flex-direction: column; text-align: center; gap: 10px; padding: 18px 16px; }
  .shop-stage { width: 140px; }
  .shop-preview { width: 132px; }
  .shop-hero-info { width: 100%; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-grid.bonuses { grid-template-columns: 1fr; }
  .shop-grid.bonuses .shop-item { display: grid; grid-template-columns: 56px 1fr; grid-template-areas: "ic n" "ic d" "ic s" "b b"; text-align: left; align-items: center; column-gap: 12px; row-gap: 4px; }
  .shop-grid.bonuses .shop-thumb { grid-area: ic; width: 56px; height: 56px; font-size: 30px; }
  .shop-grid.bonuses .shop-name { grid-area: n; min-height: 0; }
  .shop-grid.bonuses .shop-desc { grid-area: d; }
  .shop-grid.bonuses .shop-status { grid-area: s; }
  .shop-grid.bonuses .shop-btn { grid-column: 1 / -1; margin-top: 6px; }
  .shop-grid.bonuses .shop-hint { grid-column: 1 / -1; text-align: center; }
  .shop-item { padding: 14px 10px 12px; border-radius: 20px; }
  .shop-thumb { width: 84px; height: 62px; }
}
@media (prefers-reduced-motion: reduce) { .shop-btn.confirm { animation: none; } }
html.no-motion .shop-btn.confirm { animation: none; }

/* ---------- Тема «Боброве містечко» (town): ярмарок ---------- */
html[data-theme="town"] .shop-pill, html[data-theme="town"] .shop-hero, html[data-theme="town"] .shop-item {
  -webkit-backdrop-filter: none; backdrop-filter: none; border: 1.5px solid rgba(90, 60, 30, .18); box-shadow: 0 2px 0 rgba(90, 60, 30, .08); }
html[data-theme="town"] .shop-hero { border-radius: 22px; }
html[data-theme="town"] .shop-item { border-radius: 20px; }
html[data-theme="town"] .shop-item.on { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent), 0 2px 0 rgba(90, 60, 30, .08); }
html[data-theme="town"] .shop-thumb { border-radius: 14px; background: rgba(90, 60, 30, .06); }
html[data-theme="town"] .shop-pill b, html[data-theme="town"] .shop-wallet svg { color: #a0612b; }
html[data-theme="town"] .shop-hero.has-bg .shop-hero-info { border: 1.5px solid rgba(90, 60, 30, .18); }
