/* ====== OFFERS GRID (Elementor Globals–aware) ====== */

/* Base: inherit site text styles/colors */
.offers-widget {
  color: var(--e-global-color-text, inherit);
  font-family: var(--e-global-typography-text-font-family, inherit);
  font-size: var(--e-global-typography-text-font-size, inherit);
  font-weight: var(--e-global-typography-text-font-weight, inherit);
  line-height: var(--e-global-typography-text-line-height, inherit);
}

/* Make inner elements inherit text styles from the container */
.offers-widget,
.offers-widget *:where(:not(svg, svg *, img)) {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* Grid */
.offers-widget .offers-grid {
  display: grid;
  gap: var(--offers-gap, 24px);
}
.offers-widget.cols-1 .offers-grid {
  grid-template-columns: 1fr;
}
.offers-widget.cols-2 .offers-grid {
  grid-template-columns: repeat(2, 1fr);
}
.offers-widget.cols-3 .offers-grid {
  grid-template-columns: repeat(3, 1fr);
}
.offers-widget.cols-4 .offers-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 720px) {
  .offers-widget .offers-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Whole card as link */
.offer-card--link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
}

/* Card */
.offer-card {
  border-radius: 15px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.offer-card:hover,
.offer-card:focus-visible {
  transform: translateY(-4px);
  /* use current text color to tint shadow slightly; fallback via @supports */
  box-shadow: 0 4px 12px
    color-mix(in srgb, var(--e-global-color-text, #000) 25%, transparent);
  outline: none;
}
@supports not (color-mix(in srgb, #000 25%, transparent)) {
  .offer-card:hover,
  .offer-card:focus-visible {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }
}

/* Image container */
.offer-card__media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 2px solid var(--e-global-color-accent, currentColor);
  border-radius: 15px;
  margin-bottom: 12px;
  /* background gradient driven by globals */
  background: var(--e-global-color-secondary, inherit);
  background: linear-gradient(
    180deg,
    var(--e-global-color-secondary, inherit) 0%,
    var(--e-global-color-primary, inherit) 100%
  );
}
.offer-card__img {
  width: 100%;
  height: 100% !important;
  object-fit: contain;
  display: block;
}

/* Text (title uses heading/secondary typography) */
.offer-card__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--e-global-color-text, currentColor);
  text-align: start;

  font-family: var(--e-global-typography-secondary-font-family, inherit);
  /* keep responsive sizing but allow Elementor to override via globals */
}
@media (max-width: 720px) {
  .offer-card__title {
    font-size: 1rem;
  }
}

/* Static "Read more →" line */
.offer-card__moreline {
  margin: 0 0 10px;
  text-align: end;
  font-weight: 700;
  color: var(--e-global-color-text, currentColor);
  align-items: center;
  gap: 6px;
}
.offer-card--link:hover .offer-card__arrow {
  transform: translateX(4px);
}
.offer-card--link:where(:hover, :focus, :visited) {
  text-decoration: none !important;
  color: inherit;
}

.offer-card__arrow {
  transition: transform 0.2s ease;
}
@media (max-width: 720px) {
  .offer-card__moreline {
    font-size: 0.75rem;
  }
}

/* Description */
.offer-card__desc {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--e-global-color-text, inherit);
  text-align: center;
  margin: 0;
}

/* Legacy CTA */
.offer-card__cta {
  display: none !important;
}
