/* Fichas de producto estilo Éxito (Electrotheme). Vanilla CSS. */
.em-offers {
  --em-offers-cols: 4;
  --em-offers-gap: clamp(0.75rem, 2cqi, 1.25rem);
  --em-offers-cta: var(--em-red);
  --em-offers-cta-hover: var(--em-red-dark);
  --em-offers-price: var(--em-red);
  container-type: inline-size;
  margin-block: clamp(1.5rem, 4cqi, 3rem);
}

.em-offers__grid {
  display: grid;
  grid-template-columns: repeat(var(--em-offers-cols), minmax(0, 1fr));
  gap: var(--em-offers-gap);
}

.em-offers__card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem;
  border: none;
  border-radius: 0.75rem;
  background: light-dark(var(--em-gray-50), #161616);
  min-width: 0;
}

.em-offers__tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--em-gray-800);
  color: var(--em-gray-50);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.em-offers__media {
  display: block;
  height: 180px;
  overflow: hidden;
}

.em-offers__grid .em-offers__card .em-offers__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.em-offers__name {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
}

.em-offers__grid .em-offers__card .em-offers__name a {
  color: var(--em-black);
  text-decoration: none;
}

.em-offers__grid .em-offers__card .em-offers__name a:where(:hover, :focus-visible) {
  color: var(--em-black);
  text-decoration: none;
}

.em-offers__brand {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

.em-offers__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin-top: auto;
}

.em-offers__pct {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  background: var(--em-gray-800);
  color: var(--em-gray-50);
}

.em-offers__regular {
  font-size: 0.78rem;
  opacity: 0.6;
}

.em-offers__grid .em-offers__card .em-offers__price {
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
  color: var(--em-offers-price);
  width: 100%;
}

.em-offers__gift {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
  background: color-mix(in srgb, #2e9e44 15%, transparent);
  border: 1px dashed #2e9e44;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.em-offers__cta {
  margin-top: 0.25rem;
}

.em-offers__grid .em-offers__card .em-offers__cta .button {
  width: 100%;
  justify-content: center;
  background: var(--em-offers-cta);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
}

.em-offers__grid .em-offers__card .em-offers__cta .button:where(:hover, :focus-visible) {
  background: var(--em-offers-cta-hover);
  color: #fff;
  text-decoration: none;
}

.em-offers__cta .added_to_cart {
  display: block;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--em-red-dark);
  text-decoration: none;
}

.em-offers__cta .added_to_cart:where(:hover, :focus-visible) {
  color: var(--em-red-dark);
  text-decoration: underline;
}

@container (max-width: 900px) {
  .em-offers__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .em-offers__media {
    height: 150px;
  }
}

@container (max-width: 420px) {
  .em-offers__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .em-offers__cta .button {
    transition: none;
  }
}
