/**
 * 4.estate — structure only (safe to ship in plugin updates).
 * Brand look (list, card, search, gallery frame) lives in the active theme.
 */

.fe-offer__gallery-hero {
  cursor: zoom-in;
}

.fe-offer__thumbs-arrow[hidden],
.fe-offer-lightbox__nav[hidden] {
  display: none !important;
}

body.fe-offer-lightbox-open {
  overflow: hidden;
}

.fe-offer-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 4.5rem 2.5rem;
  background: rgba(10, 8, 9, 0.94);
  box-sizing: border-box;
}

.fe-offer-lightbox.is-open {
  display: flex;
}

.fe-offer-lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.fe-offer-lightbox__img {
  max-width: min(96vw, 1400px);
  max-height: calc(100vh - 6.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.fe-offer-lightbox__counter {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.fe-offer-lightbox__close,
.fe-offer-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(16, 22, 20, 0.72);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.fe-offer-lightbox__close {
  top: 1rem;
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  font-size: 1.6rem;
}

.fe-offer-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 2rem;
}

.fe-offer-lightbox__prev {
  left: 0.85rem;
}

.fe-offer-lightbox__next {
  right: 0.85rem;
}

.fe-offer-lightbox__close:hover,
.fe-offer-lightbox__nav:hover {
  border-color: var(--fe-accent, currentColor);
  color: var(--fe-accent, currentColor);
}

@media (max-width: 700px) {
  .fe-offer-lightbox {
    padding: 3.25rem 0.75rem 1.5rem;
  }

  .fe-offer-lightbox__nav {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.7rem;
  }

  .fe-offer-lightbox__prev {
    left: 0.35rem;
  }

  .fe-offer-lightbox__next {
    right: 0.35rem;
  }
}

/* Category tiles — layout mechanics (look in theme offers.css) */
.fe-offer-cat-tiles__grid {
  display: grid;
  grid-template-columns: repeat(var(--fe-cat-cols, 4), minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fe-offer-cat-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.fe-offer-cat-tile__media {
  position: relative;
  overflow: hidden;
}

.fe-offer-cat-tile__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.fe-offer-cat-tile__img--placeholder {
  background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 900px) {
  .fe-offer-cat-tiles__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .fe-offer-cat-tiles__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
