/* =====================================================
   HEADER CSS
   ===================================================== */

/* Topbar */
.tc-topbar {
  background: var(--color-bg-tertiary);
  font-size: var(--text-xs);
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.tc-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.tc-topbar__right { display: flex; align-items: center; gap: var(--space-5); }
.tc-topbar__phone, .tc-topbar__schedule { display: flex; align-items: center; gap: var(--space-1); color: var(--color-text-secondary); }
.tc-topbar__phone:hover { color: var(--color-accent); }

/* Main Header */
.tc-header {
  position: sticky; top: 0; z-index: 900;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s, transform 0.3s;
}
.tc-header--scrolled { box-shadow: var(--shadow-md); }
.tc-header--hidden   { transform: translateY(-100%); }
.tc-header__main     { height: var(--header-height); }
.tc-header__inner {
  height: 100%;
  display: flex; align-items: center; gap: var(--space-4);
}

/* Logo */
.tc-logo { display: flex; align-items: center; flex-shrink: 0; }
.tc-logo img { max-height: 40px; width: auto; }
.tc-logo__text { font-size: 22px; font-weight: 800; color: var(--color-text-primary); letter-spacing: -0.03em; }
.tc-footer__logo .tc-logo__text { color: var(--color-text-inverse); }

/* Catalog button */
.tc-catalog-nav  { position: relative; flex-shrink: 0; }
.tc-catalog-btn  { gap: var(--space-2); }
.tc-catalog-btn__chevron { transition: transform 0.2s; }
.tc-catalog-btn[aria-expanded="true"] .tc-catalog-btn__chevron { transform: rotate(-180deg); }
.tc-catalog-btn__icon { display: flex; align-items: center; }

/* Mega Menu */
.tc-mega-menu {
  position: absolute; top: calc(100% + 12px); left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  min-width: 700px;
  opacity: 0; transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.tc-mega-menu.open { opacity: 1; transform: translateY(0); pointer-events: all; }
.tc-mega-menu__inner { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; }
.tc-mega-menu__col { padding: var(--space-6); border-right: 1px solid var(--color-border); }
.tc-mega-menu__col:last-child { border-right: none; }
.tc-mega-menu__heading { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: var(--space-4); }
.tc-mega-menu__list { display: flex; flex-direction: column; gap: 2px; }
.tc-mega-menu__link { display: flex; align-items: center; gap: var(--space-2); padding: 8px 10px; border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--color-text-primary); transition: background 0.15s, color 0.15s; }
.tc-mega-menu__link:hover { background: var(--color-accent-light); color: var(--color-accent); }
.tc-mega-menu__cat-icon { font-size: 16px; }
.tc-mega-menu__count { font-size: var(--text-xs); color: var(--color-text-muted); margin-left: auto; }
.tc-mega-menu__banner { display: block; margin-top: var(--space-4); border-radius: var(--radius-lg); overflow: hidden; }
.tc-mega-menu__banner img { width: 100%; }

/* Search Bar */
.tc-header-search { flex: 1; min-width: 0; max-width: 560px; position: relative; }
.tc-header-search__trigger {
  width: 100%; height: 44px;
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0 var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-secondary);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tc-header-search__trigger:hover { border-color: var(--color-accent); }
.tc-header-search__placeholder { flex: 1; text-align: left; }
.tc-search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  display: none;
}
.tc-search-dropdown.open { display: block; }
.tc-search-dropdown__input-wrap { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-bottom: 1px solid var(--color-border); }
.tc-search-dropdown__input { flex: 1; border: none; background: none; font-size: var(--text-base); color: var(--color-text-primary); outline: none; }
.tc-search-dropdown__body { max-height: 420px; overflow-y: auto; padding: var(--space-4); }
.tc-search-dropdown__footer { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-border); }
.tc-search-dropdown__label { font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; margin-bottom: var(--space-3); }
.tc-search-hints { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tc-search-hint { padding: 5px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-full); font-size: var(--text-xs); color: var(--color-text-secondary); transition: all 0.15s; }
.tc-search-hint:hover { border-color: var(--color-accent); color: var(--color-accent); }
.tc-search-product { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); color: var(--color-text-primary); transition: background 0.15s; }
.tc-search-product:hover { background: var(--color-bg-secondary); }
.tc-search-product__img { width: 48px; height: 36px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.tc-search-product__name { font-size: var(--text-sm); display: block; }
.tc-search-product__price { font-size: var(--text-xs); color: var(--color-accent); font-weight: 600; }
.tc-search-cat, .tc-search-post { display: block; padding: 8px var(--space-3); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--color-text-secondary); }
.tc-search-cat:hover, .tc-search-post:hover { background: var(--color-bg-secondary); color: var(--color-accent); }
.tc-search-section { margin-bottom: var(--space-5); }
.tc-search-empty { text-align: center; padding: var(--space-8); color: var(--color-text-muted); font-size: var(--text-sm); }

/* Header Actions */
.tc-header-actions { display: flex; align-items: center; gap: var(--space-1); flex-shrink: 0; }
.tc-header-action {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  transition: color 0.2s, background 0.2s;
}
.tc-header-action:hover { color: var(--color-accent); background: var(--color-accent-light); }
.tc-header-action__badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px;
  background: var(--color-accent);
  color: white; font-size: 10px; font-weight: 700;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
@keyframes badge-bounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.4); } }
.tc-badge--bounce { animation: badge-bounce 0.4s; }
.tc-header-action__label { display: block; }
.tc-theme-toggle { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--color-text-secondary); transition: all 0.2s; }
.tc-theme-toggle:hover { background: var(--color-accent-light); color: var(--color-accent); }
[data-theme="light"] .tc-theme-toggle__sun { display: none; }
[data-theme="dark"]  .tc-theme-toggle__moon { display: none; }

/* Mobile Nav */
.tc-mobile-nav { display: flex; flex-direction: column; }
.tc-mobile-nav li a { display: block; padding: 12px var(--space-4); border-bottom: 1px solid var(--color-border); color: var(--color-text-primary); font-size: var(--text-base); }
.tc-mobile-nav li a:hover { color: var(--color-accent); background: var(--color-accent-light); }
.tc-mobile-nav__links { display: flex; flex-direction: column; margin-top: var(--space-4); gap: 4px; }
.tc-mobile-nav__extra { display: flex; align-items: center; gap: var(--space-3); padding: 12px var(--space-4); border-radius: var(--radius-md); color: var(--color-text-secondary); font-size: var(--text-sm); }
.tc-mobile-nav__extra:hover { background: var(--color-accent-light); color: var(--color-accent); }
.tc-mobile-nav__phone { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-4); border-top: 1px solid var(--color-border); margin-top: var(--space-4); font-size: var(--text-md); font-weight: 600; color: var(--color-text-primary); }

/* =====================================================
   FOOTER CSS
   ===================================================== */
.tc-footer { background: #111116; color: #9090A8; margin-top: var(--space-20); }
.tc-footer__main { padding: var(--space-16) 0; }
.tc-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-10); }
.tc-footer__col--brand { }
.tc-footer__logo { margin-bottom: var(--space-5); }
.tc-footer__desc { font-size: var(--text-sm); line-height: 1.7; margin-bottom: var(--space-6); }
.tc-footer__social { display: flex; gap: var(--space-3); }
.tc-footer__social-link { width: 36px; height: 36px; background: rgba(255,255,255,0.08); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 14px; transition: background 0.2s; }
.tc-footer__social-link:hover { background: var(--color-accent); }
.tc-footer__heading { font-size: var(--text-sm); font-weight: 700; color: #F0F0F5; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-5); }
.tc-footer__nav { display: flex; flex-direction: column; gap: 8px; }
.tc-footer__nav a { font-size: var(--text-sm); color: #9090A8; transition: color 0.15s; }
.tc-footer__nav a:hover { color: white; }
.tc-footer__contacts { display: flex; flex-direction: column; gap: var(--space-3); }
.tc-footer__contacts li { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); }
.tc-footer__contacts a { color: #9090A8; } .tc-footer__contacts a:hover { color: white; }
.tc-footer__bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: var(--space-5) 0; }
.tc-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.tc-footer__copy { font-size: var(--text-xs); }
.tc-footer__payment { display: flex; gap: var(--space-2); }
.tc-footer__payment-icon { padding: 4px 8px; background: rgba(255,255,255,0.08); border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; color: white; }
.tc-footer__legal-links { display: flex; gap: var(--space-5); }
.tc-footer__legal-links a { font-size: var(--text-xs); color: #5A5A6E; }
.tc-footer__legal-links a:hover { color: white; }
@media (max-width: 900px) { .tc-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tc-footer__grid { grid-template-columns: 1fr; } .tc-footer__bottom-inner { flex-direction: column; text-align: center; } }

/* =====================================================
   HOMEPAGE CSS
   ===================================================== */
/* Hero */
.tc-hero { position: relative; overflow: hidden; }
.tc-hero__slide-inner {
  position: relative; overflow: hidden;
  min-height: 580px;
  background-size: cover; background-position: center;
  display: flex; align-items: center;
}
@media (max-width: 768px) { .tc-hero__slide-inner { min-height: 420px; } }
.tc-hero__overlay { position: absolute; inset: 0; }
.tc-hero__bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tc-hero__content { position: relative; z-index: 1; max-width: 620px; padding: var(--space-16) 0; }
.tc-hero__slide-inner--light-text .tc-hero__content { color: white; }
.tc-hero__tag { display: inline-block; padding: 5px 12px; background: var(--color-accent); color: white; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-5); }
.tc-hero__headline { font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: var(--space-4); }
.tc-hero__sub { font-size: var(--text-lg); opacity: 0.85; margin-bottom: var(--space-3); }
.tc-hero__specs { font-size: var(--text-sm); margin-bottom: var(--space-8); font-family: var(--font-mono); font-weight: 500; color: var(--color-text-secondary); }
.tc-hero__slide-inner--light-text .tc-hero__specs { color: rgba(255,255,255,0.9); }
.tc-hero__slide-inner--dark-text .tc-hero__specs { color: var(--color-text-primary); }
.tc-hero__ctas { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.tc-hero-swiper .swiper-button-prev,
.tc-hero-swiper .swiper-button-next { width: 48px; height: 48px; background: rgba(255,255,255,0.15); backdrop-filter: blur(4px); border-radius: var(--radius-full); color: white; --swiper-navigation-size: 18px; }
.tc-hero-swiper .swiper-button-prev:hover,
.tc-hero-swiper .swiper-button-next:hover { background: var(--color-accent); }

/* Quick Finder */
.tc-quick-finder { background: var(--color-bg-secondary); border-radius: var(--radius-xl); }
.tc-quick-finder__inner { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-8); box-shadow: var(--shadow-md); }
.tc-quick-finder__header { margin-bottom: var(--space-6); }
.tc-finder-form { display: flex; flex-direction: column; gap: var(--space-5); }
.tc-finder-row { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.tc-finder-row--selects { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-4); }
.tc-finder-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); white-space: nowrap; flex-shrink: 0; }
.tc-finder-select-wrap { display: flex; flex-direction: column; gap: var(--space-2); }
.tc-finder-pill { display: inline-flex; }
.tc-finder-pill input { display: none; }
.tc-finder-pill span { padding: 7px 14px; border: 1.5px solid var(--color-border); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 500; color: var(--color-text-secondary); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.tc-finder-pill:has(input:checked) span,
.tc-finder-pill.active span { border-color: var(--color-accent); background: var(--color-accent); color: white; }
.tc-finder-row--submit { justify-content: flex-start; }
.tc-finder-count { font-size: var(--text-xs); font-weight: 400; opacity: 0.8; }
.tc-finder-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tc-finder-row--price { gap: var(--space-6); }
.tc-check-label { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: var(--text-sm); }
.tc-check-box { width: 18px; height: 18px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); transition: all 0.15s; flex-shrink: 0; }
input[type=checkbox]:checked ~ .tc-check-box { background: var(--color-accent); border-color: var(--color-accent); }
@media (max-width: 900px) { .tc-finder-row--selects { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .tc-finder-row--selects { grid-template-columns: 1fr; } }

/* Price Range */
.tc-price-range { flex: 1; min-width: 200px; }
.tc-price-range__track { position: relative; height: 4px; background: var(--color-border); border-radius: var(--radius-full); margin: 16px 0; }
.tc-price-range__fill { position: absolute; height: 100%; background: var(--color-accent); border-radius: var(--radius-full); pointer-events: none; }
.tc-range-input { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; appearance: none; background: none; pointer-events: none; }
.tc-range-input::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; background: white; border: 2px solid var(--color-accent); border-radius: 50%; pointer-events: all; cursor: grab; box-shadow: var(--shadow-sm); }
.tc-range-input::-webkit-slider-thumb:active { cursor: grabbing; box-shadow: var(--shadow-focus); }
.tc-price-range__labels { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--color-text-muted); }
.tc-price-range__inputs { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.tc-price-range__input-num { height: 36px; width: 100%; font-size: var(--text-sm); }

/* Categories */
.tc-categories-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-5); }
@media (max-width: 768px) { .tc-categories-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .tc-categories-grid { grid-template-columns: 1fr; } }
.tc-cat-card {
  position: relative;
  display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  color: var(--color-text-primary);
  transition: all 0.3s var(--ease-out);
  overflow: hidden;
}
.tc-cat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--color-accent); }
.tc-cat-card__icon { font-size: 40px; flex-shrink: 0; }
.tc-cat-card__img-wrap { width: 80px; height: 60px; flex-shrink: 0; border-radius: var(--radius-md); overflow: hidden; }
.tc-cat-card__img { width: 100%; height: 100%; object-fit: cover; }
.tc-cat-card__name { font-size: var(--text-md); font-weight: 600; margin-bottom: 4px; }
.tc-cat-card__desc { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }
.tc-cat-card__count { font-size: var(--text-xs); color: var(--color-accent); font-weight: 600; margin-top: var(--space-2); display: block; }
.tc-cat-card__arrow { position: absolute; right: var(--space-5); opacity: 0; transform: translateX(-4px); transition: all 0.2s; color: var(--color-accent); }
.tc-cat-card:hover .tc-cat-card__arrow { opacity: 1; transform: translateX(0); }

/* Use Cases */
.tc-use-cases-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: var(--space-4); }
@media (max-width: 1100px) { .tc-use-cases-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 640px)  { .tc-use-cases-grid { grid-template-columns: repeat(2,1fr); } }
.tc-use-card {
  display: flex; flex-direction: column;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  color: var(--color-text-primary);
  transition: all 0.3s var(--ease-out);
}
.tc-use-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-accent); transform: translateY(-2px); }
.tc-use-card__emoji { font-size: 32px; margin-bottom: var(--space-4); }
.tc-use-card__title { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); }
.tc-use-card__desc { font-size: var(--text-xs); color: var(--color-text-secondary); line-height: 1.6; flex: 1; }
.tc-use-card__tags { font-size: var(--text-xs); color: var(--color-accent); font-family: var(--font-mono); margin: var(--space-3) 0; }
.tc-use-card__cta { font-size: var(--text-xs); font-weight: 600; color: var(--color-accent); display: flex; align-items: center; gap: 4px; }

/* Brands */
.tc-brands-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: var(--space-4); }
@media (max-width: 768px) { .tc-brands-grid { grid-template-columns: repeat(3,1fr); } }
.tc-brand-logo {
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  aspect-ratio: 2;
  transition: all 0.2s;
  filter: grayscale(1); opacity: 0.6;
}
.tc-brand-logo:hover { filter: none; opacity: 1; border-color: var(--color-accent); box-shadow: var(--shadow-sm); }
.tc-brand-logo img { max-height: 36px; object-fit: contain; }
.tc-brand-logo__text { font-size: var(--text-base); font-weight: 700; color: var(--color-text-secondary); }

/* Benefits */
.tc-benefits-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-6); }
@media (max-width: 900px) { .tc-benefits-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 500px) { .tc-benefits-grid { grid-template-columns: 1fr; } }
.tc-benefit { display: flex; flex-direction: column; gap: var(--space-3); }
.tc-benefit__icon { color: var(--color-accent); }
.tc-benefit__title { font-size: var(--text-base); font-weight: 600; }
.tc-benefit__text { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; }

/* Blog */
.tc-blog-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); overflow: hidden; transition: box-shadow 0.3s, transform 0.3s; }
.tc-blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.tc-blog-card__img-wrap { display: block; aspect-ratio: 3/2; overflow: hidden; background: var(--color-bg-secondary); }
.tc-blog-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.tc-blog-card:hover .tc-blog-card__img { transform: scale(1.04); }
.tc-blog-card__img-placeholder { width: 100%; height: 100%; background: var(--color-bg-tertiary); }
.tc-blog-card__body { padding: var(--space-5); }
.tc-blog-card__cat { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent); margin-bottom: var(--space-3); display: block; }
.tc-blog-card__title { font-size: var(--text-base); font-weight: 600; line-height: 1.4; margin-bottom: var(--space-3); }
.tc-blog-card__title a { color: inherit; } .tc-blog-card__title a:hover { color: var(--color-accent); }
.tc-blog-card__excerpt { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; margin-bottom: var(--space-4); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tc-blog-card__meta { font-size: var(--text-xs); color: var(--color-text-muted); display: flex; gap: var(--space-2); align-items: center; }

/* =====================================================
   CATALOG CSS
   ===================================================== */
.tc-archive-header { padding: var(--space-6) 0; }
.tc-archive-header__title { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; margin: var(--space-3) 0; }
.tc-archive-header__desc { color: var(--color-text-secondary); font-size: var(--text-sm); max-width: 600px; line-height: 1.7; }
.tc-archive-subcats { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-4); }
.tc-subcat-pill { padding: 7px 16px; border: 1.5px solid var(--color-border); border-radius: var(--radius-full); font-size: var(--text-sm); color: var(--color-text-secondary); transition: all 0.15s; }
.tc-subcat-pill.active, .tc-subcat-pill:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-light); }
.tc-catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-8); align-items: start; padding-bottom: var(--space-16); }
@media (max-width: 900px) { .tc-catalog-layout { grid-template-columns: 1fr; } }
.tc-catalog-sidebar { position: sticky; top: calc(var(--header-height) + 16px); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-5); max-height: calc(100vh - var(--header-height) - 48px); overflow-y: auto; }
.tc-catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); flex-wrap: wrap; }
.tc-catalog-toolbar__left, .tc-catalog-toolbar__right { display: flex; align-items: center; gap: var(--space-3); }
.tc-catalog-count { font-size: var(--text-sm); color: var(--color-text-muted); white-space: nowrap; }
.tc-catalog-sort select { height: 36px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: var(--text-sm); background: var(--color-surface); color: var(--color-text-primary); }
.tc-view-toggle { display: flex; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.tc-view-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); transition: all 0.15s; }
.tc-view-btn.active { background: var(--color-accent); color: white; }
.tc-catalog-grid[data-view="list"] { --grid-cols: 1 !important; }
.tc-catalog-grid[data-view="list"] .product-card { display: flex; flex-direction: row; }
.tc-catalog-grid[data-view="list"] .product-card__media { width: 200px; flex-shrink: 0; }
.tc-catalog-pagination { margin-top: var(--space-10); display: flex; justify-content: center; }
.tc-catalog-pagination .page-numbers { display: flex; gap: var(--space-2); }
.tc-catalog-pagination a, .tc-catalog-pagination span { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--color-text-secondary); }
.tc-catalog-pagination .current { background: var(--color-accent); color: white; border-color: var(--color-accent); }
.tc-catalog-pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Filters */
.tc-filters { display: flex; flex-direction: column; gap: 0; }
.tc-filter-group { border-bottom: 1px solid var(--color-border); }
.tc-filter-group__toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-text-primary); background: none; border: none; cursor: pointer; }
.tc-filter-group__chevron { transition: transform 0.2s; color: var(--color-text-muted); }
.tc-filter-group__toggle[aria-expanded="false"] .tc-filter-group__chevron { transform: rotate(-90deg); }
.tc-filter-group__body { padding-bottom: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.tc-filter-check { display: flex; align-items: center; gap: var(--space-3); cursor: pointer; font-size: var(--text-sm); color: var(--color-text-secondary); }
.tc-filter-check:hover { color: var(--color-text-primary); }
.tc-filter-check input { display: none; }
.tc-filter-check__box { width: 18px; height: 18px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); transition: all 0.15s; flex-shrink: 0; position: relative; }
.tc-filter-check:has(input:checked) .tc-filter-check__box { background: var(--color-accent); border-color: var(--color-accent); }
.tc-filter-check:has(input:checked) .tc-filter-check__box::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: white; font-size: 11px; font-weight: 700; }
.tc-filter-check__count { margin-left: auto; font-size: var(--text-xs); color: var(--color-text-muted); }
.tc-filter-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tc-filter-pill { display: inline-flex; }
.tc-filter-pill input { display: none; }
.tc-filter-pill span, .tc-filter-pill:not(:has(input)) { padding: 5px 12px; border: 1.5px solid var(--color-border); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 500; color: var(--color-text-secondary); cursor: pointer; transition: all 0.15s; }
.tc-filter-pill:has(input:checked) span, .tc-filter-pill.active { border-color: var(--color-accent) !important; background: var(--color-accent) !important; color: white !important; }
.tc-filter-group--simple { padding: var(--space-4) 0; display: flex; flex-direction: column; gap: var(--space-3); border-bottom: 1px solid var(--color-border); }
.tc-filters__actions { padding-top: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }

/* Active Filters */
.tc-active-filters { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.tc-active-filter { display: inline-flex; align-items: center; gap: var(--space-2); padding: 5px 10px; background: var(--color-accent-light); border: 1px solid var(--color-accent-muted); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 500; color: var(--color-accent); transition: all 0.15s; }
.tc-active-filter:hover { background: var(--color-accent); color: white; }
.tc-active-filter--clear { background: var(--color-bg-tertiary); border-color: var(--color-border); color: var(--color-text-secondary); }

/* =====================================================
   PRODUCT PAGE CSS
   ===================================================== */
.tc-product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start; padding: var(--space-8) 0; }
@media (max-width: 900px) { .tc-product-layout { grid-template-columns: 1fr; } }

/* Gallery */
.tc-product-gallery { display: grid; grid-template-columns: 80px 1fr; gap: var(--space-4); position: sticky; top: calc(var(--header-height) + 16px); }
@media (max-width: 500px) { .tc-product-gallery { grid-template-columns: 1fr; } }
.tc-gallery-thumbs { display: flex; flex-direction: column; gap: var(--space-2); }
@media (max-width: 500px) { .tc-gallery-thumbs { flex-direction: row; overflow-x: auto; } }
.tc-gallery-thumb { width: 80px; height: 60px; border: 2px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0; transition: border-color 0.15s; padding: 0; }
.tc-gallery-thumb.active, .tc-gallery-thumb:hover { border-color: var(--color-accent); }
.tc-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.tc-gallery-main { position: relative; background: var(--color-bg-secondary); border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 4/3; }
.tc-gallery-slide { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; }
.tc-gallery-slide.active { display: flex; }
.tc-gallery-img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-6); }
.tc-gallery-zoom-hint { position: absolute; bottom: var(--space-4); right: var(--space-4); font-size: var(--text-xs); color: var(--color-text-muted); display: flex; align-items: center; gap: var(--space-1); opacity: 0; transition: opacity 0.2s; }
.tc-gallery-main:hover .tc-gallery-zoom-hint { opacity: 1; }
.tc-product-badges { position: absolute; top: var(--space-4); left: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }

/* Summary */
.tc-product-summary { display: flex; flex-direction: column; gap: var(--space-5); }
.tc-product-summary__brand { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.tc-product-summary__brand:hover { color: var(--color-accent); }
.tc-product-summary__title { font-size: clamp(20px, 3vw, 28px); font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.tc-product-summary__rating { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.tc-product-summary__rating-count { font-size: var(--text-sm); color: var(--color-text-muted); }
.tc-product-summary__rating-count:hover { color: var(--color-accent); }
.tc-product-summary__sku { font-size: var(--text-xs); color: var(--color-text-muted); font-family: var(--font-mono); margin-left: auto; }
.tc-price--lg .tc-price__current { font-size: 32px; }
.tc-product-summary__installment { font-size: var(--text-xs); color: var(--color-text-muted); }
.tc-product-summary__stock { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; }
.tc-product-summary__stock.in-stock { color: var(--color-success); }
.tc-product-summary__stock.out-stock { color: var(--color-error); }
.tc-product-specs-mini__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-3); background: var(--color-bg-secondary); border-radius: var(--radius-lg); padding: var(--space-5); }
.tc-product-specs-mini__item { display: flex; flex-direction: column; gap: 3px; }
.tc-product-specs-mini__label { font-size: var(--text-xs); color: var(--color-text-muted); }
.tc-product-specs-mini__val { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-primary); }
.tc-product-summary__cta { display: flex; flex-direction: column; gap: var(--space-3); }
.tc-product-summary__actions { display: flex; gap: var(--space-5); }
.tc-action-link { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-secondary); transition: color 0.2s; }
.tc-action-link:hover { color: var(--color-accent); }
.tc-action-link.active { color: var(--color-error); }
.tc-trust-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.tc-trust-item { display: flex; align-items: flex-start; gap: var(--space-3); }
.tc-trust-item > svg, .tc-trust-item > span:first-child { color: var(--color-accent); flex-shrink: 0; }
.tc-trust-item div strong { display: block; font-size: var(--text-xs); font-weight: 600; margin-bottom: 2px; }
.tc-trust-item div span { display: block; font-size: var(--text-xs); color: var(--color-text-muted); }

/* Specs Table */
.tc-specs-table-wrap { display: flex; flex-direction: column; gap: var(--space-6); }
.tc-specs-group__title { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-3); color: var(--color-text-primary); }
.tc-specs-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.tc-specs-table tr:nth-child(odd) td, .tc-specs-table tr:nth-child(odd) th { background: var(--color-bg-secondary); }
.tc-specs-table th, .tc-specs-table td { padding: 10px 14px; text-align: left; }
.tc-specs-table th { width: 40%; color: var(--color-text-muted); font-weight: 500; }
.tc-specs-table td { color: var(--color-text-primary); font-weight: 500; }
.tc-specs-table tr:first-child th { border-radius: var(--radius-sm) 0 0 0; }
.tc-specs-table tr:first-child td { border-radius: 0 var(--radius-sm) 0 0; }

/* FAQ */
.tc-faq { display: flex; flex-direction: column; }
.tc-accordion { border-bottom: 1px solid var(--color-border); }
.tc-accordion__toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) 0; font-size: var(--text-base); font-weight: 500; color: var(--color-text-primary); background: none; border: none; cursor: pointer; text-align: left; gap: var(--space-4); }
.tc-accordion__icon { flex-shrink: 0; color: var(--color-text-muted); transition: transform 0.2s; }
.tc-accordion__toggle[aria-expanded="true"] .tc-accordion__icon { transform: rotate(-180deg); }
.tc-accordion__body { padding-bottom: var(--space-5); }
.tc-accordion__body p { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.7; }

/* Quick View */
.tc-qv { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
@media (max-width: 640px) { .tc-qv { grid-template-columns: 1fr; } }
.tc-qv__img { width: 100%; border-radius: var(--radius-lg); background: var(--color-bg-secondary); aspect-ratio: 4/3; object-fit: contain; padding: var(--space-4); }
.tc-qv__title { font-size: var(--text-xl); font-weight: 700; line-height: 1.2; margin-bottom: var(--space-4); }
.tc-qv__specs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); padding: var(--space-4); background: var(--color-bg-secondary); border-radius: var(--radius-lg); }
.tc-qv__spec-label { font-size: var(--text-xs); color: var(--color-text-muted); display: block; }
.tc-qv__spec-val { font-size: var(--text-sm); font-weight: 600; display: block; }

/* Sticky Mobile CTA */
.tc-sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-4);
  z-index: 800;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  transform: translateY(100%); transition: transform 0.3s;
}
.tc-sticky-cta.visible { transform: translateY(0); }
.tc-sticky-cta__price { display: flex; align-items: center; gap: var(--space-3); }
.tc-sticky-cta__actions { display: flex; gap: var(--space-3); }

/* Prose */
.tc-prose { max-width: 72ch; line-height: 1.8; color: var(--color-text-secondary); }
.tc-prose h2 { font-size: var(--text-xl); font-weight: 700; color: var(--color-text-primary); margin: var(--space-8) 0 var(--space-4); }
.tc-prose h3 { font-size: var(--text-lg); font-weight: 600; color: var(--color-text-primary); margin: var(--space-6) 0 var(--space-3); }
.tc-prose p { margin-bottom: var(--space-5); }
.tc-prose ul, .tc-prose ol { padding-left: var(--space-6); margin-bottom: var(--space-5); }
.tc-prose ul li { list-style: disc; margin-bottom: var(--space-2); }
.tc-prose ol li { list-style: decimal; margin-bottom: var(--space-2); }
.tc-prose img { border-radius: var(--radius-lg); margin: var(--space-6) 0; }
.tc-prose strong { color: var(--color-text-primary); }
.tc-prose a { color: var(--color-accent); }

/* Mini Cart */
.tc-mini-cart { display: flex; flex-direction: column; gap: var(--space-4); }
.tc-mini-cart__item { display: flex; align-items: center; gap: var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border); }
.tc-mini-cart__img-wrap { flex-shrink: 0; }
.tc-mini-cart__img-wrap img { width: 72px; height: 54px; object-fit: contain; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.tc-mini-cart__img-placeholder { width: 72px; height: 54px; background: var(--color-bg-secondary); border-radius: var(--radius-md); }
.tc-mini-cart__info { flex: 1; min-width: 0; }
.tc-mini-cart__name { font-size: var(--text-sm); font-weight: 500; color: var(--color-text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; margin-bottom: 4px; }
.tc-mini-cart__name:hover { color: var(--color-accent); }
.tc-mini-cart__meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.tc-mini-cart__price { color: var(--color-accent); font-weight: 600; }
.tc-mini-cart__remove { flex-shrink: 0; color: var(--color-text-muted); padding: var(--space-1); border-radius: var(--radius-sm); transition: all 0.15s; }
.tc-mini-cart__remove:hover { color: var(--color-error); background: rgba(220,38,38,0.1); }
.tc-cart-drawer__total { display: flex; justify-content: space-between; align-items: center; font-size: var(--text-base); margin-bottom: var(--space-4); }
.tc-cart-drawer__total-price { font-size: var(--text-xl); font-weight: 700; font-family: var(--font-mono); }
.tc-cart-drawer__actions { display: flex; flex-direction: column; gap: var(--space-3); }

/* =====================================================
   FIX #1 — MEGA MENU: ACTIVE LINK STATE
   ===================================================== */
.tc-mega-menu__link.current {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 600;
  position: relative;
}
.tc-mega-menu__link.current::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.tc-mega-menu__link.current .tc-mega-menu__count {
  color: var(--color-accent);
}

/* =====================================================
   FIX #2 — MOBILE NAV: ACTIVE STATE (wp_nav_menu classes)
   ===================================================== */
.tc-mobile-nav .current-menu-item > a,
.tc-mobile-nav .current-menu-ancestor > a,
.tc-mobile-nav .current-page-ancestor > a,
.tc-mobile-nav .current_page_item > a,
.tc-mobile-nav .current_page_ancestor > a {
  color: var(--color-accent);
  background: var(--color-accent-light);
  font-weight: 600;
}

/* =====================================================
   FIX #3 — HEADER: MOBILE RESPONSIVE (была пустая)
   ===================================================== */
@media (max-width: 768px) {

  /* Скрываем элементы, которым нет места на мобиле */
  .tc-catalog-nav   { display: none !important; }
  .tc-header-search { display: none !important; }

  /* Уплотняем хедер */
  .tc-header__inner  { gap: var(--space-1); justify-content: space-between; }
  .tc-header-actions { gap: 0; }
  .tc-header-action  { padding: 6px 8px; }
  .tc-theme-toggle   { width: 36px; height: 36px; padding: 0; }

  /* Hero адаптив */
  .tc-hero__content  { padding: var(--space-8) 0; }
  .tc-hero__ctas     { flex-direction: column; gap: var(--space-3); }
  .tc-hero__ctas .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Каталог: боковая панель → drawer (скрыта, JS показывает) */
  .tc-catalog-layout { grid-template-columns: 1fr; }
  .tc-catalog-sidebar {
    display: none;
    position: static;
    max-height: none;
    overflow-y: visible;
    border-radius: 0;
    border: none;
  }

  /* Сетка товаров: 2 колонки на мобиле */
  .tc-product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-3);
  }

  /* Product page: галерея под описание */
  .tc-product-layout { gap: var(--space-6); }

  /* Sticky CTA: горизонтально */
  .tc-sticky-cta {
    flex-direction: row;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    align-items: center;
  }
  .tc-sticky-cta__actions { flex: 1; }

  /* Quick finder: всё в одну колонку */
  .tc-finder-row { flex-direction: column; align-items: flex-start; }
  .tc-finder-row--price { flex-direction: row; }
}

@media (max-width: 400px) {
  .tc-product-grid { grid-template-columns: 1fr !important; }
  .tc-hero__headline { font-size: clamp(22px, 7vw, 32px); }
  .tc-header-action[aria-label] { padding: 6px 6px; }
}

/* =====================================================
   PRIMARY NAV — заменяет кнопку "Каталог" + мега-меню
   Управляется: Внешний вид → Меню → "Основное меню"
   ===================================================== */
.tc-primary-nav {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.tc-primary-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

/* Пункт первого уровня */
.tc-primary-nav__list > .menu-item {
  position: relative;
  flex-shrink: 0;
}

.tc-primary-nav__list > .menu-item > a {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--header-height);
  padding: 0 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.tc-primary-nav__list > .menu-item > a:hover,
.tc-primary-nav__list > .menu-item.current-menu-item > a,
.tc-primary-nav__list > .menu-item.current-menu-ancestor > a,
.tc-primary-nav__list > .menu-item.current-menu-parent > a {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Стрелка у пунктов с дочерними */
.tc-primary-nav__list > .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.5;
  flex-shrink: 0;
}

/* Подменю второго уровня */
.tc-primary-nav__list .sub-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  list-style: none;
  padding: var(--space-2) 0;
  margin: 0;
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}

.tc-primary-nav__list .menu-item:hover > .sub-menu,
.tc-primary-nav__list .menu-item:focus-within > .sub-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.tc-primary-nav__list .sub-menu a {
  display: block;
  padding: 9px 16px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.tc-primary-nav__list .sub-menu a:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.tc-primary-nav__list .sub-menu .current-menu-item > a {
  color: var(--color-accent);
  font-weight: 600;
}

/* ul.products override removed — карточки теперь прямые потомки .tc-catalog-grid */

/* =====================================================
   FIX: FEATURED PRODUCTS — 2 КОЛОНКИ НА МОБИЛЕ
   inline style="--grid-cols:4" перебивает медиа-запросы,
   поэтому используем grid-template-columns напрямую с !important
   ===================================================== */

@media (max-width: 768px) {
  .tc-featured-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}

/* На очень маленьких экранах — тоже 2, не 1: читаемо и компактно */
@media (max-width: 400px) {
  .tc-featured-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* =====================================================
   FIX: CATALOG SIDEBAR — скрываем при ≤900px (не ≤768px)
   В диапазоне 769-900px сайдбар был виден, но layout
   уже был однаколоночным → sidebar занимал всю ширину
   и толкал товары вниз (эффект "пол-экрана")
   ===================================================== */

@media (max-width: 900px) {
  .tc-catalog-sidebar {
    display: none !important;
  }
}

/* =====================================================
   FIX: CATALOG GRID — корректная раскладка
   Карточки теперь прямые потомки .tc-catalog-grid.tc-grid,
   ul.products больше не используется в archive-product.php
   ===================================================== */

/* Предотвращаем overflow карточек в узких колонках */
.tc-catalog-grid .product-card,
.tc-featured-grid .product-card {
  min-width: 0;
  width: 100%;
}

/* Catalog grid: 4 колонки на десктопе */
.tc-catalog-grid.tc-grid {
  --grid-cols: 4;
}

@media (max-width: 1200px) {
  .tc-catalog-grid.tc-grid { --grid-cols: 3; }
}

@media (max-width: 900px) {
  /* Сайдбар скрыт → можно дать чуть больше колонок */
  .tc-catalog-grid.tc-grid { --grid-cols: 3; }
}

@media (max-width: 640px) {
  .tc-catalog-grid.tc-grid { --grid-cols: 2; gap: 12px; }
}

/* =====================================================
   FIX: CATALOG SIDEBAR — правильный брейкпоинт
   ===================================================== */

/* На планшете (≤900px) сайдбар уходит в drawer */
@media (max-width: 900px) {
  .tc-catalog-sidebar {
    display: none !important;
  }
  /* Layout переходит в 1 колонку (уже есть в 900px правиле) */
}

/* =====================================================
   FIX: FEATURED PRODUCTS — 2 колонки на мобиле
   inline style="--grid-cols:4" перебит через grid-template-columns
   ===================================================== */
@media (max-width: 640px) {
  .tc-featured-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}


/* Dark mode toggle — hidden (light-only site) */
.tc-theme-toggle, .tc-theme-toggle--sm { display: none !important; }
[data-theme="dark"] { /* force light overrides just in case */
  --color-bg: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-text-primary: #1a1a2e;
  --color-text-secondary: #64748b;
}

/* =====================================================
   PRODUCT CARD — полные стили карточки
   ===================================================== */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  height: 100%;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Media */
.product-card__media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-bg-secondary);
  flex-shrink: 0;
}
.product-card__img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: var(--space-3);
  transition: transform 0.4s var(--ease-out);
}
.product-card:hover .product-card__img--primary {
  transform: scale(1.04);
}
.product-card__img--secondary {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.product-card:hover .product-card__img--secondary {
  opacity: 1;
}

/* Badges */
.product-card__badges {
  position: absolute; top: var(--space-3); left: var(--space-3);
  display: flex; flex-direction: column; gap: 4px;
  z-index: 2;
}

/* Hover actions (wishlist/compare) */
.product-card__actions {
  position: absolute; top: var(--space-3); right: var(--space-3);
  display: flex; flex-direction: column; gap: 6px;
  z-index: 2;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s, transform 0.2s;
}
.product-card:hover .product-card__actions { opacity: 1; transform: translateX(0); }
.product-card__action-btn {
  width: 34px; height: 34px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.15s;
  cursor: pointer;
}
.product-card__action-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.product-card__action-btn.active { color: var(--color-error); border-color: var(--color-error); }

/* Quick View */
.product-card__quick-view {
  position: absolute; bottom: var(--space-3); left: 50%;
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 2;
}
.product-card:hover .product-card__quick-view {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Body */
.product-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-2);
}
.product-card__brand {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}
.product-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__title a { color: inherit; }
.product-card__title a:hover { color: var(--color-accent); }
.product-card__specs {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Rating */
.product-card__rating {
  display: flex; align-items: center; gap: var(--space-2);
}
.tc-stars { display: flex; gap: 2px; color: #f59e0b; font-size: 12px; }
.product-card__rating-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Footer: price + button */
.product-card__footer {
  padding: var(--space-4);
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
}

/* Availability badge */
.product-card__availability {
  display: flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 600;
}
.product-card__availability.in-stock  { color: var(--color-success); }
.product-card__availability.out-stock { color: var(--color-error); }

/* Add to cart button */
.product-card__add-cart {
  width: 100%;
  justify-content: center;
  white-space: nowrap;           /* не обрезаем «В корзину» */
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(12px, 1.1vw, 14px);
  padding: 9px 12px;
}

/* Price inside footer */
.product-card__footer .tc-price__current {
  font-size: var(--text-lg);
  font-weight: 800;
}
.product-card__footer .tc-price__old {
  font-size: var(--text-xs);
}

/* List view overrides */
.tc-catalog-grid[data-view="list"] .product-card {
  flex-direction: row;
  height: auto;
}
.tc-catalog-grid[data-view="list"] .product-card__media {
  width: 220px;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.tc-catalog-grid[data-view="list"] .product-card__body {
  flex: 1;
}
.tc-catalog-grid[data-view="list"] .product-card__footer {
  border-top: none;
  border-left: 1px solid var(--color-border);
  margin-top: 0;
  padding: var(--space-4);
  width: 180px;
  flex-shrink: 0;
  justify-content: center;
}

/* Fix WooCommerce default ul.products if ever used */
.woocommerce .products, .woocommerce-page .products {
  max-width: 100% !important;
  width: 100% !important;
}
.woocommerce ul.products li.product .button {
  white-space: nowrap;
  font-size: clamp(12px, 1.2vw, 14px);
  padding: 8px 12px;
}


/* Kaspi-like компактные кнопки в каталоге */
.product-card__add-cart{padding:6px 10px;font-size:13px;min-height:0;line-height:1.2;border-radius:8px;}


/* ===== Perxa: мобильные UX-правки ===== */
@media (max-width: 640px) {
  /* Hero: боковые отступы, чтобы текст не лип к краям */
  .tc-hero__content { padding-left: 16px; padding-right: 16px; max-width: 100%; }
  .tc-hero__headline { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; }
  .tc-hero__sub { font-size: 15px; }
  /* Стрелки карусели прячем — на телефоне свайп и точки удобнее и не перекрывают текст */
  .tc-hero-prev, .tc-hero-next { display: none !important; }
  /* Категории: компактные карточки-строки в духе Kaspi */
  .tc-cat-card { gap: 12px; padding: 12px 14px; border-radius: 12px; }
  .tc-cat-card__img-wrap { width: 48px; height: 48px; }
  .tc-cat-card__icon { font-size: 26px; }
  .tc-cat-card__name { font-size: 15px; margin-bottom: 0; }
}


/* ===== Perxa: подкатегории-чипы ===== */
.tc-subcat-pill.active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
@media (max-width: 640px) {
  .tc-archive-subcats {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-right: -16px;
    padding-right: 16px;
    padding-bottom: 4px;
  }
  .tc-archive-subcats::-webkit-scrollbar { display: none; }
  .tc-subcat-pill { flex: 0 0 auto; white-space: nowrap; }
}


/* ===== Perxa: категории плитками (Kaspi-style) ===== */
.tc-categories-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.tc-cat-card { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px 8px; border-radius: 16px; }
.tc-cat-card__img-wrap { width: 64px; height: 64px; border-radius: 14px; }
.tc-cat-card__img { width: 100%; height: 100%; object-fit: cover; }
.tc-cat-card__icon { font-size: 34px; }
.tc-cat-card__body { width: 100%; }
.tc-cat-card__name { font-size: 13px; font-weight: 500; margin: 0; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) {
  .tc-categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tc-cat-card { padding: 12px 6px; gap: 6px; }
  .tc-cat-card__img-wrap { width: 56px; height: 56px; }
  .tc-cat-card__icon { font-size: 30px; }
  .tc-cat-card__name { font-size: 12px; }
}

/* ===== Perxa: карусель категорий (Swiper) ===== */
.tc-cat-swiper { position: relative; padding: 0 4px; }
.tc-cat-swiper .tc-categories-grid { display: flex !important; flex-wrap: nowrap; }
.tc-cat-swiper .tc-categories-grid { gap: 12px !important; }
.tc-cat-swiper .tc-cat-card{width:132px !important;flex:0 0 132px !important;max-width:132px !important;}
.tc-cat-swiper .swiper-button-prev,
.tc-cat-swiper .swiper-button-next { width: 40px; height: 40px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.14); border-radius: var(--radius-full); color: var(--color-text-primary); --swiper-navigation-size: 15px; }
.tc-cat-swiper .swiper-button-prev:hover,
.tc-cat-swiper .swiper-button-next:hover { background: var(--color-accent); color: #fff; }
@media (max-width: 640px) {
    .tc-cat-swiper .tc-cat-card { width: 96px !important; flex: 0 0 96px !important; max-width: 96px !important; }
  .tc-cat-swiper .swiper-button-prev, .tc-cat-swiper .swiper-button-next { display: none !important; }
}


/* ===== Perxa: багфиксы (список / корзина / аккаунт) ===== */
.tc-catalog-grid[data-view="list"] { grid-template-columns: 1fr !important; }
@media (max-width: 640px) {
  .tc-catalog-grid[data-view="list"] .product-card__media { width: 120px; flex-shrink: 0; }
}
.tc-drawer { height: 100vh; height: 100dvh; }
@media (max-width: 640px) {
  .woocommerce-account .woocommerce { padding-left: 16px; padding-right: 16px; }
}


/* ===== Perxa: степпер количества (карточка) ===== */
.tc-qty { display: flex; align-items: center; justify-content: space-between; background: #F0F0F2; border-radius: 10px; height: 40px; margin-bottom: 8px; overflow: hidden; }
.tc-qty__btn { flex: 0 0 40px; height: 100%; border: none; background: transparent; font-size: 20px; line-height: 1; color: var(--color-text-primary); cursor: pointer; display: flex; align-items: center; justify-content: center; user-select: none; padding: 0; }
.tc-qty__btn:hover { color: var(--color-accent); }
.tc-qty__val { flex: 1 1 auto; width: 100%; min-width: 0; text-align: center; border: none; border-left: 1px solid rgba(0,0,0,0.08); border-right: 1px solid rgba(0,0,0,0.08); background: transparent; font-size: 15px; font-weight: 600; font-family: inherit; color: var(--color-text-primary); -moz-appearance: textfield; }
.tc-qty__val:focus { outline: none; }


/* Perxa: степпер показываем только в корзине */
.tc-qty { display: none; }
.tc-qty.tc-qty--active { display: flex; }


/* ===== Perxa: сортировка под общий стиль ===== */
select.orderby, .woocommerce-ordering select.orderby {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  border: 1px solid #E0E0E5;
  border-radius: 8px;
  height: 36px;
  padding: 0 34px 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text-primary);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
select.orderby:hover { border-color: var(--color-accent); }
select.orderby:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-muted); }


/* Perxa: список — форсим 1 колонку через ID (style.css перебивал по порядку) */
#tc-catalog-grid[data-view="list"] { grid-template-columns: 1fr !important; }


/* ponytail: сравнение скрыто через CSS. Полностью убрать — деактивировать YITH Compare. */
a[href*="yith-compare"],
.compare-button,
.compare.button,
a.compare.button,
.product-card__compare,
.tc-compare-count { display: none !important; }


/* ponytail: галерея без превью — главная картинка на всю ширину */
.tc-gallery-main:only-child { grid-column: 1 / -1; }
.tc-gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }


/* ponytail: единый стиль фильтров — пилюли превращаем в чекбоксы (input уже внутри label) */
.tc-filter-pills { flex-direction: column; gap: 10px; }
.tc-filter-pill { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--color-text-secondary); }
.tc-filter-pill:hover { color: var(--color-text-primary); }
.tc-filter-pill::before {
  content: ''; width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  transition: all .15s; display: block;
}
.tc-filter-pill:has(input:checked)::before {
  background: var(--color-accent); border-color: var(--color-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}
/* обнуляем «пилюльный» вид подписи */
.tc-filter-pill span, .tc-filter-pill:not(:has(input)) {
  padding: 0 !important; border: none !important; border-radius: 0 !important;
  background: transparent !important; font-size: 14px !important;
}
.tc-filter-pill:has(input:checked) span, .tc-filter-pill.active {
  border: none !important; background: transparent !important; color: var(--color-text-primary) !important;
}
/* счётчик — как у обычных чекбоксов */
.tc-filter-pill .tc-filter-count { margin-left: auto; font-size: 12px !important; color: var(--color-text-muted) !important; }


/* Perxa: hero-карточка (по макету) */
@media (min-width: 901px) {
  .tc-hero { max-width: var(--container-xl); margin: 20px auto 0; padding: 0 var(--container-pad); }
  .tc-hero .swiper, .tc-hero__slide-inner { border-radius: 20px; overflow: hidden; }
  .tc-hero__slide-inner { height: 480px; }
  .tc-hero__content { padding-left: 48px; padding-right: 48px; }
}
.tc-hero-prev, .tc-hero-next { background: #fff !important; color: #1A1B18 !important; box-shadow: 0 2px 14px rgba(0,0,0,.16); }
.tc-hero-prev:hover, .tc-hero-next:hover { background: #fff !important; }
.tc-hero__slide-inner:not(:has(.tc-hero__bg-img)) { background: linear-gradient(135deg,#E8F6F7 0%,#F2F6FB 55%,#F0EAF8 100%); }


/* Perxa: две колонки — преимущества + товары */
.tc-home-split{display:grid;grid-template-columns:280px 1fr;gap:24px;align-items:start}
.tc-why{background:var(--color-bg-secondary);border:1px solid var(--color-border);border-radius:16px;padding:24px}
.tc-why__title{font-size:18px;font-weight:700;margin:0 0 18px;line-height:1.3}
.tc-why__item{display:flex;gap:12px;align-items:flex-start;margin-bottom:16px;font-size:14px;color:var(--color-text-secondary);line-height:1.4}
.tc-why__item:last-child{margin-bottom:0}
.tc-why__item svg{flex-shrink:0;color:var(--color-accent);margin-top:1px}
@media(max-width:900px){.tc-home-split{grid-template-columns:1fr}.tc-why{order:2}}


/* Perxa: плитки категорий по референсу */
.tc-categories-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
.tc-cat-card{padding:18px 10px;gap:10px;border-radius:14px}
.tc-cat-card__img-wrap{width:76px;height:76px;border-radius:12px}
.tc-cat-card__icon{font-size:38px}
.tc-cat-card__name{font-size:13px;font-weight:500}
@media(max-width:640px){.tc-categories-grid{grid-template-columns:repeat(3,1fr);gap:8px}.tc-cat-card__img-wrap{width:56px;height:56px}}


/* Perxa: плитки категорий — вид как на референсе */
.tc-categories-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
.tc-categories-grid a.tc-cat-card{flex:1 1 140px;max-width:200px;background:var(--color-bg-secondary);border:1px solid transparent;border-radius:14px;padding:16px 10px;color:var(--color-text-primary);transition:background .15s,box-shadow .15s,border-color .15s}
.tc-categories-grid a.tc-cat-card:hover{background:#fff;border-color:var(--color-border);box-shadow:0 4px 14px rgba(0,0,0,.07)}
.tc-categories-grid a.tc-cat-card .tc-cat-card__name{color:var(--color-text-primary);font-size:13px;font-weight:500}
.tc-categories-grid .tc-cat-card__img-wrap{width:84px;height:84px;border-radius:12px}
@media(max-width:640px){.tc-categories-grid a.tc-cat-card{flex:1 1 30%;max-width:none}.tc-categories-grid .tc-cat-card__img-wrap{width:56px;height:56px}}


/* Perxa: hero ниже по высоте (референс) */
@media(min-width:901px){.tc-hero .tc-hero__slide-inner{height:440px !important;min-height:440px !important}.tc-hero .tc-hero__content{padding-top:40px;padding-bottom:40px}}


/* Perxa: положение текста на слайде */
.tc-hero__slide-inner--pos-left .tc-hero__content{margin-left:0 !important;margin-right:auto !important;text-align:left}
.tc-hero__slide-inner--pos-center .tc-hero__content{margin-left:auto !important;margin-right:auto !important}
.tc-hero__slide-inner--pos-right .tc-hero__content{margin-left:auto !important;margin-right:0 !important;text-align:right}
.tc-hero__slide-inner--pos-right .tc-hero__ctas{justify-content:flex-end}
.tc-hero__slide-inner--pos-left .tc-hero__ctas{justify-content:flex-start}


/* Perxa: текст не заезжает под стрелки слайдера */
@media(min-width:901px){
  .tc-hero__slide-inner--pos-left .tc-hero__content{padding-left:88px}
  .tc-hero__slide-inner--pos-right .tc-hero__content{padding-right:88px}
}


/* Perxa: текст hero помещается в высоту */
@media(min-width:901px){
  .tc-hero__content{max-width:820px !important}
  .tc-hero__headline{font-size:clamp(28px,2.6vw,44px) !important;margin-bottom:14px}
  .tc-hero__sub{font-size:16px;margin-bottom:14px}
  .tc-hero__specs{margin-bottom:18px}
}


/* Perxa: убираем лишний воздух между hero, категориями и товарами */
.tc-section.tc-categories{padding-top:28px;padding-bottom:24px}
.tc-section.tc-featured{padding-top:32px}
@media(max-width:640px){.tc-section.tc-categories{padding-top:20px;padding-bottom:16px}.tc-section.tc-featured{padding-top:24px}}


/* Perxa: меньше воздуха после популярных товаров */
.tc-section.tc-featured{padding-bottom:32px}
.tc-featured-more{margin-top:24px !important}
section.pb2b--solutions{padding-top:40px !important}
@media(max-width:640px){.tc-section.tc-featured{padding-bottom:24px}.pb2b--solutions{padding-top:28px}}


/* Perxa: картинка категории во всю ширину, 4:3 без обрезки */
.tc-categories-grid a.tc-cat-card{padding:8px 8px 14px;gap:10px}
.tc-categories-grid .tc-cat-card__img-wrap{width:100% !important;height:auto !important;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:#fff}
.tc-categories-grid .tc-cat-card__img{width:100%;height:100%;object-fit:cover;display:block}
.tc-categories-grid .tc-cat-card__icon{width:100%;aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:10px;font-size:38px}
@media(max-width:640px){.tc-categories-grid a.tc-cat-card{padding:6px 6px 10px}.tc-categories-grid .tc-cat-card__img-wrap{border-radius:8px}}


/* Perxa: кнопка каталога в шапке + пункты меню в панели */
.tc-header__inner .tc-catnav__all{margin-left:10px;margin-right:6px}
.tc-catnav__list ul,.tc-catnav__list li{list-style:none;margin:0;padding:0}
.tc-catnav__list li{display:inline-flex}
.tc-catnav__list li a{padding:8px 12px;border-radius:8px;font-size:14px;color:var(--color-text-secondary);white-space:nowrap;display:inline-block}
.tc-catnav__list li a:hover{background:var(--color-bg-secondary);color:var(--color-text-primary)}


/* Perxa: кнопка каталога в шапке — белый текст */
.tc-header__inner a.tc-catnav__all{color:#fff}
.tc-header__inner a.tc-catnav__all:hover{color:#fff}

/* Perxa: блок КП в стиле слайдера */
.pb2b--cta{background:transparent !important;padding-top:32px;padding-bottom:40px}
.pb2b__cta-box{position:relative;overflow:hidden;border-radius:20px;background-color:#111827;background-size:cover;background-position:center right;background-repeat:no-repeat;padding:48px !important;min-height:220px;align-items:center}
.pb2b__cta-box::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(17,24,39,.95) 0%,rgba(17,24,39,.86) 42%,rgba(17,24,39,.30) 100%);pointer-events:none}
.pb2b__cta-box>*{position:relative;z-index:1}
@media(max-width:768px){.pb2b__cta-box{padding:28px 20px !important;border-radius:16px;background-position:center}.pb2b__cta-box::before{background:linear-gradient(180deg,rgba(17,24,39,.93),rgba(17,24,39,.9))}}

/* ===== Perxa: мобильная версия по макету ===== */
@media(max-width:900px){
  /* Hero — карточка с отступами */
  .tc-hero{padding:12px 12px 0}
  .tc-hero .swiper,.tc-hero__slide-inner{border-radius:16px;overflow:hidden}
  .tc-hero .tc-hero__slide-inner{min-height:340px !important;height:auto !important}
  .tc-hero__headline{font-size:24px !important;line-height:1.2}
  .tc-hero__sub{font-size:14px}
  .tc-hero__content{padding:24px 20px !important}
}
@media(max-width:640px){
  /* Категории — 2 в ряд */
  .tc-categories-grid{gap:10px}
  .tc-categories-grid a.tc-cat-card{flex:1 1 calc(50% - 5px) !important;max-width:none !important}
  /* Преимущества — сетка 2x2 над товарами */
  .tc-home-split .tc-why{order:0}
  .tc-why{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:16px;border-radius:14px}
  .tc-why__title{grid-column:1/-1;font-size:15px;margin:0 0 2px}
  .tc-why__item{margin-bottom:0;font-size:12px;line-height:1.35;gap:8px}
  .tc-why__item svg{width:16px;height:16px}
  /* Популярные товары — сетка 2 в ряд */
  #tc-featured-grid{display:grid !important;grid-template-columns:1fr 1fr;gap:10px;overflow-x:visible;margin-right:0;padding-right:0}
  #tc-featured-grid .product-card{width:auto;flex:none}
}

/* Perxa: фикс переполнения на мобильном + центр блока КП */
.tc-home-split,.tc-home-split__main{min-width:0}
#tc-featured-grid{min-width:0}
@media(max-width:640px){
  .pb2b__cta-box{flex-direction:column;text-align:center;align-items:center;gap:16px}
  .pb2b__cta-box>*{width:100%}
  .pb2b__cta-actions{display:flex;flex-direction:column;gap:10px;align-items:stretch;justify-content:center}
  .pb2b__cta-actions .btn{width:100%;justify-content:center}
}

/* Perxa: B2B-блоки по ширине остальной страницы */
.pb2b__wrap:not(.pb2b__cta-box){max-width:var(--container-xl) !important;padding-left:24px;padding-right:24px;margin-left:auto;margin-right:auto}
.pb2b__cta-box{max-width:calc(var(--container-xl) - 48px) !important;margin-left:auto;margin-right:auto}
@media(max-width:640px){.pb2b__wrap:not(.pb2b__cta-box){padding-left:16px;padding-right:16px}.pb2b__cta-box{max-width:calc(100% - 32px) !important}}

/* Perxa: шапка на ПК — иконки к правому краю, поиск шире */
@media(min-width:901px){
  .tc-header__inner .tc-header-search{max-width:820px}
  .tc-header__inner .tc-header-actions{margin-left:auto}
}


/* Perxa: панель категорий компактнее и по центру */
.tc-catnav__list{justify-content:center}
.tc-catnav__list li a{padding:5px 10px;font-size:13px}

/* ===== Perxa: карусель категорий в шапке (Swiper) ===== */
.tc-catnav-swiper { width: 100%; }
.tc-catnav-swiper .tc-catnav__list { justify-content: flex-start !important; flex-wrap: nowrap !important; overflow: visible !important; }
.tc-catnav-swiper .tc-catnav__list { gap: 8px !important; }
.tc-catnav-swiper .swiper-slide { width: auto; }

/* Perxa: читаемость текста на слайдах (затемнение под текстом + тень) */
.tc-hero__slide-inner{position:relative}
.tc-hero__slide-inner--light-text::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:0}
.tc-hero__slide-inner--light-text.tc-hero__slide-inner--pos-left::after{background:linear-gradient(90deg,rgba(0,0,0,.55) 0%,rgba(0,0,0,.32) 42%,rgba(0,0,0,0) 78%)}
.tc-hero__slide-inner--light-text.tc-hero__slide-inner--pos-right::after{background:linear-gradient(270deg,rgba(0,0,0,.55) 0%,rgba(0,0,0,.32) 42%,rgba(0,0,0,0) 78%)}
.tc-hero__slide-inner--light-text.tc-hero__slide-inner--pos-center::after{background:linear-gradient(180deg,rgba(0,0,0,.30) 0%,rgba(0,0,0,.45) 100%)}
.tc-hero__content{position:relative;z-index:2}
.tc-hero__slide-inner--light-text .tc-hero__headline,
.tc-hero__slide-inner--light-text .tc-hero__sub,
.tc-hero__slide-inner--light-text .tc-hero__specs{text-shadow:0 2px 14px rgba(0,0,0,.55),0 1px 3px rgba(0,0,0,.45)}
.tc-hero__slide-inner--light-text .tc-hero__sub{opacity:1;color:rgba(255,255,255,.95)}
.tc-hero__slide-inner--dark-text .tc-hero__headline,
.tc-hero__slide-inner--dark-text .tc-hero__sub{text-shadow:0 1px 12px rgba(255,255,255,.75)}
@media(max-width:900px){
  .tc-hero__slide-inner--light-text::after{background:linear-gradient(180deg,rgba(0,0,0,.35) 0%,rgba(0,0,0,.55) 100%) !important}
}

/* Perxa: поиск ровно по центру шапки (ПК) */
@media(min-width:1280px){
  .tc-header__inner{position:relative}
  .tc-header__inner .tc-header-search{position:absolute;left:50%;transform:translateX(-50%);margin:0;width:min(820px,calc(100% - 760px));max-width:none}
}

/* Perxa: единый радиус кнопок */
.btn:not(.swiper-button-next):not(.swiper-button-prev){border-radius:10px !important}
.btn--sm,.tc-quick-view-btn{border-radius:8px !important}
.btn--icon{border-radius:10px !important}
.product-card__add-cart{border-radius:10px !important}
.tc-catnav__all{border-radius:10px}
input[type=submit],button.single_add_to_cart_button,.woocommerce button.button,.woocommerce a.button{border-radius:10px !important}

/* Perxa: заголовок слева как в каталоге, текст статьи по центру */
body.page:not(.home):not(.woocommerce-page) .tc-page-content,
body.page:not(.home):not(.woocommerce-page) .tc-breadcrumbs{max-width:none;margin-left:0;margin-right:0}
body.page:not(.home):not(.woocommerce-page) .tc-page-content .tc-prose{max-width:880px;margin-left:auto;margin-right:auto}
body.page:not(.home):not(.woocommerce-page) .pq-page,
body.page:not(.home):not(.woocommerce-page) .pq-intro{max-width:880px;margin-left:auto;margin-right:auto}
@media(max-width:940px){
  body.page:not(.home):not(.woocommerce-page) .tc-page-content .tc-prose{max-width:none}
}


/* Perxa: плавающая кнопка WhatsApp */
.tc-wa-float{position:fixed;right:22px;bottom:22px;z-index:800;display:inline-flex;align-items:center;gap:0;background:#25D366;color:#fff;border-radius:999px;padding:14px;box-shadow:0 8px 26px rgba(37,211,102,.38);text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,gap .22s ease,padding .22s ease}
.tc-wa-float:hover{color:#fff;transform:translateY(-2px);box-shadow:0 12px 30px rgba(37,211,102,.5);gap:10px;padding:14px 20px 14px 14px}
.tc-wa-float__icon{display:flex;align-items:center;justify-content:center;flex-shrink:0}
.tc-wa-float__label{max-width:0;overflow:hidden;white-space:nowrap;opacity:0;font-size:14px;font-weight:600;transition:max-width .22s ease,opacity .18s ease}
.tc-wa-float:hover .tc-wa-float__label{max-width:220px;opacity:1}
.tc-wa-float::after{content:'';position:absolute;inset:0;border-radius:999px;border:2px solid rgba(37,211,102,.65);animation:tcWaPulse 2.4s ease-out infinite;pointer-events:none}
@keyframes tcWaPulse{0%{transform:scale(1);opacity:.7}70%{transform:scale(1.5);opacity:0}100%{transform:scale(1.5);opacity:0}}
@media(max-width:640px){.tc-wa-float{right:14px;bottom:14px;padding:12px}.tc-wa-float:hover{padding:12px}.tc-wa-float__label{display:none}}
@media(prefers-reduced-motion:reduce){.tc-wa-float,.tc-wa-float::after{transition:none;animation:none}}

/* Perxa: WhatsApp — отделяем от фона */
.tc-wa-float{border:3px solid #fff !important;box-shadow:0 6px 20px rgba(0,0,0,.22),0 0 0 1px rgba(0,0,0,.06) !important}
.tc-wa-float:hover{box-shadow:0 10px 28px rgba(0,0,0,.28),0 0 0 1px rgba(0,0,0,.08) !important}
.tc-wa-float__icon svg{width:28px;height:28px;filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))}
@media(max-width:640px){.tc-wa-float{border-width:2px !important}.tc-wa-float__icon svg{width:26px;height:26px}}

/* Perxa: кнопки в блоке КП одной высоты */
.pb2b__cta-actions .btn{min-height:56px;display:inline-flex;align-items:center;justify-content:center;gap:10px;line-height:1;padding-top:0;padding-bottom:0}
.pb2b__cta-actions .btn svg{width:20px;height:20px;flex-shrink:0}
@media(max-width:640px){.pb2b__cta-actions .btn{min-height:52px;width:100%}}

/* Perxa: бегущая лента клиентов */
.pb2b__chips--clients.tc-marquee{display:block !important;overflow:hidden;position:relative;flex-wrap:nowrap;padding-bottom:4px;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 5%,#000 95%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 5%,#000 95%,transparent 100%)}
.tc-marquee__track{display:flex;flex-wrap:nowrap;align-items:center;gap:12px;width:max-content;animation:tcMarquee 55s linear infinite;will-change:transform}
.tc-marquee__track .pb2b-chip{flex:0 0 auto;white-space:nowrap;margin:0}
.tc-marquee:hover .tc-marquee__track{animation-play-state:paused}
@keyframes tcMarquee{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}
@media(max-width:640px){.tc-marquee__track{animation-duration:38s;gap:8px}}
/* лента едет всегда; при «уменьшенном движении» — медленнее, но без ползунка */
@media(prefers-reduced-motion:reduce){
  .tc-marquee__track{animation-name:tcMarquee !important;animation-duration:90s !important;animation-timing-function:linear !important;animation-iteration-count:infinite !important}
}
.tc-marquee__track{animation-name:tcMarquee !important;animation-duration:55s !important;animation-timing-function:linear !important;animation-iteration-count:infinite !important}
@media(max-width:640px){.tc-marquee__track{animation-duration:38s !important}}
.pb2b__chips--clients.tc-marquee{overflow:hidden !important;-ms-overflow-style:none;scrollbar-width:none}
.pb2b__chips--clients.tc-marquee::-webkit-scrollbar{display:none}

/* Perxa: лента клиентов вплотную к футеру */
section.pb2b--clients{padding-bottom:20px !important}
body.home footer,body.home .tc-footer{margin-top:0 !important}
@media(max-width:640px){section.pb2b--clients{padding-bottom:16px !important}}

/* Perxa: чекаут — переключатель типа клиента */
.tc-hidden-row{display:none !important}
.tc-ctype{margin:0 0 24px}
.tc-ctype__title{font-size:15px;font-weight:600;margin-bottom:10px}
.tc-ctype__opts{display:flex;gap:10px;flex-wrap:wrap}
.tc-ctype__opt{display:inline-flex;align-items:center;gap:8px;padding:12px 18px;border:1.5px solid var(--color-border);border-radius:10px;cursor:pointer;font-size:14px;transition:border-color .15s,background .15s}
.tc-ctype__opt:hover{border-color:var(--color-accent)}
.tc-ctype__opt.is-active{border-color:var(--color-accent);background:var(--color-accent-light)}
.tc-ctype__opt input{accent-color:var(--color-accent);margin:0}
.woocommerce-checkout .form-row{margin-bottom:14px}
.woocommerce-checkout .form-row label{font-size:13px;font-weight:500;margin-bottom:5px;display:block}
.woocommerce-checkout .form-row input.input-text,.woocommerce-checkout .form-row textarea{width:100%;padding:12px 14px;border:1.5px solid var(--color-border);border-radius:10px;font-size:14px;font-family:inherit}
.woocommerce-checkout .form-row input.input-text:focus{border-color:var(--color-accent);outline:none}
@media(max-width:640px){.tc-ctype__opt{flex:1 1 100%;justify-content:center}.woocommerce-checkout .form-row-first,.woocommerce-checkout .form-row-last{width:100%;float:none}}

/* Perxa: отступы и ширина страниц корзины/оформления/кабинета */
body.woocommerce-checkout .tc-main .tc-container,
body.woocommerce-cart .tc-main .tc-container,
body.woocommerce-account .tc-main .tc-container{
  max-width:1240px;margin-left:auto;margin-right:auto;
  padding-left:24px !important;padding-right:24px !important;
}
body.woocommerce-checkout .tc-main,
body.woocommerce-cart .tc-main,
body.woocommerce-account .tc-main{padding-bottom:56px}
@media(max-width:640px){
  body.woocommerce-checkout .tc-main .tc-container,
  body.woocommerce-cart .tc-main .tc-container,
  body.woocommerce-account .tc-main .tc-container{padding-left:16px !important;padding-right:16px !important}
}
/* ============================================================
   FIX 2026-09-13: категории в мобильной карусели схлопывались
   в 0px из-за конфликта со старым (неиспользуемым) правилом
   .tc-categories-grid a.tc-cat-card { flex: 1 1 calc(50% - 5px) }
   Оставляем карточкам фиксированную ширину слайда карусели.
   ============================================================ */
@media (max-width: 640px) {
  .tc-cat-swiper .tc-categories-grid a.tc-cat-card {
    flex: 0 0 96px !important;
    width: 96px !important;
    max-width: 96px !important;
  }
  .tc-cat-swiper .tc-categories-grid .tc-cat-card__img-wrap {
    width: 56px !important;
    height: 56px !important;
    aspect-ratio: auto !important;
  }
}
.tc-cat-swiper, .tc-cat-swiper * { -webkit-user-select: none; user-select: none; }
.tc-cat-swiper img { -webkit-user-drag: none; user-drag: none; }