/* ==========================================================================
 *   Geosvip-Tegeler — редизайн каталога (/shop/ и страницы разделов)
 *   Стили изолированы внутри .gtc, хедер/футер не затрагиваются.
 *   Токены совпадают с карточкой товара (gt-product.css).
 *   ========================================================================== */

.gtc {
    --gtc-accent: #f04e33;
    --gtc-accent-hover: #d63d23;
    --gtc-accent-soft: #fdeeeb;
    --gtc-ink: #1d2126;
    --gtc-ink-2: #4a525c;
    --gtc-muted: #7b848f;
    --gtc-line: #e6e9ed;
    --gtc-line-2: #d3d8dd;
    --gtc-surface: #f6f7f9;
    --gtc-bg: #ffffff;
    --gtc-ok: #1f8a4c;
    --gtc-ok-soft: #e8f5ed;
    --gtc-radius: 6px;
    --gtc-radius-sm: 4px;
    /* Шрифты сайта (@font-face объявлены в /bitrix/templates/shopredesign/styles.css) */
    --gtc-font: "MontserratCustom", "Montserrat", Arial, sans-serif;
    --gtc-font-bold: "MontserratBolder", "MontserratCustom", "Montserrat", Arial, sans-serif;

    color: var(--gtc-ink);
    font-family: var(--gtc-font);
    font-size: 14px;
    line-height: 1.45;
    max-width: 1440px;   /* как .content-wrapper на сайте */
    margin: 0 auto;
    padding: 8px 0 48px;
}
.gtc *, .gtc *::before, .gtc *::after { box-sizing: border-box; }
.gtc svg { display: block; flex-shrink: 0; }
.gtc b, .gtc strong { font-family: var(--gtc-font-bold); font-weight: 700; }
.gtc .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Заголовок ---------- */
.gtc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 16px; }
.gtc-head h1 {
    margin: 0; padding: 0;
    font-size: 28px; line-height: 1.2; letter-spacing: -0.01em;
    font-weight: 700; font-family: var(--gtc-font-bold);
    text-transform: none;
}
.gtc-total { font-size: 15px; color: var(--gtc-muted); }

/* ---------- Поиск + менеджер ---------- */
.gtc-top { margin-bottom: 16px; }
.gtc-search {
    display: flex; flex-direction: column; justify-content: center;
    padding: 18px 20px;
    background: var(--gtc-surface);
    border: 1px solid var(--gtc-line);
    border-radius: var(--gtc-radius);
}
.gtc-search label { margin-bottom: 8px; font-size: 15px; font-weight: 700; font-family: var(--gtc-font-bold); }
.gtc-search-row { display: flex; gap: 8px; }
.gtc-search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.gtc-search-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--gtc-muted); pointer-events: none; }
.gtc-search input {
    width: 100%; height: 46px;
    max-width: 100% !important;
    padding: 0 14px 0 42px;
    font: inherit; font-size: 15px; color: var(--gtc-ink);
    background: var(--gtc-bg);
    border: 1px solid var(--gtc-line-2);
    border-radius: var(--gtc-radius-sm);
}
.gtc-search input:focus { outline: none; border-color: var(--gtc-accent); box-shadow: 0 0 0 3px var(--gtc-accent-soft); }
.gtc-search button {
    flex-shrink: 0; height: 46px; padding: 0 22px;
    font: inherit; font-size: 15px; font-weight: 700; font-family: var(--gtc-font-bold);
    color: #fff; background: var(--gtc-accent);
    border: 0; border-radius: var(--gtc-radius-sm); cursor: pointer;
}
.gtc-search button:hover { background: var(--gtc-accent-hover); }
.gtc-search-hint { margin-top: 6px; font-size: 12px; color: var(--gtc-muted); }
.gtc-search-reset { color: var(--gtc-accent) !important; text-decoration: none !important; margin-left: 6px; }

/* Блок менеджера (вариант D): по центру, крупная кнопка-телефон */
.gtc-help, .gtc-benefit {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 18px 16px 16px;
    background: var(--gtc-bg);
    border: 1px solid var(--gtc-line);
    border-top: 3px solid var(--gtc-accent);
    border-radius: var(--gtc-radius);
}
.gtc-help img {
    width: 84px; height: 84px; margin-bottom: 10px; flex-shrink: 0;
    border-radius: 50%; object-fit: cover; background: var(--gtc-surface);
    border: 3px solid #fff; box-shadow: 0 6px 18px -8px rgba(0,0,0,.4);
}
.gtc-help-title { font-size: 16px; font-weight: 700; font-family: var(--gtc-font-bold); line-height: 1.3; }
.gtc-help-text { margin: 4px 0 14px; font-size: 13px; line-height: 1.4; color: var(--gtc-ink-2); }
.gtc-help-call {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 44px;
    font-size: 15px; font-weight: 700; font-family: var(--gtc-font-bold); letter-spacing: .01em;
    color: #fff !important; text-decoration: none !important;
    background: var(--gtc-accent); border-radius: var(--gtc-radius-sm);
    transition: background .15s;
}
.gtc-help-call:hover { background: var(--gtc-accent-hover); }
.gtc-help-cb {
    display: inline-block; margin-top: 10px; font-size: 13px;
    color: var(--gtc-accent) !important; text-decoration: none !important;
    border-bottom: 1px dashed currentColor; cursor: pointer;
}
.gtc-help-cb:hover { color: var(--gtc-accent-hover) !important; }

/* ---------- Теги категорий ---------- */
.gtc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.gtc-tag {
    display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 14px;
    font-size: 14px; line-height: 1; white-space: nowrap;
    color: var(--gtc-ink) !important; text-decoration: none !important;
    background: var(--gtc-bg);
    border: 1px solid var(--gtc-line-2);
    border-radius: var(--gtc-radius-sm);
    transition: border-color .15s, background .15s, color .15s;
}
.gtc-tag:hover { border-color: var(--gtc-ink-2); }
.gtc-tag-count { font-size: 12px; color: var(--gtc-muted); font-variant-numeric: tabular-nums; }
.gtc-tag.is-active { color: #fff !important; background: var(--gtc-ink); border-color: var(--gtc-ink); }
.gtc-tag.is-active .gtc-tag-count { color: rgba(255,255,255,.7); }
.gtc-tag:focus-visible { outline: 2px solid var(--gtc-accent); outline-offset: 2px; }

/* ---------- Каркас: фильтр слева, список справа ---------- */
.gtc-body { display: grid; /*grid-template-columns: 272px minmax(0, 1fr);*/ gap: 28px; align-items: start; }

/* ---------- Левая колонка: менеджер + фильтр ---------- */
/* Колонка тянется на всю высоту списка, чтобы фильтр мог «прилипать» при прокрутке */
.gtc-side { display: flex; flex-direction: column; gap: 12px; align-self: stretch; min-width: 0; }

/* ---------- Слайдер над фильтром: менеджер + «Гарантия низких цен» ---------- */
.gtc-promo { position: relative; }
.gtc-promo-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    border-radius: var(--gtc-radius);
}
.gtc-promo-track::-webkit-scrollbar { display: none; }
.gtc-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.gtc-promo .gtc-help, .gtc-promo .gtc-benefit { margin: 0; justify-content: center; }
.gtc-benefit-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 84px; height: 84px; margin-bottom: 10px; border-radius: 50%;
    color: #fff; background: var(--gtc-accent);
    box-shadow: 0 6px 18px -8px rgba(240,78,51,.6);
}
.gtc-benefit-icon svg { width: 40px; height: 40px; }
.gtc-promo-dots { display: flex; justify-content: center; gap: 6px; padding-top: 8px; }
.gtc-promo-dots button {
    width: 8px; height: 8px; padding: 0;
    background: #cfd4da; border: 0; border-radius: 4px; cursor: pointer;
    transition: width .2s, background .2s;
}
.gtc-promo-dots button[aria-current="true"] { width: 22px; background: var(--gtc-accent); }
.gtc-promo-dots button:focus-visible { outline: 2px solid var(--gtc-accent); outline-offset: 2px; }

/* ---------- Фильтр ---------- */
.gtc-filter {
    position: sticky; top: 16px;
    max-height: calc(100vh - 32px);
    display: flex; flex-direction: column;
    background: var(--gtc-bg);
    border: 1px solid var(--gtc-line);
    border-radius: var(--gtc-radius);
}
.gtc-filter > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; margin: 0; }
.gtc-filter-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.gtc-filter-head h2 { margin: 0; padding: 0; font-size: 17px; font-weight: 700; font-family: var(--gtc-font-bold); text-transform: none; }
.gtc-filter-close { display: none; }
.gtc-filter-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 16px; overscroll-behavior: contain; }
.gtc-fgroup { margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--gtc-line); min-width: 0; }
.gtc-fgroup-title {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 0; margin: 0 0 8px;
    font: inherit; font-size: 14px; font-weight: 700; font-family: var(--gtc-font-bold);
    color: var(--gtc-ink); background: none; border: 0; cursor: pointer; text-align: left;
}
.gtc-fgroup-title svg { width: 16px; height: 16px; color: var(--gtc-muted); transition: transform .15s; }
.gtc-fgroup.is-collapsed .gtc-fgroup-title svg { transform: rotate(-90deg); }
.gtc-fgroup.is-collapsed .gtc-fgroup-body { display: none; }
.gtc-fopt {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 0;
    font-size: 14px; line-height: 1.3; color: var(--gtc-ink);
    cursor: pointer; user-select: none;
}
.gtc-fopt input {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; flex-shrink: 0; margin: 0;
    border: 1.5px solid #b7bec6; border-radius: 3px; background: var(--gtc-bg);
    display: grid; place-content: center; cursor: pointer;
}
.gtc-fopt input::after {
    content: ""; width: 10px; height: 6px; margin-top: -2px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0); transition: transform .1s;
}
.gtc-fopt input:checked { background: var(--gtc-accent); border-color: var(--gtc-accent); }
.gtc-fopt input:checked::after { transform: rotate(-45deg) scale(1); }
.gtc-fopt input:focus-visible { outline: 2px solid var(--gtc-accent); outline-offset: 2px; }
.gtc-fopt-name { flex: 1 1 auto; min-width: 0; }
.gtc-fopt-count { font-size: 12px; color: var(--gtc-muted); font-variant-numeric: tabular-nums; }
.gtc-fopt.disabled { opacity: .4; }
.gtc-fopt.is-hidden { display: none; }
.gtc-fgroup-more {
    margin-top: 4px; padding: 0;
    font: inherit; font-size: 13px; color: var(--gtc-accent);
    background: none; border: 0; cursor: pointer;
}
.gtc-fgroup-more:hover { text-decoration: underline; }
.gtc-filter-foot {
    display: flex; flex-direction: column; gap: 8px;
    padding: 12px 16px 14px;
    border-top: 1px solid var(--gtc-line);
    background: var(--gtc-bg);
    border-radius: 0 0 var(--gtc-radius) var(--gtc-radius);
}
.gtc-btn-apply {
    height: 44px; width: 100%;
    font: inherit; font-size: 15px; font-weight: 700; font-family: var(--gtc-font-bold);
    color: #fff; background: var(--gtc-accent);
    border: 0; border-radius: var(--gtc-radius-sm); cursor: pointer;
}
.gtc-btn-apply:hover { background: var(--gtc-accent-hover); }
.gtc-btn-apply[disabled] { opacity: .6; cursor: default; }
.gtc-btn-reset {
    height: 36px; width: 100%;
    font: inherit; font-size: 14px; color: var(--gtc-ink-2);
    background: none; border: 1px solid var(--gtc-line-2); border-radius: var(--gtc-radius-sm); cursor: pointer;
}
.gtc-btn-reset:hover { border-color: var(--gtc-ink-2); color: var(--gtc-ink); }
/* Всплывашка Bitrix «Выбрано: N» не нужна — число показано на кнопке */
.gtc #modef { display: none !important; }

/* ---------- Панель над списком ---------- */
.gtc-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.gtc-found { font-size: 14px; color: var(--gtc-ink-2); }
.gtc-found b { color: var(--gtc-ink); }
.gtc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gtc-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 28px; padding: 0 6px 0 10px;
    font: inherit; font-size: 13px; color: var(--gtc-ink);
    background: var(--gtc-surface); border: 1px solid var(--gtc-line); border-radius: var(--gtc-radius-sm);
    cursor: pointer;
}
.gtc-chip svg { width: 14px; height: 14px; color: var(--gtc-muted); }
.gtc-chip:hover svg { color: var(--gtc-accent); }
.gtc-toolbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gtc-filter-open {
    display: none; align-items: center; gap: 8px;
    height: 38px; padding: 0 14px;
    font: inherit; font-size: 14px; font-weight: 700; font-family: var(--gtc-font-bold);
    color: var(--gtc-ink); background: var(--gtc-bg);
    border: 1px solid var(--gtc-line-2); border-radius: var(--gtc-radius-sm); cursor: pointer;
}
.gtc-filter-open svg { width: 18px; height: 18px; }
.gtc-filter-open-count {
    min-width: 20px; height: 20px; padding: 0 6px;
    font-size: 12px; line-height: 20px; text-align: center;
    color: #fff; background: var(--gtc-accent); border-radius: 10px;
}
.gtc-filter-open-count:empty { display: none; }
.gtc-view { display: inline-flex; border: 1px solid var(--gtc-line-2); border-radius: var(--gtc-radius-sm); overflow: hidden; }
.gtc-view button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 36px; padding: 0;
    color: var(--gtc-muted); background: var(--gtc-bg); border: 0; cursor: pointer;
}
.gtc-view button + button { border-left: 1px solid var(--gtc-line-2); }
.gtc-view button svg { width: 18px; height: 18px; }
.gtc-view button[aria-pressed="true"] { color: #fff; background: var(--gtc-ink); }
.gtc-view button:focus-visible { outline: 2px solid var(--gtc-accent); outline-offset: -2px; }

/* ---------- Список товаров: общие элементы ---------- */
.gtc-list { position: relative; }
.gtc-list.is-loading { opacity: .5; pointer-events: none; }
.gtc-item a { text-decoration: none !important; }
.gtc-item-name { color: var(--gtc-ink) !important; font-weight: 700; font-family: var(--gtc-font-bold); line-height: 1.35; }
.gtc-item-name:hover { color: var(--gtc-accent) !important; }
.gtc-item-mf { font-size: 12px; color: var(--gtc-muted); }
.gtc-art { min-width: 0; font-variant-numeric: tabular-nums; }
.gtc-art-main { font-weight: 700; font-family: var(--gtc-font-bold); letter-spacing: .01em; word-break: break-all; }
.gtc-art-more {
    display: inline-block; margin-left: 4px; padding: 0 5px;
    font: inherit; font-size: 11px; line-height: 18px; color: var(--gtc-ink-2);
    background: var(--gtc-surface); border: 1px solid var(--gtc-line); border-radius: 3px; cursor: pointer;
}
.gtc-art-more:hover { border-color: var(--gtc-ink-2); }
.gtc-art-all { display: none; margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--gtc-ink-2); word-break: break-word; }
.gtc-art.is-open .gtc-art-all { display: block; }
.gtc-art.is-open .gtc-art-more { display: none; }
.gtc-no-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gtc-ok); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gtc-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gtc-ok); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gtc-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.gtc-stock--out { color: var(--gtc-muted); }
.gtc-list[data-view="table"] .gtc-stock-label { display: none; }
.gtc-price { font-size: 16px; font-weight: 700; font-family: var(--gtc-font-bold); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Счётчик — поверх оригинальных элементов Bitrix (_quant_down / _quantity / _quant_up) */
.gtc-qty {
    display: inline-flex; align-items: center;
    height: 38px; padding: 0 2px;
    background: var(--gtc-bg);
    border: 1px solid var(--gtc-line-2); border-radius: var(--gtc-radius-sm);
}
.gtc-qty:focus-within { border-color: var(--gtc-accent); }
.gtc-qty-btn {
    width: 30px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0; color: var(--gtc-ink-2); background: none; border: 0; border-radius: 3px; cursor: pointer;
    font-size: 18px; line-height: 1; user-select: none;
}
.gtc-qty-btn:hover { color: var(--gtc-accent); background: var(--gtc-surface); }
.gtc-qty input {
    width: 40px; height: 32px; padding: 0; margin: 0;
    font: inherit; font-size: 14px; font-weight: 700; font-family: var(--gtc-font-bold);
    text-align: center; color: var(--gtc-ink);
    background: none; border: 0; -moz-appearance: textfield;
}
.gtc-qty input::-webkit-outer-spin-button, .gtc-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gtc-qty input:focus { outline: none; }

.gtc-buy {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 14px;
    font: inherit; font-size: 14px; font-weight: 700; font-family: var(--gtc-font-bold);
    color: #fff !important; background: var(--gtc-accent);
    border: 0; border-radius: var(--gtc-radius-sm); cursor: pointer; white-space: nowrap;
    transition: background .15s;
}
.gtc-buy:hover { background: var(--gtc-accent-hover); }
.gtc-buy svg { width: 18px; height: 18px; }
.gtc-buy.is-added { background: var(--gtc-ok); }
.gtc-buy--ghost { color: var(--gtc-ink) !important; background: var(--gtc-bg); border: 1px solid var(--gtc-line-2); }
.gtc-buy--ghost:hover { background: var(--gtc-surface); }

/* ---------- Вид «таблица» ---------- */
.gtc-thead, .gtc-list[data-view="table"] .gtc-item {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) 96px 104px 108px 132px;
    align-items: center;
    column-gap: 16px;
}
.gtc-thead {
    padding: 10px 14px;
    font-size: 12px; color: var(--gtc-muted);
    background: var(--gtc-surface);
    border: 1px solid var(--gtc-line);
    border-radius: var(--gtc-radius) var(--gtc-radius) 0 0;
}
.gtc-thead > :nth-child(n+3) { text-align: left; }
.gtc-list[data-view="grid"] ~ .gtc-thead, .gtc-main[data-view="grid"] .gtc-thead { display: none; }
.gtc-list[data-view="table"] { border: 1px solid var(--gtc-line); border-top: 0; border-radius: 0 0 var(--gtc-radius) var(--gtc-radius); }
.gtc-list[data-view="table"] .gtc-item { padding: 12px 14px; border-top: 1px solid var(--gtc-line); }
.gtc-list[data-view="table"] .gtc-item:first-child { border-top: 0; }
.gtc-list[data-view="table"] .gtc-item:hover { background: #fafbfc; }
.gtc-list[data-view="table"] .gtc-item-img { display: none; }
.gtc-list[data-view="table"] .gtc-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gtc-list[data-view="table"] .gtc-item-name { font-size: 14px; }
.gtc-list[data-view="table"] .gtc-item-buy .gtc-buy { width: 100%; }

/* ---------- Вид «плитка» ---------- */
.gtc-list[data-view="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
    gap: 12px;
}
.gtc-list[data-view="grid"] .gtc-item {
    display: flex; flex-direction: column;
    padding: 12px;
    background: var(--gtc-bg);
    border: 1px solid var(--gtc-line); border-radius: var(--gtc-radius);
    transition: border-color .15s, box-shadow .15s;
}
.gtc-list[data-view="grid"] .gtc-item:hover { border-color: #cfd4da; box-shadow: 0 10px 24px -16px rgba(20,24,30,.4); }
.gtc-list[data-view="grid"] .gtc-item-img {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 3; margin-bottom: 10px; overflow: hidden;
}
.gtc-list[data-view="grid"] .gtc-item-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gtc-list[data-view="grid"] .gtc-art { order: 2; margin-top: 6px; font-size: 12px; }
.gtc-list[data-view="grid"] .gtc-art-main { font-family: var(--gtc-font); font-weight: 400; color: var(--gtc-ink-2); }
.gtc-list[data-view="grid"] .gtc-item-info { order: 1; display: flex; flex-direction: column; gap: 2px; }
.gtc-list[data-view="grid"] .gtc-item-name {
    font-size: 14px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gtc-list[data-view="grid"] .gtc-item-stock { order: 3; margin-top: 6px; }
.gtc-list[data-view="grid"] .gtc-item-price { order: 4; margin-top: auto; padding-top: 10px; }
.gtc-list[data-view="grid"] .gtc-price { font-size: 18px; }
.gtc-list[data-view="grid"] .gtc-item-qty { order: 5; margin-top: 10px; }
.gtc-list[data-view="grid"] .gtc-item-buy { order: 6; margin-top: 8px; }
.gtc-list[data-view="grid"] .gtc-qty { width: 100%; justify-content: space-between; }
.gtc-list[data-view="grid"] .gtc-buy { width: 100%; }

.gtc-empty { padding: 40px 20px; text-align: center; color: var(--gtc-ink-2); border: 1px dashed var(--gtc-line-2); border-radius: var(--gtc-radius); }
.gtc-empty b { display: block; margin-bottom: 6px; font-size: 16px; color: var(--gtc-ink); }

/* ---------- Показать ещё + страницы ---------- */
.gtc-more { margin-top: 16px; }
.gtc-more-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 46px;
    font: inherit; font-size: 15px; font-weight: 700; font-family: var(--gtc-font-bold);
    color: var(--gtc-ink); background: var(--gtc-bg);
    border: 1px solid var(--gtc-line-2); border-radius: var(--gtc-radius-sm); cursor: pointer;
}
.gtc-more-btn:hover { border-color: var(--gtc-ink); }
.gtc-more-btn[hidden], .gtc-fgroup-more[hidden] { display: none; }
.gtc-more-btn span { font-family: var(--gtc-font); font-weight: 400; color: var(--gtc-muted); }
.gtc-pages { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 16px 0 0; padding: 0; list-style: none; }
.gtc-pages a, .gtc-pages span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 8px;
    font-size: 14px; font-variant-numeric: tabular-nums;
    color: var(--gtc-ink) !important; text-decoration: none !important;
    border: 1px solid var(--gtc-line); border-radius: var(--gtc-radius-sm);
}
.gtc-pages a:hover { border-color: var(--gtc-ink-2); }
.gtc-pages .is-current { color: #fff !important; background: var(--gtc-ink); border-color: var(--gtc-ink); font-family: var(--gtc-font-bold); font-weight: 700; }
.gtc-pages .is-gap { border-color: transparent; color: var(--gtc-muted) !important; min-width: 20px; }
.gtc-pages svg { width: 16px; height: 16px; }

.gtc-toast {
    position: fixed; z-index: 10000; left: 50%; bottom: 28px;
    transform: translate(-50%, 20px);
    padding: 12px 18px;
    font-family: var(--gtc-font-bold, inherit); font-size: 14px; font-weight: 700;
    color: #fff; background: #1d2126; border-radius: 4px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.gtc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.gtc-toast a { color: #fff !important; text-decoration: underline !important; margin-left: 8px; }

/* ==========================================================================
 *   Адаптив
 *   ========================================================================== */
@media (max-width: 1180px) {
    .gtc-thead, .gtc-list[data-view="table"] .gtc-item {
        grid-template-columns: 140px minmax(0, 1fr) 88px 96px 104px 48px;
        column-gap: 12px;
    }
    /* Узкая таблица: кнопка корзины — только иконка */
    .gtc-list[data-view="table"] .gtc-buy span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .gtc-list[data-view="table"] .gtc-buy { padding: 0; }
}

@media (max-width: 960px) {
    .gtc-body { grid-template-columns: minmax(0, 1fr); }
    .gtc-side { align-self: auto; }
    .gtc-promo { max-width: 420px; margin: 0 auto; width: 100%; }
    /* Фильтр — выезжающая панель */
    .gtc-filter {
        position: fixed; z-index: 9000; inset: 0 auto 0 0;
        width: min(360px, 100vw); max-height: none; height: 100%;
        border: 0; border-radius: 0;
        box-shadow: 0 0 40px rgba(0,0,0,.25);
        transform: translateX(-105%); transition: transform .25s ease;
        visibility: hidden;
    }
    .gtc-filter.is-open { transform: none; visibility: visible; }
    .gtc-filter-close {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; margin-right: -8px;
        color: var(--gtc-ink-2); background: none; border: 0; cursor: pointer;
    }
    .gtc-filter-foot { border-radius: 0; }
    .gtc-backdrop { position: fixed; inset: 0; z-index: 8999; background: rgba(16,19,23,.5); }
    .gtc-backdrop[hidden] { display: none; }
    .gtc-filter-open { display: inline-flex; }
}

@media (max-width: 760px) {
    .gtc { font-size: 14px; padding-bottom: 32px; }
    .gtc-head h1 { font-size: 22px; }
    .gtc-search { padding: 14px; }
    .gtc-search button { padding: 0 16px; }
    /* Теги — горизонтальная прокрутка */
    .gtc-tags { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px 4px; scrollbar-width: none; }
    .gtc-tags::-webkit-scrollbar { display: none; }
    .gtc-toolbar-right { margin-left: 0; width: 100%; justify-content: space-between; }
    .gtc-found { width: 100%; }

    /* Таблица превращается в карточки-строки */
    .gtc-thead { display: none; }
    .gtc-list[data-view="table"] { border: 0; display: flex; flex-direction: column; gap: 10px; }
    .gtc-list[data-view="table"] .gtc-item {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
        "info info"
        "art  art"
        "stock price"
        "qty  buy";
    row-gap: 8px; column-gap: 10px;
    padding: 12px;
    border: 1px solid var(--gtc-line); border-radius: var(--gtc-radius);
    }
    .gtc-list[data-view="table"] .gtc-item:first-child { border-top: 1px solid var(--gtc-line); }
    .gtc-list[data-view="table"] .gtc-item-info { grid-area: info; }
    .gtc-list[data-view="table"] .gtc-art { grid-area: art; font-size: 12px; }
    .gtc-list[data-view="table"] .gtc-art-main { font-family: var(--gtc-font); font-weight: 400; color: var(--gtc-ink-2); }
    .gtc-list[data-view="table"] .gtc-item-stock { grid-area: stock; align-self: center; }
    .gtc-list[data-view="table"] .gtc-stock-label { display: inline; }
    .gtc-list[data-view="table"] .gtc-item-price { grid-area: price; text-align: right; }
    .gtc-list[data-view="table"] .gtc-price { font-size: 17px; }
    .gtc-list[data-view="table"] .gtc-item-qty { grid-area: qty; }
    .gtc-list[data-view="table"] .gtc-item-buy { grid-area: buy; }
    .gtc-list[data-view="table"] .gtc-buy span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .gtc-list[data-view="table"] .gtc-buy { padding: 0 16px; height: 42px; }
    .gtc-qty { height: 42px; }
    .gtc-qty-btn { width: 40px; height: 38px; }

    .gtc-list[data-view="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .gtc-list[data-view="grid"] .gtc-item { padding: 10px; }
    .gtc-list[data-view="grid"] .gtc-buy span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .gtc-list[data-view="grid"] .gtc-qty-btn { width: 32px; }
    .gtc-list[data-view="grid"] .gtc-qty input { width: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    .gtc *, .gtc-toast { transition: none !important; }
}
