/* ===== ОБЩЕЕ ===== */

.catalog-page {
    background: #fff;
}

.catalog-list {
    padding-bottom: 60px;
    background: #f6f8f7;
    padding: 40px 0 70px;
}

/* ===== СЕТКА КАТАЛОГА ===== */

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

/* ===== КАРТОЧКА ===== */

.catalog-card {
    display: flex;
    flex-direction: column;
    border: 3px solid #e3ebe6;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #2b2b2b;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.catalog-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 18px 45px rgba(0,0,0,0.12),
        0 4px 10px rgba(0,0,0,0.06);
}

/* ===== ИЗОБРАЖЕНИЕ ===== */

.catalog-card-img {
    width: 100%;
    height: 220px;
    background: #f2f4f3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 220px;          /* фиксированное окно */
    overflow: hidden;
}

.catalog-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);

}

/* Если нет фото */
.no-photo {
    width: 100%;
    height: 100%;
    background: #e1e6e3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #6f776f;
}

/* ===== ТЕЛО КАРТОЧКИ ===== */

.catalog-card-body {
    padding: 14px 14px 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 64px;
    gap: 6px;
}

/* ===== НАЗВАНИЕ ===== */

.catalog-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

/* ===== ПЛОЩАДЬ ===== */

.catalog-card-meta {
    font-size: 14px;
    color: #6f776f;
}

/* ===== ЦЕНА ===== */

.catalog-card-price {
    margin-top: 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--green);
}

/* ===== АДАПТИВ ===== */

@media (max-width: 600px) {
    .catalog-card-img {
        height: 160px;
    }

    .catalog-card-title {
        font-size: 15px;
    }

    .catalog-card-price {
        font-size: 15px;
    }
}

/* ===== БЕЙДЖ НА КАРТОЧКЕ ===== */

.catalog-card-img {
    position: relative;
}

.catalog-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
}

/* Цвета */

.catalog-badge--green {
    background: var(--green);
}

.catalog-badge--red {
    background: #b93838;
}

/* Убрать подчёркивание у карточек каталога */
.catalog-card{
  text-decoration: none;
  color: inherit;
}

.catalog-card:hover,
.catalog-card:focus,
.catalog-card:active{
  text-decoration: none;
}

@media (max-width: 768px){
  .gallery-page .catalog-grid .catalog-card-img{
    aspect-ratio: 4 / 3; /* или 3/2 */
    overflow: hidden;
    border-radius: 18px;
  }

  .gallery-page .catalog-grid .catalog-card-img a,
  .gallery-page .catalog-grid .catalog-card-img img{
    display: block;
    width: 100%;
    height: 100%;
  }

  .gallery-page .catalog-grid .catalog-card-img img{
    object-fit: cover;
  }
}

@media (max-width: 768px){

  /* контейнер картинки — выше */
  .gallery-page #lightgallery .catalog-card-img{
    height: 300px !important;   /* ← меняй: 280 / 320 / 360 */
    overflow: hidden !important;
    border-radius: 18px;
  }

  /* ссылка занимает всю высоту */
  .gallery-page #lightgallery .catalog-card-img > a{
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* КЛЮЧЕВО: img принудительно тянется по высоте */
  .gallery-page #lightgallery .catalog-card-img img{
    display: block !important;
    width: 100% !important;
    height: 100% !important;     /* ← вот этого раньше не хватало */
    max-height: none !important; /* ← убираем ограничения */
    object-fit: cover !important;
  }
}

.hero-seo{
  margin-top:14px;
  display:flex;
  gap:14px;
  align-items:stretch;
  background:#ffffff;
  border:1px solid #e8eaee;
  border-radius:16px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  padding:16px;
}

.hero-seo__main{ flex:1; min-width:0; }

.hero-seo__title{
  font-size:18px;
  font-weight:800;
  line-height:1.25;
  color:#1f2a24;
  margin:0 0 10px;
}

.hero-seo__chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 10px;
}

.hero-seo__chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid #e8eaee;
  background:#f9fafb;
  color:#2f3337;
  font-size:13px;
  line-height:1;
  white-space:nowrap;
}

.hero-seo__price{
  font-size:15px;
  color:#1f2a24;
  margin:0 0 8px;
}

.hero-seo__price b{ color:#2f5f43; }

.hero-seo__text{
  font-size:14px;
  color:#6b7280;
  line-height:1.55;
}

.hero-seo__actions{
  width:260px;
  display:flex;
  flex-direction:column;
  gap:10px;
  justify-content:center;
}

.hero-seo__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  border-radius:12px;
  font-weight:800;
  text-decoration:none;
  transition:transform .06s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  user-select:none;
}

.hero-seo__btn:active{ transform:translateY(1px); }

.hero-seo__btn--primary{
  background:#2f5f43;
  color:#fff;
  border:1px solid #2f5f43;
  box-shadow:0 10px 18px rgba(47,95,67,.18);
}

.hero-seo__btn--primary:hover{
  box-shadow:0 14px 24px rgba(47,95,67,.22);
}

.hero-seo__btn--outline{
  background:#fff;
  color:#2f5f43;
  border:1px solid #2f5f43;
}

.hero-seo__btn--outline:hover{
  background:#f3faf6;
}

.hero-seo__small{
  font-size:12px;
  color:#6b7280;
  text-align:center;
}

@media (max-width: 860px){
  .hero-seo{
    flex-direction:column;
    padding:14px;
  }
  .hero-seo__actions{
    width:100%;
    flex-direction:row;
    gap:10px;
  }
  .hero-seo__btn{
    flex:1;
  }
  .hero-seo__small{
    display:none;
  }
  .catalog-card-img{ height: 220px; }
}

@media (max-width: 860px){
  .hero-seo__actions{
    align-items:stretch;
  }

  .hero-seo__btn{
    height:auto;           
    min-height:44px;          
    padding:10px 12px;       
    line-height:1.15;
    font-size:15px;
    text-align:center;
    white-space:normal;       
  }
}
