/* ========== Layout ========== */
.tfr-wrap { display:grid; grid-template-columns:320px 1fr; gap:20px; }
@media (max-width:992px){ .tfr-wrap { grid-template-columns:1fr; } }

/* ========== Filters ========== */
.tfr-filters{
  background:#10161b; color:#e9eef3; border-radius:12px; padding:16px;
  position:sticky; top:12px; border:2px solid #FFA200; box-shadow:0 6px 22px rgba(0,0,0,.12);
}
.tfr-filters h3{ margin:0 0 12px; font-size:28px; color:#fff; font-family:inherit; }
.tfr-group{ margin-bottom:14px; }
.tfr-group label{ display:block; font-size:13px; margin-bottom:6px; color:#b8c2cc; }
.tfr-row{ display:flex; gap:8px; }
.tfr-row select, .tfr-filters select{
  width:100%; appearance:none; background:#0f1720; border:1px solid #223042; color:#e9eef3;
  border-radius:10px; padding:8px 10px;
}
.tfr-opts details{ border:1px solid #223042; border-radius:10px; background:#0f1720; margin-top:8px; }
.tfr-opts summary{ cursor:pointer; list-style:none; padding:10px 12px; display:flex; align-items:center; gap:8px; }
.tfr-opts summary::-webkit-details-marker{ display:none; }
.tfr-opts summary:after{ content:"▸"; margin-left:auto; transition:transform .2s ease; opacity:.9; }
.tfr-opts[open] summary:after{ transform:rotate(90deg); }
.tfr-opts .tfr-opts-inner{ padding:10px 12px 12px; border-top:1px solid #223042; }

/* Winter subtypes */
.tfr-wtype{ display:none; margin:8px 0; padding:10px 10px 0px 20px; border:1px dashed #334155; border-radius:10px; background:#0b1320; }
.tfr-wtype.is-visible{ display:block; }
.tfr-wtype .tfr-wtype-row{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.tfr-wtype label{ display:flex; align-items:center; gap:8px; font-size:13px; color:#dbe4ee; cursor:pointer; }
.tfr-wtype input[type="checkbox"]{ accent-color:#FFA200; margin-top:5px; }

/* Apply buttons (shared) */
.tfr-apply{ display:flex; gap:10px; margin-top:12px; }

/* ========== Grid ========== */
.tfr-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.tfr-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
@media (max-width:1100px){ .tfr-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){  .tfr-grid{ grid-template-columns:1fr; } }

/* Card */
.tfr-card{
  position:relative; display:grid;
  grid-template-columns:120px 1fr; grid-template-rows:auto auto;
  gap:14px; background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  padding:14px; box-shadow:0 1px 2px rgba(0,0,0,.04); overflow:hidden;
}
.tfr-card:hover{ box-shadow:0 6px 20px rgba(2,6,23,.08); }
.tfr-card-link{ position:absolute; inset:0; }
.tfr-z2{ position:relative; z-index:2; }

/* Thumb + price + stock */
.tfr-thumb{ grid-column:1; grid-row:1; display:flex; flex-direction:column; gap:8px; position:relative; }
.tfr-thumb img{ width:120px; height:120px; object-fit:contain; }
.tfr-price-badge{
  position:absolute; top:6px; left:6px;
  background:#FFA200; color:#111; font-weight:800; padding:6px 10px; border-radius:8px; line-height:1;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
}
.tfr-stock{ font-size:12px; color:#475569; }

/* Info column */
.tfr-info{ grid-column:2; grid-row:1; display:flex; flex-direction:column; gap:6px; min-width:0; }
.tfr-brand{ font-weight:800; font-size:15px; line-height:1.25; margin:0; }
.tfr-title{ color:#111; font-size:14px; margin:0; }
.tfr-line{ font-size:13px; color:#374151; margin:0; }
.tfr-cta{ display:flex; gap:8px; align-items:center; margin-top:6px; }
.tfr-cta .button{ border-radius:10px; }

/* Energy strip in card */
.tfr-energy{
  grid-column:1/-1; grid-row:2; display:grid; grid-template-columns:repeat(3,1fr); gap:10px;
  margin-top:12px; padding-top:12px; border-top:1px solid #e5e7eb;
}
.tfr-energy__item{
  height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; gap:6px; border:1px solid #FFA200;
}
.tfr-energy__item svg{ width:18px; height:18px; }
.tfr-energy__val{ font-weight:800; font-size:12px; }

/* Pagination & misc */
.tfr-pagination{ display:flex; gap:6px; flex-wrap:wrap; margin-top:14px; }
.tfr-pagination a, .tfr-pagination span{ padding:6px 10px; border:1px solid #e3e8ef; border-radius:8px; background:#fff; }
.tfr-pagination .current{ background:#f1f5f9; }
.tfr-empty{ padding:20px; background:#fff; border-radius:12px; text-align:center; }
.tfr-skel{ background:linear-gradient(90deg,#eee,#f8f8f8,#eee); background-size:200% 100%; animation:tfrshimmer 1.1s linear infinite; border-radius:12px; }
@keyframes tfrshimmer{ 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.tfr-skel-card{ height:200px; }

/* ========== Single Product ========== */
.tfr-product-head{ display:flex; flex-direction:column; gap:0px; margin-bottom:12px; }
.tfr-product-head h1{ font-size:34px; line-height:1.15; margin:0; }
.tfr-muted{ color:#64748b; font-size:12px; }
.wh-content{ padding:0 !important; }

.tfr-topgrid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:center; margin:14px 0 10px; }
.tfr-pricebox{
  background:#fff; border:1px solid #e5e7eb; border-radius:12px; display:flex; gap:20px; height:65px; align-items:center; 
}
.tfr-pricebox .big-price{
  display:inline-flex; align-items:center; gap:8px; background:#FFA200; color:#111; font-weight:800;
  border-radius:10px; padding:8px 12px; font-size:18px; line-height:1;  height:100%;
}
.tfr-pricebox .inst{ margin-top:10px; font-size:13px; }
.tfr-pricebox .inst .muted{ color:#64748b; }

.tfr-buyline{
  background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:12px;
  display:flex; gap:12px; align-items:center; justify-content:flex-end; height:65px;
}
.tfr-totalline{ font-weight:700; white-space:nowrap; }
.tfr-totalline .muted{ display:block; color:#64748b; font-weight:400; font-size:12px; line-height:1.1; margin-bottom:2px; }
.tfr-buyline form.cart{ display:flex; gap:14px; align-items:center; margin:0; }
.tfr-buyline .quantity input.qty{ height:40px; }

/* Specs & image */
.tfr-specs{ display:grid; grid-template-columns:1fr 360px; gap:24px; align-items:start; margin:12px 0 16px; }
.tfr-specs-table{ background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:14px; }
.tfr-specs-table .row{ display:grid; grid-template-columns:330px 1fr; gap:10px; padding:8px 0; border-bottom:1px dashed #e5e7eb; }
.tfr-specs-table .row:last-child{ border-bottom:0; }
.tfr-specs-table .lbl{ color:#64748b; }
.tfr-product-image{ background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:12px; display:flex; justify-content:center; }
.tfr-product-image img{ max-width:100%; height:auto; }

.tfr-desc{ background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:16px; margin:14px 0; }

/* Energy (single) */
.energy{ margin-top:8px; background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:20px; }
.energy .energy-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.energy .energy-data{ display:flex; align-items:center; gap:10px; }
.energy .energy-data img{ width:24px; height:24px; object-fit:contain; }
.energy .result{ position:relative; flex:1; height:4px; background:linear-gradient(90deg,#16a34a,#f59e0b,#ef4444); border-radius:5px; }
.energy .state{
  position:absolute; top:-22px; transform:translateX(-50%);
  background:#111; color:#fff; padding:2px 6px; font-size:11px; line-height:1; white-space:nowrap;
}
.energy .state:after{
  content:""; position:absolute; top:100%; left:50%; margin-left:-9px; width:0; height:0;
  border-left:9px solid transparent; border-right:9px solid transparent; border-top:9px solid #111;
}

/* ========== Add to cart (warning-tape) ========== */
.single-product .tfr-buyline form.cart .single_add_to_cart_button.button.alt,
.single-product .tfr-buyline form.cart .single_add_to_cart_button,
.single-product form.cart .single_add_to_cart_button.button.alt{
  --c1:#FFA200; --c2:#10161B; --angle:-45deg; --stripe:14px;
  position:relative; font-family:inherit; padding:12px 18px !important; border:0 !important;
  width:200px !important; font-size:20px; color:#fff !important;
  background:repeating-linear-gradient(var(--angle), var(--c1) 0 calc(14px), var(--c2) 0 calc(28px)) !important;
  background-color:transparent !important; box-shadow:0 6px 18px rgba(0,0,0,.15) !important;
  transition:transform .15s ease, box-shadow .15s ease !important; overflow:hidden; isolation:isolate;
}
.single-product .tfr-buyline form.cart .single_add_to_cart_button.button.alt:hover,
.single-product .tfr-buyline form.cart .single_add_to_cart_button:hover,
.single-product form.cart .single_add_to_cart_button.button.alt:hover,
.single-product .tfr-buyline form.cart .single_add_to_cart_button.button.alt:focus-visible,
.single-product .tfr-buyline form.cart .single_add_to_cart_button:focus-visible,
.single-product form.cart .single_add_to_cart_button.button.alt:focus-visible{
  transform:translateY(-1px);
  box-shadow:0 8px 22px rgba(0,0,0,.18), inset 0 0 0 100vmax rgba(0,0,0,.22) !important;
  color:#fff !important; outline:none;
}
.single-product .tfr-buyline form.cart .single_add_to_cart_button.button.alt:active,
.single-product .tfr-buyline form.cart .single_add_to_cart_button:active,
.single-product form.cart .single_add_to_cart_button.button.alt:active{
  transform:translateY(0);
  box-shadow:0 4px 14px rgba(0,0,0,.16), inset 0 0 0 100vmax rgba(0,0,0,.28) !important;
}

/* ========== Promo ========== */
.tfr-specs-col{ display:flex; flex-direction:column; gap:14px; }
.tfr-promo{
  position:relative; background:#0b1217; color:#fff; border:1px solid #10161B;
  border-radius:12px; padding:16px 16px 18px; overflow:hidden; box-shadow:0 6px 18px rgba(0,0,0,.08);
}
.tfr-promo::before{
  content:""; position:absolute; left:0; right:0; top:0; height:8px;
  background:repeating-linear-gradient(-45deg,#FFA200 0 14px,#10161B 14px 28px);
}
.tfr-promo .promo-title{ display:flex; align-items:center; gap:10px; margin:4px 0 6px; font-weight:800; font-size:18px; }
.tfr-promo .promo-badge{ background:#FFA200; color:#111; font-weight:900; border-radius:8px; padding:4px 8px; line-height:1; }
.tfr-promo p{ margin:0; color:#d1d7de; }
.tfr-promo .promo-note{ margin-top:6px; font-size:12px; color:#94a3b8; }

@media (max-width:780px){ .tfr-specs{ grid-template-columns:1fr; } }

/* ========== Custom Quantity (fixed, no animations) ========== */
.tfr-qty{
  display:inline-grid; grid-template-columns:40px 64px 40px; height:40px;
  border:1px solid #e5e7eb; border-radius:10px; overflow:hidden; background:#fff;
}
.tfr-qty .tfr-qty-btn{
  appearance:none; -webkit-appearance:none;
  width:40px; min-width:40px; height:40px; flex:0 0 40px; box-sizing:border-box;
  display:inline-flex; align-items:center; justify-content:center;
  background:#0b1217; color:#fff; border:0; font-weight:900; font-size:18px; line-height:1;
  cursor:pointer; user-select:none; transition:none !important; transform:none !important; box-shadow:none !important;
  -webkit-tap-highlight-color:transparent;
}
.tfr-qty .tfr-qty-btn:hover,
.tfr-qty .tfr-qty-btn:focus,
.tfr-qty .tfr-qty-btn:active{
  background:#10161B; outline:none; transform:none; box-shadow:none;
}
.tfr-qty .qty{
  width:64px !important; height:40px !important; border:0 !important; outline:none !important;
  text-align:center; font-weight:700; font-size:16px; background:#fff; color:#111; padding:0; margin:0 !important;
}
.tfr-qty .qty::-webkit-outer-spin-button,
.tfr-qty .qty::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.tfr-qty .qty[type=number]{ -moz-appearance:textfield; }

/* compact form spacing */
.tfr-buyline form.cart{ gap:14px; }

/* ========== Unified buttons (extra helpers) ========== */
.tfr-btn{
  appearance:none; -webkit-appearance:none; display:inline-flex; align-items:center; justify-content:center;
  gap:8px; height:40px; padding:0 14px; border-radius:10px; border:1px solid #fff;
  font:inherit; font-weight:700; line-height:1; cursor:pointer; text-decoration:none !important; user-select:none;
  transition:transform .08s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.tfr-btn--primary{
  background:#FFA200; border-color:#FFA200; color:#111; box-shadow:0 6px 16px rgba(0,0,0,.12); width:100%;
}
.tfr-btn--primary:hover{ filter:brightness(.96); }
.tfr-btn--primary:active{ transform:translateY(1px); }
.tfr-btn--primary:focus-visible{ outline:none; box-shadow:0 0 0 3px rgba(255,162,0,.35); }
.tfr-btn--ghost{ background:transparent; border-color:#223042; color:#e9eef3; }

/* ========== Shop: add-to-cart button UX ========== */
.tfr-grid .tfr-cta .add_to_cart_button.tfr-add{
  position:relative; font-family:inherit; display:inline-flex; align-items:center;
  height:36px; padding:0 12px; border-radius:10px; border:2px solid #FFA200; background:#111;
  transition:transform .08s ease, filter .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.tfr-grid .tfr-cta .add_to_cart_button.tfr-add:hover{ filter:brightness(.96); }
.tfr-grid .tfr-cta .add_to_cart_button.tfr-add:active{ transform:translateY(1px); }
.tfr-add .tfr-spinner{
  display:none; width:16px; height:16px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%;
  animation:tfrspin .7s linear infinite;
}
.tfr-add.is-loading .tfr-spinner{ display:inline-block; }
@keyframes tfrspin{ to{ transform:rotate(360deg); } }
.tfr-add.is-added{ background:#16a34a; border-color:#16a34a; color:#fff !important; }
.tfr-add .tfr-check{ display:none; }
.tfr-add.is-added .tfr-check{ display:inline-block; }
.tfr-add.is-added .tfr-label{ opacity:.95; }

/* toast confirm */
#tfr-added-toast{
  position:fixed; right:22px; bottom:22px; background:#111; color:#fff; padding:10px 14px; border-radius:10px;
  box-shadow:0 10px 28px rgba(0,0,0,.28); opacity:0; transform:translateY(8px); pointer-events:none; transition:.25s ease;
  z-index:9999; font-weight:700;
}
#tfr-added-toast.show{ opacity:1; transform:translateY(0); }

/* Kill Woo default "View cart" and added icon */
.tfr-grid a.added_to_cart.wc-forward{ display:none !important; }
.woocommerce a.button.added:after,
.woocommerce button.button.added:after,
.woocommerce input.button.added:after,
.woocommerce #respond input#submit.added:after{ content:none !important; display:none !important; }
.woocommerce .add_to_cart_button:after{ display:none; }
.woocommerce a.added_to_cart{ display:none; }


/* Карточка полностью кликабельна */
.tfr-card { position: relative; }

/* Оверлей-ссылка поверх всего контента карточки */
.tfr-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;            /* <-- главное */
  display: block;
}

/* Все интерактивные элементы (кнопки и т.п.) выше ссылки */
.tfr-z2 {
  position: relative;
  z-index: 2;
}

/* Чтобы клик по бейджу цены не «гасил» переход */
.tfr-price-badge { pointer-events: none; }

/* (по желанию) если где-то внутри есть ссылки, которым надо быть кликабельными поверх оверлея */
.tfr-info a,
.tfr-thumb a { position: relative; z-index: 2; }

/* Brand bar */
.tfr-brandline{

  height:100px;                /* фиксируем высоту под лого */
  display:flex;
  align-items:center;
  justify-content:flex-start;  /* прижать контент влево */
  overflow:hidden;
  cursor:default;
}

/* Brand logo image */
.tfr-brandline img.tfr-brand-logo{
  height:100px !important;     /* как просили */
  width:auto !important;       /* ширина по пропорциям */
  max-width:100%;              /* не вылезать за блок */
  object-fit:contain;
  object-position:left center; /* максимально слева */
  display:block;
  pointer-events:none;
}

.tfr-filters--horizontal {
   background:#10161b4f;
}


/* Обёртка горизонтальных фильтров на главной */
.tfr-filters--horizontal .tfr-form--horizontal {
    
    gap: 16px;
    
 
}
.tfr-filters--horizontal .tfr-group--season .tfr-season-row {
    display:flex;
    gap:30px;
}

/* Группы в линию */
.tfr-filters--horizontal .tfr-group {
    margin: 0;
}

/* Можно задать минимальную ширину для блоков */
.tfr-filters--horizontal .tfr-group--season {
    min-width: 260px;
}

.tfr-filters--horizontal .tfr-group--size {
    min-width: 320px;
}

.tfr-filters--horizontal .tfr-group--advanced {
    min-width: 260px;
  
    width: 100%;
    appearance: none;
    background: #0f1720;
    border: 1px solid #223042;
    color: #e9eef3;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom:20px;
}

.tfr-filters--horizontal .tfr-group--submit {
      width: 200px;        
    margin-left: auto;    
    display: flex;       
    justify-content: flex-end; 
}


/* ===== Mobile polish ===== */

/* 1) Укрупняем тач-цели и типографику на мелких экранах */
@media (max-width: 480px){
  .tfr-filters { padding: 14px; }
  .tfr-filters h3 { font-size: 22px; }
  .tfr-group label { font-size: 14px; }
  .tfr-row select, .tfr-filters select { padding: 10px 12px; }

  /* Тост — центр внизу с отступами */
  #tfr-added-toast{
    right: 12px; left: 12px; bottom: 12px;
    text-align: center;
  }
}

/* 2) Карточка: на телефоне — вертикальный стек с гибкими размерами */
@media (max-width: 640px){
  .tfr-card{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 10px;
    padding: 12px;
  }
  .tfr-thumb{ grid-column: 1; grid-row: 1; align-items: center; }
  .tfr-thumb img{ width: 100%; max-width: 220px; height: auto; }

  .tfr-info{ grid-column: 1; grid-row: 2; }
  .tfr-cta{ flex-wrap: wrap; }

  .tfr-energy{ grid-column: 1; grid-row: 3; gap: 8px; }
  .tfr-energy__item{ height: 36px; }
}

/* 3) Грид: чуть раньше на 1 колонку, чтобы карточки не ломались */
@media (max-width: 720px){
  .tfr-grid{ grid-template-columns: 1fr; }
}

/* 4) Фильтры: липкий блок на мобилке слишком “высокий” — уменьшим липкость */
@media (max-width: 992px){
  .tfr-filters{ position: static; top: auto; }
  .tfr-apply{ flex-direction: column; }
}

/* 5) Типы зимней резины — 2→1 колонка */
@media (max-width: 480px){
  .tfr-wtype .tfr-wtype-row{ grid-template-columns: 1fr; }
}

/* 6) Верхняя сетка single: 2 колонки → 1, гибкие высоты */
@media (max-width: 920px){
  .tfr-topgrid{ grid-template-columns: 1fr; }
  .tfr-pricebox, .tfr-buyline{ height: auto; }
  .tfr-pricebox .big-price{ height: auto; font-size: 16px; padding: 18px 12px; }
  .tfr-buyline{ justify-content: stretch; flex-wrap: wrap; gap: 10px; }
  .tfr-buyline form.cart{ width: 100%; gap: 10px; flex-wrap: wrap; }
  .tfr-totalline{ order: 2; width: 100%; }
}

/* 7) Кнопки количества и “в корзину”: гибкие и на всю ширину при необходимости */
@media (max-width: 480px){
  .tfr-qty{ grid-template-columns: 40px 1fr 40px; width: 100%; }
  .tfr-qty .qty{ width: 100% !important; }

  .single-product .tfr-buyline form.cart .single_add_to_cart_button.button.alt,
  .single-product .tfr-buyline form.cart .single_add_to_cart_button,
  .single-product form.cart .single_add_to_cart_button.button.alt{
    width: 100% !important;
    font-size: 18px;
    padding: 14px !important;
  }
}

/* 8) Таблица спецификаций — метка над значением на узких экранах */
@media (max-width: 640px){
  .tfr-specs-table .row{ grid-template-columns: 1fr; gap: 6px; }
  .tfr-specs-table .lbl{ font-size: 12px; color:#64748b; }
}

/* 9) Энергопоказатели (single) — строки вместо колонок */
@media (max-width: 640px){
  .energy .energy-row{ grid-template-columns: 1fr; gap: 12px; }
  .energy .state{ top: -18px; font-size: 10px; }
}

/* 10) CTA в карточке — адаптивная ширина */
@media (max-width: 480px){
  .tfr-grid .tfr-cta .add_to_cart_button.tfr-add{ width: 100%; justify-content: center; }
}

/* Контейнер с картинкой товара */
.tfr-product-image {
  position: relative;
}

.tfr-product-image .tfr-product-main {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Логотип бренда поверх изображения */
.tfr-product-image .tfr-brand-overlay {
  position: absolute;
  top: 1rem;     /* можно заменить на bottom: 1rem; */
  left: 1rem;    /* или right: 1rem; если нужен другой угол */
  max-width: 90px;
  height: auto;
  object-fit: contain;

  background: rgba(255, 255, 255, 0.9);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}