/* walkthroughs-shop — landing page. Scoped to .ws-shop.
   Theme: walkthroughs.games dark (background near-black + red/orange accent #ef4444) */

:root {
    --ws-bg-deep: #0e0f12;
    --ws-surface: #15171c;
    --ws-surface-2: #1c1f26;
    --ws-surface-3: #232831;
    --ws-border: rgba(255,255,255,.08);
    --ws-border-strong: rgba(255,255,255,.18);
    --ws-text: #f1f1f3;
    --ws-text-muted: rgba(255,255,255,.6);
    --ws-text-dim: rgba(255,255,255,.35);
    --ws-accent: #ef4444;
    --ws-accent-hover: #f87171;
    --ws-accent-soft: rgba(239,68,68,.12);
    --ws-success: #34d399;
}

.ws-shop {
    max-width: 1200px;
    margin: 2rem auto 3rem;
    padding: 0 1rem;
    color: var(--ws-text);
}
.ws-shop__hero-title,
.ws-shop__grid-title {
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    font-weight: 800;
    margin: 0 0 1.25rem;
    letter-spacing: -.01em;
    text-transform: uppercase;
    color: #fff;
}
.ws-shop__hero-title-accent { color: var(--ws-accent); }
.ws-shop__grid-title-accent { color: var(--ws-accent); }

/* Hero shell */
.ws-shop__hero-card {
    padding: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--ws-surface) 0%, var(--ws-surface-2) 100%);
    border: 1px solid var(--ws-border);
    margin-bottom: 3rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

/* ===== Steam form — 2-column layout ===== */
.ws-steam-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 900px) {
    .ws-steam-form__grid {
        grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    }
}

.ws-steam-form__left { display: flex; flex-direction: column; min-width: 0; }
.ws-steam-form__header {
    display: flex; align-items: flex-start; gap: 1rem;
    flex-direction: column;
    margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
    .ws-steam-form__header { flex-direction: row; align-items: center; }
}
.ws-steam-form__logo {
    width: 96px; height: 96px; flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #1b2838 0%, #0f1620 100%);
    border: 1px solid rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: center;
}
.ws-steam-form__logo img { width: 70px; height: 70px; object-fit: contain; }
.ws-steam-form__logo-fallback {
    font-weight: 800; font-size: 1rem;
    color: #66c0f4; letter-spacing: .12em;
}

.ws-steam-form__heading { display: flex; flex-direction: column; gap: .4rem; }
.ws-steam-form__title { font-size: 1.5rem; font-weight: 700; margin: 0; color: #fff; line-height: 1.2; }
.ws-steam-form__tag {
    display: inline-flex; align-items: center; gap: .35rem;
    align-self: flex-start;
    padding: .3rem .65rem;
    background: var(--ws-accent-soft);
    border: 1px solid rgba(239,68,68,.3);
    border-radius: 999px;
    font-size: .75rem; font-weight: 600; color: var(--ws-accent);
    letter-spacing: .02em;
}
.ws-steam-form__subtitle { font-size: .9375rem; color: var(--ws-text-muted); margin: 0; }

.ws-steam-form__label {
    display: block;
    font-size: .8125rem;
    color: var(--ws-text-muted);
    margin: 1rem 0 .4rem;
    font-weight: 500;
}
.ws-steam-form__input {
    width: 100%;
    padding: .85rem 1rem;
    background: var(--ws-surface-3);
    border: 1px solid var(--ws-border);
    border-radius: 10px;
    color: #fff; font-size: .9375rem;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
}
.ws-steam-form__input:hover { border-color: var(--ws-border-strong); }
.ws-steam-form__input:focus {
    outline: none;
    border-color: var(--ws-accent);
    background: var(--ws-surface-2);
}
.ws-steam-form__input::placeholder { color: var(--ws-text-dim); }
.ws-steam-form__hint {
    font-size: .75rem;
    color: var(--ws-text-dim);
    margin: .4rem 0 0;
}

.ws-steam-form__amount-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}
@media (min-width: 500px) {
    .ws-steam-form__amount-row { grid-template-columns: 1fr 1fr; }
}
.ws-steam-form__payout-box {
    padding: .85rem 1rem;
    background: var(--ws-surface-3);
    border: 1px solid var(--ws-border);
    border-radius: 10px;
    color: #fff; font-size: .9375rem; font-weight: 600;
    display: flex; align-items: center; gap: .5rem;
    min-height: 1.18rem;
}

.ws-steam-form__quick-picks {
    margin-top: 1rem;
    display: flex; flex-wrap: wrap; gap: .5rem;
}
.ws-steam-form__quick-btn {
    padding: .5rem .9rem;
    background: var(--ws-surface-3);
    border: 1px solid var(--ws-border);
    border-radius: 10px;
    color: var(--ws-text); font-size: .8125rem; font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.ws-steam-form__quick-btn:hover {
    border-color: var(--ws-accent);
    color: #fff;
}
.ws-steam-form__quick-btn.is-active {
    background: var(--ws-accent-soft);
    border-color: var(--ws-accent);
    color: var(--ws-accent);
}

/* RIGHT COLUMN — payment summary */
.ws-steam-form__right {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex; flex-direction: column;
    height: fit-content;
}
.ws-steam-form__summary-title {
    font-size: 1.125rem; font-weight: 700; margin: 0 0 1rem;
    color: #fff;
}
.ws-steam-form__info-box {
    display: flex; align-items: flex-start; gap: .65rem;
    background: var(--ws-accent-soft);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 10px;
    padding: .75rem .9rem;
    margin-bottom: 1.25rem;
}
.ws-steam-form__info-box > span {
    color: var(--ws-accent);
    font-size: 1rem; flex-shrink: 0; line-height: 1.2;
}
.ws-steam-form__info-box > p { margin: 0; font-size: .8125rem; color: var(--ws-text-muted); line-height: 1.4; }

.ws-steam-form__summary-list {
    list-style: none; padding: 0;
    margin: 0 0 1.25rem;
    display: flex; flex-direction: column; gap: .65rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ws-border);
}
.ws-steam-form__summary-list li {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: .9375rem;
}
.ws-steam-form__summary-list li > span { color: var(--ws-text-muted); }
.ws-steam-form__summary-list li > strong { color: #fff; font-weight: 600; font-size: 1rem; }
.ws-steam-form__cashback { color: var(--ws-success) !important; }

.ws-steam-form__payment-section { margin-bottom: 1.25rem; }
.ws-steam-form__payment-label {
    font-size: .8125rem; font-weight: 500;
    color: var(--ws-text-muted);
    margin: 0 0 .5rem;
}
.ws-steam-form__payment-methods {
    display: flex; gap: .25rem; padding: .25rem;
    background: var(--ws-surface-3); border-radius: 10px;
    border: 1px solid var(--ws-border);
}
.ws-steam-form__pay-btn {
    flex: 1; height: 48px;
    background: transparent; border: 0; cursor: pointer;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .15s;
    position: relative;
}
.ws-steam-form__pay-btn:hover:not(.is-active) { background: rgba(255,255,255,.04); }
.ws-steam-form__pay-btn.is-active {
    background: var(--ws-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* SBP / МИР — full-color brand marks straight on the dark pay buttons (no chip):
 * СБП is the multi-color icon, МИР the green/blue wordmark — both read on dark.
 * Selection is shown by the active button's bg + full opacity. */
.ws-steam-form__pay-logo {
    display: block;
    width: auto;
    object-fit: contain;
    opacity: .6;
    transition: opacity .15s;
}
.ws-steam-form__pay-logo--sbp { height: 30px; }
.ws-steam-form__pay-logo--mir { height: 22px; }
.ws-steam-form__pay-btn:hover .ws-steam-form__pay-logo { opacity: .85; }
.ws-steam-form__pay-btn.is-active .ws-steam-form__pay-logo { opacity: 1; }

/* Submit */
.ws-steam-form__submit {
    width: 100%;
    height: 48px;
    border: 0;
    background: linear-gradient(135deg, var(--ws-accent) 0%, #dc2626 100%);
    color: #fff;
    border-radius: 10px;
    font-weight: 700; font-size: .9375rem;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(239,68,68,.4), 0 8px 24px rgba(239,68,68,.18);
    transition: filter .15s, transform .15s, opacity .15s;
}
.ws-steam-form__submit:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.ws-steam-form__submit:disabled {
    opacity: .4; cursor: not-allowed;
    background: var(--ws-surface-3);
    box-shadow: none;
}

.ws-steam-form__terms {
    display: flex; align-items: flex-start; gap: .5rem;
    margin-top: 1rem;
    font-size: .75rem; color: var(--ws-text-muted);
    cursor: pointer;
    line-height: 1.4;
}
.ws-steam-form__terms input[type="checkbox"] {
    width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px;
    accent-color: var(--ws-accent); cursor: pointer;
}
.ws-steam-form__terms a { color: var(--ws-text); text-decoration: underline; text-underline-offset: 2px; }
.ws-steam-form__terms a:hover { color: var(--ws-accent); }

/* ===== Game grid ===== */
.ws-shop__grid-section { margin-top: 2rem; }
.ws-shop__grid {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.ws-shop__grid-card {
    border: 1px solid var(--ws-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--ws-surface);
    transition: transform .2s ease, border-color .2s;
}
.ws-shop__grid-card:hover {
    border-color: var(--ws-border-strong);
    transform: translateY(-2px);
}
.ws-shop__grid-card.is-expanded {
    grid-column: 1 / -1;
    transform: none;
    border-color: rgba(239,68,68,.3);
}
/* Expanded card spans full width, which would balloon / awkwardly crop the 1:1 cover —
   so hide the big cover entirely when expanded. The small 80px cover by the form title stays. */
.ws-shop__grid-card.is-expanded .ws-shop__card-image {
    display: none;
}

.ws-shop__card-trigger {
    width: 100%;
    padding: 0;
    background: transparent;
    color: inherit;
    border: 0;
    cursor: pointer;
    display: flex; flex-direction: column;
}
.ws-shop__card-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--ws-surface-2);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}
.ws-shop__card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.ws-shop__card-image-fallback {
    /* Color cards by slug — generated bg + game name overlay */
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    font-weight: 800; font-size: 1.05rem;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
/* Per-slug gradient backgrounds for fallback covers */
.ws-card-bg-genshin-impact-ru { background: linear-gradient(135deg, #5b48a5 0%, #c084fc 100%); }
.ws-card-bg-honkai-star-rail-ru { background: linear-gradient(135deg, #1e3a8a 0%, #ec4899 100%); }
.ws-card-bg-zenless-zone-zero-ru { background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%); color: #1a1a1a !important; }
.ws-card-bg-mobile-legends-ru { background: linear-gradient(135deg, #7c3aed 0%, #0ea5e9 100%); }
.ws-card-bg-mobile-legends-global { background: linear-gradient(135deg, #7c3aed 0%, #0ea5e9 100%); }
.ws-card-bg-pubg-mobile { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.ws-card-bg-garena-free-fire { background: linear-gradient(135deg, #f97316 0%, #dc2626 100%); }
.ws-card-bg-marvel-rivals { background: linear-gradient(135deg, #dc2626 0%, #7c2d12 100%); }
.ws-card-bg-honor-of-kings { background: linear-gradient(135deg, #fbbf24 0%, #b91c1c 100%); }
.ws-card-bg-stumble-guys { background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%); }

.ws-shop__card-name {
    padding: .75rem 1rem;
    font-size: .9375rem; font-weight: 600;
    margin: 0;
    text-align: left;
    color: var(--ws-text);
}

/* Expanded card form container */
.ws-shop__form-container {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease;
}
.is-expanded .ws-shop__form-container { grid-template-rows: 1fr; }
.ws-shop__form-inner {
    overflow: hidden;
    min-height: 0;
}
/* Padding/bg/border only when expanded — otherwise the 0fr grid row zeroes content
   height but NOT padding, so a ~40px strip peeks below the collapsed card. */
.is-expanded .ws-shop__form-inner {
    padding: 1.25rem;
    background: var(--ws-surface-2);
    border-top: 1px solid var(--ws-border);
}

/* ===== Expanded game form — 2-col like Steam ===== */
.ws-game-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 900px) {
    .ws-game-form__grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
    }
}
.ws-game-form__left { display: flex; flex-direction: column; min-width: 0; }
.ws-game-form__header {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.25rem;
}
.ws-game-form__cover {
    width: 80px; height: 80px; flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--ws-surface-3);
    display: flex; align-items: center; justify-content: center;
}
.ws-game-form__cover img { width: 100%; height: 100%; object-fit: cover; }
.ws-game-form__cover-text {
    color: #fff; font-weight: 700; font-size: .75rem;
    text-align: center; padding: .25rem; line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.ws-game-form__heading { display: flex; flex-direction: column; gap: .25rem; }
.ws-game-form__title {
    font-size: 1.25rem; font-weight: 700; margin: 0; color: #fff; line-height: 1.2;
}
.ws-game-form__subtitle {
    font-size: .8125rem; color: var(--ws-text-muted); margin: 0;
}

.ws-game-form__label {
    display: block; font-size: .8125rem; color: var(--ws-text-muted);
    margin: .85rem 0 .35rem; font-weight: 500;
}
.ws-game-form__input {
    width: 100%;
    padding: .75rem .9rem;
    background: var(--ws-surface-3);
    border: 1px solid var(--ws-border);
    border-radius: 8px;
    color: #fff; font-size: .9375rem;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
}
.ws-game-form__input:hover { border-color: var(--ws-border-strong); }
.ws-game-form__input:focus {
    outline: none; border-color: var(--ws-accent);
    background: var(--ws-surface-2);
}
.ws-game-form__input::placeholder { color: var(--ws-text-dim); }
.ws-game-form__hint { font-size: .75rem; color: var(--ws-text-dim); margin: .35rem 0 0; }

.ws-game-form__right {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex; flex-direction: column;
    height: fit-content;
}
.ws-game-form__denoms {
    display: flex; flex-direction: column; gap: .4rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 1rem;
}
.ws-game-form__denoms::-webkit-scrollbar { width: 4px; }
.ws-game-form__denoms::-webkit-scrollbar-track { background: var(--ws-surface-2); border-radius: 4px; }
.ws-game-form__denoms::-webkit-scrollbar-thumb { background: var(--ws-border-strong); border-radius: 4px; }
.ws-game-form__denom {
    display: flex; align-items: center; gap: .65rem;
    padding: .65rem .8rem;
    background: var(--ws-surface-3);
    border: 1px solid var(--ws-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ws-game-form__denom:hover { border-color: var(--ws-border-strong); }
.ws-game-form__denom.is-active,
.ws-game-form__denom:has(input:checked) {
    border-color: var(--ws-accent);
    background: var(--ws-accent-soft);
}
.ws-game-form__denom input[type="radio"] {
    width: 16px; height: 16px; accent-color: var(--ws-accent); margin: 0; flex-shrink: 0;
}
.ws-game-form__denom-name {
    flex: 1; font-size: .8125rem; font-weight: 500; color: #fff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ws-game-form__denom-price {
    font-size: .875rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.ws-game-form__summary {
    margin: 0 0 1rem;
    padding: .75rem .9rem;
    background: var(--ws-surface-3);
    border-radius: 8px;
}
.ws-game-form__summary-row {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: .9375rem;
}
.ws-game-form__summary-row > span { color: var(--ws-text-muted); }
.ws-game-form__summary-row > strong { color: #fff; font-weight: 700; font-size: 1.05rem; }

.ws-game-form__submit {
    width: 100%; height: 44px; border: 0;
    background: linear-gradient(135deg, var(--ws-accent) 0%, #dc2626 100%);
    color: #fff; border-radius: 10px;
    font-weight: 700; font-size: .9375rem;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(239,68,68,.4), 0 6px 18px rgba(239,68,68,.15);
    transition: filter .15s, transform .15s;
}
.ws-game-form__submit:hover { filter: brightness(1.08); transform: translateY(-1px); }

.ws-game-form__terms-note {
    font-size: .7rem; color: var(--ws-text-dim);
    margin: .75rem 0 0; line-height: 1.4; text-align: center;
}
.ws-game-form__terms-note a { color: var(--ws-text-muted); text-decoration: underline; }
.ws-game-form__terms-note a:hover { color: var(--ws-accent); }

/* Error / fallback */
.ws-shop--error { text-align: center; padding: 4rem 1rem; }
.ws-shop__inline-error {
    padding: .8rem 1rem;
    background: var(--ws-accent-soft);
    border: 1px solid rgba(239,68,68,.3);
    border-radius: 10px;
    color: #fca5a5;
    font-size: .875rem;
    margin-bottom: 1rem;
}

/* Theme suppression on shop pages */
body.ws-shop-page .entry-title,
body.ws-shop-page .page-title,
body.ws-shop-page .post-title,
body.ws-shop-page .wp-block-post-title,
body.ws-shop-page header.entry-header,
body.ws-shop-page .page-header,
body.ws-shop-page .single-header,
body.ws-shop-page main > h1:first-child,
body.ws-shop-page article > h1:first-child,
body.ws-shop-page .elementor-heading-title,
body.ws-shop-page .breadcrumbs + h1 { display: none !important; }

.ws-game-form__denom-old {
  color: var(--ws-text-muted, #8a8f98);
  text-decoration: line-through;
  margin-right: 6px;
  font-weight: 400;
  opacity: .7;
}

.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* СБП discount reveal (витрина: shown only after the first "Перейти к оплате" click) */
.ws-game-form__summary-row--discount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ff4d5e;
    font-weight: 600;
}
.ws-game-form__summary-row--discount[hidden] {
    display: none;
}
.ws-game-form__discount-prices {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}
.ws-game-form__discount-prices .ws-game-form__denom-old {
    color: var(--ws-text-muted, #8a8f98);
    font-weight: 400;
    margin-right: 0; /* parent .ws-game-form__discount-prices gap:8px is the only spacing */
}
.ws-game-form__discount-prices [data-discount-new] {
    color: #ff4d5e;
}
