/* Tool Park — каталог плитками: /catalog.php (разделы) и страницы разделов (подкатегории).
   Шкала отступов 4/8/12/16/24/32/48, размеры шрифта 12/14/16/18/20/24/30,
   радиусы 12/16. Движение — одна кривая, только transform/opacity/цвет. */
:root{ --tpb-ease: cubic-bezier(0.32, 0.72, 0, 1); }

.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Поиск на входе в каталог */
.tpb-search{display:flex;gap:8px;margin:0 0 32px}
.tpb-search input{flex:1;min-width:0;height:48px;padding:0 16px;border:1px solid var(--line,#e7e7e9);border-radius:12px;background:#fff;font-size:16px;line-height:24px;color:var(--black,#0b0b0d);transition:border-color .3s var(--tpb-ease),box-shadow .3s var(--tpb-ease)}
.tpb-search input:focus{outline:0;border-color:var(--red,#f01938);box-shadow:0 0 0 4px #f019381f}
.tpb-search .btn{min-height:48px;padding:8px 24px;border-radius:12px;font-size:16px;font-weight:600}

.tpb-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 16px}
.section .tpb-head h2,.tpb-head h2{margin:0;font-size:24px;line-height:32px;font-weight:700;letter-spacing:-.02em}
.tpb-head h2::after{display:none}
.tpb-head .link-red{font-size:14px;font-weight:600;white-space:nowrap}

/* Разделы: большие плитки с иконкой */
.tpb-sections{display:grid;grid-template-columns:repeat(auto-fill,minmax(272px,1fr));gap:16px;margin:0 0 48px;padding:0;list-style:none}
.tpb-section{position:relative;display:flex;flex-direction:column;gap:16px;padding:24px;border:1px solid var(--line,#e7e7e9);border-radius:16px;background:#fff;transition:border-color .5s var(--tpb-ease),box-shadow .5s var(--tpb-ease),transform .5s var(--tpb-ease)}
.tpb-section-ic{display:grid;place-items:center;width:80px;height:80px;border-radius:12px;background:#fff4f6;color:var(--red,#f01938)}
.tpb-section-ic svg{width:64px;height:64px}
.tpb-section-body{display:flex;flex-direction:column;gap:4px;min-width:0}
.tpb-section-link{font-size:20px;line-height:28px;font-weight:700;letter-spacing:-.01em;color:var(--black,#0b0b0d);text-wrap:balance;overflow-wrap:break-word}
/* Вся плитка кликабельна: растягиваем главную ссылку на карточку */
.tpb-section-link::after{content:"";position:absolute;inset:0;border-radius:16px}
.tpb-section-link:focus-visible{outline:0}
.tpb-section-link:focus-visible::after{outline:3px solid var(--red,#f01938);outline-offset:2px}
.tpb-count{font-size:14px;line-height:20px;color:var(--gray,#696970)}
.tpb-section-groups{display:flex;flex-direction:column;gap:4px;margin:8px 0 0;padding:12px 0 0;list-style:none;border-top:1px solid var(--line,#e7e7e9)}
.tpb-section-groups a{position:relative;z-index:1;display:inline-block;padding:2px 0;font-size:14px;line-height:20px;color:#3b3b41;transition:color .3s var(--tpb-ease)}
.tpb-section-groups a.tpb-more{color:var(--red,#f01938);font-weight:600}

/* Подкатегории на странице раздела */
.tpb-children{margin:0 0 32px}
.tpb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin:0;padding:0;list-style:none}
.tpb-card{position:relative;display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid var(--line,#e7e7e9);border-radius:16px;background:#fff;transition:border-color .5s var(--tpb-ease),box-shadow .5s var(--tpb-ease),transform .5s var(--tpb-ease)}
.tpb-card-link{font-size:16px;line-height:24px;font-weight:700;color:var(--black,#0b0b0d);text-wrap:balance;overflow-wrap:anywhere}
.tpb-card-link::after{content:"";position:absolute;inset:0;border-radius:16px}
.tpb-card-link:focus-visible{outline:0}
.tpb-card-link:focus-visible::after{outline:3px solid var(--red,#f01938);outline-offset:2px}
.tpb-card-sub{display:flex;flex-wrap:wrap;gap:4px 12px;margin:8px 0 0;padding:0;list-style:none}
.tpb-card-sub a{position:relative;z-index:1;font-size:14px;line-height:20px;color:#55555c;transition:color .3s var(--tpb-ease)}
.tpb-more-muted{font-size:14px;line-height:20px;color:#9a9aa1}
.section .tpb-products-title,.tpb-products-title{margin:0 0 16px;font-size:24px;line-height:32px;font-weight:700;letter-spacing:-.02em}
.tpb-products-title::after{display:none}

@media (hover:hover) and (pointer:fine){
  .tpb-section:hover,.tpb-card:hover{border-color:var(--red,#f01938);box-shadow:0 12px 32px #0000000f;transform:translateY(-2px)}
  .tpb-section:hover .tpb-section-link,.tpb-card:hover .tpb-card-link{color:var(--red2,#c90f29)}
  .tpb-section-groups a:hover,.tpb-card-sub a:hover{color:var(--red2,#c90f29)}
}
.tpb-section:active,.tpb-card:active{transform:scale(.98)}

@media (max-width:760px){
  .tpb-search{margin-bottom:24px}
  .tpb-search .btn{padding:8px 16px}
  .section .tpb-head h2,.section .tpb-products-title{font-size:20px;line-height:28px}
  /* На телефоне — список: иконка слева, название справа. Слова не рвутся. */
  .tpb-sections{grid-template-columns:1fr;gap:8px;margin-bottom:32px}
  .tpb-section{flex-direction:row;align-items:center;gap:16px;padding:12px 16px 12px 12px;border-radius:16px}
  .tpb-section-ic{flex:none;width:56px;height:56px}
  .tpb-section-ic svg{width:48px;height:48px}
  .tpb-section-link{font-size:16px;line-height:24px;text-wrap:pretty}
  .tpb-section::after{content:"";flex:none;width:8px;height:8px;margin-left:auto;border-right:2px solid #b9b9bf;border-top:2px solid #b9b9bf;transform:rotate(45deg)}
  .tpb-count{font-size:12px;line-height:16px}
  .tpb-section-groups{display:none}
  .tpb-grid{grid-template-columns:1fr;gap:8px}
  .tpb-card{padding:12px 16px}
}
@media (prefers-reduced-motion:reduce){
  .tpb-section,.tpb-card,.tpb-search input{transition:none}
  .tpb-section:hover,.tpb-card:hover,.tpb-section:active,.tpb-card:active{transform:none}
}

/* Название и цена товара: цена крупнее, но спокойнее по насыщенности */
.pp-mobile-brand{margin:-4px 0 8px;font-size:12px;line-height:16px;color:var(--gray,#696970)}

/* Картинки разделов: мягкий «подскок» рамки, пока внутри играет анимация иконки */
.tpb-section-ic{transition:transform .5s var(--tpb-ease),background-color .5s var(--tpb-ease)}
.tpb-section-ic svg{overflow:visible}
.tpb-section-ic.is-playing{transform:scale(1.06) rotate(-2deg);background:#ffe8ec}
@media (hover:hover) and (pointer:fine){
  .tpb-section:hover .tpb-section-ic{background:#ffe8ec}
}
@media (prefers-reduced-motion:reduce){
  .tpb-section-ic,.tpb-section-ic.is-playing{transition:none;transform:none}
}

/* Блок «О разделе» под товарами: цифры каталога и совет по выбору */
.tp-seo-text{max-width:840px;margin:48px 0 32px;padding-top:32px;border-top:1px solid var(--line,#e7e7e9);color:var(--char,#17171a)}
.section .tp-seo-text h2{margin:0 0 16px;font-size:20px;line-height:28px;font-weight:700;letter-spacing:-.01em}
.section .tp-seo-text h2::after{display:none}
.tp-seo-text p{margin:0 0 12px;font-size:15px;line-height:24px;text-wrap:pretty}
.tp-seo-text p:last-child{margin-bottom:0;color:var(--gray,#696970)}

/* Ссылки на страницы «раздел + бренд» */
.tp-brand-links{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 12px;max-width:840px;margin:0 0 32px;font-size:14px;line-height:20px}
.tp-brand-links>span{font-weight:600}
.tp-brand-links ul{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
.tp-brand-links a,.tp-brand-links b{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 12px;border:1px solid var(--line,#e7e7e9);border-radius:16px;background:#fff;color:inherit;font-weight:500}
.tp-brand-links b{border-color:var(--black,#0b0b0d);font-weight:600}
.tp-brand-links small{color:var(--gray,#696970);font-size:12px}
@media (hover:hover){.tp-brand-links a:hover{border-color:var(--black,#0b0b0d)}}
.tp-brand-links a:focus-visible{outline:3px solid var(--red,#f01938);outline-offset:2px}
