/* ====== GLOBAL ====== */

body {
    font-family: "Inter", Arial, sans-serif;
    background: #f4f5f7;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ===== PAGE LAYOUT ===== */

.container {
    width: 90%;
    margin: auto;
    padding-bottom: 50px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: #777;
    margin-bottom: 22px;
}

/* ===== GRID LIST ===== */

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

/* ===== PRODUCT CARD ===== */

.product-card{
  padding: 10px;
  border-radius: 12px;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #d0ffd0;
}

/* IMAGE */

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 10px;
    background: #fafafa;
    border: 1px solid #ececec;
    padding: 10px;
}

/* PRODUCT NAME */

.product-name{
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  margin: 6px 0;
}

/* PACKAGING */

.product-meta {
    margin-top: 6px;
    font-size: 14px;
    color: #777;
}

/* PRICE RANGE */

.product-price-range {
    margin-top: 12px;
    font-size: 19px;
    font-weight: 700;
    color: #0a7b2e;
}

/* TAG */

.tag {
    display: inline-block;
    margin-top: 8px;
    background: #e8ffe8;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
    color: #138d13;
    border: 1px solid #bff5bf;
}

/* BUTTON */

.btn {
    width: 100%;
    padding: 10px 0;
    margin-top: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-primary {
    background: #149d26;
    color: #fff;
}

.btn-primary:hover {
    background: #0f7c1e;
}

/* ===== PRODUCT PAGE ===== */

.product-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.product-main-image {
    width: 380px;
    height: 380px;
    object-fit: contain;
    background: white;
    border-radius: 14px;
    border: 1px solid #ddd;
    padding: 18px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
}

.product-category {
    font-size: 16px;
    margin-bottom: 12px;
    color: #777;
}

.product-price-big {
    font-size: 26px;
    color: #138d13;
    font-weight: 700;
    margin-top: 12px;
}

.product-shops-count {
    margin-top: 6px;
    color: #444;
}

.product-actions {
    display: flex;
    gap: 12px;
    margin: 18px 0;
}

.product-desc-title {
    margin-top: 18px;
    font-size: 20px;
    font-weight: 700;
}

.product-desc-text {
    margin-top: 10px;
    line-height: 1.5;
    color: #444;
}

/* ===== SHOPS LIST ===== */

.shop-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 14px 18px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.shop-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.shop-logo {
    width: 42px;
    height: 42px;
    background: #149d26;
    color: white;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-price {
    font-size: 20px;
    font-weight: 700;
    color: #149d26;
}

/* ===== HOME PAGE ===== */

.home-container {
    width: 90%;
    margin: auto;
    padding-top: 10px;
    padding-bottom: 60px;
}

.home-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-top: 20px;
}

.home-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}

.home-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid #e1e1e1;
    text-align: center;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #d0ffd0;
}

.home-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 14px;
}

.home-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.home-card-count {
    color: #777;
    font-size: 14px;
}

/* ===== NEW LAYOUT (Hotline-like) ===== */
.header-icons { display:flex; gap:10px; align-items:center; }
.header-pill { background: rgba(255,255,255,0.15); padding:6px 10px; border-radius:10px; }



.layout { display:flex; gap:20px; align-items:flex-start; }

.sidebar {
  width: 220px;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  padding: 16px;
  position: sticky;
  top: 20px;
}
.sidebar-title { font-weight:800; margin-bottom:10px; }
.sidebar-link { display:block; padding:10px 10px; border-radius:10px; font-weight:700; }
.sidebar-link:hover { background:#e8ffe8; }

.content { flex:1; }

.breadcrumbs { color:#666; margin-bottom:14px; }
.breadcrumbs a { color:#4b2e83; font-weight:700; }

.product-hero {
  display:grid;
  grid-template-columns: 520px 1fr;
  gap: 20px;
}

.product-gallery {
  background:#fff;
  border:1px solid #e1e1e1;
  border-radius: 14px;
  padding: 16px;
  display:grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
}
.thumbs { display:flex; flex-direction:column; gap:10px; }
.thumb { width: 90px; height: 90px; object-fit:contain; border:1px solid #eee; border-radius:12px; background:#fafafa; }
.main-photo { display:flex; align-items:center; justify-content:center; }
.main-photo img { width: 100%; height: 420px; object-fit:contain; }

.product-summary {
  background:#fff;
  border:1px solid #e1e1e1;
  border-radius: 14px;
  padding: 16px;
}

.product-h1 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }

.compare-box {
  border:1px solid #eee;
  border-radius: 14px;
  padding: 14px;
  background:#fafafa;
}
.compare-price { margin-top:8px; font-size:18px; font-weight:800; color:#0a7b2e; }
.compare-actions {
  display: flex;
  justify-content: flex-start;
}

.compare-btn {
  display: flex;
  align-items: center;
  justify-content: center;   /* рџ‘€ РіРѕР»РѕРІРЅРµ */
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
  border-radius: 12px;
}
.btn-outline {
  background:#fff; border:1px solid #ddd; color:#333;
}
.btn-outline:hover { background:#f3f3f3; }

.spec-mini { margin-top:14px; line-height:1.9; }
.spec-mini span { color:#777; display:inline-block; width: 180px; }
.spec-full-btn { margin-top:14px; display:inline-block; width:auto; padding:10px 16px; border-radius:12px; }

.tabs {
  margin-top: 18px;
  display:flex;
  gap: 14px;
  border-bottom: 2px solid #eaeaea;
}
.tab {
  padding: 12px 6px;
  font-weight: 800;
  color:#444;
}
.tab.active { color:#149d26; border-bottom: 3px solid #149d26; }

.tab-panel {
  background:#fff;
  border:1px solid #e1e1e1;
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

.offers-table { width:100%; }
.offers-head, .offers-row {
  display:grid;
  grid-template-columns: 1.5fr 1fr 0.7fr 0.6fr;
  gap: 10px;
  align-items:center;
}
.offers-head {
  font-weight: 900;
  color:#666;
  padding: 12px 10px;
  border-bottom:1px solid #eee;
}
.offers-row {
  padding: 12px 10px;
  border-bottom:1px solid #f1f1f1;
}
.offers-row.best { background:#e8ffe8; border-radius:12px; }

.offers-shop { display:flex; gap:10px; align-items:center; }
.shop-badge {
  width:44px; height:44px; border-radius:12px;
  background:#149d26; color:#fff; font-weight:900;
  display:flex; align-items:center; justify-content:center;
}
.best-price { font-size:12px; color:#0f7c1e; font-weight:900; }
.offers-price { font-weight: 900; color:#149d26; font-size: 16px; }
.buy-btn { width:auto; padding:10px 14px; border-radius:10px; margin-top:0 !important; }

/* Responsive */
@media (max-width: 1100px) {
  .product-hero { grid-template-columns: 1fr; }
 /*  .sidebar { display:none; }*/
  .product-gallery { grid-template-columns: 1fr; }
  .thumbs { flex-direction:row; }
}

/* Tabs logic */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tabs {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  border-bottom: 2px solid #eaeaea;
}

.tab {
  background: none;
  border: none;
  padding: 12px 6px;
  font-weight: 800;
  cursor: pointer;
  color: #444;
}

.tab.active {
  color: #149d26;
  border-bottom: 3px solid #149d26;
}

.pagination{
  margin-top:16px;
  display:flex;
  gap:12px;
  align-items:center;
}
.page-btn{
  background:#149d26;
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  font-weight:800;
}
.page-info{ color:#666; font-weight:700; }

.card-actions { margin-top: 8px; }

.card-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  border-radius:12px;
  font-weight:800;
}

.category-layout{
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.filters{
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}

.filter-box{
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  padding: 14px;
}

.filter-title{
  font-weight: 900;
  margin-bottom: 12px;
}

.filter-group{
  margin-bottom: 14px;
}

.filter-group-title{
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
}

.filter-placeholder{
  font-size: 13px;
  color: #999;
  background: #f6f6f6;
  padding: 8px;
  border-radius: 8px;
}

.products-area{
  flex: 1;
}




.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.product-card{
  padding: 10px;
  border-radius: 12px;
}

.product-card img{
  height: 150px;
  object-fit: contain;
}

.product-name{
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  margin: 6px 0;
}

.product-meta{
  font-size: 12px;
  color: #666;
}

.product-price-range{
  font-size: 13px;
  font-weight: 800;
  margin-top: 4px;
}

.card-actions{
  margin-top: 6px;
}

.card-btn{
  min-height: 34px;
  font-size: 13px;
  border-radius: 10px;
}


/* ===== HOME (Agro-Hotline main) ===== */


/* layout: left filters + main */
.home-wrap{
  width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
  padding-bottom: 60px;
}

.home-sidebar{
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-box{
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  padding: 14px;
}
.filter-title{
  font-weight: 900;
  margin-bottom: 10px;
}
.filter-group{
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
  margin-top: 10px;
}
.filter-label{
  font-weight: 800;
  margin-bottom: 8px;
  color: #333;
}
.filter-item{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 8px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}
.filter-item:hover{ background:#f6fff6; }
.filter-item input{ transform: scale(1.05); }
.filter-item span{ font-weight: 600; color:#444; }

.filter-apply{
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 900;
  background:#149d26;
  color:#fff;
}
.filter-apply:hover{ background:#0f7c1e; }

.filter-reset{
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e2e2;
  cursor: pointer;
  font-weight: 900;
  background:#fff;
  color:#333;
}
.filter-reset:hover{ background:#f3f3f3; }

.ad-box{
  background: #fff;
  border: 1px dashed #d6d6d6;
  border-radius: 14px;
  padding: 16px;
  color: #777;
  text-align: center;
}

/* main content sections */
.home-content .home-section{
  background:#fff;
  border:1px solid #e1e1e1;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.section-title{
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 12px;
}

/* categories grid */
.category-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}
.category-card{
  background:#fafafa;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 12px;
  transition: .2s;
}
.category-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  border-color:#d0ffd0;
  background:#fff;
}
.cat-name{ font-weight: 900; margin-bottom: 6px; }
.cat-count{ color:#777; font-size: 13px; }

/* banners */
.banners{
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;
}
.banner-main{
  min-height: 160px;
  border-radius: 16px;
  border: 1px dashed #d6d6d6;
  background: #fafafa;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#777;
  font-weight: 800;
  padding: 14px;
  text-align:center;
}
.banner-side{
  display: grid;
  gap: 12px;
}
.banner-sm{
  min-height: 48px;
  border-radius: 14px;
  border: 1px dashed #d6d6d6;
  background: #fafafa;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#777;
  font-weight: 800;
}

/* popular products */
.product-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 12px;
}
.product-card{
  background:#fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 12px;
  transition: .2s;
}
.product-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  border-color:#d0ffd0;
}
.product-card img{
  width: 100%;
  height: 160px;
  object-fit: contain;
  background:#fafafa;
  border-radius: 12px;
  border: 1px solid #ececec;
  padding: 10px;
}
.product-name{
  font-size: 14px;
  font-weight: 900;
  margin: 10px 0 6px;
  line-height: 1.2;
}
.product-molecule{
  color:#777;
  font-size: 13px;
  margin-bottom: 10px;
}
.product-price{
  font-weight: 900;
  color:#0a7b2e;
}

/* why us */
.why-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  color:#444;
  font-weight: 700;
}
.why-grid > div{
  background:#fafafa;
  border:1px solid #eee;
  border-radius: 14px;
  padding: 12px;
}

/* responsive */
@media (max-width: 1100px){
  .category-grid{ grid-template-columns: repeat(3, 1fr); }
  .product-grid{ grid-template-columns: repeat(3, 1fr); }
  .banners{ grid-template-columns: 1fr; }
}

@media (max-width: 900px){
  .home-wrap{
    grid-template-columns: 1fr;
  }
  .home-sidebar{
    position: static;
  }
  .category-grid{ grid-template-columns: repeat(2, 1fr); }
  .product-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px){
  .hero-inner h1{ font-size: 22px; }
  .hero-search{ flex-direction: column; }
  .hero-search button{ width: 100%; }
  .category-grid{ grid-template-columns: 1fr; }
  .product-grid{ grid-template-columns: 1fr; }
  .why-grid{ grid-template-columns: 1fr; }
}


.category-card{
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;

  background:#fafafa;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 12px;
  transition: .2s;
}

.category-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  border-color:#d0ffd0;
  background:#fff;
}

.cat-img{
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ececec;
  background: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
}

.cat-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-info .cat-name{ font-weight: 900; margin-bottom: 4px; }
.cat-info .cat-count{ color:#777; font-size: 13px; }




/* Placeholder cards: like category cards but product size */
.placeholder-card{
  background:#fafafa;
  border: 1px dashed #d6d6d6;
  border-radius: 14px;
  padding: 12px;
  transition: .2s;
  min-height: 260px;
}

.placeholder-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  border-color:#d0ffd0;
  background:#fff;
}

.ph-img{
  height: 160px;
  border-radius: 12px;
  border: 1px dashed #d6d6d6;
  background: #f3f3f3;
  margin-bottom: 12px;
}

.ph-line{
  height: 14px;
  border-radius: 10px;
  border: 1px dashed #d6d6d6;
  background: #f3f3f3;
  margin-bottom: 10px;
}

.ph-line.short{
  width: 60%;
}

.banner-link img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ===== Banner rotator ===== */

.banner-rotator{
  padding: 0;
}

.banner-grid{
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
}

.banner-big{
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e1e1e1;
}

.banner-big img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-small-wrap{
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
}

.banner-small{
  height: 90px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e1e1e1;
}

.banner-small img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* mobile */
@media (max-width: 900px){
  .banner-grid{
    grid-template-columns: 1fr;
  }
  .banner-small-wrap{
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
  }
  .banner-small{
    height: 80px;
  }
}

.banner-big img,
.banner-small img{
  transition: opacity .4s ease;
}

.banner-small{
  cursor: pointer;
}
.banner-big{
  cursor: pointer;
}


/* View more card */
.view-more-card{
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fff7;
  border: 2px dashed #9ad49a;
  text-decoration: none;
}

.view-more-card:hover{
  background: #ecffec;
  border-color: #6fcf97;
}

.view-more-inner{
  text-align: center;
  font-weight: 900;
  color: #1f7a3f;
}

.view-more-plus{
  font-size: 42px;
  line-height: 1;
  margin-bottom: 8px;
}

.view-more-text{
  font-size: 15px;
}


.view-more-card{
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fff7;
  border: 2px dashed #9ad49a;
  text-decoration: none;
}

.view-more-card:hover{
  background: #ecffec;
  border-color: #6fcf97;
}

.view-more-inner{
  text-align: center;
  font-weight: 900;
  color: #1f7a3f;
}

.view-more-plus{
  font-size: 42px;
  line-height: 1;
  margin-bottom: 8px;
}

.view-more-text{
  font-size: 15px;
}

.section-header{
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
}

.section-title{
  cursor: pointer;
  opacity: .5;
  border-bottom: 3px solid transparent;
}

.section-title.active{
  opacity: 1;
  border-color: #149d26;
}

.tab-content{
  display: none;
}
.tab-content.active{
  display: grid;
}

/* discounts */
.discount{
  position: relative;
}
.discount-badge{
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e53935;
  color: #fff;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
}
.product-price .old{
  text-decoration: line-through;
  color: #999;
  margin-right: 6px;
}
.product-price .new{
  color: #d32f2f;
  font-weight: 900;
}


/* ===== HOME MAIN (no sidebar) ===== */
.home-main{
  width: 90%;
  margin: 0 auto;
  padding: 18px 0 30px;
}

.section-title.static-title{
  cursor: default;
  opacity: 1;
  border-bottom: none;
}

/* Empty block (discounts placeholder) */
.empty-block{
  grid-column: 1 / -1;
  background: #fafafa;
  border: 1px dashed #d6d6d6;
  border-radius: 14px;
  padding: 14px;
  color: #666;
  font-weight: 700;
}

/* Tools / Useful services */
.tools-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 12px;
}
.tool-card{
  background:#fafafa;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px;
  transition: .2s;
}
.tool-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  border-color:#d0ffd0;
  background:#fff;
}
.tool-ico{ font-size: 26px; margin-bottom: 10px; }
.tool-title{ font-weight: 900; margin-bottom: 6px; }
.tool-sub{ color:#777; font-size: 13px; line-height: 1.35; }

/* Banner5: fixed height, full image visible, rounded like site */
.home-ad2 .ad-wide{
  height: 220px;
  border-radius: 12px;        /* рџ”№ РјС–РЅС–РјР°Р»СЊРЅРµ Р·Р°РѕРєСЂСѓРіР»РµРЅРЅСЏ */
  overflow: hidden;
  border: 1px solid #e1e1e1;
  background: #fff;
}

.home-ad2 .ad-wide img{
  width: 100%;
  height: 100%;
  object-fit: contain;        /* рџ”№ РќР• РѕР±СЂС–Р·Р°С” С‚РµРєСЃС‚ */
  display: block;
}


/* Footer */
.footer{
  background: #3b2467;
  color: #fff;
  margin-top: 14px;
}
.footer-inner{
  width: 90%;
  margin: 0 auto;
  padding: 26px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}
.footer-logo{
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
}

.footer-title{ font-weight: 900; margin-bottom: 10px; }
.footer-link{
  display:block;
  opacity: .92;
  margin-bottom: 8px;
  font-weight: 700;
}
.footer-link:hover{ opacity: 1; text-decoration: underline; }
.footer-muted{ opacity: .9; line-height: 1.4; }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 12px 0;
  text-align: center;
  opacity: .9;
  font-weight: 700;
}

/* Responsive for tools & footer */
@media (max-width: 1100px){
  .tools-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px){
  .tools-grid{ grid-template-columns: 1fr; }
  .footer-inner{ grid-template-columns: 1fr; }
  .ad-wide{ height: 160px; }
}


/* ===== Hotline-like Services (Home) ===== */
.home-page .services-section .section-title{
  margin-bottom: 10px;
}

.home-page .services-box{
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 12px;
  padding: 18px 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.home-page .service-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 10px;
  transition: .15s;
}

.home-page .service-item:hover{
  background: #f6f8fb;
}

.home-page .service-icon{
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 900;
}

.home-page .service-icon.purple{ background:#efe7ff; color:#7c3aed; }
.home-page .service-icon.green{ background:#e8fff1; color:#16a34a; }
.home-page .service-icon.orange{ background:#fff1e7; color:#f97316; }
.home-page .service-icon.blue{ background:#e8f1ff; color:#2563eb; }

.home-page .service-text{
  font-weight: 800;
  font-size: 14px;
  color:#222;
  text-align: center;
}

/* ===== Hotline-like Footer ===== */
.site-footer{
  background: #565656;
  color: #eaeaea;
  margin-top: 18px;
  position: relative;
}

.site-footer .footer-inner{
  width: 92%;
  margin: 0 auto;
  padding: 26px 0 18px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;
  gap: 22px;
}

.site-footer .footer-brand-name{
  font-size: 28px;
  font-weight: 900;
  color: #f6a31a;
}

.site-footer .footer-social-title{
  margin-top: 14px;
  font-weight: 800;
  color: #fff;
}

.site-footer .footer-social{
  display: flex;
  gap: 12px;
  margin: 10px 0 14px;
}

.site-footer .soc{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3f3f3f;
  color: #fff;
  font-weight: 900;
}

.site-footer .footer-theme{
  display:flex;
  align-items:center;
  gap: 10px;
  opacity: .95;
  margin-bottom: 14px;
}

.site-footer .moon{
  font-size: 18px;
  opacity: .9;
}

.site-footer .footer-stores{
  display:flex;
  gap: 10px;
  margin-bottom: 14px;
}

.site-footer .store-btn{
  background:#2f2f2f;
  border: 1px solid rgba(255,255,255,0.15);
  color:#fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 800;
}

.site-footer .footer-title{
  font-weight: 900;
  color:#fff;
  margin-bottom: 10px;
}

.site-footer .footer-link{
  display:block;
  color:#9fd0ff; /* Hotline-like bluish links */
  margin-bottom: 8px;
  font-weight: 700;
}

.site-footer .footer-link:hover{
  text-decoration: underline;
}

.site-footer .footer-copy{
  margin-top: 8px;
  opacity: .9;
  font-weight: 700;
}

/* to top button */
.site-footer .to-top{
  position: absolute;
  right: 22px;
  top: 40%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #dedede;
  color:#2b2b2b;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1200px){
  .site-footer .footer-inner{
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .home-page .services-box{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px){
  .site-footer .footer-inner{
    grid-template-columns: 1fr;
  }
  .home-page .services-box{
    grid-template-columns: 1fr;
  }
  .site-footer .to-top{
    top: 18px;
  }
}


/* ===== Recently viewed: 5 cards in a row ===== */
.product-grid-5{
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}


@media (max-width: 1200px){
  .product-grid-5{
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px){
  .product-grid-5{
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px){
  .product-grid-5{
    grid-template-columns: repeat(2, 1fr);
  }
}


/* FIX: product cards grid on home (Popular / Discounts) */
.home-page .product-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
}
@media (max-width: 1200px){
  .home-page .product-grid{
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 900px){
  .home-page .product-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px){
  .home-page .product-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ===== HOME: force 5 cards in a row (Popular / Discounts / Recently) ===== */
#tab-popular.product-grid,
#tab-discounts.product-grid,
#recentlyViewedGrid.product-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}

/* СЏРєС‰Рѕ Р°РєС‚РёРІРЅРёР№ С‚Р°Р± СЂР°РїС‚РѕРј РїРµСЂРµР±РёРІР°С”С‚СЊСЃСЏ */
#tab-popular.tab-content.active,
#tab-discounts.tab-content.active{
  display: grid;
}

/* С‰РѕР± РєР»С–Рє РїРѕ РєР°СЂС‚С†С– РІРёРіР»СЏРґР°РІ РЅРѕСЂРјР°Р»СЊРЅРѕ (РЅРµ вЂњСЂРѕР·С‚СЏРіСѓРІР°РІвЂќ РєРѕРЅС‚РµРЅС‚) */
.product-card > a{
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Р°РґР°РїС‚РёРІ */
@media (max-width: 1200px){
  #tab-popular.product-grid,
  #tab-discounts.product-grid,
  #recentlyViewedGrid.product-grid{
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 900px){
  #tab-popular.product-grid,
  #tab-discounts.product-grid,
  #recentlyViewedGrid.product-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px){
  #tab-popular.product-grid,
  #tab-discounts.product-grid,
  #recentlyViewedGrid.product-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-grid-5{
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}


/* --- Card fixed layout --- */
.product-card{
  display:flex;
  flex-direction:column;
  height:100%;
}
.product-card > a{
  display:flex;
  flex-direction:column;
  flex:1;
  text-decoration:none;
  color:inherit;
}


/* fixed text zones */
.product-name{
  min-height:44px;
  line-height:22px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.product-meta{
  min-height:22px;
  line-height:22px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ===== FIX: overlap РјС–Р¶ "empty-block" С– "РќР°С€С– СЃРµСЂРІС–СЃРё" ===== */

/* СЃРµРєС†С–С— Р·Р°РІР¶РґРё РјР°СЋС‚СЊ Р№С‚Рё РѕРґРЅР° Р·Р° РѕРґРЅРѕСЋ */
.home-section {
  position: relative;
  clear: both;
  margin-bottom: 28px;
}

/* РІРєР»Р°РґРєРё/РєРѕРЅС‚РµРЅС‚ РЅРµ РїРѕРІРёРЅРЅС– Р±СѓС‚Рё absolute */
.tab-content,
#tab-popular,
#tab-discounts {
  position: static;
  height: auto;
  overflow: visible;
}

/* РїРѕРІС–РґРѕРјР»РµРЅРЅСЏ РїСЂРѕ РІС–РґСЃСѓС‚РЅС–СЃС‚СЊ Р·РЅРёР¶РѕРє РјР°С” Р·Р°Р№РјР°С‚Рё РјС–СЃС†Рµ */
.empty-block {
  position: static;
  display: block;
  clear: both;
  margin: 16px 0 32px;
  padding: 16px 20px;
  background: #f6f7f8;
  border-radius: 12px;
}

/* РґРѕРґР°С‚РєРѕРІРѕ: С‰РѕР± "РќР°С€С– СЃРµСЂРІС–СЃРё" С‚РѕС‡РЅРѕ РЅРµ Р·Р°Р»С–С‚Р°Р»Рё РІРІРµСЂС… */
.services-section {
  margin-top: 24px;
}


/* === PRODUCT IMAGE FRAME (Hotline-like) === */
.product-thumb{
  width: 100%;
  height: 180px;
  background: #fff;            /* Р‘Р†Р›Рђ Р РђРњРљРђ */
  border-radius: 16px;
  padding: 10px;               /* РІС–РґСЃС‚СѓРї РјС–Р¶ СЂР°РјРєРѕСЋ С– С„РѕС‚Рѕ */
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  margin-bottom: 12px;
}

/* С„РѕС‚Рѕ РІСЃРµСЂРµРґРёРЅС– */
.product-thumb img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.product-card{
  overflow: hidden;     /* С‰РѕР± РЅС–С‡РѕРіРѕ РЅРµ РІРёР»С–Р·Р»Рѕ Р·Р° РјРµР¶С– */
  box-sizing: border-box;
}

.product-card > a{
  min-width: 0;         /* РІР°Р¶Р»РёРІРѕ РґР»СЏ grid/flex, С‰РѕР± РєРѕРЅС‚РµРЅС‚ РЅРµ СЂРѕР·РїРёС…Р°РІ */
}

.product-thumb{
  height: 180px;
  padding: 10px;
}


/* === PRODUCT IMAGE: SIMPLE WHITE BACKGROUND (NO FRAME) === */

.product-card{
  overflow: hidden;              /* РЅС–С‡РѕРіРѕ РЅРµ РјРѕР¶Рµ РІРёР»Р°Р·РёС‚Рё */
}

/* Р·РѕРЅР° РїС–Рґ С„РѕС‚Рѕ */
.product-thumb{
  width: 100%;
  height: 180px;
  background: #ffffff;           /* РїСЂРѕСЃС‚Рѕ Р±С–Р»РёР№ С„РѕРЅ */
  border-radius: 18px;           /* РѕРґРЅР°РєРѕРІРµ СЃРєСЂСѓРіР»РµРЅРЅСЏ */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* СЃР°РјРµ С„РѕС‚Рѕ */
.product-thumb img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* РїСЂРёР±РёСЂР°С”РјРѕ Р’РЎР† outline/focus РµС„РµРєС‚Рё */
.product-card a{
  outline: none;
}

.product-card a:focus,
.product-card a:active,
.product-card a:focus-visible{
  outline: none;
  box-shadow: none;
}



/* ===== FINAL: HEADER + HERO (single version) ===== */

/* Header base */
.header{
  background: #4b2f83;
  color: #fff;
}

/* Wider container in header */
.header-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 16px;
}

/* Logo */
.logo{
  font-weight: 900;
  font-size: 34px;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}
.logo span{ color: #38d668; }

/* Actions (UA / icons) */
.header-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.chip{
  border: 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.icon-btn{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
}

/* Home mode: centered logo */
.header--home .logo--center{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

/* Inner pages: search in header */
.header-search{
  flex: 1;
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.header-search-input{
  flex: 1;
  border: 0;
  outline: none;
  font-size: 16px;
  padding: 10px 12px;
}

.header-search-btn{
  width: 54px;
  height: 44px;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  background: rgba(56,214,104,.2);
}

/* HOME hero (purple like Hotline) */
.hero{
  background: #4b2f83;
  padding: 22px 0 26px;
}

.hero-inner{
  max-width: 900px;
  margin: 0 auto;
  padding: 0 18px;
  text-align: center;
}

.hero-slogan{
  color: rgba(255,255,255,.92);
  font-size: 22px;
  font-weight: 800;
  margin: 6px 0 16px;
}

.hero-search{
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.hero-search-input{
  flex: 1;
  border: 0;
  outline: none;
  font-size: 16px;
  padding: 12px 12px;
}

.hero-search-btn{
  width: 54px;
  height: 48px;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  background: #168f2d;
  color: #fff;
}




.header-search .search-form{
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;

  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}


.header-search .search-input{
  flex: 1;
  width: auto;
  border: 0;
  outline: none;
  padding: 10px 12px;
  border-radius: 10px;
}

.header-search .search-btn{
  border: 0;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(56,214,104,.2);
  font-weight: 800;
}




/* HERO uses the same search_form component */
.hero-search .search-form{
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;

  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}


.hero-search .search-input{
  flex: 1;
  border: 0;
  outline: none;
  padding: 14px 14px;
  border-radius: 12px;
  font-size: 16px;
}

.hero-search .search-btn{
  border: 0;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 12px;
  background: #168f2d;
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}




/* ===== HOME: allow full-width hero like mock ===== */
.home-page .home-main{
  width: 100%;
  margin: 0;
  padding: 0;
}

/* container only for content under hero */
.home-page .home-inner{
  width: 90%;
  margin: 0 auto;
  padding: 18px 0 30px;
}




/* ===== PRO SEARCH DROPDOWN (compact + thumbs) ===== */

.search-box{
  position: relative;
  width: 100%;
}

.search-dropdown{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;

  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  border: 1px solid rgba(0,0,0,.06);

  z-index: 2000;
  overflow: hidden;
}

.search-dropdown.hidden{ display:none; }

.search-dropdown .dd-inner{
  max-height: 360px;
  overflow: auto;
  padding: 6px;
}

.search-dropdown .dd-inner::-webkit-scrollbar{ width: 10px; }
.search-dropdown .dd-inner::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.12);
  border-radius: 999px;
  border: 3px solid #fff;
}

/* group header */
.search-dropdown .dd-group{
  margin: 6px 0 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-dropdown .dd-group-title{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #616161;
  text-transform: uppercase;
}

.search-dropdown .dd-group-count{
  font-size: 12px;
  font-weight: 800;
  color: #8a8a8a;
}

/* item row */
.search-dropdown .dd-item{
  display: flex;
  gap: 10px;
  align-items: flex-start;

  padding: 8px 10px;
  border-radius: 12px;

  cursor: pointer;
  user-select: none;

  transition: background .12s ease;
}

.search-dropdown .dd-item:hover{
  background: #f4f3ff;
}

.search-dropdown .dd-item.is-active{
  background: #ece9ff;
}

/* thumbnail */
.search-dropdown .dd-thumb{
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  overflow: hidden;
  background: #f2f2f2;
  border: 1px solid rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-dropdown .dd-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-dropdown .dd-thumb--active{
  background: rgba(75,47,131,.12);
  color: #4b2f83;
  font-weight: 900;
  font-size: 16px;
}

/* title/subtitle */
.search-dropdown .dd-main{
  flex: 1;
  min-width: 0;
}

.search-dropdown .dd-title{
  font-weight: 900;
  font-size: 13px;
  color: #171717;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown .dd-sub{
  margin-top: 1px;
  font-size: 11.5px;
  color: #6b6b6b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown mark{
  background: rgba(56,214,104,.25);
  color: inherit;
  padding: 0 2px;
  border-radius: 4px;
}

/* footer */
.search-dropdown .dd-footer{
  border-top: 1px solid rgba(0,0,0,.06);
  padding: 9px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.search-dropdown .dd-all{
  font-weight: 900;
  font-size: 13px;
  color: #4b2f83;
  cursor: pointer;
  text-decoration: none;
}

.search-dropdown .dd-hint{
  display: none; /* compact */
}



/* ===== Sidebar v2 ===== */
.sidebar { width: 260px; flex-shrink: 0; }

.sidebar-block {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.sidebar-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
  opacity: .8;
  margin-bottom: 10px;
}

/* ===== Sidebar categories вЂ“ MORE compact ===== */
.sidebar-nav { 
  display: flex; 
  flex-direction: column; 
  gap: 2px;              /* Р±СѓР»Рѕ 6px */
}

/* ===== Sidebar categories вЂ“ styled ===== */
.sidebar-link{
  display:flex;
  justify-content:space-between;
  align-items:center;

  padding: 6px 10px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 800;
  border-radius: 12px;

  /* вњ… Р±СЂР°РєСѓРІР°Р»Рѕ С†СЊРѕРіРѕ */
  text-decoration: none;
  color: #171717;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
}

.sidebar-badge{
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 999px;

  /* вњ… Р±СЂР°РєСѓРІР°Р»Рѕ С†СЊРѕРіРѕ */
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.10);
  color: rgba(0,0,0,.70);
  font-weight: 900;
  min-width: 34px;
  text-align: center;
}




.sidebar-link:hover {
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.06);
}

/* ===== Active category highlight ===== */
.sidebar-link.is-active {
  background: rgba(20, 157, 38, 0.12); /* СЃР°Р»Р°С‚РѕРІР°, РїСЂРѕР·РѕСЂР° */
  color: #149d26;
}

.sidebar-link.is-active .sidebar-link-text {
  font-weight: 900;
}

.sidebar-link.is-active .sidebar-badge {
  background: rgba(20, 157, 38, 0.18);
  color: #0e7f1e;
  border-color: rgba(20, 157, 38, 0.25);
}

.sidebar-link:hover {
  background: rgba(20, 157, 38, 0.08);
}

.sidebar-link.is-active:hover {
  background: rgba(20, 157, 38, 0.16);
}


.sidebar-link-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }



.sidebar-empty { opacity: .7; font-size: 14px; padding: 6px 2px; }

/* ===== Filters scaffold ===== */
.filter { padding-top: 10px; border-top: 1px solid rgba(0,0,0,.06); margin-top: 10px; }
.filter:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.filter-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; }

.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.filter-input {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}

.filter-input:disabled {
  background: rgba(0,0,0,.03);
  color: rgba(0,0,0,.55);
}

.filter-hint { font-size: 12px; opacity: .7; margin-top: 6px; }

/* ===== Layout safety ===== */
.layout { display: flex; gap: 20px; align-items: flex-start; }
.content { flex: 1; min-width: 0; }



/* =========================================================
   SIDEBAR: own scroll on desktop, normal flow on mobile
   ========================================================= */

/* ===== Layout safety (СЏРєС‰Рѕ РІР¶Рµ С” вЂ” РІРґСЂСѓРіРµ РЅРµ СЃС‚СЂР°С€РЅРѕ) ===== */
.layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.content {
  flex: 1;
  min-width: 0;
}

/* ===== DESKTOP: sidebar with its own scroll ===== */
.sidebar {
  position: sticky;
  top: 0px; /* РІРёСЃРѕС‚Р° header */
  overscroll-behavior: auto;
  padding-right: 4px;
}

/* Scrollbar вЂ” Chrome / Edge */
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

/* Scrollbar вЂ” Firefox */
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

/* ===== MOBILE: sidebar without own scroll ===== */
@media (max-width: 960px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: relative;
    top: auto;
    overflow: visible;
    padding-right: 0;
  }
}



/* === HEADER SEARCH: centered look === */
.header-search{
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: transparent;
  padding: 0;
  box-shadow: none;
}


/* === SEARCH BUTTON HOVER === */
.search-btn{
  transition: 
    background .18s ease,
    transform .12s ease,
    box-shadow .12s ease;
}

.search-btn:hover{
  background: #1fa63a;          /* СЏСЃРєСЂР°РІС–С€Рµ */
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

.search-btn:active{
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}



.product-molecule{
  font-size: 12px;
  color: #777;
  margin: 2px 0 6px;
  line-height: 1.25;

  display: -webkit-box;
  -webkit-line-clamp: 2;        /* РјР°РєСЃРёРјСѓРј 2 СЂСЏРґРєРё */
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* === Product card: shops block (compact & aligned) === */
.product-shops{
  min-height: 32px;          /* С„С–РєСЃРѕРІР°РЅР° Р·РѕРЅР° */
  margin-top: 6px;
  display: flex;
  align-items: flex-start;   /* РїСЂРёС‚РёСЃРєР°С”РјРѕ РІРіРѕСЂСѓ */
}

.shop-tag{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #e8ffe8;
  color: #138d13;
  border: 1px solid #bff5bf;
  font-weight: 700;
  line-height: 1;
}


/* ===== FINAL FIX: product card symmetry (place at END of file) ===== */

.product-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card > a{
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* 1) РќР°Р·РІР° вЂ” Р·Р°РІР¶РґРё 2 СЂСЏРґРєРё РјС–СЃС†СЏ */
.product-name{
  min-height: 44px;
  line-height: 22px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 2) Р”С–СЋС‡Р° СЂРµС‡РѕРІРёРЅР° вЂ” Р·Р°РІР¶РґРё 2 СЂСЏРґРєРё РјС–СЃС†СЏ (С‰РѕР± РЅРµ вЂњРїР»Р°РІР°РІвЂќ РЅРёР·) */
.product-molecule{
  min-height: 32px;   /* ~2 СЂСЏРґРєРё РїРѕ 16px */
  margin: 2px 0 6px;
  line-height: 16px;
  font-size: 12px;
  color: #777;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 3) Packaging вЂ” РѕРґРЅР°РєРѕРІР° РІРёСЃРѕС‚Р°, РЅР°РІС–С‚СЊ СЏРєС‰Рѕ РїРѕСЂРѕР¶РЅС–Р№ */
.product-pack{
  min-height: 22px;
  line-height: 22px;
  font-size: 12px;
  color: #666;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4) Р¦С–РЅР° вЂ” СЃС‚Р°Р±С–Р»СЊРЅР° Р·РѕРЅР° */
.product-price-range{
  min-height: 22px;
  margin-top: 4px;
}

/* 5) РњР°РіР°Р·РёРЅРё вЂ” СЃС‚Р°Р±С–Р»СЊРЅР° Р·РѕРЅР° (С‚РІС–Р№ Р±Р»РѕРє) */
.product-shops{
  min-height: 32px;
  margin-top: 6px;
  display: flex;
  align-items: flex-start;
}

.shop-tag{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
}


/* Fix: dropdown must not inherit hero text centering */
.search-dropdown{ text-align: left; }
.search-dropdown .dd-main{ text-align: left; }


.search-dropdown .dd-pack{
  font-weight: 900;
  color: #111;
}



.molecule-link{
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.molecule-link:hover{
  opacity: .8;
}




/* ===== Search page header (Rozetka-like) ===== */
.search-page-head{
  margin: 8px 0 18px;
}

.search-page-h1{
  margin: 0;
  font-size: 20px;
  line-height: 1.12;
  font-weight: 900;
  color: #111;
  letter-spacing: -0.3px;
}

.search-page-q{
  color: #18a34a;
  font-weight: 900;
}

.search-page-count{
  margin-top: 14px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

@media (max-width: 700px){
  .search-page-h1{ font-size: 30px; }
  .search-page-count{ font-size: 16px; margin-top: 10px; }
}


.molecule-link{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.molecule-link:hover{
  opacity: .8;
}


/* ===== Sidebar filters: accordions + checklists + active dropdown ===== */

.f-acc{
  border-top: 1px solid rgba(0,0,0,.06);
  padding-top: 10px;
  margin-top: 10px;
}

.f-sum{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  font-size: 13px;
  padding: 8px 0;
}

.f-sum::-webkit-details-marker{ display: none; }

.f-chev{
  font-weight: 900;
  opacity: .75;
  transition: transform .15s ease;
}

.f-acc[open] .f-chev{ transform: rotate(180deg); }

.f-body{
  padding: 6px 0 2px;
}

.f-checks{
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 6px;
}

.f-check{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 8px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}

.f-check:hover{ background: rgba(20,157,38,.06); }

.f-check input{ transform: scale(1.05); }
.f-check span{ font-weight: 700; color:#333; }

.f-auto{ position: relative; }

.f-dd{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.16);
  z-index: 3000;
  overflow: hidden;
  max-height: 260px;
  overflow: auto;
}

.f-dd.hidden{ display: none; }

.f-dd-item{
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.f-dd-item:hover{
  background: #f4f3ff;
}


/* ===== Compact filters (sidebar) ===== */

/* Р·Р°РіР°Р»СЊРЅС– РІС–РґСЃС‚СѓРїРё СЃРµРєС†С–Р№ */
.sidebar .sidebar-block { 
  padding: 12px; 
}

.filters-form { 
  margin-top: 8px; 
}

/* РІРµСЂС…РЅС–Р№ Р±Р»РѕРє (Р—Р°СЃС‚РѕСЃРѕРІР°РЅРѕ / РєРЅРѕРїРєРё) */
.filters-actions{
  gap: 8px;
  margin-bottom: 10px;
}

.filters-applied{
  font-size: 13px;
  line-height: 1.2;
}

.filters-actions-btns{
  display: flex;
  gap: 8px;
  align-items: center;
}

/* РєРЅРѕРїРєРё */
.filters-btn{
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 10px;
}

/* Р±Р»РѕРє "Р¦С–РЅР°" С‚Р° С–РЅС€С– .filter */
.filter{
  margin-top: 10px;
  padding-top: 10px;
}

.filter-title{
  font-size: 13px;
  margin-bottom: 6px;
}

/* С–РЅРїСѓС‚Рё: РјРµРЅС€С– РїРѕ РІРёСЃРѕС‚С– */
.filter-row{
  gap: 8px;
}

.filter-input{
  height: 34px;          /* Р±СѓР»Рѕ РІРёС‰Рµ */
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 10px;
}

/* Р°РєРѕСЂРґРµРѕРЅРё */
.f-acc{
  padding-top: 8px;
  margin-top: 8px;
}

.f-sum{
  padding: 6px 0;        /* Р±СѓР»Рѕ 8px */
  font-size: 13px;
}

.f-body{
  padding: 4px 0 2px;
}

/* С‡РµРєР±РѕРєСЃРё: С‰С–Р»СЊРЅС–С€Рµ */
.f-checks{
  gap: 6px;
  max-height: 240px;     /* РєРѕРјРїР°РєС‚РЅС–С€Рµ */
}

.f-check{
  padding: 6px 8px;      /* Р±СѓР»Рѕ 8px */
  border-radius: 10px;
}

.f-check span{
  font-size: 13px;
  line-height: 1.15;
}

/* РїС–РґРєР°Р·РєРё РїС–Рґ Р±Р»РѕРєР°РјРё */
.filter-hint{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.2;
}

/* dropdown РїС–РґРєР°Р·РѕРє "Р”С–СЋС‡Р° СЂРµС‡РѕРІРёРЅР°" */
.f-dd-item{
  padding: 8px 10px;     /* РєРѕРјРїР°РєС‚РЅС–С€Рµ */
  font-size: 13px;
}



/* ===== Apply button highlight when filters are applied ===== */

/* РєРѕР»Рё РІ Р±Р»РѕС†С– С” "Р—Р°СЃС‚РѕСЃРѕРІР°РЅРѕ: N" */
.filters-actions:has(.filters-applied b) .filters-btn--apply {
  background: rgba(20, 157, 38, 0.18);   /* СЃР°Р»Р°С‚РѕРІРёР№ */
  border-color: #149d26;
  color: #0e7f1e;
  font-weight: 900;
}

/* hover РґР»СЏ Р°РєС‚РёРІРЅРѕРіРѕ СЃС‚Р°РЅСѓ */
.filters-actions:has(.filters-applied b) .filters-btn--apply:hover {
  background: rgba(20, 157, 38, 0.26);
}

/* optional: Р»РµРіРєР° С‚С–РЅСЊ, С‰РѕР± РІРёРіР»СЏРґР°Р»Рѕ "Р°РєС‚РёРІРЅРѕ" */
.filters-actions:has(.filters-applied b) .filters-btn--apply {
  box-shadow: 0 4px 12px rgba(20, 157, 38, 0.25);
}



/* ===== Price slider (double range) ===== */

.price-box{
  margin-top: 8px;
  padding-top: 6px;
}

.price-top{
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-field{
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-label{
  font-weight: 900;
  font-size: 13px;
  opacity: .9;
  text-transform: lowercase;
}

.price-input{
  width: 110px;
  height: 34px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.18);
  outline: none;
}

.price-currency{
  margin-left: auto;
  font-size: 18px;
  font-weight: 900;
  opacity: .9;
}

.price-slider{
  position: relative;
  height: 38px;
  margin-top: 10px;
}

.range{
  position: absolute;
  left: 0;
  top: 12px;
  width: 100%;
  pointer-events: none; /* РІР°Р¶Р»РёРІРѕ */
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 14px;
  margin: 0;
}

.range-min, .range-max{ pointer-events: auto; } /* С‰РѕР± РјРѕР¶РЅР° Р±СѓР»Рѕ С‚СЏРіРЅСѓС‚Рё */

.range-track{
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.14);
}

.range-fill{
  position: absolute;
  top: 18px;
  height: 6px;
  border-radius: 999px;
  background: rgba(20,157,38,.55); /* СЃР°Р»Р°С‚РѕРІР° СЃРјСѓРіР° */
  left: 0%;
  right: 0%;
}

/* thumb */
.range::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #8aa0a8;            /* СЏРє РЅР° СЃРєСЂС–РЅС– */
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  cursor: pointer;
}

.range::-moz-range-thumb{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #8aa0a8;
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  cursor: pointer;
}





/* ===== Price UI fix (compact + в‚ґ inside input) ===== */

.price-top{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.price-field{
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.price-label{
  font-size: 12px;
  font-weight: 900;
}

.price-input{
  width: 100%;
  max-width: 140px;   /* вњ… РєРѕРјРїР°РєС‚РЅС–С€Рµ, С‰РѕР± РІР»С–Р·Р°Р»Рѕ РІ СЃР°Р№РґР±Р°СЂ */
  height: 30px;
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 10px;
}

.price-input-wrap{
  position: relative;
  width: 100%;
  max-width: 140px;   /* вњ… С‚Р°Рє СЃР°РјРѕ */
}

.price-input-wrap .price-input{
  max-width: none;
  width: 100%;
  padding-right: 28px; /* РјС–СЃС†Рµ РїС–Рґ в‚ґ */
}

.price-currency{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  opacity: .9;
  pointer-events: none;
}

/* slider: РЅРµ РїРµСЂРµРєСЂРёРІР°С‚Рё pointer */
.price-slider{ position: relative; height: 30px; margin-top: 8px; }
.range-track, .range-fill{ pointer-events: none; }
.range{ position: absolute; left: 0; top: 6px; width: 100%; background: transparent; }


/* ===== Hotline-style price slider (custom thumbs) ===== */

.price-top{
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 6px;
  align-items: center;
}

.price-field{
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.price-label{
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.price-input,
.price-input-wrap{
  width: 100%;
  max-width: 96px;
  min-width: 0;
}

.price-input{
  height: 26px;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 8px;
}

.price-input-wrap{
  position: relative;
}

.price-input-wrap .price-input{
  width: 100%;
  max-width: none;
  padding-right: 18px;
}

.price-currency{
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 800;
  opacity: .85;
  pointer-events: none;
}

/* slider */
.price-slider.hs{
  position: relative;
  height: 30px;
  margin-top: 8px;
  user-select: none;
}

.price-slider.hs .hs-track{
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.14);
}

.price-slider.hs .hs-range{
  position: absolute;
  top: 12px;
  height: 6px;
  border-radius: 999px;
  background: rgba(20,157,38,.55);
  left: 0%;
  right: 0%;
  pointer-events: none;
}

.price-slider.hs .hs-thumb{
  position: absolute;
  top: 15px;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.95);
  background: #8aa0a8;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  cursor: pointer;
  padding: 0;
}

.price-slider.hs .hs-thumb:focus{
  outline: 2px solid rgba(0, 120, 255, .35);
  outline-offset: 2px;
}



/* ===== PRICE INPUTS: smaller boxes, same numbers ===== */

/* 2 РєРѕР»РѕРЅРєРё РіР°СЂР°РЅС‚РѕРІР°РЅРѕ */
.price-top{
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* РїРѕР»Рµ + label */
.price-field{
  gap: 4px;
  min-width: 0;
}

/* в¬‡пёЏ РіРѕР»РѕРІРЅРµ: РїСЂРёР±РёСЂР°С”РјРѕ СЃС‚СЂС–Р»РєРё number */
.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
.price-input{
  -moz-appearance: textfield;
}

/* РєРѕРјРїР°РєС‚РЅРµ РїРѕР»Рµ */
.price-input{
  height: 26px;
  padding: 4px 6px;
  font-size: 13px;          /* С†РёС„СЂРё РќР• Р·РјРµРЅС€СѓС”РјРѕ */
  max-width: 82px;          /* в¬…пёЏ РєР»СЋС‡РѕРІРµ */
  min-width: 0;
  border-radius: 8px;
}

/* РїСЂР°РІРµ РїРѕР»Рµ Р· РІР°Р»СЋС‚РѕСЋ */
.price-input-wrap{
  max-width: 82px;          /* в¬…пёЏ С‚Рµ СЃР°РјРµ */
  width: 100%;
}

.price-input-wrap .price-input{
  padding-right: 18px;      /* СЂС–РІРЅРѕ РїС–Рґ в‚ґ */
}

/* РІР°Р»СЋС‚Р° РєРѕРјРїР°РєС‚РЅР° */
.price-currency{
  right: 6px;
  font-size: 13px;
}

/* СЃС‚СЂР°С…РѕРІРєР° */
.price-box{
  overflow: hidden;
}


/* ===== Fix: price inputs look cut ===== */

/* РќР• СЂС–Р¶РµРјРѕ РєРѕРЅС‚РµРЅС‚ */
.price-box{
  overflow: visible;  /* Р±СѓР»Рѕ hidden */
}

/* РґР°С”РјРѕ С‚СЂРѕС…Рё РІРЅСѓС‚СЂС–С€РЅСЊРѕРіРѕ РїСЂРѕСЃС‚РѕСЂСѓ СЃРїСЂР°РІР° */
.price-top{
  padding-right: 6px;
}

/* С–РЅРїСѓС‚Р°Рј С‚СЂРѕС…Рё Р±С–Р»СЊС€Рµ "РїРѕРІС–С‚СЂСЏ" РїРѕ РєСЂР°СЏС… */
.price-input{
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
}

/* РїСЂР°РІРµ РїРѕР»Рµ: РІР°Р»СЋС‚Р° Р±Р»РёР¶С‡Рµ С– С‚РѕС‡РЅРѕ РІСЃРµСЂРµРґРёРЅС– */
.price-input-wrap{
  max-width: 88px;     /* С‚СЂС–С€РєРё С€РёСЂС€Рµ */
}

.price-input-wrap .price-input{
  padding-right: 20px; /* С‰РѕР± в‚ґ РЅРµ РїСЂРёС‚РёСЃРєР°Р»Р°СЃСЊ */
}

/* РІР°Р»СЋС‚Р° РЅРµ Р±С–Р»СЏ СЃР°РјРѕС— СЂР°РјРєРё */
.price-currency{
  right: 8px;
}


/* ===== Price inputs: slimmer look ===== */

/* С‰Рµ РєРѕРјРїР°РєС‚РЅС–С€Р° СЃС–С‚РєР° */
.price-top{
  grid-template-columns: auto auto;
  justify-content: start;
  column-gap: 10px;
}

/* label РєРѕРјРїР°РєС‚РЅС–С€Рµ */
.price-label{
  font-size: 12px;
  font-weight: 800;
}

/* в¬‡пёЏ РіРѕР»РѕРІРЅРµ: РІСѓР¶С‡С– С–РЅРїСѓС‚Рё */
.price-input{
  max-width: 72px;     /* Р±СѓР»Рѕ ~88вЂ“96 */
  height: 26px;
  padding: 4px 6px;
  font-size: 13px;     /* С†РёС„СЂРё РќР• Р·РјРµРЅС€СѓС”РјРѕ */
}

/* РїСЂР°РІРµ РїРѕР»Рµ */
.price-input-wrap{
  max-width: 72px;
}

.price-input-wrap .price-input{
  padding-right: 18px;
}

/* РІР°Р»СЋС‚Р° РєРѕРјРїР°РєС‚РЅРѕ */
.price-currency{
  right: 6px;
  font-size: 13px;
}



/* ===============================
   HOTLINE-LIKE SIDEBAR BEHAVIOR
   =============================== */

:root{
  --header-h: 90px;   /* РІРёСЃРѕС‚Р° С€Р°РїРєРё */
  --sidebar-gap: 20px;
}

/* РєРѕР»РѕРЅРєР° СЃР°Р№РґР±Р°СЂСѓ С‚СЏРіРЅРµС‚СЊСЃСЏ РґРѕ РЅРёР·Сѓ СЃС‚РѕСЂС–РЅРєРё */
.layout{
  align-items: stretch;                 /* С‰РѕР± РєРѕР»РѕРЅРєРё Р±СѓР»Рё РѕРґРЅР°РєРѕРІРѕС— РІРёСЃРѕС‚Рё */
  min-height: calc(100vh - var(--header-h));
}

/* СЃР°РјР° РєРѕР»РѕРЅРєР° РќР• sticky, РІРѕРЅР° РїСЂРѕСЃС‚Рѕ РєРѕР»РѕРЅРєР° */
.sidebar{
  width: 260px;
  flex: 0 0 260px;
  position: relative;
  height: auto;
  overflow: visible;
  padding-right: 0;
}

/* sticky С‚С–Р»СЊРєРё РІРЅСѓС‚СЂС–С€РЅС–Р№ РєРѕРЅС‚РµР№РЅРµСЂ */
.sidebar-inner{
  position: sticky;
  top: var(--sidebar-gap);
  max-height: calc(100vh - var(--header-h) - var(--sidebar-gap));
  overflow-y: auto;
  padding-right: 4px;                  /* С‰РѕР± СЃРєСЂРѕР» РЅРµ вЂњС—РІвЂќ РєРѕРЅС‚РµРЅС‚ */
}

/* РјРѕР±С–Р»РєР°: СЏРє Р±СѓР»Рѕ вЂ” Р±РµР· sticky */
@media (max-width: 960px){
  .layout{ min-height: auto; }
  .sidebar{
    width: 100%;
    flex: 1 1 auto;
  }
  .sidebar-inner{
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}


/* ===== Hotline: sidebar = full viewport height, no empty bottom ===== */

:root{
  --header-h: 90px; /* РїС–Рґ С‚РІРѕСЋ С€Р°РїРєСѓ, СЏРєС‰Рѕ С–РЅС€Рµ вЂ” Р·РјС–РЅРёС€ */
}


/* sticky-РєРѕРЅС‚РµР№РЅРµСЂ Р·Р°Р№РјР°С” РІСЃСЋ РІРёСЃРѕС‚Сѓ РєРѕР»РѕРЅРєРё С– СЃРєСЂРѕР»РёС‚СЊСЃСЏ РІСЃРµСЂРµРґРёРЅС– */
.sidebar-inner{
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  overflow-x: hidden;
 
  /* РїСЂРёР±РёСЂР°С”РјРѕ вЂњС„РµР№РєРѕРІРёР№вЂќ РїСЂРѕСЃС‚С–СЂ Р·РЅРёР·Сѓ */
  padding-bottom: 0;
  margin-bottom: 0;
}

/* С‡Р°СЃС‚Рѕ вЂњРїСѓСЃС‚РѕС‚СѓвЂќ РґР°СЋС‚СЊ РѕСЃС‚Р°РЅРЅС– РІС–РґСЃС‚СѓРїРё Р±Р»РѕРєС–РІ */
.sidebar-inner .sidebar-block:last-child{
  margin-bottom: 0;
  padding-bottom: 0;
}

/* С– Сѓ СЃРїРёСЃРєС–РІ С‚РµР¶ РјРѕР¶Рµ Р±СѓС‚Рё margin-bottom */
.sidebar-inner .filters-form,
.sidebar-inner .f-body,
.sidebar-inner .f-checks{
  margin-bottom: 0;
  padding-bottom: 0;
}



/* ===== FINAL: Sidebar = full viewport height like Hotline ===== */
:root{
  --header-h: 90px; /* РїС–Рґ С‚РІРѕСЋ С€Р°РїРєСѓ. СЏРєС‰Рѕ С‚СЂРµР±Р° вЂ” РїС–РґРєСЂСѓС‚РёС€ */
}

.layout,
.category-layout{
  align-items: stretch; /* С‚СЏРіРЅРµРјРѕ РєРѕР»РѕРЅРєРё РїРѕ РІРёСЃРѕС‚С– */
}

/* СЃР°Рј РєРѕРЅС‚РµР№РЅРµСЂ СЃР°Р№РґР±Р°СЂСѓ вЂ” СЂС–РІРЅРѕ РЅР° РІРёСЃРѕС‚Сѓ РІСЊСЋРїРѕСЂС‚Сѓ */
.sidebar{
  position: sticky;
  top: 20px;
  height: auto;
  overflow: visible;
  padding-bottom: 0;       /* С‰РѕР± РЅРµ Р±СѓР»Рѕ Р·Р°Р№РІРѕРіРѕ вЂњРїРѕРІС–С‚СЂСЏвЂќ */
}

/* РїСЂРёР±РёСЂР°С”РјРѕ Р·Р°Р№РІРёР№ РІС–РґСЃС‚СѓРї РїС–Рґ РѕСЃС‚Р°РЅРЅС–Рј Р±Р»РѕРєРѕРј */
.sidebar .sidebar-block:last-child{
  margin-bottom: 0;
}



/* ===== Active substance input: never overflow / never clip ===== */

/* РІР°Р¶Р»РёРІРѕ РґР»СЏ РІСЃС–С… РµР»РµРјРµРЅС‚С–РІ Сѓ С„С–Р»СЊС‚СЂР°С… */
.sidebar-inner,
.sidebar-block,
.filters-form,
.filter,
.f-auto,
.filter-input{
  box-sizing: border-box;
}

/* РєРѕРЅС‚РµР№РЅРµСЂ РїС–Рґ С–РЅРїСѓС‚ */
.f-auto{
  position: relative;
  width: 100%;
  padding-right: 6px;  /* РјР°Р»РµРЅСЊРєРёР№ Р·Р°РїР°СЃ СЃРїСЂР°РІР°, С‰РѕР± РЅРµ "Р»РёРїР»Рѕ" */
}

/* СЃР°Рј С–РЅРїСѓС‚ */
.filter-input{
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* СЏРєС‰Рѕ РґРµСЃСЊ С” overflow, СЏРєРёР№ СЂС–Р¶Рµ РєРѕРЅС‚РµРЅС‚ */
.sidebar-block{
  overflow: visible;
}

/* dropdown РїС–РґРєР°Р·РѕРє С‚РµР¶ РЅРµ РјР°С” СЂС–Р·Р°С‚РёСЃСЊ */
.f-dd{
  position: absolute;
  left: 0;
  right: 6px;   /* С‰РѕР± Р·Р±С–РіР°Р»РѕСЃСЊ Р· padding-right Сѓ .f-auto */
  z-index: 50;
}






/* =========================================================
   SIDEBAR (FINAL) вЂ” own scroll like Hotline
   - sidebar sticks to top
   - sidebar has internal scroll
   - filters can expand, but scroll stays inside sidebar
   - dropdown suggestions won't "break" layout
   ========================================================= */

/* РџР†Р”РЎРўРђР’ РЎР®Р”Р Р Р•РђР›Р¬РќРЈ Р’РРЎРћРўРЈ РўР’РћР„Р‡ РЁРђРџРљР, СЏРєС‰Рѕ РІРѕРЅР° fixed/sticky.
   РЇРєС‰Рѕ С€Р°РїРєР° РќР• fixed вЂ” РїРѕСЃС‚Р°РІ 0px. */
:root{
  --header-h: 0px;
}

/* С‰РѕР± sticky РєРѕСЂРµРєС‚РЅРѕ РїСЂР°С†СЋРІР°РІ Сѓ flex-СЂРѕР·РєР»Р°РґС†С– */
.layout,
.category-layout{
  align-items: flex-start;
}

/* РЎР°Р№РґР±Р°СЂ Р»РёРїРЅРµ С– РјР°С” СЃРІРѕСЋ РІРёСЃРѕС‚Сѓ = viewport */
.sidebar{
  position: sticky;
  top: var(--header-h);
  align-self: flex-start;

  height: calc(100vh - var(--header-h)); /* вњ… РІР»Р°СЃРЅР° РІРёСЃРѕС‚Р° */
  overflow-y: auto;                      /* вњ… РІР»Р°СЃРЅРёР№ СЃРєСЂРѕР» */
  overflow-x: hidden;

  -webkit-overflow-scrolling: touch;

  /* СЏРєС‰Рѕ Сѓ С‚РµР±Рµ С” СЃРІРѕС— СЂР°РјРєРё/РїР°РґС–РЅРіРё вЂ” РјРѕР¶РµС€ Р»РёС€РёС‚Рё СЏРє Сѓ С‚РІРѕС”РјСѓ СЃС‚РёР»С– */
}

/* Р’РЅСѓС‚СЂС–С€РЅС–Р№ РєРѕРЅС‚РµР№РЅРµСЂ Р±РµР· sticky/overflow, С‰РѕР± РЅРµ Р±СѓР»Рѕ "РїРѕРґРІС–Р№РЅРѕРіРѕ" СЃРєСЂРѕР»Сѓ */
.sidebar-inner{
  position: static;
  height: auto;
  max-height: none;
  overflow: visible;
}

/* ===== РЇРєС‰Рѕ С…РѕС‡РµС€, С‰РѕР± РїСЂРё СЃРєСЂРѕР»С– РІСЃРµСЂРµРґРёРЅС– СЃР°Р№РґР±Р°СЂСѓ "РљР°С‚РµРіРѕСЂС–С—" С‚РµР¶ СЃРєСЂРѕР»РёР»РёСЃСЊ вЂ” РЅС–С‡РѕРіРѕ РЅРµ СЂРѕР±Рё.
   РЇРєС‰Рѕ С…РѕС‡РµС€, С‰РѕР± "РљР°С‚РµРіРѕСЂС–С—" Р±СѓР»Рё Р·РІРµСЂС…Сѓ С– РќР• Р·РЅРёРєР°Р»Рё РїСЂРё СЃРєСЂРѕР»С– СЃР°Р№РґР±Р°СЂСѓ вЂ” Р·СЂРѕР±Рё С—С… sticky: */

/*
.sidebar .sidebar-block:first-of-type{
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
*/

/* ===== Dropdown РґР»СЏ "Р”С–СЋС‡Р° СЂРµС‡РѕРІРёРЅР°" (С‰РѕР± РЅРµ РІРёР»Р°Р·РёРІ С– РЅРµ Р»Р°РјР°РІ sidebar) ===== */
.f-field.f-auto{
  position: relative;
  width: 100%;
}

.f-input{
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* РџС–РґРєР°Р·РєРё: СЂРѕР±РёРјРѕ РІСЃРµСЂРµРґРёРЅС– СЃР°Р№РґР±Р°СЂСѓ, Р· РѕР±РјРµР¶РµРЅРЅСЏРј РІРёСЃРѕС‚Рё */
.f-dd{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 100;

  max-height: 240px;     /* С‰РѕР± РЅРµ "РІРёР»Р°Р·РёР»Рѕ" Р· СЃР°Р№РґР±Р°СЂСѓ */
  overflow: auto;

  box-sizing: border-box;
}

/* РќР° РјРѕР±С–Р»СЊРЅРѕРјСѓ: Р·Р°Р·РІРёС‡Р°Р№ sidebar СЏРє Р±Р»РѕРє Р±РµР· sticky/СЃРєСЂРѕР»Р° */
@media (max-width: 960px){
  :root{ --header-h: 0px; }

  .sidebar{
    position: relative;
    top: auto;
    height: auto;
    overflow: visible;
  }

  .f-dd{
    max-height: 220px;
  }
}





/* ================================
   Filter text input (Active ingredient)
   ================================ */
/* ================================
   Active ingredient input (f-input)
   Fix: no overflow outside sidebar
   ================================ */

.f-field{
  margin-top: 10px;
}

/* РІР°Р¶Р»РёРІРѕ: С‰РѕР± dropdown РїРѕР·РёС†С–РѕРЅСѓРІР°РІСЃСЏ РІС–Рґ С†СЊРѕРіРѕ РєРѕРЅС‚РµР№РЅРµСЂР° */
.f-field.f-auto{
  position: relative;
}

/* СЃР°Рј input */
.f-input{
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  height: 44px;
  padding: 0 14px;

  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;

  font-size: 16px;
  font-weight: 700;
  color: #111;

  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.f-input::placeholder{
  color: rgba(0,0,0,0.45);
  font-weight: 700;
}

.f-input:focus{
  border-color: rgba(47,128,237,0.55);
  box-shadow: 0 0 0 4px rgba(47,128,237,0.15);
}

.f-input:hover{
  border-color: rgba(0,0,0,0.20);
}





/* ===== COMPACT FOOTER ===== */
.site-footer{
  background: #4b2f83; /* 1:1 СЏРє С…РµРґРµСЂ */
  color: rgba(255,255,255,.92);
  margin-top: 16px;
}

/* main bar */
.footer-bar{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;           /* рџ”ґ РјС–РЅС–РјР°Р»СЊРЅР° РІРёСЃРѕС‚Р° */
  display: flex;
  align-items: center;
  gap: 16px;
}

/* logo */
.footer-logo{
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}
.logo-agro{ color: #ffffff; }
.logo-scan{ color: #22c55e; }  /* Р·РµР»РµРЅРёР№ СЏРє Сѓ РєРЅРѕРїРєР°С… */

/* text */
.footer-text{
  flex: 1;
  font-size: 15px;
  line-height: 1.35;
  opacity: .9;
}
.footer-text a{
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}
.footer-text a:hover{
  text-decoration: underline;
}

/* legal */
.footer-legal{
  display: flex;
  gap: 12px;
  white-space: nowrap;
}
.footer-legal a{
  color: rgba(255,255,255,.85);
  font-size: 15px;
  text-decoration: none;
}
.footer-legal a:hover{
  text-decoration: underline;
}

/* to top */
.to-top{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.to-top:hover{
  background: rgba(255,255,255,.12);
}

/* copyright */
.footer-copy{
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 16px 10px;
  font-size: 12px;
  opacity: .75;
}

/* mobile */
@media (max-width: 900px){
  .footer-bar{
    flex-wrap: wrap;
    gap: 10px;
  }
  .footer-text{
    order: 3;
    width: 100%;
  }
  .footer-legal{
    order: 2;
  }
}

/* === SVG icons for services === */
.service-svg{
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}



/* ===== PRODUCT CARD: compact spacing ===== */

.product-name{
  margin: 6px 0 2px;
}

.product-brand{
  font-size: 12px;
  font-weight: 800;
  color: #222;
  margin-bottom: 2px;
}

.product-molecule{
  margin: 2px 0 4px;
}

.product-pack{
  margin-bottom: 4px;
}

.product-price-range{
  margin-top: 2px;
}

.product-shops{
  margin-top: 4px;
}

.card-actions{
  margin-top: 6px;
}


.product-brand{
  min-height: 18px;
}

.product-molecule{
  min-height: 32px;
}


 /* Р‘Р°РЅРµСЂ РІРЅРёР·Сѓ СЃР°Р№РґР±Р°СЂСѓ: С€РёСЂРёРЅР° СЃР°Р№РґР±Р°СЂСѓ, РІРёСЃРѕС‚Р° = С€РёСЂРёРЅС– */
  .sidebar-ad{
    display:block;
    width:100%;
    aspect-ratio: 1 / 1;          /* СЂРѕР±РёС‚СЊ РєРІР°РґСЂР°С‚ */
    border-radius: 12px;
    overflow:hidden;
    margin-top: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.02);
  }
  .sidebar-ad-img{
    width:100%;
    height:100%;
    object-fit: cover;             /* С‰РѕР± РєСЂР°СЃРёРІРѕ Р·Р°РїРѕРІРЅСЋРІР°Р»Рѕ */
    display:block;
  }
  .sidebar-ad:hover{
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: .15s ease;
  }




  /* --- Tooltip for РїСЂРµРїР°СЂР°С‚РёРІРЅС– С„РѕСЂРјРё --- */
.f-title-with-tip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tip-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  outline: none;
}

/* СЃР°РјР° вЂњР·С–СЂРѕС‡РєР°вЂќ */
.tip-star{
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  color: #0b3;
  background: rgba(20,157,38,.12);
  border: 1px solid rgba(20,157,38,.25);
  cursor: help;
}

/* bubble: РІС–РґРєСЂРёРІР°С”РјРѕ Р’РџР РђР’Рћ, С‰РѕР± РЅРµ Р»С–Р·Р»Рѕ Сѓ СЃР°Р№РґР±Р°СЂ */
.tip-bubble{
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);     /* РїСЂР°РІРѕСЂСѓС‡ РІС–Рґ Р·С–СЂРѕС‡РєРё */
  transform: translateY(-50%);
  z-index: 9999;

  width: min(360px, 70vw);     /* РЅРѕСЂРјР°Р»СЊРЅР° С€РёСЂРёРЅР° */
  max-height: 260px;           /* С‰РѕР± РЅРµ Р·Р°Р№РјР°Р»Рѕ РІРµСЃСЊ РµРєСЂР°РЅ */
  overflow: auto;              /* СЃРєСЂРѕР» СЏРєС‰Рѕ РґРѕРІРіРѕ */

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);

  font-size: 12px;
  line-height: 1.35;
  color: #111;

  display: none;
  white-space: normal;
}

/* РїРѕРєР°Р· */
.tip-wrap:hover .tip-bubble,
.tip-wrap:focus .tip-bubble,
.tip-wrap:focus-within .tip-bubble{
  display: block;
}

/* вЂњС…РІРѕСЃС‚РёРєвЂќ Р·Р»С–РІР° (Р±Рѕ bubble СЃРїСЂР°РІР°) */
.tip-bubble::before{
  content:"";
  position:absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);

  width: 10px;
  height: 10px;
  background:#fff;
  border-left: 1px solid rgba(0,0,0,.10);
  border-bottom: 1px solid rgba(0,0,0,.10);
}

/* ===== Tooltip (forms): open INSIDE sidebar, not to the right ===== */

.f-title-with-tip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tip-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  outline: none;
}

.tip-star{
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  color: #0b3;
  background: rgba(20,157,38,.12);
  border: 1px solid rgba(20,157,38,.25);
  cursor: help;
}

/* Р’РђР–Р›РР’Рћ: tooltip Р’РќРР—, С– РїРѕ С€РёСЂРёРЅС– СЃР°Р№РґР±Р°СЂСѓ */
.tip-bubble{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;                 /* вњ… РІРјС–С‰СѓС”С‚СЊСЃСЏ РІ С€РёСЂРёРЅСѓ СЃР°Р№РґР±Р°СЂСѓ */
  transform: none;
  z-index: 9999;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);

  font-size: 12px;
  line-height: 1.35;
  color: #111;

  max-height: 260px;        /* вњ… СЏРєС‰Рѕ РґРѕРІРіРѕ вЂ” СЃРєСЂРѕР» */
  overflow: auto;

  display: none;
  white-space: normal;
}

.tip-wrap:hover .tip-bubble,
.tip-wrap:focus .tip-bubble,
.tip-wrap:focus-within .tip-bubble{
  display: block;
}

/* С…РІРѕСЃС‚РёРє Р·РІРµСЂС…Сѓ */
.tip-bubble::before{
  content:"";
  position:absolute;
  top:-6px;
  left: 20px;
  width: 10px;
  height: 10px;
  background:#fff;
  border-left: 1px solid rgba(0,0,0,.10);
  border-top: 1px solid rgba(0,0,0,.10);
  transform: rotate(45deg);
}




/* ===== FIX TOOLTIP (forms): never clip, never shift layout ===== */
.tip-wrap { position: relative; display: inline-flex; align-items: center; }

.tip-bubble{
  position: fixed;     /* вњ… РІРёР№РјР°С” Р· overflow РєРѕРЅС‚РµР№РЅРµСЂС–РІ */
  z-index: 999999;
  display: none;       /* вњ… Р·Р°Р±РѕСЂРѕРЅСЏС”РјРѕ display:block Р· РїРѕРїРµСЂРµРґРЅС–С… СЃС‚РёР»С–РІ */
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: 260px;
  overflow: auto;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);

  font-size: 12px;
  line-height: 1.35;
  color: #111;
}

.tip-bubble.is-open{ display: block; }

/* С…РІРѕСЃС‚РёРє РјРѕР¶РЅР° РїСЂРёР±СЂР°С‚Рё, Р±Рѕ fixed */
.tip-bubble::before{ display:none; }



.date-field {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.date-field label {
  font-size: 12px;
  color: #666;
}

.date-field input[type="date"]{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  min-width: 180px;
}

.hint{
  font-size: 12px;
  color: #666;
  margin-left: 8px;
}



/* ===== Banner highlight like hotline ===== */
.banner-grid .banner-big img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity: 1;
  filter: none;
  transition: opacity .25s ease, filter .25s ease, transform .25s ease;
}

/* small banners dimmed by default */
.banner-grid .banner-small img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity: .45;                  /* Р·Р°С‚С–РЅРµРЅРЅСЏ */
  filter: grayscale(0.15) saturate(0.8) contrast(0.95);
  transition: opacity .25s ease, filter .25s ease, transform .25s ease;
}

/* on hover: become active/bright */
.banner-grid .banner-small:hover img{
  opacity: 1;
  filter: none;
  transform: translateY(-1px);
}

/* optional: nice focus ring on hover */
.banner-grid .banner-small{
  border-radius: 14px;           /* СЏРєС‰Рѕ Сѓ С‚РµР±Рµ С–РЅС€С– СЂР°РґС–СѓСЃРё вЂ” РїС–РґР¶РµРЅРё РїС–Рґ СЃС‚РёР»СЊ */
  overflow: hidden;
}
.banner-grid .banner-small:hover{
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}



.section-header-left{
  display:flex;
  align-items:center;
  gap:14px;
}

.range-switch{
  display:flex;
  gap:8px;
}

.range-chip{
  display:inline-flex;
  align-items:center;
  height:30px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  color:#111;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  opacity:.65;              /* вњ… вЂњР·Р°С‚С–РЅРµРЅС–вЂќ */
  transition:opacity .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.range-chip:hover{
  opacity:.9;
  border-color: rgba(20,157,38,.35);
}

.range-chip.active{
  opacity:1;                /* вњ… Р°РєС‚РёРІРЅРёР№ вЂњСЏСЃРєСЂР°РІРёР№вЂќ */
  border-color: rgba(20,157,38,.55);
  box-shadow: 0 6px 16px rgba(20,157,38,.10);
}


/* FIX: popularGrid wrapper must NOT break product grid */
#tab-popular #popularGrid{
  display: contents;   /* РґС–С‚Рё #popularGrid СЃС‚Р°СЋС‚СЊ РїСЂСЏРјРёРјРё РµР»РµРјРµРЅС‚Р°РјРё grid */
}


/* Switch under "РџРѕРїСѓР»СЏСЂРЅС– С‚РѕРІР°СЂРё" */
.section-header-left{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}

.range-switch--under{
  margin-top:-4px;
}


/* Header icons controlled cleanly in modern_ui.css */

/* Header logo vertical alignment fix */
.logo.logo--center {
  margin: 0;
}

/* ===== HOME: Recently viewed without white container ===== */
.home-page #recentlyViewedSection{
  width: 90%;
  margin: 8px auto 14px;   /* РјРµРЅС€РёР№ РІС–РґСЃС‚СѓРї Р·РІРµСЂС…Сѓ */
  padding: 0;              /* РїСЂРёР±СЂР°Р»Рё РїР°РґС–РЅРіРё РєРѕРЅС‚РµР№РЅРµСЂР° */
  background: transparent; /* РїСЂРёР±СЂР°Р»Рё Р±С–Р»РёР№ С„РѕРЅ */
  border: 0;               /* РїСЂРёР±СЂР°Р»Рё СЂР°РјРєСѓ */
  border-radius: 0;        /* РїСЂРёР±СЂР°Р»Рё Р·Р°РѕРєСЂСѓРіР»РµРЅРЅСЏ РєРѕРЅС‚РµР№РЅРµСЂР° */
  box-shadow: none;
}

/* tighter gap between banner5 and recently viewed */
.home-page .home-ad2{
  margin-bottom: 8px;
}


/* ================================
   HOME: tighter spacing between blocks
   (categories в†” banners в†” popular в†” services в†” banner5 в†” recently)
   ================================ */

/* РјРµРЅС€Рµ Р·Р°РіР°Р»СЊРЅРёС… РІС–РґСЃС‚СѓРїС–РІ РїС–Рґ hero */
.home-page .home-inner{
  padding: 10px 0 14px; /* Р±СѓР»Рѕ 18px 0 30px */
}

/* РјРµРЅС€Рµ РІС–РґСЃС‚СѓРїСѓ РјС–Р¶ СЃРµРєС†С–СЏРјРё РЅР° РіРѕР»РѕРІРЅС–Р№ */
.home-page .home-inner > .home-section{
  margin: 0 0 10px;     /* РІС–РґСЃС‚СѓРї РјС–Р¶ Р±Р»РѕРєР°РјРё */
}

/* РїСЂРёР±РёСЂР°С”РјРѕ Р·Р°Р№РІРёР№ РЅРёР¶РЅС–Р№ РІС–РґСЃС‚СѓРї Сѓ РѕСЃС‚Р°РЅРЅСЊРѕРіРѕ Р±Р»РѕРєСѓ РІСЃРµСЂРµРґРёРЅС– home-inner */
.home-page .home-inner > .home-section:last-child{
  margin-bottom: 0;
}

/* Сѓ С‚РµР±Рµ С” РїСЂР°РІРёР»Рѕ Р· РЅР° 24px вЂ” СЂРѕР±РёРјРѕ РєРѕРјРїР°РєС‚РЅС–С€Рµ */
.home-page .services-section{
  margin-top: 10px;
}

/* banner5 вЂ” С‚СЂРѕС…Рё РЅРёР¶С‡Рµ, С‰РѕР± РЅРµ Р±СѓР»Рѕ вЂњРїСЂРѕРІР°Р»Р»СЏвЂќ РґРѕ РїРµСЂРµРіР»СЏРЅСѓС‚РёС… */
.home-page .home-ad2{
  margin-bottom: 8px;
}

/* Recently viewed Р·Р°СЂР°Р· РїС–РґС‚СЏРіСѓС”С‚СЊСЃСЏ Р· base.html РїРѕР·Р° .home-inner вЂ” СЃС‚РёСЃРєР°С”РјРѕ С– РїСЂРёР±РёСЂР°С”РјРѕ вЂњРєРѕРЅС‚РµР№РЅРµСЂРЅС–СЃС‚СЊвЂќ */
.home-page #recentlyViewedSection{
  width: 90%;
  margin: 8px auto 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* С‚СЂРѕС€РєРё РјРµРЅС€Рµ РІС–РґСЃС‚СѓРї РІС–Рґ Р·Р°РіРѕР»РѕРІРєР° РґРѕ РєР°СЂС‚РѕРє */
.home-page #recentlyViewedSection .section-title{
  margin-bottom: 8px;
}

/* =========================================================
   FINAL OVERRIDES (no !important)
   Purpose: keep the current visual result stable after cleanup.
   ========================================================= */

/* Home: keep 5 cards in a row for Popular/Discounts/Recently on desktop */
.home-page #tab-popular.product-grid,
.home-page #tab-discounts.product-grid,
.home-page #recentlyViewedGrid.product-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}

/* Active tabs render as grid */
.home-page #tab-popular.tab-content.active,
.home-page #tab-discounts.tab-content.active{
  display: grid;
}

/* Prevent overlap: tabs and empty states must stay in normal flow */
.home-page .home-section{
  position: relative;
  clear: both;
  margin-bottom: 28px;
}

.home-page .tab-content,
.home-page #tab-popular,
.home-page #tab-discounts{
  position: static;
  height: auto;
  overflow: visible;
}

.home-page .empty-block{
  position: static;
  display: block;
  clear: both;
  margin: 16px 0 32px;
  padding: 16px 20px;
  background: #f6f7f8;
  border-radius: 12px;
}

/* Services spacing (keep your current state) */
.home-page .services-section{
  margin-top: 24px;
}

/* Tooltip must not be clipped by overflow containers */
.tip-bubble{
  position: fixed;
  z-index: 999999;
  display: none;
}
.tip-bubble.is-open{ display: block; }
.tip-bubble::before{ display: none; }

/* Header actions controlled in modern_ui.css */

/* Sidebar: avoid extra space at bottom */
.sidebar-inner .sidebar-block:last-child{
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Responsive: keep the same grid breakpoints for those key home grids */
@media (max-width: 1200px){
  .home-page #tab-popular.product-grid,
  .home-page #tab-discounts.product-grid,
  .home-page #recentlyViewedGrid.product-grid{
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 900px){
  .home-page #tab-popular.product-grid,
  .home-page #tab-discounts.product-grid,
  .home-page #recentlyViewedGrid.product-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px){
  .home-page #tab-popular.product-grid,
  .home-page #tab-discounts.product-grid,
  .home-page #recentlyViewedGrid.product-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}


/* =========================
   Product FAQ block
   ========================= */
.faq-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.faq-block h2 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.faq-block h3 {
  margin: 14px 0 6px 0;
  font-size: 15px;
  line-height: 1.25;
}

.faq-block p {
  margin: 0 0 10px 0;
  line-height: 1.55;
  opacity: 0.95;
}

.faq-block h3 + p {
  margin-top: 0;
}

/* трохи “картковості” без зміни дизайну */
.faq-block {
  background: rgba(0,0,0,0.02);
  border-radius: 14px;
  padding: 14px 14px;
}

/* Tab jump links (inside text/FAQ) */
.tab-link {
  color: #1e7f3a;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tab-link:hover {
  opacity: 0.85;
}

/* Small helper hint after molecule link */
.hint {
  font-size: 13px;
  opacity: 0.75;
  margin-left: 6px;
}






/* =========================================
   MOBILE HEADER: logo center + search under
   ========================================= */

@media (max-width: 600px){

  /* Хедер стає колонкою */
  .header-inner{
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 14px;
    padding: 16px;
    position: relative;
  }

  /* Лого — по центру */
  .header .logo{
    position: static !important;
    transform: none !important;
    margin: 0 auto;
    text-align: center;
  }

  .logo-text{
    justify-content: center;
  }

  /* Пошук під логотипом */
  .header-search{
    order: 2;
    width: 100%;
    max-width: none;
    margin: 0 !important;   /* прибираємо margin-left */
  }

  .header-search .search-form{
    width: 100%;
  }

  /* Кнопка пошуку компактніша */
  .header-search .search-btn{
    padding: 10px 14px;
    white-space: nowrap;
  }

  /* Праві кнопки — під пошуком (якщо колись увімкнеш) */
  .header-actions{
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
  }
}


/* =========================================
   MOBILE GRID OVERRIDE
   Fix: category/search grids should NOT be 5 cols
   ========================================= */

/* На мобільному: всі product-grid-5 -> 2 колонки, на дуже малих -> 1 */
@media (max-width: 960px){
  .product-grid.product-grid-5{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 360px){
  .product-grid.product-grid-5{
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   MOBILE FILTERS DRAWER (single clean version)
   - Button "Фільтри" над товарами
   - Sidebar becomes off-canvas drawer on mobile
   - Scroll works INSIDE drawer
   ========================================================= */

/* row with the button над товарами */
.mobile-filters-row{
  display: none; /* desktop hidden */
  margin: 10px 0 12px;
}

.mobile-filters-btn{
  width: 100%;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 900;
  cursor: pointer;
}

/* overlay */
.filters-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9998;
}
.filters-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}

/* lock body scroll when drawer open */
body.filters-open{
  overflow: hidden;
}

/* desktop: bar hidden */
.sidebar-mobile-bar{
  display: none;
}

/* mobile-only drawer behavior */
@media (max-width: 960px){

  /* show button above products */
  .mobile-filters-row{
    display: block;
  }

  /* SIDEBAR -> drawer container */
  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: min(88vw, 360px);
    max-width: 360px;

    z-index: 9999;

    transform: translateX(-110%);
    transition: transform .22s ease;

    background: #fff;
    border-radius: 0;
    border: 0;

    /* IMPORTANT: make a flex column */
    display: flex;
    flex-direction: column;

    /* IMPORTANT: do NOT scroll here */
    overflow: hidden;

    /* убезпечення від старих desktop sticky/height правил */
    height: auto;
    align-self: auto;
  }

  /* open state */
  body.filters-open .sidebar{
    transform: translateX(0);
  }

  /* top bar inside drawer */
  .sidebar-mobile-bar{
    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;

    background: #fff;
    padding: 10px 10px;
    border-bottom: 1px solid rgba(0,0,0,.08);

    z-index: 5;
  }

  .sidebar-mobile-title{
    font-weight: 900;
    font-size: 16px;
  }

  .sidebar-mobile-close{
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  /* SCROLL AREA (this is the key!) */
  .sidebar-inner{
    flex: 1;
    min-height: 0; /* 🔥 MUST for flex scrolling */

    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;

    padding: 14px 12px 18px;

    /* убезпечення від старих sticky/height правил */
    position: relative;
    top: auto;
    height: auto;
    max-height: none;
  }
}



/* =========================================
   PAGINATION: one row + centered + no overflow
   ========================================= */

.pagination{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 10px;

  max-width: 100%;
  padding: 0 10px;          /* щоб не впиралось у краї */
  box-sizing: border-box;

  flex-wrap: nowrap;        /* один ряд */
}

.pagination .page-btn{
  flex: 0 0 auto;           /* кнопки не розтягуються */
  min-width: 84px;          /* менше, щоб влазило */
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.pagination .page-info{
  flex: 0 1 auto;           /* ✅ цей блок може стискатися */
  min-width: 0;             /* ✅ обовʼязково для flex shrink */
  text-align: center;
  font-weight: 700;
  font-size: 14px;

  overflow: hidden;         /* ✅ не робить горизонтальний скрол */
  text-overflow: ellipsis;  /* ✅ якщо не влазить — ... */
  white-space: nowrap;
}

/* Дуже маленькі екрани — ще компактніше */
@media (max-width: 380px){
  .pagination{ gap: 8px; }
  .pagination .page-btn{ min-width: 74px; padding: 9px 10px; font-size: 13px; }
  .pagination .page-info{ font-size: 13px; }
}

/* Prevent accidental layout overflow without clipping card shadows */
body{ max-width: 100%; }
.container, .layout, .content{ max-width: 100%; }

@media (max-width: 520px){
  .product-grid.product-grid-5{
    padding: 0 10px;
    box-sizing: border-box;
  }
}

/* =========================================
   PAGINATION COMPACT MOBILE (3 / 8)
   ========================================= */

/* За замовчуванням показуємо повну версію */
.page-info-compact{
  display: none;
}

/* На мобільному — ховаємо довгу, показуємо коротку */
@media (max-width: 600px){

  .page-info-full{
    display: none;
  }

  .page-info-compact{
    display: inline-block;
    font-weight: 800;
    font-size: 15px;
  }

  .pagination{
    gap: 10px;
  }

  .pagination .page-btn{
    min-width: 70px;
    padding: 9px 12px;
    font-size: 14px;
  }
}


/* =========================================
   NO RESULTS BLOCK
   ========================================= */

.no-results{
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.06);
  margin-top: 10px;
}

.no-results-icon{
  font-size: 42px;
  margin-bottom: 12px;
}

.no-results-title{
  font-size: 20px;
  margin-bottom: 10px;
}

.no-results-text{
  color: #666;
  margin-bottom: 18px;
}

.no-results-actions{
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.no-results-btn{
  background: #1c9c2c;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
}

.no-results-btn--secondary{
  background: #f3f3f3;
  color: #333;
}


/* =========================================
   Filters badge + sticky actions (mobile)
   ========================================= */

.filters-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  margin-left: 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  background: #1c9c2c;
  color: #fff;
}

/* Sticky buttons in drawer */
@media (max-width: 960px){
  .filters-sticky-bar{
    position: sticky;
    bottom: 0;
    z-index: 6;
    background: #fff;
    padding: 10px 0 8px;
    border-top: 1px solid rgba(0,0,0,.08);
  }

  .filters-sticky-inner{
    display: flex;
    gap: 10px;
  }

  .filters-sticky-inner .filters-btn{
    flex: 1;
    text-align: center;
  }
}


/* ===== Filters buttons visibility (desktop vs mobile drawer) ===== */

/* DESKTOP (>= 961px): top buttons visible, bottom sticky hidden */
@media (min-width: 961px){
  .filters-actions-btns{ display: flex; }
  .filters-sticky-bar{ display: none; }
}

/* MOBILE (<= 960px): top buttons hidden, bottom sticky visible */
@media (max-width: 960px){
  .filters-actions-btns{ display: none; }
  .filters-sticky-bar{ display: block; }
}


/* ===============================
   BANNERS: fix mobile cropping
   =============================== */

/* базово: картинки не виходять за рамки */
.banner-big img,
.banner-small img,
.ad-wide img,
.banner-link img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Контейнери банерів: обрізання тільки якщо треба */
.banner-big,
.banner-small,
.ad-wide,
.banner-link {
  overflow: hidden;
  border-radius: 18px; /* якщо в тебе вже є — можна прибрати */
}

/* Десктоп: заповнюємо блок гарно */
.banner-big img,
.banner-small img,
.ad-wide img,
.banner-link img {
  object-fit: cover;
}

/* ✅ МОБІЛКА: показуємо банер повністю (без обрізання) */
@media (max-width: 640px) {
  /* великий банер */
  .banner-big {
    aspect-ratio: 16 / 9;     /* можеш змінити під свої банери */
    height: auto;
    background: #fff;         /* щоб “порожні поля” виглядали ок */
  }
  .banner-big img {
    object-fit: contain;      /* головне: НЕ ріже */
  }

  /* малі банери */
  .banner-small {
    aspect-ratio: 16 / 9;
    height: auto;
    background: #fff;
  }
  .banner-small img {
    object-fit: contain;
  }

  /* нижній широкий банер (banner5) */
  .ad-wide,
  .banner-link {
    aspect-ratio: 16 / 5;     /* під wide-банер */
    height: auto;
    background: #fff;
  }
  .ad-wide img,
  .banner-link img {
    object-fit: contain;
  }
}

/* ===== Filters: no scroll for selected accordions ===== */
.f-acc--noscr .f-checks{
  max-height: none;
  overflow: visible;
  padding-right: 0;
}


.filters-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

/* clear button */
.filters-btn--clear{
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
  text-decoration: none;
  color: inherit;
}

.filters-btn--clear:hover{
  background: rgba(0,0,0,.07);
}


/* ===== Offers availability: red when out of stock ===== */
.offers-avail.is-out{
  color: #d32f2f;          /* червоний */
  font-weight: 900;
}


/* ===== Offers sorting ===== */
.offers-sort{
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 900;
  color:#666;
  text-align: left;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.offers-sort:hover{ color:#149d26; }

.offers-sort .sort-ind{
  width: 12px;
  display: inline-block;
  text-align: center;
  font-weight: 900;
  color:#149d26;
}

/* стрілки */
.offers-sort.sorted-asc  .sort-ind::before { content: "↑"; }
.offers-sort.sorted-desc .sort-ind::before { content: "↓"; }

/* "Найкраща ціна" показуємо тільки для .best */
.offers-row .best-price{ display:none; }
.offers-row.best .best-price{ display:block; }

/* =========================================================
   CATEGORY STRIP: horizontal navigation under header
   ========================================================= */
.category-strip {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
}

.category-strip-inner {
  width: 90%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .22) transparent;
}

.category-strip-inner::-webkit-scrollbar {
  height: 5px;
}

.category-strip-inner::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .22);
  border-radius: 999px;
}

.category-strip-item {
  min-width: 170px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #1c1c1c;
  text-align: center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease,
              background .18s ease, color .18s ease;
}

.category-strip-item:hover {
  border-color: rgba(20, 157, 38, .45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

.category-strip-item.is-active {
  color: #0e7f1e;
  background: rgba(20, 157, 38, .09);
  border-color: rgba(20, 157, 38, .35);
  box-shadow: inset 0 0 0 1px rgba(20, 157, 38, .08);
}

.category-strip-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}

.category-strip-count {
  min-width: 34px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .055);
  border: 1px solid rgba(0, 0, 0, .08);
  color: rgba(0, 0, 0, .65);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 900;
}

.category-strip-item.is-active .category-strip-count {
  background: rgba(20, 157, 38, .16);
  border-color: rgba(20, 157, 38, .22);
  color: #0e7f1e;
}

@media (max-width: 960px) {
  .category-strip-inner {
    width: auto;
    padding: 10px 14px 12px;
    gap: 9px;
  }

  .category-strip-item {
    min-width: 138px;
    min-height: 54px;
    padding: 9px 11px;
    border-radius: 12px;
  }

  .category-strip-name {
    font-size: 14px;
  }
}
