/*
Theme Name: Tovarometr
Theme URI: https://tovarometr.ru/
Description: Fast comparison-catalog theme for Tovarometr Catalog Core.
Version: 0.3.1
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: tovarometr
*/
:root{--bg:#f5f7f4;--card:#fff;--ink:#17221b;--muted:#6d776f;--line:#e1e7e1;--green:#287848;--green2:#1e6038;--soft:#edf6ef;--yellow:#f4bd54;--radius:18px;--shadow:0 10px 28px rgba(21,48,31,.07);--container:1260px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.5}a{color:inherit;text-decoration:none}img{display:block;max-width:100%;height:auto}button,input,select{font:inherit}.tm-container{width:min(calc(100% - 32px),var(--container));margin-inline:auto}.tm-header{position:sticky;z-index:50;top:0;border-bottom:1px solid var(--line);background:rgba(255,255,255,.94);backdrop-filter:blur(12px)}.tm-headrow{display:grid;grid-template-columns:auto minmax(260px,1fr) auto;gap:26px;align-items:center;min-height:76px}.tm-logo{display:flex;align-items:center;gap:10px;font-size:23px;font-weight:900;letter-spacing:-.04em}.tm-mark{display:grid;width:40px;height:40px;place-items:center;border-radius:13px;background:var(--green);color:#fff}.tm-search{display:flex;border:2px solid var(--green);border-radius:14px;overflow:hidden;background:#fff}.tm-search input{width:100%;min-width:0;padding:11px 14px;border:0;outline:0}.tm-search button{padding:0 18px;border:0;background:var(--green);color:#fff;font-weight:800}.tm-nav{display:flex;gap:20px;font-size:14px;font-weight:750}.tm-main{padding:28px 0 68px}.tm-hero{display:grid;grid-template-columns:1.25fr .75fr;gap:25px;padding:52px;border-radius:30px;background:linear-gradient(135deg,#173f29,#2d8150);color:#fff;box-shadow:var(--shadow)}.tm-hero h1{max-width:760px;margin:0 0 18px;font-size:clamp(38px,5.2vw,68px);line-height:1;letter-spacing:-.06em}.tm-hero p{max-width:650px;margin:0;color:rgba(255,255,255,.8);font-size:18px}.tm-hero-side{align-self:end;padding:23px;border:1px solid rgba(255,255,255,.17);border-radius:22px;background:rgba(255,255,255,.1)}.tm-hero-side b{display:block;margin-bottom:6px;font-size:19px}.tm-section{margin-top:44px}.tm-section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:18px}.tm-section h2,.tm-archive-title{margin:0;font-size:clamp(28px,3.8vw,43px);line-height:1.08;letter-spacing:-.045em}.tm-categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.tm-category{min-height:145px;padding:22px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow);transition:.2s}.tm-category:hover,.tm-card:hover{transform:translateY(-3px);border-color:#b8cfbf}.tm-category b{display:block;font-size:19px}.tm-category span{display:block;margin-top:8px;color:var(--muted);font-size:14px}.tm-breadcrumbs{margin-bottom:20px;color:var(--muted);font-size:13px}.tm-catalog-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;margin-top:24px}.tm-filter{position:sticky;top:100px;align-self:start;padding:20px;border:1px solid var(--line);border-radius:var(--radius);background:#fff}.tm-filter h3{margin:0 0 16px}.tm-field{margin-bottom:15px}.tm-field label{display:block;margin-bottom:6px;color:var(--muted);font-size:13px;font-weight:700}.tm-field input,.tm-field select{width:100%;padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:#fff}.tm-filter-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tm-button{display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border:0;border-radius:12px;background:var(--green);color:#fff;font-weight:800;cursor:pointer}.tm-button:hover{background:var(--green2)}.tm-button-light{background:var(--soft);color:var(--green)}.tm-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;color:var(--muted);font-size:14px}.tm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.tm-card{position:relative;display:flex;min-width:0;flex-direction:column;padding:14px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow);transition:.2s}.tm-card-image{display:grid;aspect-ratio:1;place-items:center;padding:10px;border-radius:14px;background:#fafbf9;overflow:hidden}.tm-card-image img{width:100%;height:100%;object-fit:contain}.tm-brand{margin-top:13px;color:var(--muted);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.tm-card-title{display:-webkit-box;min-height:48px;margin:6px 0 10px;overflow:hidden;font-size:16px;font-weight:750;-webkit-box-orient:vertical;-webkit-line-clamp:2}.tm-specs{min-height:58px;margin:0 0 12px;padding:0;list-style:none;color:var(--muted);font-size:12px}.tm-specs li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tm-card-bottom{display:flex;align-items:end;justify-content:space-between;gap:10px;margin-top:auto}.tm-price{font-size:21px;font-weight:900;letter-spacing:-.03em}.tm-offer-count{color:var(--muted);font-size:12px}.tm-compare-check{position:absolute;z-index:3;top:24px;right:24px;display:grid;width:34px;height:34px;place-items:center;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:var(--shadow)}.tm-pagination{margin-top:28px}.tm-pagination .page-numbers{display:flex;gap:8px;list-style:none;padding:0}.tm-pagination a,.tm-pagination span{display:grid;min-width:42px;height:42px;place-items:center;border-radius:10px;background:#fff}.tm-pagination .current{background:var(--green);color:#fff}.tm-empty{padding:35px;border-radius:var(--radius);background:#fff}.tm-single{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.85fr);gap:40px}.tm-gallery{display:grid;min-height:530px;place-items:center;padding:28px;border:1px solid var(--line);border-radius:24px;background:#fff}.tm-gallery img{max-height:500px;object-fit:contain}.tm-product-info{padding:14px 0}.tm-product-info h1{margin:8px 0 16px;font-size:clamp(34px,4.2vw,54px);line-height:1.05;letter-spacing:-.05em}.tm-product-meta{display:flex;gap:14px;color:var(--muted);font-size:13px}.tm-single-price{margin:20px 0 4px;font-size:36px;font-weight:950}.tm-price-range{color:var(--muted);font-size:14px}.tm-notice{margin:20px 0;padding:14px 16px;border-radius:12px;background:var(--soft);color:#275f3d;font-size:14px}.tm-tabs{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:24px;margin-top:34px}.tm-panel{padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:#fff}.tm-panel h2{margin-top:0;font-size:26px}.tm-offers{width:100%;border-collapse:collapse}.tm-offers th,.tm-offers td{padding:14px 10px;border-bottom:1px solid var(--line);text-align:left}.tm-offers td:last-child{text-align:right}.tm-offers .tm-button{padding:9px 13px;font-size:13px}.tm-attrs{width:100%;border-collapse:collapse}.tm-attrs th,.tm-attrs td{padding:10px;border-bottom:1px solid var(--line);text-align:left}.tm-attrs th{width:45%;color:var(--muted);font-weight:600}.tm-content{font-size:16px}.tm-compare-bar{position:fixed;z-index:70;right:20px;bottom:20px;display:none;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:#17221b;color:#fff;box-shadow:0 14px 40px rgba(0,0,0,.25)}.tm-compare-bar.is-active{display:flex}.tm-compare-wrap{overflow:auto}.tm-compare{min-width:800px;width:100%;border-collapse:collapse;background:#fff}.tm-compare th,.tm-compare td{padding:14px;border:1px solid var(--line);text-align:left}.site-footer{padding:40px 0;border-top:1px solid var(--line);background:#fff;color:var(--muted)}.tm-footer{display:flex;justify-content:space-between;gap:30px}
@media(max-width:1020px){.tm-nav{display:none}.tm-categories{grid-template-columns:repeat(3,1fr)}.tm-grid{grid-template-columns:repeat(2,1fr)}.tm-single,.tm-tabs{grid-template-columns:1fr}.tm-gallery{min-height:420px}}
@media(max-width:760px){.tm-container{width:calc(100% - 20px)}.tm-headrow{grid-template-columns:auto 1fr;gap:12px;padding:12px 0}.tm-search{grid-column:1/-1}.tm-main{padding-top:18px}.tm-hero{grid-template-columns:1fr;padding:30px 22px;border-radius:22px}.tm-hero h1{font-size:39px}.tm-categories{grid-template-columns:repeat(2,1fr);gap:10px}.tm-category{min-height:120px;padding:16px}.tm-catalog-layout{grid-template-columns:1fr}.tm-filter{position:static}.tm-grid{gap:10px}.tm-card{padding:10px}.tm-card-title{font-size:14px}.tm-price{font-size:18px}.tm-specs{display:none}.tm-single-price{font-size:30px}.tm-gallery{min-height:320px}.tm-product-info h1{font-size:34px}.tm-offers th:nth-child(3),.tm-offers td:nth-child(3){display:none}.tm-panel{padding:16px}.tm-footer{flex-direction:column}}

/* Marketplace UI 0.3 */
:root{--bg:#f5f5f8;--card:#fff;--ink:#16171b;--muted:#71727a;--line:#e9e9ef;--green:#3956e8;--green2:#2943cc;--soft:#eef1ff;--yellow:#ffb800;--radius:18px;--shadow:0 4px 18px rgba(22,24,35,.06);--container:1380px}.tm-topline{background:#f5f5f8;color:#676873;font-size:12px}.tm-topline-row{display:flex;justify-content:space-between;align-items:center;min-height:32px}.tm-topline-links{display:flex;gap:18px}.tm-header{background:#fff;box-shadow:0 2px 12px rgba(20,22,30,.04)}body.admin-bar .tm-header{top:32px}.tm-headrow{grid-template-columns:auto auto minmax(340px,1fr) auto;gap:16px;min-height:72px}.tm-logo{font-size:22px}.tm-mark{background:linear-gradient(135deg,#425ff4,#7449e9);border-radius:14px}.tm-catalog-button{display:flex;align-items:center;gap:9px;height:46px;padding:0 17px;border-radius:13px;background:#4258e8;color:#fff;font-weight:800}.tm-catalog-button svg{width:20px}.tm-search{height:48px;border:3px solid #4258e8;border-radius:15px}.tm-search input{padding:10px 16px}.tm-search button{min-width:90px;background:#4258e8}.tm-nav{gap:8px}.tm-nav a{display:flex;min-width:58px;flex-direction:column;align-items:center;gap:3px;color:#383943;font-size:11px}.tm-nav svg{width:21px;height:21px}.tm-subnav{border-top:1px solid #f0f0f3;background:#fff}.tm-subnav-row{display:flex;gap:22px;align-items:center;min-height:40px;overflow:auto;white-space:nowrap;font-size:13px;font-weight:650}.tm-main{padding-top:22px}.tm-market-hero{display:grid;grid-template-columns:1.55fr .8fr .8fr;gap:14px}.tm-main-banner{position:relative;min-height:280px;padding:38px;border-radius:24px;background:linear-gradient(125deg,#435df3 0%,#6747e8 58%,#a346ea 100%);color:#fff;overflow:hidden}.tm-main-banner:after{content:"";position:absolute;right:-50px;bottom:-110px;width:340px;height:340px;border:70px solid rgba(255,255,255,.11);border-radius:50%}.tm-main-banner h1{position:relative;z-index:1;max-width:650px;margin:0 0 14px;font-size:clamp(36px,4.4vw,60px);line-height:.98;letter-spacing:-.055em}.tm-main-banner p{position:relative;z-index:1;max-width:560px;margin:0 0 26px;color:rgba(255,255,255,.86);font-size:17px}.tm-main-banner .tm-button{position:relative;z-index:1;background:#fff;color:#344bd5}.tm-promo-stack{display:grid;gap:14px}.tm-promo{position:relative;display:flex;min-height:133px;flex-direction:column;justify-content:flex-end;padding:20px;border-radius:22px;overflow:hidden}.tm-promo b{position:relative;z-index:1;font-size:20px;line-height:1.08}.tm-promo span{position:relative;z-index:1;margin-top:5px;font-size:13px}.tm-promo-blue{background:#dbe8ff;color:#173b82}.tm-promo-yellow{background:#fff0b9;color:#664400}.tm-promo-pink{background:#f6dfff;color:#6d207e}.tm-promo-mint{background:#d9f6eb;color:#155c45}.tm-section{margin-top:34px}.tm-section h2,.tm-archive-title{font-size:30px;letter-spacing:-.035em}.tm-categories{grid-template-columns:repeat(8,minmax(0,1fr));gap:12px}.tm-category{min-height:120px;padding:14px;border:0;border-radius:18px;box-shadow:none;text-align:center}.tm-category-icon{display:grid;width:66px;height:66px;margin:0 auto 10px;place-items:center;border-radius:50%;background:linear-gradient(145deg,#eef1ff,#e2e7ff);color:#4258e8;font-size:27px;font-weight:900}.tm-category b{display:-webkit-box;overflow:hidden;font-size:13px;line-height:1.25;-webkit-box-orient:vertical;-webkit-line-clamp:2}.tm-category span{margin-top:4px;font-size:11px}.tm-benefits{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.tm-benefit{padding:18px;border-radius:18px;background:#fff}.tm-benefit b{display:block;margin-bottom:4px}.tm-benefit span{color:var(--muted);font-size:13px}.tm-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.tm-card{padding:10px;border:0;border-radius:17px;box-shadow:none}.tm-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(26,27,40,.1)}.tm-card-image{aspect-ratio:1/1.04;padding:8px;background:#f8f8fa}.tm-compare-check{top:18px;right:18px;width:30px;height:30px}.tm-brand{margin-top:10px;color:#8a8b94;font-size:10px}.tm-card-title{min-height:42px;margin:4px 0 8px;font-size:14px;line-height:1.45}.tm-specs{display:none}.tm-card-bottom{display:block}.tm-price{font-size:20px}.tm-offer-count{margin:2px 0 9px}.tm-card .tm-button{width:100%;padding:10px;border-radius:11px;background:#4258e8}.tm-filter{top:126px;border:0;box-shadow:none}.tm-single{grid-template-columns:minmax(420px,.88fr) minmax(0,1.12fr);gap:28px;padding:22px;border-radius:24px;background:#fff}.tm-gallery{min-height:490px;border:0;background:#f8f8fa}.tm-product-info{padding:8px 10px}.tm-product-info h1{max-width:820px;margin:8px 0 12px;font-size:clamp(30px,3vw,46px);line-height:1.08}.tm-single-price{font-size:40px}.tm-notice{background:#f1f3ff;color:#384cad}.tm-product-info>.tm-button{min-width:210px;background:#4258e8}.tm-tabs{grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr)}.tm-panel{border:0;box-shadow:none}.tm-offers tr{transition:.15s}.tm-offers tbody tr:hover{background:#f8f9ff}.tm-offers .tm-button{background:#4258e8}.comment-form textarea{width:min(100%,680px);padding:13px;border:1px solid var(--line);border-radius:12px}.comment-form input[type=text],.comment-form input[type=email]{max-width:420px;width:100%;padding:11px;border:1px solid var(--line);border-radius:10px}.form-submit input{padding:11px 16px;border:0;border-radius:11px;background:#4258e8;color:#fff;font-weight:800}.tm-compare-bar{background:#252633}.site-footer{background:#252633;color:#bfc0c9}.site-footer strong{color:#fff}
@media(max-width:1180px){.tm-grid{grid-template-columns:repeat(4,1fr)}.tm-categories{grid-template-columns:repeat(6,1fr)}.tm-market-hero{grid-template-columns:1.4fr .8fr}.tm-promo-stack:last-child{display:none}}
@media(max-width:900px){.tm-headrow{grid-template-columns:auto auto 1fr}.tm-nav{display:none}.tm-grid{grid-template-columns:repeat(3,1fr)}.tm-categories{grid-template-columns:repeat(4,1fr)}.tm-market-hero{grid-template-columns:1fr}.tm-promo-stack{grid-template-columns:1fr 1fr}.tm-single{grid-template-columns:1fr}}
@media(max-width:760px){body.admin-bar .tm-header{top:46px}.tm-topline{display:none}.tm-headrow{grid-template-columns:auto 1fr auto;padding:10px 0}.tm-logo span:last-child{display:none}.tm-catalog-button{width:46px;padding:0;justify-content:center}.tm-catalog-button span{display:none}.tm-search{grid-column:auto;height:44px}.tm-search button{min-width:auto;width:48px;font-size:0}.tm-search button:after{content:"⌕";font-size:22px}.tm-subnav{display:none}.tm-market-hero{display:block}.tm-main-banner{min-height:245px;padding:28px 22px}.tm-main-banner h1{font-size:38px}.tm-promo-stack{display:none}.tm-benefits{grid-template-columns:repeat(2,1fr)}.tm-categories{grid-template-columns:repeat(4,1fr);gap:8px}.tm-category{min-height:104px;padding:10px 5px}.tm-category-icon{width:54px;height:54px}.tm-grid{grid-template-columns:repeat(2,1fr)}.tm-single{padding:12px}.tm-gallery{min-height:320px}.tm-tabs{grid-template-columns:1fr}}

/* paginate_links() can return either .nav-links or ul.page-numbers. */
.tm-pagination .nav-links,.tm-pagination ul.page-numbers{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:auto;margin:0;padding:0;list-style:none}
.tm-pagination ul.page-numbers li{display:block;margin:0;padding:0}
.tm-pagination a.page-numbers,.tm-pagination span.page-numbers,.tm-pagination ul.page-numbers a,.tm-pagination ul.page-numbers span{display:grid;flex:0 0 42px;width:42px;min-width:42px;height:42px;padding:0;place-items:center;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}
.tm-pagination .page-numbers.current{border-color:#4258e8;background:#4258e8;color:#fff}
