/* =========================================================
   CPP HOMEPAGE CATEGORY CARDS

   Loaded from:
   snippets/cpp/cpp_homepage-categories.liquid

   Purpose:
   Modular homepage category card grid.
   Update cards inside the snippet only:
   - image asset filename
   - card title
   - card text
   - button label
   - button/category URL

   Copy to future stores:
   1. Upload category images into assets/cpp/
   2. Copy this CSS asset
   3. Copy snippets/cpp/cpp_homepage-categories.liquid
   4. Include snippet on homepage/theme where desired
========================================================= */

.cpp-home-cats {
  width: 100%;
  padding: clamp(32px, 5vw, 72px) clamp(16px, 4vw, 48px);
  background: var(--cpp-home-cats-bg, #f7f4f3);
}

.cpp-home-cats__inner {
  max-width: 1320px;
  margin: 0 auto;
}

.cpp-home-cats__header {
  max-width: 760px;
  margin: 0 auto clamp(24px, 4vw, 44px);
  text-align: center;
}

.cpp-home-cats__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cpp-primary, #3cb4e5);
}

.cpp-home-cats__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--cpp-navy);
}

.cpp-home-cats__intro {
  max-width: 580px;
  margin: 16px auto 0;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55;
  color: var(--cpp-text-muted, #566e86);
}

.cpp-home-cats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.cpp-home-cat-card {
  position: relative;
  overflow: hidden;
  min-height: clamp(360px, 40vw, 520px);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(17, 36, 64, 0.12);
  isolation: isolate;
}

.cpp-home-cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(17, 36, 64, 0.08) 0%,
      rgba(17, 36, 64, 0.12) 38%,
      rgba(17, 36, 64, 0.82) 100%
    );
  pointer-events: none;
}

.cpp-home-cat-card__image {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cpp-home-cat-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.2);
  transition: transform 450ms ease;
}

.cpp-home-cat-card:hover .cpp-home-cat-card__image img {
  transform: scale(1.3);
}

.cpp-home-cat-card__content {
  position: absolute;
  left: clamp(18px, 2vw, 28px);
  right: clamp(18px, 2vw, 28px);
  bottom: clamp(18px, 2vw, 28px);
  z-index: 3;
  color: #ffffff;
}

.cpp-home-cat-card__kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--cpp-accent, #fcee21);
  color: var(--cpp-dark, #262625);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cpp-home-cat-card__title {
  color: #f7f4f3;
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.cpp-home-cat-card__text {
  max-width: 420px;
  margin: 12px 0 20px;
  font-size: 1rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.cpp-home-cat-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--cpp-navy, #112440);
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition:
    transform 200ms ease,
    background-color 200ms ease,
    color 200ms ease;
}

.cpp-home-cat-card__btn::after {
  content: "→";
  font-size: 1.05rem;
  line-height: 1;
  transform: translateY(-1px);
}

.cpp-home-cat-card__btn:hover,
.cpp-home-cat-card__btn:focus {
  background: var(--cpp-primary);
  color: var(--cpp-page-bg);
  transform: translateY(-2px);
}

/* Featured larger first card option */
.cpp-home-cats__grid--featured .cpp-home-cat-card:first-child {
  grid-column: span 2;
}

/* Mobile */
@media (max-width: 991px) {
  .cpp-home-cats__grid,
  .cpp-home-cats__grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cpp-home-cats__grid--featured .cpp-home-cat-card:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .cpp-home-cats {
    padding-left: 14px;
    padding-right: 14px;
  }

  .cpp-home-cats__grid,
  .cpp-home-cats__grid--featured {
    grid-template-columns: 1fr;
  }

  .cpp-home-cats__grid--featured .cpp-home-cat-card:first-child {
    grid-column: auto;
  }

  .cpp-home-cat-card {
    min-height: 420px;
    border-radius: 24px;
  }

  .cpp-home-cats__header {
    text-align: left;
  }

  .cpp-home-cats__intro {
    margin-left: 0;
    margin-right: 0;
  }
}