/* ============================================================
   WC Gift Products — Frontend Styles
   ============================================================ */

/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
/*  Badge — shared                                                      */
/* ------------------------------------------------------------------ */
.wcgp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.wcgp-badge__icon-svg {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.wcgp-badge--gift {
  background: #1a1a2e;
  color: #fff;
}

.wcgp-badge--new {
  background: #10b981;
  color: #fff;
}

/* ------------------------------------------------------------------ */
/*  Badge wrappers & positioning                                       */
/* ------------------------------------------------------------------ */
.woocommerce ul.products li.product {
  position: relative;
}

.wcgp-badges-loop-wrap {
  position: absolute;
  top: 44px; /* below built-in WC badges */
  left: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* If no sale badge, move to top */
.woocommerce ul.products li.product:not(.sale) .wcgp-badges-loop-wrap {
  top: 8px;
}

.wcgp-badges-loop-wrap .wcgp-badge {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.wcgp-badges-single-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Make sure product wrapper, image wrapper and gallery are relative */
.woocommerce div.product,
.woocommerce-product-gallery,
.woocommerce div.product div.images,
.wcgp-single-image-wrapper {
  position: relative;
}

.wcgp-single-image-wrapper {
  display: block;
}

/* ------------------------------------------------------------------ */
/*  Gift block                                                          */
/* ------------------------------------------------------------------ */
.wcgp-gift-block {
  background: #E5EAEE66;
  border: none;
  border-radius: 12px;
  padding: 24px 28px;
  margin: 20px 0;
}

.wcgp-gift-block__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  color: #000;
  margin: 0 0 20px;
  padding: 0;
}

.wcgp-gift-block__icon {
  font-size: 22px;
  line-height: 1;
}

.wcgp-gift-block__condition {
  font-size: 13px;
  color: #555;
  margin: 0 0 12px;
}

/* ---- Grid of gift cards ---- */
.wcgp-gift-block__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ---- Single gift card ---- */
.wcgp-gift-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: none;
  padding: 0;
  transition: opacity 0.15s ease-in-out;
}

.wcgp-gift-card:hover {
  opacity: 0.85;
}

.wcgp-gift-card__thumb {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  display: block;
  background: #fff;
}

.wcgp-gift-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wcgp-gift-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.wcgp-gift-card__name {
  font-size: 14px;
  font-weight: 500;
  color: #000;
  line-height: 1.35;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wcgp-gift-card__name:hover {
  text-decoration: none;
}

.wcgp-gift-card__cond {
  font-size: 12px;
  color: #666;
  line-height: 1.3;
}

.wcgp-gift-card__cond .woocommerce-Price-amount {
  font-weight: 600;
  color: #333;
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 600px) {
  .wcgp-gift-block__grid {
    grid-template-columns: 1fr;
  }
}
