/* product-grid.css - Product card and grid layout styles */

/* ============== PRODUCTS GRID ============== */
/* Удален products-header, так как элемент больше не используется */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* ============== PRODUCT CARD ============== */
.product-card {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.product-card:hover {
  box-shadow: var(--premium-shadow);
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.product-image-container {
  position: relative;
  width: 100%;
  padding-top: 160px;
  overflow: hidden;
  border-radius: 10px;
  margin: 5px auto 10px;
  max-width: 160px;
  border: 2px solid rgba(255, 215, 0, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image {
  transform: scale(1.08);
}

.product-card:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover:after {
  opacity: 1;
}

/* Country badges */
.product-card .country-badge,
.product-card .global-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.product-card .country-badge img,
.product-card .global-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .global-badge {
  background: #2c2c2c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card .global-badge img {
  filter: invert(1);
}

.product-category {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 215, 0, 0.85);
  color: #000;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 0.5px;
}

.product-title {
  font-size: 1.1em;
  color: var(--primary-color);
  text-align: center;
  font-weight: bold;
  margin: 8px 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.product-description {
  color: #fff;
  text-align: center;
  font-size: 0.85em;
  opacity: 0.9;
  line-height: 1.3;
  margin: 5px 0;
  max-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
  flex: 1;
  position: relative;
  height: 100%;
  box-sizing: border-box;
}

.product-price-button-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding-top: 5px;
}

.product-price {
  font-size: 1.15rem;
  color: #fff;
  font-weight: bold;
  margin: 8px 0;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
  display: inline-block;
  transition: all 0.3s ease;
}

.product-card:hover .product-price {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--primary-color);
  transform: scale(1.05);
}