/* CARDS-20261031: карточки шин — главная и каталог (core/tz_cards.php) */
.pop-card { --pop-acc: #eb9318; --pop-acc-h: #d68210; --pop-ink: #1d232b; --pop-mute: #5f6873; --pop-line: #e8eaee;
    position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--pop-line);
    border-radius: 16px; overflow: hidden; color: var(--pop-ink); text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.pop-card:hover { color: var(--pop-ink); transform: translateY(-4px); border-color: rgba(235,147,24,.55); box-shadow: 0 14px 32px -12px rgba(29,35,43,.28); }
.pop-card:focus-visible { outline: 3px solid rgba(235,147,24,.5); outline-offset: 2px; }

.pop-card__media { position: relative; aspect-ratio: 5 / 4; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: radial-gradient(circle at 50% 42%, #fff 0, #f6f7f9 46%, #eceef2 100%); }
.pop-card__media img { position: relative; z-index: 1; width: 78%; height: 86%; object-fit: contain; mix-blend-mode: multiply;
    transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.pop-card:hover .pop-card__media img { transform: scale(1.05); }
.pop-card__chips { position: absolute; z-index: 2; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.pop-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
    background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(29,35,43,.12); }
.pop-chip i { font-size: .72rem; }
.pop-chip--winter { color: #0b7fae; }
.pop-chip--summer { color: #c66f00; }
.pop-chip--all { color: #4b5563; }
.pop-chip--spike { color: #fff; background: #1d232b; }

.pop-card__body { flex: 1; padding: 14px 16px 4px; }
.pop-card__brand { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pop-mute); }
.pop-card__title { display: block; font-size: 1.12rem; font-weight: 800; line-height: 1.25; margin: 2px 0 10px; color: var(--pop-ink); text-decoration: none; }
.pop-card:hover .pop-card__title { color: #9a5700; }
.pop-card__li { font-weight: 600; color: var(--pop-mute); font-size: .9em; }
.pop-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pop-card__meta span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; background: #f3f4f6;
    font-size: .76rem; font-weight: 600; color: #4b5563; white-space: nowrap; }
.pop-card__meta i { font-size: .7rem; opacity: .7; }
.pop-card__meta .is-stock { background: #e8f6ee; color: #15803d; }
.pop-card__meta .is-stock::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pop-card__meta .is-none { background: #fdeeee; color: #b42318; }

.pop-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 16px; }
.pop-card__price { font-size: 1.3rem; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.pop-card__price small { font-size: .74rem; font-weight: 600; color: var(--pop-mute); }
.pop-card__go, .pop-card__cart { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; flex-shrink: 0; border: 0;
    background: rgba(235,147,24,.12); color: #9a5700; font-size: .82rem; font-weight: 700; text-decoration: none; transition: background .2s, color .2s; }
.pop-card__go svg { width: 15px; height: 15px; transition: transform .2s; }
.pop-card:hover .pop-card__go { background: var(--pop-acc); color: #1d232b; }
.pop-card:hover .pop-card__go svg { transform: translateX(3px); }
/* в корзину — главное действие, сразу оранжевая */
.pop-card__cart { background: var(--pop-acc); color: #1d232b; cursor: pointer; }
.pop-card__cart:hover, .pop-card__cart:focus-visible { background: var(--pop-acc-h); color: #1d232b; }
.pop-card.is-out .pop-card__media img { opacity: .55; }
.pop-card.is-out .pop-card__price { color: var(--pop-mute); }

@media (max-width: 767.98px) {
    .pop-card__title { font-size: 1.02rem; }
    .pop-card__price { font-size: 1.15rem; }
    .pop-card__go { padding: 8px 11px; }
    .pop-card__go b { display: none; }
    .pop-card__body { padding: 12px 12px 2px; }
    .pop-card__foot { padding: 10px 12px 12px; }
    .pop-card__chips { top: 8px; left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .pop-card, .pop-card__media img { transition: none; }
    .pop-card:hover, .pop-card:hover .pop-card__media img { transform: none; }
}

/* ---------- каталог: подборки над списком ---------- */
.tzc-cats { margin-bottom: 1.75rem; }
.tzc-cats .tzm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tzc-cats .tzm-cap { margin-top: 18px; }
.tzc-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.tzc-sizes a { font-size: .85rem; font-weight: 600; padding: 5px 11px; border-radius: 8px; border: 1px solid #e8eaee; background: #fff; color: #1d232b; text-decoration: none;
    transition: border-color .15s, background .15s, color .15s; }
.tzc-sizes a:hover { border-color: #eb9318; background: rgba(235,147,24,.08); color: #d68210; }
@media (max-width: 1199.98px) { .tzc-cats .tzm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .tzc-cats .tzm-tile { min-height: 70px; padding: 10px 6px 10px 12px; }
    .tzc-cats .tzm-tile img { width: 62px; height: 62px; margin: -10px -6px -10px -10px; }
    .tzc-cats .tzm-tile__txt b { font-size: .9rem; }
    .tzc-sizes { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
    .tzc-sizes a { flex-shrink: 0; }
}

/* каталог на телефоне: карточка строкой — фото слева, на экране 4–5 моделей вместо одной */
@media (max-width: 575.98px) {
    .tzc-grid .pop-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-rows: 1fr auto; border-radius: 14px; }
    .tzc-grid .pop-card__media { grid-row: 1 / 3; aspect-ratio: auto; min-height: 100%; }
    .tzc-grid .pop-card__media img { width: 88%; height: auto; max-height: 120px; }
    .tzc-grid .pop-card__chips { top: 6px; left: 6px; gap: 3px; }
    .tzc-grid .pop-chip { padding: 2px 7px; font-size: .66rem; }
    .tzc-grid .pop-card__body { padding: 10px 12px 0; }
    .tzc-grid .pop-card__title { font-size: 1rem; margin-bottom: 6px; }
    .tzc-grid .pop-card__meta { gap: 4px; }
    .tzc-grid .pop-card__meta span { font-size: .7rem; padding: 2px 6px; }
    .tzc-grid .pop-card__foot { padding: 8px 12px 10px; }
    .tzc-grid .pop-card__price { font-size: 1.1rem; }
    .tzc-grid .pop-card__cart { padding: 8px 12px; }
    .tzc-grid .pop-card__cart b { display: none; }
    .tzc-grid .pop-card:hover { transform: none; }
}

/* CARTMODAL-20261031: окно «Добавление в корзину» (templates/header.php) */
.cm .modal-dialog { max-width: 460px; }
.cm .modal-content { position: relative; border: 0; border-radius: 20px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(29,35,43,.45); color: #1d232b; }
.cm-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background-color: #f3f4f6; background-size: 11px; opacity: 1; }
.cm-close:hover { background-color: #e7e9ed; }
.cm-item { display: flex; gap: 16px; align-items: center; padding-right: 36px; margin-bottom: 20px; }
.cm-img { flex-shrink: 0; width: 96px; height: 96px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 42%, #fff 0, #f2f3f6 100%); }
.cm-img img { max-width: 84%; max-height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.cm-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5f6873; margin-bottom: 4px; }
.cm-title { font-weight: 800; font-size: 1.02rem; line-height: 1.3; margin-bottom: 6px; }
.cm-meta { font-size: .86rem; color: #5f6873; }
.cm-meta b { color: #1d232b; font-size: .98rem; }
.cm-stock { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #e8f6ee; color: #15803d; font-weight: 700; font-size: .74rem; }
.cm-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid #e8eaee; }
.cm-qty { display: inline-flex; align-items: center; border: 1px solid #e8eaee; border-radius: 999px; overflow: hidden; background: #fff; }
.cm-qty button { width: 42px; height: 42px; border: 0; background: transparent; font-size: 1.25rem; font-weight: 600; color: #1d232b; cursor: pointer; }
.cm-qty button:hover { background: #f5f6f8; }
.cm-qty input { width: 44px; border: 0; text-align: center; font-weight: 800; font-size: 1.05rem; background: transparent; }
.cm-qty input:focus { outline: none; }
.cm-quick { display: flex; gap: 6px; }
.cm-quick button { padding: 8px 12px; border-radius: 999px; border: 1px solid #e8eaee; background: #fff; font-size: .82rem; font-weight: 700; color: #4b5563; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.cm-quick button:hover { border-color: #eb9318; color: #d68210; }
.cm-quick button.is-on { border-color: #eb9318; background: rgba(235,147,24,.1); color: #d68210; }
.cm-total { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0 18px; border-top: 1px solid #e8eaee; }
.cm-total > span { color: #5f6873; font-weight: 600; }
.cm-total b { font-size: 1.7rem; font-weight: 800; }
.cm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 20px; border: 0; border-radius: 999px;
    background: #eb9318; color: #1d232b !important; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .2s; }
.cm-btn:hover { background: #d68210; }
.cm-btn:disabled { background: #c9ced6; }
.cm-btn--ghost { background: #f3f4f6; color: #1d232b !important; }
.cm-btn--ghost:hover { background: #e7e9ed; }
.cm-done { text-align: center; padding: 8px 4px 2px; }
.cm-done__ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #e8f6ee; color: #15803d; font-size: 1.6rem; }
.cm-done__title { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.cm-done__text { color: #5f6873; font-size: .9rem; margin-bottom: 20px; }
.cm-done__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-done__btns .cm-btn { padding: 12px 14px; font-size: .92rem; }
@media (max-width: 420px) {
    .cm .modal-content { padding: 18px; }
    .cm-img { width: 76px; height: 76px; }
    .cm-done__btns { grid-template-columns: 1fr; }
}

/* SEARCH-20261101: страница результатов поиска /catalog/?q= */
.tzsr { margin-bottom: 1.5rem; }
.tzsr .tzs-hint { display: inline-block; margin: 0 0 8px; }
.tzsr__sum { color: #5f6873; margin: 0 0 12px; }
.tzsr__models { display: flex; flex-wrap: wrap; gap: 8px; }
.tzsr__models a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border: 1px solid #e8eaee; border-radius: 12px; background: #fff;
    color: #1d232b; font-weight: 700; font-size: .9rem; text-decoration: none; transition: border-color .15s, background .15s; }
.tzsr__models a:hover { border-color: #eb9318; background: rgba(235,147,24,.06); color: #1d232b; }
.tzsr__models img { width: 36px; height: 36px; object-fit: contain; mix-blend-mode: multiply; }
.tzsr-empty { padding: 28px; border-radius: 20px; background: #f5f6f8; }
.tzsr-empty h4 { font-weight: 800; }
.tzsr-empty p { color: #4b5563; margin-bottom: 18px; }
