
.product-card {
  font-family: 'Segoe UI', sans-serif;
  width: 220px;
  height: 100%;
  /* margin: 6px; */
  padding: 10px;
  border-radius: 6px;
  border: 2px dashed #bbb; /* пунктирная граница */
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  background: #fefefe;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.my-product-list {
  gap: 3px;
  row-gap: 10px;
}

@media (min-width: 576px) {
  .my-product-list {
    gap: 10px;
  }
}

@media (max-width: 576px) {
  .product-card {
    width: 195px;
    margin: 3px;
    padding: 6px;
  }
    .my-product-list {
      padding: 5px;
    }
}

@media (max-width: 460px) {
  .product-card {
    width: 175px;
    margin: 3px;
    padding: 6px;
  }
    .my-product-list {
      padding: 5px;
    }
}

.container-my-size .col {
  padding: 0;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Картинка */
.image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(45deg, #ddd, #f3f3f3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  /* border-radius: 10px; */
}

/* Блок опта */
.opt-hint {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  position: relative;
  margin-bottom: 6px;
}

.opt-label {
  font-size: 0.9em;
  background-color: #f57c00;
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: 0.3s;
}

/* Увеличенная и округлая метка опта */
.opt-label.large-rounded {
  border-radius: 999px;
  font-size: 1em;
  padding: 6px 12px;
}

.opt-tooltip {
  display: none;
  position: absolute;
  top: 36px;
  left: 0;
  background: #fff;
  color: #333;
  padding: 8px;
  border: 1px solid #ccc;
  font-size: 0.75em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border-radius: 6px;
  width: max-content;
  max-width: 180px;
  z-index: 10;
}

.opt-hint:hover .opt-tooltip {
  display: block;
}

/* Название */
.product-name {
  font-weight: bold;
  font-size: 1.2em;
  color: #222;
  margin: 6px 0 4px;
  text-align: left;
  width: 100%;
}

/* Код товара */
.product-code {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 4px;
  width: 100%;
}

/* Цена */
.product-price {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 8px 0;
  width: 100%;
}

.price-old {
  text-decoration: line-through;
  color: #aaa;
  font-size: 0.9em;
}

.price-current {
  font-size: 1.2em;
  font-weight: bold;
  color: #e53935;
}

/* Кнопка */
.add-to-cart {
  width: 100%;
  align-self: stretch;
  background: #198754;
  color: white;
  border: none;
  padding: 6px 11px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2em;
  transition: 0.3s;
  margin-top: auto;
  text-align: center;
}

.add-to-cart:hover {
  background: #22a643;
}

/* Темы */
.product-card.retro {
  background: #fff9f0;
}

.product-card.green-theme {
  background: #ffffff;
  border-color: #a5d6a7;
}

.product-card.green-theme .price-current {
  color: #2e7d32;
}

.product-card.green-theme .opt-label {
  background: #388e3c;
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* это поможет прижимать кнопку вниз */
  height: 100%;
  position: relative;
}

.product-card form{
  width: 100%;
}

/* Обёртка для всего контента, кроме кнопки */
.product-content {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Опт вынесен абсолютным позиционированием */
.opt-hint {
  position: absolute;
  top: 180px;
  left: 14px;
  z-index: 2;
}

.image-placeholder {
  margin-bottom: 14px; /* чтобы не перекрывалось оптом */
}
