/*
 * FB Products ("From the Store") widget.
 * Values taken from the Faith-Be.fig source, frame "product" (46:51) at 1440px.
 *
 * Vertical rhythm inside a card, measured from the bottom of the 274px photo:
 *   42 pad · 28 cat · 6 · 28 name · 113 desc · 12 · 32 coupon · 12 · 29 link · 35 pad
 *   = 337, and 274 + 337 = the 611px card height in the design.
 */

.fb-prod {
  --fb-pr-bg: #c7cdbf;
  --fb-pr-card: #fbf7f1;
  --fb-pr-accent: #ed184b;
  --fb-pr-ink: #3f4937;
  --fb-pr-plum: #392a30;
  --fb-pr-body: #000000;
  --fb-pr-gold: #be9540;

  /* 3 × 400 cards + 2 × 20 gutters. */
  --fb-pr-content: 1240px;

  background: var(--fb-pr-bg);
  /* No outer spacing — the Elementor container that wraps this widget supplies
     the section padding and the page gutter. */
  padding: 0;
  font-family: "Jost", sans-serif;
  color: var(--fb-pr-ink);
}

.fb-prod *,
.fb-prod *::before,
.fb-prod *::after { box-sizing: border-box; }

/* ---------- head ---------- */
.fb-prod__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 40px;
  max-width: var(--fb-pr-content);
  /* 88px in the design, less the 2px the intro's line box adds over Figma's text frame. */
  margin: 0 auto 86px;
  padding: 0;
}

.fb-prod__head-left { flex: 1 1 400px; }

.fb-prod__eyebrow {
  /* flex, not inline-flex: an inline line box would add stray leading above the title. */
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  font-family: var(--fb-script-font, "Segoe Script", cursive);
  font-size: var(--fb-script-size, 32px);
  line-height: 24px;
  letter-spacing: .01em;
  color: var(--fb-pr-accent);
}

/* The 44px rule after the eyebrow sits at 20% accent. */
.fb-prod__eyebrow::after {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--fb-pr-accent);
  opacity: .2;
}

.fb-prod__title {
  max-width: 400px;
  margin: 14px 0 0;
  font-family: "Inria Serif", serif;
  font-size: clamp(30px, 2.78vw, 40px);
  font-weight: 400;
  line-height: 46px;
  letter-spacing: .01em;
  color: var(--fb-pr-ink);
}

.fb-prod__intro {
  /* 611px is where the paragraph starts in the design (x=729 of the 1240 grid). */
  flex: 0 1 611px;
  margin: 34px 0 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: .01em;
  color: var(--fb-pr-plum);
}

/* ---------- grid ---------- */
.fb-prod__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: var(--fb-pr-content);
  margin: 0 auto;
  padding: 0;
  justify-content: center;
}

.fb-prod__grid--centered,
.fb-prod__grid:has(> .fb-prod__card:only-child),
.fb-prod__grid:has(> .fb-prod__card:first-child:nth-last-child(2)) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.fb-prod__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  min-height: 611px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--fb-pr-card);
  transition: transform .25s ease, box-shadow .25s ease;
}

.fb-prod__card:only-child {
  grid-column: 2;
}

.fb-prod__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(57, 42, 48, .14);
}

/* ---------- media ---------- */
.fb-prod__media {
  position: relative;
  flex: none;
  height: 274px;
  overflow: hidden;
  background: rgba(57, 42, 48, .06);
}

.fb-prod__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.fb-prod__card:hover .fb-prod__img { transform: scale(1.04); }

.fb-prod__badge {
  position: absolute;
  right: 16px;
  bottom: 19px;
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 16px;
  border: 1px solid rgba(237, 24, 75, .2);
  border-radius: 20px;
  background: rgba(237, 24, 75, .4);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .02em;
  color: #fff;
  backdrop-filter: blur(2px);
}

/* ---------- body ---------- */
.fb-prod__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 42px 21px 35px 22px;
}

.fb-prod__cat {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fb-pr-ink);
}

.fb-prod__name {
  margin: 6px 0 10px;
  font-size: 24px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: .01em;
  color: var(--fb-pr-body);
}

.fb-prod__desc {
  min-height: 113px;
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: .01em;
  color: var(--fb-pr-body);
}

/* ---------- coupon ---------- */
.fb-prod__coupon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-width: 228px;
  height: 32px;
  margin: 0 0 12px;
  padding: 0 11px;
  border: 1px dashed var(--fb-pr-gold);
  border-radius: 5px;
  background: rgba(255, 219, 111, .1);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1;
  color: var(--fb-pr-body);
  white-space: nowrap;
}

.fb-prod__coupon-code strong {
  font-weight: 600;
}

/* ---------- link ---------- */
.fb-prod__link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  /* margin-top:auto keeps the rule on the card floor when a blurb runs short. */
  margin-top: auto;
  height: 29px;
  padding: 0 5px;
  border-bottom: 1px solid var(--fb-pr-plum);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fb-pr-plum);
  transition: color .2s ease, border-color .2s ease, gap .2s ease;
}

.fb-prod__link:hover,
.fb-prod__link:focus-visible {
  color: var(--fb-pr-accent);
  border-color: var(--fb-pr-accent);
  text-decoration: none;
}

.fb-prod__link-text {
  display: inline-block;
  line-height: 1;
}

.fb-prod__link-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-left: 7px;
  transition: transform .2s ease;
}

.fb-prod__link:hover .fb-prod__link-arrow,
.fb-prod__link:focus-visible .fb-prod__link-arrow {
  transform: translateX(3px);
}

/* ---------- load more ---------- */
.fb-prod__more-wrap {
  margin-top: 36px;
  text-align: center;
}

.fb-prod__more {
  appearance: none;
  background: transparent;
  border: 1px solid var(--fb-pr-accent);
  border-radius: 5px;
  color: var(--fb-pr-accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 14px 32px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease, transform .2s ease;
}

.fb-prod__more:hover:not(:disabled) {
  background: var(--fb-pr-accent);
  color: #fff;
  transform: translateY(-2px);
}

.fb-prod__more:disabled {
  cursor: default;
  opacity: .6;
}

.fb-prod__more[hidden] {
  display: none;
}

.fb-prod__more.is-loading .fb-prod__more-label::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 10px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: fb-prod-spin .7s linear infinite;
}

@keyframes fb-prod-spin {
  to { transform: rotate(360deg); }
}

/* ---------- footer ---------- */
.fb-prod__note {
  max-width: 756px;
  margin: 30px auto 0;
  padding: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: .01em;
  text-align: center;
  color: var(--fb-pr-ink);
}

.fb-prod__foot {
  /* 30px in the design, plus the 8px of slack Figma's fixed disclaimer box carries. */
  margin-top: 38px;
  text-align: center;
}

.fb-prod__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 171px;
  height: 50px;
  padding: 0 25px;
  border-radius: 5px;
  background: var(--fb-pr-accent);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: filter .2s ease, transform .2s ease;
}

.fb-prod__btn:hover,
.fb-prod__btn:focus-visible {
  filter: brightness(.92);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .fb-prod__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-prod__intro { flex-basis: 100%; margin-top: 0; }
}

@media (max-width: 1024px) and (min-width: 768px) {
  .fb-prod__grid > :last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc((100% - 20px) / 2); }
}
@media (max-width: 820px) {
  .fb-prod__media { height: 230px; }
}

@media (max-width: 767px) {
  .fb-prod__head { margin-bottom: 48px; }
  .fb-prod__grid { grid-template-columns: minmax(0, 1fr); }
  .fb-prod__card { min-height: 0; }
  .fb-prod__desc { min-height: 0; }
  .fb-prod__body { padding: 28px 20px; }
  .fb-prod__link { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-prod__card,
  .fb-prod__img,
  .fb-prod__btn { transition: none; }
  .fb-prod__card:hover { transform: none; }
  .fb-prod__card:hover .fb-prod__img { transform: none; }
  .fb-prod__btn:hover { transform: none; }
}
