/* =========================================================
   Minishop — тема «Игровой интерфейс».
   Подключается после style.css. Чтобы вернуть прежний вид —
   удалите строку с theme.css в inc/layout.php.
   ========================================================= */
:root {
  --abyss: #061a2a;     /* фон */
  --reef: #0c2f44;      /* поверхности */
  --reef-2: #113d57;
  --cobalt: #1f6bff;    /* синий */
  --jade: #18e29a;      /* зелёный */
  --ice: #ddf6ff;       /* текст */
  --coin: #ffd23f;      /* цены, как игровая валюта */

  --bg: var(--abyss);
  --text: var(--ice);
  --text-2: #a9cfe0;
  --muted: #6f9bb3;
  --line: rgba(120, 220, 255, .14);
  --line-2: rgba(120, 230, 255, .28);
  --surface: rgba(12, 47, 68, .78);
  --surface-2: rgba(17, 61, 87, .85);
  --surface-solid: #0c2f44;
  --cyan: #3fe0ff;
  --green: var(--jade);
  --grad: linear-gradient(180deg, #2ff0b0 0%, #14c98a 100%);
  --grad-soft: linear-gradient(135deg, rgba(31,107,255,.2), rgba(24,226,154,.18));
  --glow: 0 0 0 transparent;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-h: 'Russo One', 'Nunito', system-ui, sans-serif;
  --cut: 14px;          /* скошенный угол */
  --cut-sm: 9px;
}

html, body { overflow-x: clip; }
body { font-weight: 600; }
h1, h2, h3, h4 { font-weight: 400; letter-spacing: .01em; }

/* ---------- Фон: соты ---------- */
.bg-fx .grid-fx {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64l28 16v32M28 64L0 80v32' fill='none' stroke='%233fe0ff' stroke-opacity='.07' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 10%, #000 20%, transparent 80%);
}
.orb { opacity: .32; filter: blur(110px); }
.o1 { background: #1f6bff; }
.o2 { background: #18e29a; opacity: .22; }
.o3 { background: #0a7ea8; }

/* ---------- Скошенные углы (главный приём темы) ---------- */
.pcard, .cat-card, .card, .step, .hero-stats div, .pstat, .buy-box, .ptabs, .cart-row,
.checkout, .order-row, .empty, .login-card, .doc, .doc-nav, .paybox, .timer, .chat-card,
.review-card, .profile-hero, .product-media, .drop-panel, .user-panel {
  border-radius: 0 !important;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  border: 0 !important;
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.drop-panel, .user-panel { clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm)); }
/* «уголки» как в игровом интерфейсе */
.pcard, .cat-card, .buy-box, .checkout { position: relative; }
.pcard::after, .buy-box::after, .checkout::after {
  content: ''; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; pointer-events: none;
  background: linear-gradient(135deg, transparent 50%, var(--jade) 50%, var(--jade) calc(50% + 2px), transparent calc(50% + 2px));
}

/* ---------- Кнопки: объёмные, «нажимаются» ---------- */
.btn {
  border-radius: 0 !important; border: 0;
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
  font-family: var(--font-h); font-weight: 400; letter-spacing: .02em;
  transition: transform .08s, filter .2s, box-shadow .08s;
}
.btn-primary {
  background: var(--grad); color: #04261b;
  box-shadow: inset 0 -5px 0 rgba(0, 70, 45, .45), inset 0 2px 0 rgba(255,255,255,.45);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:hover { color: #04261b; filter: brightness(1.08); transform: translateY(-1px); background: var(--grad); }
.btn-primary:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,70,45,.45), inset 0 2px 0 rgba(255,255,255,.35); }
.btn-ghost { background: rgba(31,107,255,.14); color: var(--ice); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -4px 0 rgba(0,0,0,.25); }
.btn-ghost:hover { background: rgba(31,107,255,.24); color: var(--ice); border: 0; }
.btn-tg { background: linear-gradient(180deg, #3aa8ff, #1f6bff); box-shadow: inset 0 -5px 0 rgba(0,20,90,.4), inset 0 2px 0 rgba(255,255,255,.35); }
.btn-light { background: var(--ice); color: #052234; box-shadow: inset 0 -5px 0 rgba(0,40,70,.25); }
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible { outline: 3px solid var(--coin); outline-offset: 3px; }

.icon-btn { border-radius: 0; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); border: 0; box-shadow: inset 0 0 0 1px var(--line-2); background: rgba(31,107,255,.12); }
.cart-count { background: var(--coin); color: #3a2a00; box-shadow: 0 0 0 3px var(--abyss); border-radius: 4px; }

/* ---------- Шапка ---------- */
.header { background: rgba(6, 26, 42, .86); border-bottom: 2px solid rgba(24,226,154,.25); }
.logo { font-family: var(--font-h); font-weight: 400; letter-spacing: .02em; }
.logo-mark { border-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); box-shadow: none; }
.nav-link { font-weight: 700; border-radius: 0; }
.nav-link.active, .nav-link:hover { background: transparent; color: var(--ice); box-shadow: inset 0 -3px 0 var(--jade); }
.user-chip { border-radius: 0; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.avatar { border-radius: 0 !important; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }

/* ---------- Подписи без капса ---------- */
.eyebrow, .pcard-cat, .pstat-label, .role, .msg-who {
  text-transform: none !important; letter-spacing: 0 !important;
}
.eyebrow { border-radius: 0; background: transparent; border: 0; padding: 0; color: var(--jade); font-size: 14px; }
.pcard-cat { color: var(--cyan); font-size: 13px; font-weight: 800; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 36px; }
.live { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; color: var(--jade); font-weight: 800; font-size: 15px; }
.title-3d {
  font-family: var(--font-h); font-size: clamp(34px, 5.6vw, 68px); line-height: 1.04; color: var(--ice);
  text-shadow: 0 1px 0 #9fd7ea, 0 2px 0 #6fb6d0, 0 3px 0 #3f8fb0, 0 4px 0 #1f6a8a, 0 5px 0 #0f4a66, 0 10px 18px rgba(0,0,0,.55);
  max-width: 13ch;
}
.lead { font-weight: 600; }
.hero-stats div { background: var(--surface); }
.hero-stats b { font-family: var(--font-h); font-weight: 400; color: var(--coin); }
.float-card { border-radius: 0; border: 0; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); box-shadow: inset 0 0 0 1px var(--line-2); background: rgba(9, 38, 58, .92); }
.float-card .ic { border-radius: 0; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.art-ring { border-color: rgba(63,224,255,.25); }

/* ---------- Бегущая строка ---------- */
.ticker { position: relative; z-index: 1; overflow: hidden; background: var(--jade); color: #04261b; transform: rotate(-1.2deg); margin: 18px 0 10px; box-shadow: 0 10px 30px -10px rgba(24,226,154,.5); }
.ticker-track { display: flex; gap: 42px; width: max-content; padding: 12px 0; animation: ticker 38s linear infinite; font-family: var(--font-h); font-size: 16px; white-space: nowrap; }
.ticker-track span { display: inline-flex; align-items: center; gap: 10px; }
.ticker .ic { color: #04261b; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Категории ---------- */
.cat-card { background: linear-gradient(160deg, #0f4766 0%, #0b2a40 70%) !important; min-height: 300px; }
.cat-card.v1 { background: linear-gradient(160deg, #0b5a4a 0%, #0b2a40 70%) !important; }
.cat-card::before { opacity: .22; border-radius: 0; transform: rotate(45deg); width: 220px; height: 220px; right: -70px; top: -70px; filter: blur(0); background: repeating-linear-gradient(45deg, rgba(63,224,255,.25) 0 2px, transparent 2px 14px); }
.cat-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--jade); }
.cat-ic { border-radius: 0; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); box-shadow: none; }
.cat-card h3 { font-size: 28px; }
.chip { border-radius: 0; border: 0; background: rgba(6,26,42,.55); box-shadow: inset 0 0 0 1px var(--line-2); }
.cat-go { font-family: var(--font-h); font-weight: 400; color: var(--jade); }

/* ---------- Карточки товаров ---------- */
.pcard { background: var(--surface); }
.pcard:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--jade); }
.pcard-media { background: #0b2c42; }
.pcard-ph { background: radial-gradient(circle at 50% 60%, rgba(24,226,154,.35), transparent 60%), linear-gradient(160deg, #0f4766, #0a2b3f); }
.badge, .badge-lg {
  border-radius: 0; background: var(--coin); color: #3a2a00; font-weight: 900; box-shadow: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
  padding-right: 18px; left: 0 !important; top: 14px !important;
}
.pcard-title { font-weight: 800; }
.price-now { font-family: var(--font-h); font-weight: 400; color: var(--coin); }
.price-old { font-weight: 600; }
.discount { border-radius: 0; background: rgba(24,226,154,.18); }

/* ---------- Шаги ---------- */
.step > .ic { border-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); border: 0; background: rgba(31,107,255,.22); }
.step-n { font-family: var(--font-h); font-weight: 400; color: rgba(24,226,154,.12); }

.cta-band { border-radius: 0; clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px); background: linear-gradient(120deg, #1f6bff, #18e29a); }
.cta-band::after { border-radius: 0; transform: rotate(45deg); border-width: 30px; }
.cta-band h2 { font-family: var(--font-h); }

/* ---------- Формы ---------- */
input[type=text], input[type=number], input[type=email], input[type=password], input:not([type]), textarea, select, .copy-input {
  border-radius: 0 !important; background-color: rgba(3, 16, 26, .55);
}
.tab { border-radius: 0; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.tab.active { background: var(--jade); color: #04261b; box-shadow: none; }
.qty { border-radius: 0; }
.pay-radio, .pay-opt, .chip-btn, .file-pick { border-radius: 0; }
.pay-ic, .pstat-ic, .timer-ic, .chat-ic, .review-ic, .empty-ic, .page-hero-ic, .login-ic, .drop-ic, .stat-ic {
  border-radius: 0 !important; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.status, .role { border-radius: 0; }
.bubble { border-radius: 0 !important; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); border: 0; box-shadow: inset 0 0 0 1px var(--line); }
.ptabs-head button.active::after { border-radius: 0; background: var(--jade); }
.pstep.on span { background: var(--jade); color: #04261b; }
.pstep span { border-radius: 0; transform: rotate(45deg); }
.pstep span > * , .pstep span { font-family: var(--font-h); }
.pstep span { display: grid; place-items: center; }
.pstep span .ic, .pstep span { line-height: 1; }
.timer-value, .timer [data-timer-value], .sum-row.total b, .pstat b, .cart-sum, .order-row > b { font-family: var(--font-h); font-weight: 400; }
.pstat-balance b { color: var(--coin); }

/* ---------- Подвал ---------- */
.footer { border-top: 2px solid rgba(24,226,154,.25); background: #04131f; }
.footer h4 { text-transform: none; letter-spacing: 0; font-family: var(--font-h); font-weight: 400; font-size: 16px; }
.footer-badges span { border-radius: 0; border: 0; box-shadow: inset 0 0 0 1px var(--line); }

.toast { border-radius: 0; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); border: 0; box-shadow: inset 0 0 0 1px var(--jade); }
.alert { border-radius: 0; }
.pagination a { border-radius: 0; }
.pagination a.active { background: var(--jade); color: #04261b; }

@media (max-width: 900px) { .hero-art { max-width: 270px; } }
@media (max-width: 620px) {
  .title-3d { font-size: 34px; text-shadow: 0 1px 0 #6fb6d0, 0 2px 0 #3f8fb0, 0 3px 0 #1f6a8a, 0 6px 12px rgba(0,0,0,.5); }
  .ticker-track { font-size: 14px; }
  .cat-card h3 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* Шапка на узких экранах: значок чата + корзина + профиль + меню */
@media (max-width: 620px) {
  .header-actions { gap: 6px; }
  .header .icon-btn, .header .user-chip { width: 40px; height: 40px; }
  .header .user-chip { padding: 0; justify-content: center; }
  .header .user-chip > .ic { display: none; }
  .header .avatar { width: 30px; height: 30px; }
}
@media (max-width: 430px) {
  .header .logo-text { display: none; }
}

/* Декоративная стрелка на плашке «Остались вопросы?» не должна перекрывать кнопку */
.cta-band::after { pointer-events: none; z-index: 0; }
.cta-band > * { position: relative; z-index: 1; }

/* ---------- Авто-выдача ---------- */
.auto-badge { position: absolute; top: 14px; right: 0; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 14px; background: var(--cyan); color: #032330; font-weight: 900; font-size: 12.5px; clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 50%); }
.auto-badge.lg { top: 18px; font-size: 14px; padding: 7px 14px 7px 18px; }
.stock { display: inline-block; margin: -4px 0 10px; font-size: 13px; font-weight: 800; color: var(--jade); }
.stock.out { color: var(--bad); }
.auto-info { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; font-weight: 700; background: rgba(63,224,255,.08); box-shadow: inset 0 0 0 1px rgba(63,224,255,.35); }
.auto-info.out { background: rgba(255,107,129,.08); box-shadow: inset 0 0 0 1px rgba(255,107,129,.35); color: #ffb3bf; }
.auto-inline { color: var(--cyan); font-weight: 700; }
.auto-note { display: flex; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 14px; font-weight: 700; font-size: 14px; background: rgba(63,224,255,.08); box-shadow: inset 0 0 0 1px rgba(63,224,255,.35); }
.pcard .btn:disabled { filter: grayscale(1); opacity: .5; cursor: not-allowed; }
.issued { margin: 0 0 22px; padding: 16px 18px; background: rgba(24,226,154,.07); box-shadow: inset 0 0 0 1px rgba(24,226,154,.4); }
.issued h3 { font-size: 17px; margin-bottom: 8px; }
.issued-name { font-weight: 800; margin: 8px 0 4px; color: var(--text-2); }
.issued-line { display: block; margin-bottom: 6px; padding: 8px 10px; background: rgba(0,0,0,.3); font-size: 14px; word-break: break-all; cursor: copy; }
.issued-line.copied { box-shadow: inset 0 0 0 1px var(--jade); }

/* Подписи сотрудников в чатах: Админ — золотой, Продавец N — бирюзовый */
.msg-who.who-admin, b.who-admin { color: var(--coin) !important; }
.msg-who.who-seller, b.who-seller { color: var(--cyan) !important; }
.msg.msg-role-admin .bubble { box-shadow: inset 0 0 0 1px rgba(255,210,63,.55); background: linear-gradient(135deg, rgba(255,210,63,.12), rgba(12,47,68,.85)); }
.msg.msg-role-admin .msg-text { color: #fff3c4; }

/* Промокод в корзине */
.promo-form { display: flex; gap: 8px; margin: -4px 0 16px; }
.promo-form input { flex: 1; text-transform: uppercase; }
.promo-row span { display: flex; align-items: center; gap: 6px; color: var(--jade); font-weight: 800; }
.link-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 4px; }
.link-x:hover { color: var(--bad); }

/* Иконки-картинки категорий */
.cat-icon-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cat-ic.has-img, .page-hero-ic.has-img, .drop-ic.has-img { background: transparent !important; box-shadow: none !important; clip-path: none !important; padding: 0; border: 0 !important; }
.cat-ic.has-img { width: 76px; height: 76px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.page-hero-ic.has-img { width: 84px; height: 84px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.drop-ic.has-img { width: 36px; height: 36px; }
.m-cat-ic { width: 26px; height: 26px; display: inline-grid; place-items: center; flex: none; }
.m-cat-ic .cat-icon-img { width: 26px; height: 26px; }
.cat-ic.has-img .cat-icon-img, .page-hero-ic.has-img .cat-icon-img { border-radius: 16px; }
.drop-ic.has-img .cat-icon-img, .m-cat-ic .cat-icon-img { border-radius: 7px; }
