body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #333;
}
h1 {
    margin-block-start: 0em;
    margin-block-end: 0.67em;
}
p {
  line-height: 1.6180339887;
}
@media (max-width: 768px) {
  p {
    line-height: 1.314;
  }
}

/* Верхняя шапка */
.top-header {
  background: #2e7d32;
  color: #fff;
  padding: 0.7rem;
}
@media (max-width: 768px) {
  .top-header {
    padding: 0rem;
  }
}
.top-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  
}

.top-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/*.top-header-right {
    padding: 10px 15px;
    border: 3px solid #ffffff;
    border-radius: 6px;
}*/

.top-header-left i.fas.fa-map-pin {
  font-size: 1rem;
}

.location-text {
  font-weight: 500;
  white-space: nowrap; /* чтобы текст не ломался */
}

.top-header-right a.phone-link {
  background: #4CAF50;
  color: #fff;
  font-size: 17px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  padding: 10px 15px;
  /*border: 3px solid #ffffff;*/
  border-radius: 6px;
}

.top-header-right a.phone-link:hover {
  color: #4CAF50; 
  background: #ffff00;
}

@media(max-width: 768px) {
  .top-header-inner {
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
  }
  .top-header-right {
    margin-top: 1rem;
  }
}


header {
  text-align: center;
  padding: 2rem 1rem;
  background: #4CAF50;
  color: white;
}
.hero {
  background: #4CAF50;
  color: white;
  padding: 3rem 1rem;
}
.hero-content {
  color: white;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
}
@media(max-width: 768px) {
  .hero {
    padding: 2rem;
  }
}
.highlight {
  background: #ffff00;
  padding: 7px 10px;
  border-radius: 6px;
  color: #4caf50;
}
@media(max-width: 768px) {
  .highlight {
    display: block;
    margin-top: 8px;
  }
}
.hero-benefits {
  list-style: none;
  margin: 15px 0 0;
  padding: 0;
  line-height: 1.5;
}
@media(max-width: 768px) {
  .hero-benefits {
    line-height: 1.5;
  }
}
.hero-benefits li {
  margin: 6px 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-benefits i {
  color: #ffff00;
  font-size: 1.1rem;
}

.filter-toggle {
  display: none;
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.8rem 1rem;
  /*width: 100%;*/
  font-size: 1rem;
  cursor: pointer;
  margin-left: 2rem;
  margin-top: 2rem;
  border-radius: 6px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  /*padding: 1rem;*/
  padding: 1rem 1rem 0.7rem 1rem;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
  max-width: 1200px;
  margin: 0 auto;
  /*align-items: center;*/
  margin-top: 1rem;
}

.filters.hidden {
  display: none;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.filter-group label {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.filter-group input, .filter-group select {
  background: #fff;
  color: #000;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16.6px;

  appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

  width: 100%;
  max-width: 300px;
  min-width: 250px;
  box-sizing: border-box;
}
@media(max-width: 768px) {
  .filter-group input, .filter-group select {
  width: 100% !important;
  max-width: none !important;
  }
}

#clear-filters {
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 6px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.2s;
  font-size: 17px;
}
#clear-filters:hover {
    background: #2e7d32;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  /*padding: 1rem;*/
  padding: 2rem 1rem 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto; 
}

/* Карточки */
.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

/*.card:hover {
  transform: scale(1.02);
}*/

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.card img.second {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.card:hover img.second {
  opacity: 1;
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  
  display: -webkit-box;
  -webkit-line-clamp: 2; /* ограничиваем до двух строк */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  min-height: calc(1.3em * 2); /* всегда 2 строки по высоте */
  max-height: calc(1.3em * 2);
}
.popup-desc {
  margin-block-start: 0.5em !important;
}
.popup-desc-name {
  font-size: 1rem;
  margin-block-start: 1.33em;
  margin-block-end: 0em !important;
  color: #333;
}
.popup-specs {
  margin-block-start: 0.5em !important;
}
.popup-specs-name {
  font-size: 1rem;
  margin-block-start: 1.33em;
  margin-block-end: 0em !important;
  color: #333;
}
.popup-details-specs {
  background: #ffff00;
  padding: 1rem;
  border-radius: 8px;
}
@media(max-width: 768px) {
  .popup-details-specs {
  max-width: 100%;
  }
}
.details-specs-phone-link {
  font-weight: 600;
}
.card-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: bold;
  color: #2e7d32;
  margin: 1rem 0;
}

.card-price .oldprice {
  text-decoration: line-through;
  color: #999;
  font-weight: normal;
  font-size: 0.95rem;
}

/* Popup */
.popup {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  overflow: auto;
}

.popup-content {
  background: white;
  margin: 5% auto;
  padding: 2rem;
  width: 80%;
  max-width: 800px;
  border-radius: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popup-gallery {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-gallery img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  border-radius: 4px;
}

.nav-btn.prev { left: 5px; }
.nav-btn.next { right: 5px; }

.popup-content .close {
  /*position: absolute;*/
  /*top: 0.5rem;*/
  /*right: 1rem;*/
  font-size: 2rem;
  cursor: pointer;
  align-self: flex-end;
}

.popup-price {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 1.3rem;
  font-weight: bold;
  color: #2e7d32;
}

.popup-price .oldprice {
  text-decoration: line-through;
  color: #999;
  font-weight: normal;
  font-size: 1.1rem;
}

.price-badge {
  background: #4CAF50;
  color: white;
  font-size: 0.9rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.popup-details ul {
  list-style: none;
  padding: 0;
}

@media(max-width: 768px) {
  .filters {
    display: none;
    gap: 0rem;
    flex-direction: column;
    align-items: center;
    background: #fff;
    margin-top: 0rem !important;
  }

  .filters.active {
    display: flex;
    padding: 0rem 2rem;
  }

  .filter-toggle {
    display: block;
    text-align: left;
    padding: 1rem 2rem;
  }

  #clear-filters {
    width: 100%;
    padding: 10px 15px;
  }

  .catalog {
    /*grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));*/
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 2rem;
  }

  .filter-group {
    margin-top: 1rem;
    min-width: 120px;
    width: 100%;
  }

  .card-content {
    padding: 1.5rem;
  }
  .popup-content {
    width: 75%;
  }

}





/* Краткое описание в карточке */
.short-desc {
  color: #444;
  font-size: 0.95rem;
  margin: 0.4rem 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* обрезаем до двух строк */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  min-height: 2.6em;
  max-height: 2.6em; /* высота для 2 строк */
}

/* Кружок "б/у" в карточках */
.used-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #d32f2f;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 2;
}

/* Контейнер для изображения карточки */
.card-img-wrapper {
  position: relative;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  display: block;
}

/* Кружок "б/у" в popup */
.used-label-popup {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #d32f2f;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 5;
}

/* Фальш-кнопка "Подробнее" */
.fake-button {
  background: #4caf50;
  color: #fff;
  padding: 10px 15px;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  margin-top: 0.7rem;
  transition: background 0.2s;
  pointer-events: none; /* делает её некликабельной */
  font-size: 17px;
}

.card:hover .fake-button {
  background: #2e7d32;
}




.card-spec {
  line-height: 0.7;
  color: #777777;
  font-size: 0.95rem;
}








.site-footer {
    background-color: #2e7d32;
    color: #fff;
    padding: 3rem 1rem;
    font-family: sans-serif;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    align-items: center;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

/* Колонка 1 */
.footer-col.col-1 h3 {
    font-size: 1.3rem;
    line-height: 1.4;
    margin-block-start: 0em;
    margin-block-end: 0em;
}

.footer-col.col-1 .highlight {
    background: #ffff00;
    color: #2e7d32;
    padding: 0 0.2em; /* внутренний отступ слева/справа */
    display: inline-block;
    margin-top: 0.3rem;
}

/* Колонка 2 */
.hero-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-benefits li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Колонка 3 */
.footer-col.col-3 p {
    margin-bottom: 0.5rem;
    margin-block-start: 0em;
    margin-block-end: 1em;
}

.footer-col.col-3 .phone {
    display: inline-block;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

/* Нижняя строка */
.footer-bottom {
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 1rem;
    text-align: left;
    font-size: 0.85rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Адаптив для мобильной версии */
@media (max-width: 768px) {
    .footer-columns {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem;
    }

    .footer-col {
        min-width: 100%;
    }
    .site-footer {
        padding: 0rem;
    }
    .footer-col.col-1, 
    .footer-col.col-2, 
    .footer-col.col-3 {
        text-align: left; 
    }

    .footer-bottom {
        text-align: left;
        margin-top: 1rem;
        padding: 2rem;
    }
}
