/* === Мобильная оптимизация для товаров и фильтров === */
@media (max-width: 768px) {
  /* Два товара в ряд */
  #productsRow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .product-col {
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
    margin: 0;
  }

  .controls-row .form-select,
  .controls-row .form-control {
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 8px;
  }

  .controls-row .col-12.text-end {
    text-align: center !important;
    margin-top: 10px;
  }

  .product-item {
    padding: 10px;
  }

  .product-title {
    font-size: 14px;
    margin-top: 5px;
  }

  .product-price, .product-discount {
    font-size: 13px;
  }

  .icon-cross {
    width: 20px;
    height: 20px;
  }
}


/* ======== Product card fixed thumbnail ======== */
/* Контейнер для превью — фиксированная высота, картинка покрывает весь блок */
.product-thumb {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: #f5f5f5;
  position: relative;
}

.product-thumb img.product-thumbnail {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}


.product-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 14px;
  background: linear-gradient(90deg, #f5f5f5 0%, #e9e9e9 100%);
}

.product-col .product-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-thumbnail {
  max-width: none;
  height: auto;
  width: 100%;
}

@media (max-width: 768px) {
  .product-thumb { height: 180px; }
}
@media (max-width: 480px) {
  .product-thumb { height: 150px; }
}

.product-section .product-item .product-thumbnail {
  transition: transform 0.3s ease;
}

.product-section .product-item:hover .product-thumbnail {
  transform: scale(1.05);
}