.bazzar-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  align-items: center;
  position: relative;
}

.bazzar-search-button {
  padding: 10px 20px;
  background: #007c3e;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
.bazzar-search-button:hover {
  background: #005926;
}

.bazzar-search-input {
  padding: 10px;
  font-size: 16px;
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color .18s;
}
.bazzar-search-input:focus {
  border-color: #007c3e;
}

/* Локации */
.bazzar-location-autocomplete {
  position: relative;
  width: 220px;
}
.bazzar-location-autocomplete input {
  padding: 10px 36px 10px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  outline: none;
  transition: border-color .18s;
}
.bazzar-location-autocomplete input:focus {
  border-color: #007c3e;
}
.bazzar-location-clear {
  position: absolute;
  right: 8px;
  top: 8px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  z-index: 2;
}
.bazzar-location-list {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background: #fff;
  border: 1.5px solid #007c3e;
  border-radius: 12px;
  box-shadow: 0 4px 22px rgba(0,0,0,0.07);
  z-index: 20;
  padding: 0;
  width: 100%;
  max-height: 310px;
  min-width: 220px;
  overflow-y: auto;
  margin-top: 3px;
}
.bazzar-location-list.visible {
  display: block;
}

.bazzar-category-button.active span {
    color: #fff !important;
}



/* Структура регионов */
.region-root {
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 7px;
  margin: 2px 0;
  background: #fff;
  color: #007c3e;
  transition: background 0.2s, color 0.2s;
  font-size: 16px;
  cursor: pointer;
}
.region-root:hover {
  background: #e7fbe7;
  color: #005926;
}
.region-parent {
  font-weight: 600;
  background: #fff;
  color: #007c3e;
  border-left: 0 solid transparent;
  padding: 10px 15px;
  border-radius: 7px;
  margin: 2px 0;
  transition: background 0.2s, color 0.2s;
  font-size: 16px;
  position: relative;
  cursor: pointer;
}
.region-parent.open, .region-parent:focus, .region-parent:hover {
  background: #007c3e;
  color: #fff;
}
.region-label {
  margin-left: 8px;
}
.region-arrow {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 14px;
}
.region-parent.open > .region-arrow {
  transform: rotate(90deg);
}
.region-children {
  display: none;
  padding-left: 0;
  margin: 0 0 2px 20px;
  background: #f6f6f6;
  border-radius: 0 0 8px 8px;
  border-left: 2px solid #007c3e;
}
.region-parent.open > .region-children {
  display: block;
  animation: fadein .17s;
}
.region-child {
  padding: 8px 15px 8px 17px;
  margin: 0 0 2px 0;
  font-weight: 400;
  color: #007c3e;
  background: #f6f6f6;
  cursor: pointer;
  border-radius: 5px;
  transition: background .15s, color .15s;
}
.region-child:hover, .region-child:focus {
  background: #d9f7df;
  color: #003820;
}

/* Категории */
.bazzar-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 10px;
}
.bazzar-category-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;  
  padding: 14px 10px 10px 10px;
  width: 130px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color .18s, box-shadow .18s;
  font-weight: bold;
  position: relative;
  box-shadow: 0 2px 7px 0 rgba(80,80,80,.03);
  min-height: 120px;
}
.bazzar-category-button span {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #526179;
  line-height: 1.1;
}
.bazzar-category-button .cat-title {
  text-align: center;
  width: 100%;
  font-size: 1.12em;
  font-weight: bold;
}
.bazzar-category-button.active .cat-title {
  color: #fff;
}

.bazzar-category-button.active {
  background: #007c3e;
  color: #fff;
  border-color: #007c3e;
  box-shadow: 0 2px 12px 0 rgba(40, 124, 62, 0.09);
  z-index: 2;
}
.bazzar-category-button.active .cat-icon {
  box-shadow: 0 2px 16px 0 rgba(40, 124, 62, 0.12);
  border: 2.5px solid #fff;
}



.cat-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  background: #ffe7a1; 
  border-radius: 50%;
  margin: 0 auto 8px auto; 
  box-shadow: 0 2px 6px 0 rgba(180,180,180,.07);
  transition: background .18s;
}

.bazzar-category-button.active .cat-icon-wrap {
  background: #007c3e; 
}

.cat-img-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #80deaa; 
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 0 0 4px #f6f6f6;
  overflow: hidden;   
}
.bazzar-category-button.active .cat-img-circle {
  border-color: #007c3e;
  box-shadow: 0 0 0 4px #b8f0d0, 0 2px 12px 0 rgba(44, 62, 80, 0.12);
}
.cat-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
  display: block;
}
.cat-name {
  text-align: center;
  display: block;
  width: 100%;
}




/* Подкатегории */
.bazzar-subcategory-block {
  margin-top: 30px;
  padding: 25px 18px;
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 16px;
  display: none;
  animation: fadein .22s;
}
.bazzar-subcategory-block.active {
  display: block;
}
.bazzar-subcategory-title {
  font-size: 21px;
  font-weight: bold;
  margin-bottom: 22px;
}
.bazzar-subcategory-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bazzar-subcategory-links a {
  padding: 7px 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: white;
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: 500;
  transition: 0.2s;
}
.bazzar-subcategory-links a:hover {
  background: #007c3e;
  color: white;
  border-color: #007c3e;
}
.bazzar-subcategory-header {
    margin-bottom: 16px;
    font-size: 16px;
}
.bazzar-category-all-link {
    color: #249c4b;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.15s;
}
.bazzar-category-all-link:hover {
    color: #007c3e;
    text-decoration: underline;
}

.bazzar-category-all-arrow {
  font-size: 20px;
  margin-right: 4px;
  color: #007c3e;
}


/* Анимация появления дочерних городов */
@keyframes fadein {
  from { opacity: 0; transform: translateY(-8px);}
  to { opacity: 1; transform: none;}
}

/* Для мобильных — аккордеон + горизонтальный скролл */
@media (max-width: 700px) {
  .bazzar-category-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 7px;
    margin-bottom: 6px;
    padding-bottom: 4px;
  }
  .bazzar-category-button {
    min-width: 86px;
    width: 86px;
    padding: 7px 2px;
    font-size: 13px;
    border-radius: 9px;
    min-height: 80px;
  }
  .cat-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
  }
  .bazzar-subcategory-block {
    margin-top: 10px;
    padding: 11px 6px;
    border-radius: 9px;
  }
  .bazzar-subcategory-title {
    font-size: 15px;
    margin-bottom: 8px;
  }
  .bazzar-subcategory-links a {
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 6px;
  }
  .bazzar-location-autocomplete {
    width: 100%;
    min-width: unset;
    max-width: unset;
  }
}
.bazzar-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.bazzar-ad-card {
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .2s;
}
.bazzar-ad-card:hover {
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.bazzar-ad-img img { width: 100%; height: 180px; object-fit: cover; }
.bazzar-ad-title { font-weight: 600; margin: 12px 0 4px 0; }
.bazzar-ad-price { color: #2f8a43; font-size: 1.1em; font-weight: bold; }
.bazzar-ad-location { font-size: 0.92em; color: #666; }

.bazzar-ads-grid {
    display: grid;
    grid-gap: 22px;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 40px;
}
@media (max-width: 1000px) {
    .bazzar-ads-grid { grid-template-columns: repeat(2, 1fr);}
}
@media (max-width: 700px) {
    .bazzar-ads-grid { grid-template-columns: 1fr;}
}

.bazzar-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 14px 0 rgba(0,0,0,0.09);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.17s, transform 0.15s;
}
.bazzar-card:hover {
    box-shadow: 0 10px 30px 0 rgba(0,0,0,0.15);
    transform: translateY(-2px) scale(1.01);
}

/* Фиксированная высота для блока с изображением */
.bazzar-card-img {
    width: 100%;
    height: 190px;
    background: #f6f6f6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.bazzar-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f4f4f4;
}

/* Тело карточки всегда одной высоты */
.bazzar-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 16px 14px 13px 14px;
    min-height: 150px;
}

/* Ограничить высоту для заголовка и цены */
.bazzar-card-title {
    font-size: 1.07rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.22;
    min-height: 44px;
    max-height: 48px;
    overflow: hidden;
}
.bazzar-card-title a {
    color: #181818; /* обычный чёрный/тёмно-серый */
    text-decoration: none;
    transition: color 0.15s;
}
.bazzar-card-title a:hover,
.bazzar-card-title a:focus {
    color: #19af44; /* тот же зелёный, что у цены */
}


.price-box {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    min-height: 30px;
}
.price-box strong {
    font-weight: 700;
    font-size: 1.05rem;
    color: #16803b;
    flex: 1 1 auto;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.price-box .favourite {
    margin-left: 10px;
    font-size: 1.18rem;
    color: #bbb;
    transition: color 0.17s;
}
.price-box .favourite:hover, .price-box .favourite.fav-active {
    color: #19af44;
}

.bazzar-card-meta {
    font-size: 0.97rem;
    color: #999;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bazzar-card-category {
    font-weight: 500;
    color: #787878;
}
.bazzar-card-location { color: #bbb; }
.bazzar-card-date { color: #bbb; }

.bazzar-card-category { font-weight: 500; color: #6a6a6a; }
.bazzar-card-location { }
.bazzar-card-date { }
.bazzar-card-views { font-size: 0.91rem; margin-top: 2px; }

.bazzar-label-top {
    position: absolute;
    left: 14px; top: 14px;
    background: #fffde3;
    color: #f1a600;
    font-weight: bold;
    font-size: 0.97rem;
    border-radius: 7px;
    padding: 3px 12px;
    box-shadow: 0 1px 3px #fff3;
    z-index: 3;
}
