/* ---------- Магазин: витрина ---------- */
.shop-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.shop-hero__text { flex: 1 1 380px; min-width: 0; }
.shop-hero__eyebrow { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: 11.5px;
    font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: var(--brand-light); }
.shop-hero__title { margin: 0 0 8px; font-size: clamp(26px, 4vw, 34px); }
.shop-hero__lead { margin: 0 0 12px; max-width: 62ch; color: var(--muted); }
.shop-hero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.shop-fact { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
    font-size: 12.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); }
.shop-fact i { color: var(--accent); }
.shop-hero__side { display: grid; gap: 10px; flex: 0 1 260px; }

.shop-balance { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
    background: linear-gradient(150deg, rgba(99, 176, 74, .14), rgba(99, 176, 74, 0) 62%), var(--panel); }
.shop-balance__label { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.shop-balance__value { font-size: 23px; font-weight: 800; line-height: 1.15; color: var(--accent); }
.shop-balance__link { font-size: 13px; color: var(--brand-light); }

.shop-cartlink { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
    background: var(--panel); border: 1px solid var(--line); font-weight: 700; transition: border-color .15s ease, transform .15s ease; }
.shop-cartlink:hover { border-color: var(--brand-light); color: var(--text); transform: translateY(-2px); }
.shop-cartlink > i { color: var(--brand-light); font-size: 16px; }
.shop-cartlink > span { flex: 1; }
.shop-cartlink em { font-style: normal; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 800;
    background: var(--accent); color: #10130f; font-variant-numeric: tabular-nums; }
.shop-cartlink em.is-empty { background: var(--panel-2); color: var(--muted); }

/* раскладка: разделы слева, товары справа */
.shop { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.shop__side { display: grid; gap: 12px; position: sticky; top: 88px; }
.shop__main { min-width: 0; }

.shop-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.shop-panel__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 11.5px; font-weight: 800;
    letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.shop-panel__title i { color: var(--brand-light); }
.shop-panel__foot { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.shop-panel__foot a { color: var(--brand-light); }
.shop-steps { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.shop-steps li::marker { color: var(--brand-light); font-weight: 800; }

.shop-cat { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; font-size: 14.5px;
    color: var(--text); border: 1px solid transparent; transition: background .15s ease, border-color .15s ease; }
.shop-cat + .shop-cat { margin-top: 2px; }
.shop-cat i { width: 16px; flex: none; text-align: center; font-size: 13px; font-style: normal; color: var(--muted); }
.shop-cat span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-cat em { flex: none; font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.shop-cat:hover { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.shop-cat.is-active { color: #fff; font-weight: 700; border-color: rgba(139, 92, 246, .5);
    background: linear-gradient(135deg, rgba(139, 92, 246, .24), rgba(108, 63, 245, .08)); }
.shop-cat.is-active i, .shop-cat.is-active em { color: var(--brand-light); }
.shop-cat--sub { padding-left: 24px; font-size: 13.5px; }

/* панель фильтров над сеткой */
.shop-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.shop-bar label, .shop-bar .shop-seg { display: grid; gap: 6px; margin: 0; }
.shop-bar__search { flex: 1 1 240px; min-width: 0; }
.shop-bar__box { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: var(--radius);
    background: var(--panel-2); border: 1px solid var(--line); transition: border-color .15s ease, box-shadow .15s ease; }
.shop-bar__box i { flex: none; font-size: 13px; color: var(--muted); }
.shop-bar__box input { width: 100%; min-height: 0; padding: 9px 0; border: 0; background: transparent; }
.shop-bar__box input:focus { outline: none; box-shadow: none; }
.shop-bar__box:focus-within { border-color: var(--brand-light); box-shadow: var(--ring); }
.shop-bar__sort { flex: 0 1 190px; }
.shop-bar__actions { display: flex; gap: 8px; }

/* сегментированный переключатель оплаты: скрытый radio + подписи-таблетки */
.shop-seg { flex: 0 1 auto; }
.shop-seg__row { display: inline-flex; gap: 3px; padding: 3px; border-radius: 12px;
    background: var(--panel-2); border: 1px solid var(--line); }
.shop-seg label { display: inline-flex; }
.shop-seg input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.shop-seg label span { padding: 6px 12px; border-radius: 9px; font-size: 13px; color: var(--muted);
    cursor: pointer; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.shop-seg label span:hover { color: var(--text); }
.shop-seg input:checked + span { color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--brand-light), var(--brand)); }
.shop-seg input:focus-visible + span { outline: 2px solid var(--brand-light); outline-offset: 2px; }

.shop-found { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); }
.shop-found b { color: var(--text); }

/* сетка и карточка товара */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 9px; padding: 14px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.pcard:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, .6);
    box-shadow: 0 18px 34px -22px rgba(108, 63, 245, .9); }
.pcard__media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px;
    background: radial-gradient(circle at 50% 55%, rgba(139, 92, 246, .18), rgba(139, 92, 246, 0) 62%), var(--panel-2); }
.pcard__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.pcard:hover .pcard__media img { transform: scale(1.06); }
.pcard__placeholder { display: grid; place-items: center; width: 100%; height: 100%; font-size: 40px; color: var(--muted); }
.pcard__glow { position: absolute; left: 14%; right: 14%; bottom: 9%; height: 22%; border-radius: 50%; filter: blur(15px);
    background: radial-gradient(circle, rgba(139, 92, 246, .45), rgba(139, 92, 246, 0) 70%);
    opacity: 0; transition: opacity .25s ease; }
.pcard:hover .pcard__glow { opacity: 1; }

.pcard__tags { position: absolute; top: 22px; left: 22px; z-index: 2; display: flex; flex-direction: column;
    align-items: flex-start; gap: 6px; }
.pcard__badge { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
    color: #10130f; background: linear-gradient(135deg, #f0c483, #e0a33c); }
.pcard__sale { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--danger); }
.pcard__pay { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #8fbdf0;
    background: rgba(96, 156, 224, .16); border: 1px solid rgba(96, 156, 224, .4); }

.pcard__title { margin: 0; font-size: 15.5px; line-height: 1.3; }
.pcard__desc { margin: 0; min-height: 3.1em; font-size: 13px; line-height: 1.55; color: var(--muted); }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.pcard__price { font-size: 18px; font-weight: 800; color: var(--accent); }
.pcard__old { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.pcard__buy { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 11px; border: 0;
    cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: #10130f; background: var(--accent);
    transition: background .15s ease, transform .15s ease; }
.pcard__buy:hover { background: var(--accent-dark); transform: translateY(-1px); }
.pcard__buy:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }
.pcard__stock { margin: -4px 0 0; font-size: 11.5px; color: var(--muted); }
.pcard--out { opacity: .7; }
.pcard--out .pcard__media { filter: grayscale(.75); }
.pcard__out-label { font-size: 13px; font-weight: 700; color: var(--muted); }

.shop-empty { text-align: center; padding: 46px 18px; border-radius: 16px;
    background: var(--panel); border: 1px dashed var(--line); }
.shop-empty__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 12px;
    border-radius: 16px; font-size: 21px; color: var(--brand-light);
    background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .35); }
.shop-empty h2 { margin: 0 0 6px; font-size: 19px; }
.shop-empty p { margin: 0 auto 16px; max-width: 46ch; }

@media (max-width: 980px) {
    .shop { grid-template-columns: 1fr; }
    .shop__side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 640px) {
    .shop__side { grid-template-columns: 1fr; }
    .pcard__desc { min-height: 0; }
    .shop-bar__sort { flex: 1 1 100%; }
}
.log {
    white-space: pre-wrap; word-break: break-word; background: var(--panel-2); padding: 10px 12px;
    border-radius: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
}

