/**
 * "Everything We Offer" grid.
 * Tokens mirror the approved homepage design.
 */

.fbh-offerings {
  --fbh-ink: #312923;
  --fbh-body: #515050;
  --fbh-surface: #ffffff;
  --fbh-tan: #a57c52;
  --fbh-rust: #7f4b2f;
  --fbh-teal: #5e9598;
  --fbh-line: #e1d3bc;
  --fbh-cols: 3;

  color: var(--fbh-body);
  font-family: "Lato", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- search ---------- */

.fbh-offerings__search {
  display: block;
  width: 100%;
  max-width: 440px;
  margin: 0 0 22px;
  padding: 12px 18px;
  border: 1.5px solid var(--fbh-line);
  border-radius: 24px;
  background: var(--fbh-surface);
  color: var(--fbh-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.fbh-offerings__search:focus {
  border-color: var(--fbh-teal);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(94, 149, 152, 0.25);
}

/* ---------- filter chips ---------- */

.fbh-offerings__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.fbh-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 1.5px solid var(--fbh-line);
  border-radius: 24px;
  background: transparent;
  color: var(--fbh-ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fbh-chip:hover {
  background: var(--e-global-color-secondary);
  border-color: var(--fbh-teal);
  color: #fff;
}

.fbh-chip[aria-pressed="true"] {
  background: var(--fbh-teal);
  border-color: var(--fbh-teal);
  color: #fff;
}

.fbh-chip:focus-visible {
  outline: 2px solid var(--fbh-rust);
  outline-offset: 2px;
}

/* ---------- count ---------- */

.fbh-offerings__count {
  margin: 18px 0 20px;
  color: var(--fbh-tan);
  font-size: 12.5px;
}

/* ---------- grid ---------- */

.fbh-offerings__grid {
  display: grid;
  grid-template-columns: repeat(var(--fbh-cols), minmax(0, 1fr));
  gap: 16px;
}

.fbh-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--fbh-line);
  border-radius: 10px;
  background: var(--fbh-surface);
  overflow: hidden;
}

.fbh-card[hidden] {
  display: none;
}

.fbh-card__media {
  position: relative;
}

.fbh-card__img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.fbh-card__img--placeholder {
  background: linear-gradient(135deg, #e1d3bc, #c9af8c);
}

.fbh-card__cat {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.6;
}

.fbh-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.fbh-card__title {
  margin: 0 0 6px;
  font-family: "Cormorant", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--fbh-ink);
}

.fbh-card__desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fbh-body);
}

.fbh-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.fbh-card__tag {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--fbh-line);
  border-radius: 20px;
  background: var(--fbh-surface);
  color: var(--fbh-rust);
  font-size: 10.5px;
  font-weight: 700;
}

/* ---------- out of stock ---------- */

.fbh-card__tag--out {
  border-color: #a33b2a;
  background: #a33b2a;
  color: #fff;
}

/* Still legible, plainly not on offer today. */
.fbh-card--out .fbh-card__img {
  filter: grayscale(0.65);
  opacity: 0.75;
}

.fbh-card--out .fbh-card__price {
  color: var(--fbh-body);
  text-decoration: line-through;
  text-decoration-color: var(--fbh-line);
}

.fbh-card__cta--off {
  color: var(--fbh-body);
  font-weight: 700;
  font-size: 12.5px;
  font-style: italic;
  text-decoration: none;
  white-space: nowrap;
}

.fbh-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--fbh-line);
}

/* Keep the CTA aligned even when an item has no price yet. */
.fbh-card__foot > .fbh-card__price:empty {
  display: block;
}

.fbh-card__price {
  font-weight: 900;
  font-size: 14px;
  color: var(--fbh-ink);
}

.fbh-card__cta {
  color: var(--fbh-teal);
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.fbh-card__cta:hover,
.fbh-card__cta:focus {
  color: var(--fbh-rust);
}

/* ---------- pager ---------- */

.fbh-offerings__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.fbh-offerings__pager[hidden] {
  display: none;
}

.fbh-page {
  min-width: 38px;
  padding: 8px 12px;
  border: 1.5px solid var(--fbh-line);
  border-radius: 6px;
  background: var(--fbh-surface);
  color: var(--fbh-ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fbh-page:hover:not(:disabled):not(.fbh-page--on) {
  background: var(--e-global-color-secondary);
  border-color: var(--fbh-teal);
  color: #fff;
}

.fbh-page--on {
  background: var(--fbh-teal);
  border-color: var(--fbh-teal);
  color: #fff;
  cursor: default;
}

.fbh-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.fbh-page:focus-visible {
  outline: 2px solid var(--fbh-rust);
  outline-offset: 2px;
}

.fbh-page-gap {
  padding: 0 2px;
  color: var(--fbh-tan);
  font-weight: 700;
}

/* ---------- empty state ---------- */

.fbh-offerings__empty {
  padding: 36px 0;
  color: var(--fbh-tan);
  font-style: italic;
  text-align: center;
}

.fbh-offerings__empty[hidden] {
  display: none;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .fbh-offerings__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .fbh-offerings__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fbh-offerings__search {
    max-width: none;
  }

  .fbh-page {
    min-width: 34px;
    padding: 8px 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fbh-chip,
  .fbh-page {
    transition: none;
  }
}
