.resource-category {
  margin-top: clamp(2rem, 4vw, 4.25rem);
}

.resource-category-heading {
  max-width: 760px;
  margin-bottom: 1.4rem;
}

.resource-category-kicker {
  display: block;
  margin-bottom: .5rem;
  color: #b85f3f;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.resource-category-heading h3 {
  margin: 0 0 .55rem;
  color: #334638;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  line-height: 1.05;
}

.resource-category-heading p {
  max-width: 680px;
  margin: 0;
  color: #687268;
  line-height: 1.65;
}

.resource-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(1rem, 2.2vw, 1.8rem);
}

.fff-curriculum-card .upcoming-image {
  background: #f8f0df;
}

.fff-curriculum-card .upcoming-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.fff-curriculum-card [aria-disabled="true"] {
  cursor: default;
  opacity: .72;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .resource-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .resource-category-grid .unified-product-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {

  .resource-category {
    margin-top: 2.4rem;
  }
}

/* Unified product presentation */
.resource-category-grid .unified-product-card {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(83, 91, 70, .17);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(55, 59, 45, .1);
  align-self: stretch;
}

@media (max-width: 1500px) and (min-width: 1181px) {
  .resource-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.resource-category-grid .unified-product-card > .resource-image-wrap,
.resource-category-grid .unified-product-card > .upcoming-image-wrap,
.resource-category-grid .unified-product-card > .upcoming-image {
  position: relative;
  display: grid;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 350px;
  place-items: center;
  overflow: hidden;
  padding: clamp(1.5rem, 3.2vw, 3rem);
  background: #f2e8d6 !important;
}

.resource-category-grid .unified-product-card > .resource-content,
.resource-category-grid .unified-product-card > .upcoming-content,
.resource-category-grid .unified-product-card > .upcoming-copy {
  position: static !important;
  display: flex;
  justify-content: flex-start !important;
  align-items: stretch !important;
  align-self: stretch;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  inset: auto !important;
  transform: none !important;
  overflow: visible !important;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.6rem, 3.2vw, 3rem);
  background: #fff !important;
}

.resource-category-grid .unified-product-card > .resource-content > *,
.resource-category-grid .unified-product-card > .upcoming-content > *,
.resource-category-grid .unified-product-card > .upcoming-copy > * {
  max-width: 100%;
}

.resource-category-grid .unified-product-card img {
  display: block;
  width: min(98%, 380px) !important;
  max-width: min(98%, 380px) !important;
  height: auto !important;
  max-height: 345px;
  object-fit: contain !important;
  filter: drop-shadow(10px 16px 16px rgba(47, 48, 36, .2));
}

.resource-category-grid .mockup-featured img {
  width: min(98%, 380px) !important;
  max-width: min(98%, 380px) !important;
  max-height: 375px;
  transform: scale(1.27);
}

.resource-category-grid .unified-product-card:not(.mockup-featured) img {
  transform: scale(1.45);
}

.resource-category-grid .mockup-short-vowels img {
  content: url("/assets/product-mockups-v4/short-vowels.png");
}

.resource-category-grid .upcoming-badge {
  display: none !important;
}

.resource-category-grid .fff-curriculum-card .upcoming-badge {
  position: absolute;
  right: 1.1rem;
  top: 1rem;
  bottom: auto;
  display: inline-flex !important;
  padding: .48rem .82rem;
  border-radius: 999px;
  background: #c76b3f;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.resource-category-grid .curriculum-explore[aria-disabled="true"] {
  opacity: .62;
}

.resource-category-grid .curriculum-explore {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: min(100%, 260px) !important;
  max-width: 260px !important;
  min-width: 0 !important;
  min-height: 44px;
  box-sizing: border-box;
  margin: .2rem 0 0 !important;
  padding: .7rem .8rem !important;
  border-radius: 14px !important;
  font-size: clamp(.68rem, 1vw, .82rem) !important;
  line-height: 1.2 !important;
  text-align: center;
  white-space: normal;
  align-self: flex-start;
}

.planner-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1rem;
}

.planner-launch-actions [aria-disabled="true"] {
  cursor: default;
  opacity: .62;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .resource-category-grid .unified-product-card {
    grid-template-columns: 1fr;
  }

  .resource-category-grid .unified-product-card > .resource-image-wrap,
  .resource-category-grid .unified-product-card > .upcoming-image-wrap,
  .resource-category-grid .unified-product-card > .upcoming-image {
    min-height: 330px;
  }

  .resource-category-grid .unified-product-card img {
    width: min(92%, 400px) !important;
    max-height: 360px;
  }

  .resource-category-grid .unified-product-card img {
    transform: none;
  }
}

@media (max-width: 600px) {
  .resource-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
  }

  .resource-category-grid .unified-product-card {
    border-radius: 20px;
  }

  .resource-category-grid .unified-product-card > .resource-image-wrap,
  .resource-category-grid .unified-product-card > .upcoming-image-wrap,
  .resource-category-grid .unified-product-card > .upcoming-image {
    min-height: 155px;
    padding: .7rem;
  }

  .resource-category-grid .unified-product-card img {
    width: min(94%, 165px) !important;
    max-width: min(94%, 165px) !important;
    max-height: 150px;
  }

  .resource-category-grid .unified-product-card > .resource-content,
  .resource-category-grid .unified-product-card > .upcoming-content,
  .resource-category-grid .unified-product-card > .upcoming-copy {
    gap: .55rem;
    padding: 1rem .85rem 1.1rem !important;
  }

  .resource-category-grid .unified-product-card h3 {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
    line-height: 1.08;
  }

  .resource-category-grid .unified-product-card p,
  .resource-category-grid .unified-product-card .resource-price,
  .resource-category-grid .unified-product-card .coming-link {
    font-size: .78rem;
    line-height: 1.42;
  }

  .resource-category-grid .unified-product-card .card-link,
  .resource-category-grid .unified-product-card .upcoming-cta,
  .resource-category-grid .unified-product-card .button {
    font-size: .7rem;
    line-height: 1.25;
  }

  .resource-category-grid .curriculum-explore {
    min-height: 40px;
    padding: .55rem .35rem !important;
    border-radius: 10px !important;
    font-size: .64rem !important;
  }

  .resource-category-grid .fff-curriculum-card .upcoming-badge {
    right: .55rem;
    top: .55rem;
    padding: .35rem .55rem;
    font-size: .62rem;
  }
}

/* Product-card typography lock: Together devotional is the approved reference. */
.resource-category-grid .unified-product-card .resource-price,
.resource-category-grid .unified-product-card .coming-link {
  color: #b65f42 !important;
  font-size: 1.15rem !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
}

.resource-category-grid .unified-product-card .card-link,
.resource-category-grid .unified-product-card .upcoming-cta {
  font-size: 0.79rem !important;
  font-weight: 800 !important;
  line-height: 1.6 !important;
}

.resource-category-grid .unified-product-card .card-link--purchase,
.resource-category-grid .unified-product-card .upcoming-cta--purchase,
.resource-category-grid .unified-product-card a[href*="cart?add="] {
  color: #b65f42 !important;
}

.resource-category-grid .unified-product-card .handwriting-option-price {
  color: #b65f42 !important;
}

.resource-category-grid .unified-product-card a[href*="faith-filled-handwriting-level"],
.resource-category-grid .unified-product-card a[href*="faith-filled-handwriting-complete-writing-journey"] {
  color: #2f503f !important;
}

/* Uniform card rows: image first, content immediately below, spare room last. */
@media (min-width: 701px) {
  .resource-category-grid .unified-product-card {
    display: grid !important;
    grid-template-rows: clamp(320px, 29vw, 442px) minmax(0, 1fr) !important;
    align-content: start !important;
  }

  .resource-category-grid .unified-product-card > .resource-image-wrap,
  .resource-category-grid .unified-product-card > .upcoming-image-wrap,
  .resource-category-grid .unified-product-card > .upcoming-image {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 700px) {
  .resource-category-grid .unified-product-card {
    display: grid !important;
    grid-template-rows: 155px minmax(0, 1fr) !important;
    align-content: start !important;
  }
}

.resource-category-grid .unified-product-card > .resource-content,
.resource-category-grid .unified-product-card > .upcoming-content,
.resource-category-grid .unified-product-card > .upcoming-copy {
  justify-content: flex-start !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.resource-category-grid .unified-product-card:not(.mockup-featured) img,
.resource-category-grid .unified-product-card:not(.mockup-featured):hover img {
  transform: scale(1.45) !important;
}
