/* Outer grid container */
.deals-grid-uk {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* auto-fit desktop */
  gap: 20px;
}

/* Grid item (stable size) */
.deals-wrapper-uk {
  border: 1px solid #ddd;
  background: #fff;
  position: relative;
  text-align: center;
  min-height: 280px;
  overflow: hidden; /* ensures inner pop doesn't break layout */
}

/* Inner content wrapper for POP effect */
.deals-inner-uk {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* POP effect only on inner wrapper */
.deals-wrapper-uk:hover .deals-inner-uk {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Image */
.deals-wrapper-uk img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* Discount ribbon */
.discount-ribbon-uk {
  position: absolute;
  top: 27px;
  left: -12px;
  background: #DC0E40;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: rotate(-45deg);
  transform-origin: top left;
  z-index: 3;
}

/* Title */
.deals-title-uk {
  font-size: 14px;
  margin: 8px 0;
  line-height: 1.2em;
  max-height: 2.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  flex-grow: 1;
}

/* Button */
.deals-button-uk {
  text-align: center;
  margin-top: auto;
}

.buy-btn-uk,
.buy-btn-us,
.check-price-btn-uk {
  display: inline-block;
  background: #FF9900;
  font-size: 12px;
  color: #000;
  padding: 6px 8px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none!important;
  transition: background 0.3s ease, transform 0.2s ease;
}

.buy-btn-uk:hover,
.buy-btn-us:hover,
.check-price-btn-uk:hover {
  background: #a50a30;
  color: #fff; /* stays white */
  transform: scale(1.05);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .deals-grid-uk {
    grid-template-columns: repeat(2, 1fr); /* force 2 columns on mobile */
  }
  .deals-wrapper-uk img {
    width: 120px;
    height: 120px;
  }
}
