/*
 * Free gift badge drawn on product images by the adfreegift override
 * (themes/aer/modules/adfreegift/views/templates/front/giftBadge.tpl).
 * Same palette as the module's banner under the product: peach gradient, PROMO orange.
 *
 * The wrapper spans the image width and is a size container, so thumbnails and text scale with
 * the image: about 150px in the home and product-page carousels, 270px in category grids,
 * 458px on the product page. The fixed values before each clamp() are for browsers without
 * container query units.
 */
.adfg-badge {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  container-type: inline-size;
  pointer-events: none;
  text-align: left; }

.adfg-badge--product {
  left: 14px;
  right: 14px;
  bottom: 14px; }

.adfg-badge .adfg-badge__card {
  pointer-events: auto;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
  padding: 5px 9px 5px 5px;
  background: #ffd99e;
  background: linear-gradient(29deg, #ffc3b1 2%, #ffd99e 50%, #feeabc 100%);
  border: 2px solid #ea8726;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  color: #333;
  line-height: 1.15;
  text-decoration: none;
  transition: box-shadow 0.15s ease-in-out; }
  .adfg-badge .adfg-badge__card:hover,
  .adfg-badge .adfg-badge__card:focus {
    color: #333;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28); }

.adfg-badge__row {
  display: flex;
  align-items: center;
  gap: 7px; }

.adfg-badge__gifts {
  display: flex;
  flex-shrink: 0;
  gap: 5px; }

.adfg-badge__thumb,
.adfg-badge__combo {
  position: relative;
  display: block;
  width: 44px;
  width: clamp(30px, 17cqw, 72px);
  height: 44px;
  height: clamp(30px, 17cqw, 72px);
  background: #fff;
  border-radius: 9px; }

.adfg-badge__thumb picture {
  display: block;
  width: 100%;
  height: 100%; }

.adfg-badge .adfg-badge__thumb img,
#image-block .adfg-badge .adfg-badge__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 2px;
  object-fit: contain;
  background: #fff;
  border-radius: 9px; }

.adfg-badge__qty {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  padding: 1px 4px;
  border-radius: 10px;
  background: #ea8726;
  color: #fff;
  font: 700 11px/15px Roboto, Arial, sans-serif;
  text-align: center; }

.adfg-badge__combo {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ea8726;
  border-radius: 50%;
  color: #ea8726;
  font: 800 15px/1 Roboto, Arial, sans-serif;
  font-size: clamp(12px, 6.5cqw, 26px);
  white-space: nowrap; }

.adfg-badge__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0; }

.adfg-badge__cond {
  font: 700 12px/1.15 Roboto, Arial, sans-serif;
  font-size: clamp(10px, 5.2cqw, 17px);
  white-space: nowrap; }

.adfg-badge__chip {
  padding: 2px 6px;
  border-radius: 6px;
  background: #ea8726;
  color: #fff;
  font: 800 10px/1.2 Roboto, Arial, sans-serif;
  font-size: clamp(9px, 4.4cqw, 14px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap; }

/* Narrow cards (home and product-page carousels): one thumbnail only, the chip still counts every gift. */
@container (max-width: 200px) {
  .adfg-badge__gifts > * + * {
    display: none; } }

/* On hover the grid shows the price strip at the bottom of the image (logged-in customers):
   lift the badge above it instead of covering the price. */
@media (min-width: 1200px) {
  ul.product_list.grid > li.hovered .product-image-container:has(> .content_price) .adfg-badge--list {
    bottom: 48px; } }
