/*
 * Content-managed collection components.
 *
 * These class names are a public styling contract: they may be stored in
 * WordPress page content and therefore cannot be considered unused only
 * because they do not occur in the theme's PHP templates.
 */

.pc-section {
  padding-block: 50px;
}

.pc-recipient-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.pc-recipient-card {
  padding: 20px;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  background: var(--pc-surface);
  text-align: center;
  box-shadow: 0 5px 18px rgba(33, 55, 70, .035);
  transition: transform .2s ease, box-shadow .2s ease;
}

.pc-recipient-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(33, 55, 70, .08);
}

.pc-round-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #f7e4e0;
  color: var(--pc-accent);
}

.pc-recipient-card strong,
.pc-recipient-card small {
  display: block;
}

.pc-recipient-card small {
  margin-top: 5px;
  color: #777;
}

.pc-recipient-card:nth-child(6n + 1) .pc-round-icon { background: #f8dfe2; color: #c84452; }
.pc-recipient-card:nth-child(6n + 2) .pc-round-icon { background: #f8ead0; color: #a97419; }
.pc-recipient-card:nth-child(6n + 3) .pc-round-icon { background: #dfecef; color: #2e6476; }
.pc-recipient-card:nth-child(6n + 4) .pc-round-icon { background: #eee3f2; color: #765084; }
.pc-recipient-card:nth-child(6n + 5) .pc-round-icon { background: #e1eedf; color: #4e7750; }
.pc-recipient-card:nth-child(6n) .pc-round-icon { background: #f5e5d8; color: #a76135; }

.pc-age-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pc-age-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border: 1px solid #ded8ce;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease, border-color .2s ease;
}

.pc-age-pill:hover {
  transform: translateY(-3px);
  border-color: var(--pc-accent);
}

.pc-age-pill strong {
  font-size: 28px;
  line-height: 1;
}

.pc-age-pill span {
  margin-top: 4px;
  font-size: 12px;
}

.pc-age-pill:nth-child(4n + 1) { background: #fff2f2; }
.pc-age-pill:nth-child(4n + 2) { background: #fff7e7; }
.pc-age-pill:nth-child(4n + 3) { background: #edf6f7; }
.pc-age-pill:nth-child(4n) { background: #f3edf6; }

.pc-occasion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pc-occasion-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid #e5dfd5;
  border-radius: var(--pc-radius);
  background: #fff;
}

.pc-occasion-card > span {
  display: grid;
  flex: 0 0 45px;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #f7e4e0;
  color: var(--pc-accent);
}

.pc-occasion-card > div {
  min-width: 0;
  flex: 1;
}

.pc-occasion-card strong,
.pc-occasion-card small {
  display: block;
}

.pc-occasion-card small {
  margin-top: 3px;
  color: #777;
}

.pc-occasion-card:nth-child(1) > span { background: #f8dfe2; color: #c84452; }
.pc-occasion-card:nth-child(2) > span { background: #f8ead0; color: #a97419; }
.pc-occasion-card:nth-child(3) > span { background: #dfecef; color: #2e6476; }
.pc-occasion-card:nth-child(4) > span { background: #e1eedf; color: #4e7750; }

.pc-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.pc-category-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 280px;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--pc-radius);
  background: #e8e5df;
}

.pc-category-card > img,
.pc-category-card > picture,
.pc-category-card > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pc-category-card > img,
.pc-category-card > picture > img {
  object-fit: cover;
}

.pc-category-card > div {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75));
  color: #fff;
}

.pc-category-card h3 {
  margin: 50px 0 5px;
  color: inherit;
  font-size: 25px;
}

.pc-category-card:nth-child(4n + 1) { background: linear-gradient(135deg, #dfecef, #9fc1ca); }
.pc-category-card:nth-child(4n + 2) { background: linear-gradient(135deg, #f8dfe2, #eaa7ae); }
.pc-category-card:nth-child(4n + 3) { background: linear-gradient(135deg, #f8ead0, #dfbd72); }
.pc-category-card:nth-child(4n) { background: linear-gradient(135deg, #e6ddeb, #bba4c7); }

/* Native WooCommerce sub-category cards (e.g. child collections under "Pour qui"). */
.woocommerce ul.products li.product-category.product {
  min-width: 0;
}

.woocommerce ul.products li.product-category.product > a {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
}

.woocommerce ul.products li.product-category.product a img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
}

.woocommerce ul.products li.product-category.product .woocommerce-loop-category__title {
  margin: 0;
  padding: 0 !important;
  color: var(--v47-ink, #12364b);
  font-size: 15px !important;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.woocommerce ul.products li.product-category.product .count {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--v47-muted, #687d89);
  font-size: .78em;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .pc-recipient-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pc-category-grid,
  .pc-occasion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .pc-section {
    padding-block: 28px;
  }

  .pc-recipient-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pc-recipient-card,
  .pc-occasion-card {
    padding: 14px;
  }

  .pc-category-grid {
    gap: 10px;
  }

  .pc-category-card {
    min-height: clamp(170px, 48vw, 230px);
  }

  .pc-category-card > div {
    padding: 16px;
  }

  .pc-category-card h3 {
    margin-top: 34px;
    font-size: clamp(17px, 4.8vw, 21px);
  }

  .pc-occasion-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .woocommerce ul.products li.product-category.product .woocommerce-loop-category__title {
    font-size: 13px !important;
    line-height: 1.2;
  }
}

@media (max-width: 350px) {
  .pc-category-grid,
  .pc-recipient-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-recipient-card,
  .pc-age-pill {
    transition: none;
  }
}
