/* Ecotag — головна, «вітрина магазину» (етап 4 дизайну, 03.12.2026; макет design/mockups/04b-home.html):
   меню каталогу і слайдер банерів, чотири умови, добірки секціями («Хіти продажу», «Знижки», «Новинки»),
   комплекти слайдером, рядок для опту, бренди, «Переглянуті товари», соцмережі, текст під «Розгорнути».
   Картка товару — ecotag.css (.pc), стрічка — ecotag.css (.rail), панель підрозділів — ecotag.css (.mega-h, .mega-g). */

.hm{ display:grid; grid-template-columns:minmax(0,1fr); gap:44px; padding-top:16px; padding-bottom:56px } /* minmax(0,…): стрічки не розпирають сторінку */
@media (max-width:1023px){ .hm{ gap:28px; padding-top:0 } }
.hm-h{ margin:0; font-size:24px; font-weight:600; line-height:1.2; color:var(--ink) }
@media (max-width:767px){ .hm-h{ font-size:19px } }
.hm-shelf, .hm-kits{ scroll-margin-top:calc(var(--hd-stick) + 16px) }
.hm-chev{ flex:none; width:16px; height:16px }

/* ── Перший екран: меню каталогу (компʼютер — список ліворуч, підрозділи — при наведенні) і банери ── */
.hm-first{ position:relative; display:grid; grid-template-columns:300px minmax(0,1fr); gap:14px; align-items:start }
.hm-cat{ padding:8px; border:1px solid var(--line); border-radius:14px; background:#fff }
.hm-cat-i{ display:flex; align-items:center; gap:10px; height:47px; padding:0 8px 0 6px; border-radius:9px; font-size:14.5px; font-weight:500; color:var(--ink); white-space:nowrap }
.hm-cat-i img{ flex:none; width:34px; height:34px; object-fit:contain }
.hm-cat-i span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis }
.hm-cat-i small{ font-size:12px; font-weight:400; color:var(--muted) }
.hm-cat-i .hm-chev{ color:var(--muted) }
/* Панель підрозділів — поверх банера. Починається від правого краю пункту (на 10 px лівіше краю меню): між пунктом і
   панеллю немає жодної смужки, де миша «провалюється» (зауваження власника 03.12.2026 — панель зникала, курсор
   потрапляв на стрілку слайдера). Зі скриптом (home.js, .is-js) пункт відкривається з невеликою затримкою —
   рух миші навскоси через сусідні пункти панель не перемикає; без скрипта — звичайне наведення. */
.hm-cat:not(.is-js) li:hover > .hm-cat-i, .hm-cat li.is-open > .hm-cat-i, .hm-cat li:focus-within > .hm-cat-i{ background:var(--wash); font-weight:600 }
.hm-fly{ display:none; position:absolute; left:290px; top:0; z-index:6; width:min(800px, calc(100% - 290px)); padding-left:24px }
.hm-cat:not(.is-js) li:hover > .hm-fly, .hm-cat li.is-open > .hm-fly, .hm-cat li:focus-within > .hm-fly{ display:block }
.hm-fly-in{ padding:18px 24px 22px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:var(--elevation) }
.hm-fly .mega-g{ grid-template-columns:repeat(2,minmax(0,1fr)) }
@media (min-width:1024px) and (max-width:1199px){
  .hm-first{ grid-template-columns:250px minmax(0,1fr) }
  .hm-cat-i{ gap:8px; height:42px; padding:0 6px 0 4px; font-size:13px; line-height:1.15; white-space:normal }
  .hm-cat-i img{ width:30px; height:30px }
  .hm-cat-i .hm-chev{ display:none }
  .hm-cat-i span{ overflow:visible }
  .hm-fly{ left:240px; width:calc(100% - 240px) }
}
@media (max-width:1023px){
  /* телефон: спершу банери, під ними шість плиток розділів — усі видно без гортання */
  .hm-first{ display:flex; flex-direction:column-reverse; gap:10px }
  .hm-cat{ padding:0; border:0 }
  .hm-cat ul{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px }
  .hm-cat-i{ flex-direction:column; justify-content:center; gap:6px; height:100%; padding:10px 5px; border:1px solid var(--line); border-radius:12px;
    font-size:12px; font-weight:600; line-height:1.2; text-align:center; white-space:normal }
  .hm-cat-i img{ width:60px; height:60px }
  .hm-cat-i span{ flex:none; overflow:visible }
  .hm-cat-i small{ font-size:11px }
  .hm-cat-i .hm-chev, .hm-fly{ display:none !important }
}
@media (min-width:600px) and (max-width:1023px){ .hm-cat ul{ grid-template-columns:repeat(6,minmax(0,1fr)) } }

/* Слайдер: банери 1440×432 з написами (картинки власника), гортаються по одному */
.hm-slider{ position:relative; min-width:0 }
.hm-track{ display:grid; grid-auto-flow:column; grid-auto-columns:100%; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none;
  border-radius:14px; overscroll-behavior-x:contain }
.hm-track::-webkit-scrollbar{ display:none }
.hm-slide{ display:block; scroll-snap-align:start; aspect-ratio:1440/432; background:var(--beige) }
.hm-slide img{ width:100%; height:100%; object-fit:cover }
.hm-arr{ position:absolute; top:50%; z-index:1; width:42px; height:42px; margin-top:-21px; display:grid; place-items:center; padding:0; border:0; border-radius:50%;
  background:rgba(255,255,255,.9); color:var(--ink); cursor:pointer; box-shadow:0 1px 6px rgba(0,0,0,.22); transition:background var(--t-fast) var(--ease) }
.hm-arr:hover{ background:#fff; color:var(--link-hover) }
.hm-arr.prev{ left:12px } .hm-arr.next{ right:12px }
.hm-dots{ position:absolute; left:0; right:0; bottom:12px; display:flex; justify-content:center; gap:8px }
.hm-dots button{ width:9px; height:9px; padding:0; border:0; border-radius:50%; background:rgba(255,255,255,.55); cursor:pointer; box-shadow:0 0 0 1px rgba(0,0,0,.18);
  transition:background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease) }
.hm-dots button[aria-current]{ background:#fff; transform:scale(1.35) } /* одного размера: смена слайда не двигает соседние точки */
@media (max-width:767px){
  .hm-slider{ margin:0 calc(-1 * var(--pad)) }
  .hm-track{ border-radius:0 }
  .hm-arr{ display:none }
  .hm-dots{ bottom:6px; gap:7px } .hm-dots button{ width:6px; height:6px }
}

/* Добірки кнопками — лише на телефоні, у тому ж порядку, що блоки нижче */
.hm-quick{ display:none }
@media (max-width:1023px){
  .hm-quick{ display:flex; gap:8px; margin:-18px calc(-1 * var(--pad)) 0; padding:0 var(--pad); overflow-x:auto; scrollbar-width:none }
  .hm-quick::-webkit-scrollbar{ display:none }
  .hm-quick .chip{ flex:none; min-height:36px; padding:0 14px; font-size:13px; font-weight:600; white-space:nowrap }
}

/* Чотири умови — одразу під першим екраном */
.hm-terms{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:-30px; border:1px solid var(--line); border-radius:14px; background:#fff }
.hm-terms li + li{ border-left:1px solid var(--line) }
.hm-terms a{ display:flex; align-items:center; gap:12px; height:100%; padding:14px 18px; color:inherit }
.hm-terms-ic{ flex:none; display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:#EEF6EE; color:var(--accent) }
.hm-terms-ic svg{ width:20px; height:20px }
.hm-terms b{ display:block; font-size:13.5px; font-weight:600; line-height:1.3; color:var(--ink); transition:color var(--t-fast) var(--ease) }
.hm-terms small{ display:block; margin-top:2px; font-size:12px; color:var(--soft) }
.hm-terms a:hover b{ color:var(--link-hover) }
@media (max-width:1023px){
  .hm-terms{ grid-template-columns:1fr 1fr; margin-top:-16px }
  .hm-terms li + li{ border-left:0 }
  .hm-terms li:nth-child(even){ border-left:1px solid var(--line) }
  .hm-terms li:nth-child(n+3){ border-top:1px solid var(--line) }
  .hm-terms a{ gap:9px; padding:10px }
  .hm-terms-ic{ width:34px; height:34px } .hm-terms-ic svg{ width:18px; height:18px }
  .hm-terms b{ font-size:12.5px; line-height:1.25 }
}
@media (max-width:767px){ .hm-terms small{ display:none } }

/* ── Добірка: заголовок, кнопки розділів, «Дивитися всі», стрілки стрічки ── */
.hm-shelf-h{ display:flex; align-items:center; gap:18px; margin-bottom:14px }
.hm-shelf-h .hm-h{ white-space:nowrap }
.hm-chipbox{ position:relative; flex:1; min-width:0; display:flex }
.hm-chips{ flex:1; display:flex; gap:8px; min-width:0; overflow-x:auto; scrollbar-width:none }
.hm-chipbox.more-r .hm-chips{ -webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent) }
.hm-chipbox.more-l .hm-chips{ -webkit-mask-image:linear-gradient(270deg, #000 calc(100% - 48px), transparent); mask-image:linear-gradient(270deg, #000 calc(100% - 48px), transparent) }
.hm-chipbox.more-l.more-r .hm-chips{ -webkit-mask-image:linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image:linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent) }
.hm-chipbox.more-l .hm-chips, .hm-chipbox.more-r .hm-chips{ cursor:grab }
.hm-chips.is-drag{ cursor:grabbing; user-select:none }
.hm-chips.is-drag .chip{ pointer-events:none }
/* стрелки у краёв строки — когда кнопки разделов не помещаются (замечание владельца 03.12.2026); тянуть мышью — home.js */
.hm-chips-btn{ position:absolute; top:50%; z-index:1; width:30px; height:30px; margin-top:-15px; display:grid; place-items:center; padding:0; border:1px solid var(--line-strong); border-radius:50%;
  background:#fff; color:var(--ink); cursor:pointer; box-shadow:0 1px 4px rgba(0,0,0,.14); transition:border-color var(--t-fast) var(--ease) }
.hm-chips-btn:hover{ border-color:var(--ink) }
.hm-chips-btn svg{ width:16px; height:16px }
.hm-chips-btn.prev{ left:0 } .hm-chips-btn.next{ right:0 }
.hm-chips-btn[hidden]{ display:none }
@media (hover:none){ .hm-chips-btn{ display:none } }
.hm-chips::-webkit-scrollbar{ display:none }
.hm-chips .chip{ flex:none; min-height:34px; padding:0 12px; font-size:13px; white-space:nowrap }
.hm-chips .chip.is-on{ border-color:var(--accent); background:#EEF6EE; color:var(--accent); font-weight:600 }
.hm-all{ margin-left:auto; display:inline-flex; align-items:center; gap:4px; font-size:14px; font-weight:600; color:var(--accent); white-space:nowrap; transition:color var(--t-fast) var(--ease) }
.hm-all .hm-chev{ width:15px; height:15px }
.hm-all:hover{ color:var(--link-hover) }
/* стрелки ленты — по краям ряда карточек; у края, где листать некуда, стрелки нет */
.hm-shelf{ position:relative }
.hm-shelf > .rail-nav{ position:absolute; left:-16px; right:-16px; top:172px; z-index:2; justify-content:space-between; pointer-events:none }
.hm-shelf > .rail-nav .rail-btn{ width:44px; height:44px; border:0; pointer-events:auto; box-shadow:0 2px 10px rgba(0,0,0,.22) }
.hm-shelf > .rail-nav .rail-btn[disabled]{ visibility:hidden }
.hm-kits .rail-nav{ flex:none }
.hm-shelf .rail{ transition:opacity var(--t-fast) var(--ease) }
.hm-shelf[aria-busy="true"] .rail{ opacity:.45 }
.hm-viewed[hidden]{ display:none }
@media (max-width:767px){
  .hm-shelf-h{ flex-wrap:wrap; gap:10px 12px; margin-bottom:10px }
  .hm-chipbox{ order:3; flex:0 0 calc(100% + 2 * var(--pad)); margin:0 calc(-1 * var(--pad)) }
  .hm-chips{ padding:0 var(--pad) }
  .hm-chips-btn{ display:none }
  .hm-chips .chip{ min-height:32px }
  .hm-all{ font-size:13px }
}

/* ── Комплекти — слайдером: один комплект крупно, край наступного видно ── */
.hm-kits-n{ margin-left:auto; font-size:13px; color:var(--soft) }
.hm-kits-n b{ font-weight:600; color:var(--ink) }
.hm-kits-rail{ grid-auto-columns:calc(100% - 150px); gap:14px }
.hm-kits-rail:has(> .hk:only-child){ grid-auto-columns:100% }
.hk{ scroll-snap-align:start; display:grid; grid-template-columns:290px minmax(0,1fr) minmax(300px,370px); grid-template-rows:1fr auto; gap:0 26px; align-items:center;
  padding:20px 22px 20px 20px; border-radius:16px; background:#2C2C2C; color:#fff }
.hk-ph{ grid-column:1; grid-row:1 / span 2; position:relative; height:290px; border-radius:12px; overflow:hidden }
.hk-ph img{ width:100%; height:100%; object-fit:cover }
.hk-ph i{ position:absolute; display:grid; place-items:center; width:28px; height:28px; margin:-14px 0 0 -14px; border:2px solid #fff; border-radius:50%; background:var(--accent);
  font-size:13px; font-weight:700; font-style:normal; line-height:1; color:#fff; box-shadow:0 1px 6px rgba(0,0,0,.4) }
.hk-tx{ grid-column:2; grid-row:1; align-self:end }
.hk-off{ display:inline-block; padding:5px 12px; border-radius:8px; background:var(--hot); font-size:13px; font-weight:700; line-height:1.3 }
.hk-h{ margin:14px 0 10px; font-size:27px; font-weight:700; line-height:1.2; color:#fff }
.hk-sub{ font-size:15px; line-height:1.5; color:#DDDDD8 }
.hk-form{ grid-column:2; grid-row:2; align-self:start; display:flex; flex-wrap:wrap; gap:10px; margin-top:20px }
.hk-form .btn{ min-height:50px; padding:0 18px; white-space:nowrap }
.hk-more{ border-color:rgba(255,255,255,.45); background:none; color:#fff }
.hk-more:hover{ border-color:#fff }
.hk-form .form-msg{ flex:0 0 100%; font-size:13px; color:#FFB199 }
.hk-box{ grid-column:3; grid-row:1 / span 2; padding:8px 18px 16px; border-radius:12px; background:#fff; color:var(--ink) }
.hk-rows li{ display:flex; align-items:center; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); font-size:13.5px }
.hk-img{ flex:none; width:46px; height:46px }
.hk-img img{ width:100%; height:100%; object-fit:contain; border-radius:6px }
.hk-nm{ flex:1; min-width:0; line-height:1.3 }
.hk-nm b{ display:block; font-weight:600 }
.hk-nm b i{ display:inline-grid; place-items:center; width:18px; height:18px; margin-right:6px; border-radius:50%; background:var(--accent); font-size:11px; font-weight:700; font-style:normal; line-height:1; color:#fff; vertical-align:1px }
.hk-nm a{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; color:var(--muted) }
.hk-nm a:hover{ color:var(--link-hover) }
.hk-sum{ font-weight:600; white-space:nowrap }
.hk-total{ display:flex; align-items:baseline; gap:10px; margin-top:12px }
.hk-total span{ flex:1; font-size:13.5px; line-height:1.3; color:var(--soft) }
.hk-total small{ display:block; font-size:12px; color:var(--muted) }
.hk-total b{ font-size:24px; font-weight:700; line-height:1; white-space:nowrap }
.hk-total del{ font-size:13.5px; color:var(--muted); white-space:nowrap }
.hk.no-photo{ grid-template-columns:minmax(0,1fr) minmax(300px,370px) }
.hk.no-photo .hk-tx, .hk.no-photo .hk-form{ grid-column:1 } .hk.no-photo .hk-box{ grid-column:2 }
@media (min-width:1024px) and (max-width:1199px){
  .hk{ grid-template-columns:220px minmax(0,1fr) 320px; gap:0 22px }
  .hk-ph{ height:240px }
  .hk-h{ font-size:22px }
}
@media (max-width:1023px){
  .hm-kits-rail{ grid-auto-columns:88% }
  .hm-kits-n{ font-size:12.5px }
  .hk, .hk.no-photo{ grid-template-columns:96px minmax(0,1fr); grid-template-rows:auto; gap:0 12px; align-items:start; padding:12px 12px 14px; border-radius:14px }
  .hk-ph{ grid-row:1; height:96px; border-radius:10px }
  .hk-ph i{ width:20px; height:20px; margin:-10px 0 0 -10px; border-width:1.5px; font-size:10.5px }
  .hk-tx{ grid-column:2; grid-row:1; align-self:center }
  .hk.no-photo .hk-tx{ grid-column:1 / -1 }
  .hk-off{ padding:4px 10px; font-size:12px }
  .hk-h{ margin:8px 0 0; font-size:17px }
  .hk-sub{ display:none }
  .hk-box, .hk.no-photo .hk-box{ grid-column:1 / -1; grid-row:2; margin-top:12px; padding:4px 12px 14px }
  .hk-rows li{ gap:10px; font-size:13px }
  .hk-img{ width:40px; height:40px }
  .hk-total b{ font-size:21px }
  .hk-form, .hk.no-photo .hk-form{ grid-column:1 / -1; grid-row:3; margin-top:12px }
  .hk-form .btn{ flex:0 0 100%; min-height:46px; padding:0 12px }
  .hk-form .hk-more{ min-height:40px }
  .hk-total{ flex-wrap:wrap; gap:6px 10px }
  .hk-total span{ flex:0 0 100% }
  .hk-total b{ margin-left:auto }
}

/* ── Рядок для опту — той самий, що на сторінці товару ── */
.hm-b2b{ display:flex; align-items:center; gap:22px; padding:18px 24px; border-radius:14px; background:var(--beige) }
.hm-b2b p{ flex:1; font-size:14px; color:var(--soft) }
.hm-b2b p b{ display:block; font-size:17px; font-weight:600; line-height:1.3; color:var(--ink) }
.hm-b2b-tg{ min-height:46px; padding:0 20px; border-color:var(--line-strong); background:#fff; color:var(--ink); font-size:14.5px }
.hm-b2b-tg svg{ width:18px; height:18px }
.hm-b2b-tg:hover{ border-color:var(--ink) }
@media (max-width:767px){
  .hm-b2b{ flex-wrap:wrap; gap:12px; padding:16px }
  .hm-b2b p{ flex:0 0 100% } .hm-b2b p b{ font-size:15.5px }
  .hm-b2b-tg{ flex:0 0 100% }
  .hm-b2b .hm-all{ margin:2px auto 0 }
}

/* ── Бренди — плитками ── */
.hm-brands ul{ display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-top:14px }
.hm-brands a{ display:grid; place-items:center; height:86px; padding:0 18px; border:1px solid var(--line); border-radius:12px; background:#fff; transition:border-color var(--t-fast) var(--ease) }
.hm-brands a:hover{ border-color:var(--line-strong) }
.hm-brands img{ width:auto; height:auto; max-width:128px; max-height:42px; object-fit:contain; filter:grayscale(1) opacity(.8); transition:filter var(--t-fast) var(--ease) }
.hm-brands a:hover img{ filter:none }
.hm-brands .all a{ display:flex; align-items:center; justify-content:center; gap:4px; font-size:14px; font-weight:600; color:var(--ink) }
.hm-brands .all a:hover{ color:var(--link-hover) }
.hm-brands .all .hm-chev{ width:15px; height:15px }
@media (max-width:767px){
  .hm-brands ul{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:10px }
  .hm-brands a{ height:60px; padding:0 10px }
  .hm-brands img{ max-width:84px; max-height:28px }
  .hm-brands .all a{ font-size:12.5px }
}

/* ── Соцмережі — замість блогу: лише назви ── */
.hm-soc ul{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:14px }
.hm-soc a{ display:flex; align-items:center; gap:14px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); transition:border-color var(--t-fast) var(--ease) }
.hm-soc a:hover{ border-color:var(--line-strong); color:var(--link-hover) }
.hm-soc-ic{ flex:none; display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--wash) }
.hm-soc-ic svg{ width:22px; height:22px }
.hm-soc b{ flex:1; font-size:15px; font-weight:600 }
.hm-soc .hm-chev{ color:var(--muted) }
@media (max-width:767px){
  .hm-soc ul{ gap:8px; margin-top:10px }
  .hm-soc a{ flex-direction:column; gap:6px; padding:12px 6px }
  .hm-soc-ic{ width:38px; height:38px } .hm-soc-ic svg{ width:20px; height:20px }
  .hm-soc b{ flex:none; font-size:12.5px }
  .hm-soc .hm-chev{ display:none }
}

/* Текст — згорнутий, «Розгорнути», як у Хорошопа; на всю ширину сторінки, як решта блоків (зауваження власника 03.12.2026) */
.seo-in{ position:relative; max-height:150px; overflow:hidden; color:var(--body); font-size:14px; line-height:1.6 }
.seo-in.open{ max-height:none }
.seo-in::after{ content:''; position:absolute; left:0; right:0; bottom:0; height:70px; background:linear-gradient(rgba(255,255,255,0),#fff) }
.seo-in.open::after{ display:none }
.seo p{ margin:0 0 10px }
.seo-more{ display:block; width:100%; margin:6px 0 0; padding:0; text-align:left; border:0; background:none; cursor:pointer;
  font:500 14px var(--font); color:var(--soft); text-decoration:underline; text-underline-offset:4px }
.seo-more:hover{ color:var(--link-hover) }
