/* Hub and affiliate collection pages (home-style tiles, no hero background) */

.affiliate-main-wrapper {
  position: relative;
  min-height: calc(100vh - 120px);
  background: #fff;
}

.affiliate-content-area {
  position: relative;
  padding: 1.5rem;
}

.affiliate-intro-section {
  background: rgba(254, 239, 243, 0.92);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.affiliate-intro-section p {
  color: var(--green-deep, #003300);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.affiliate-intro-section p:last-child {
  margin-bottom: 0;
}

.affiliate-hub-tiles {
  background: transparent;
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 100%;
}

.affiliate-hub-tiles > .tile-link {
  min-width: 0;
  display: block;
  text-decoration: none;
  color: inherit;
}

.affiliate-hub-tiles > .tile-link .tile {
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(33, 78, 0, 0.12);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.affiliate-hub-tiles > .tile-link:hover .tile,
.affiliate-hub-tiles > .tile-link:focus-visible .tile {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

@media (max-width: 992px) {
  .affiliate-hub-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .affiliate-hub-tiles {
    grid-template-columns: 1fr;
  }
}

.affiliate-hub-tiles .tile-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  justify-content: center;
}

.affiliate-hub-tiles .tile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--berry, #600329);
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.affiliate-hub-tiles .tile-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.affiliate-hub-tiles .tile-heading .recipe-title-b {
  margin: 0;
  font-size: 1.35rem;
}

.affiliate-hub-tiles .affiliate-tile-icon {
  width: 100%;
  max-width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto 1rem;
  border-radius: 8px;
}

.affiliate-hub-tiles .recipe-description p {
  margin: 0;
  color: var(--green-deep, #003300);
  line-height: 1.6;
  font-size: 0.98rem;
}

/* Collection detail pages */
.affiliate-collection-page {
  padding-bottom: 2.5rem;
}

.affiliate-collection-hero {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
}

.affiliate-collection-hero h1 {
  color: var(--berry, #600329);
  margin-bottom: 1rem;
}

.affiliate-collection-hero p {
  color: var(--green-deep, #003300);
  line-height: 1.7;
}

.affiliate-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.affiliate-product-card {
  background: #fff;
  border: 1px solid rgba(33, 78, 0, 0.12);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.affiliate-product-card .affiliate-product-image-link {
  display: block;
  margin-bottom: 0.75rem;
  line-height: 0;
}

.affiliate-product-card .affiliate-product-image-link img,
.affiliate-product-card > img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  margin-bottom: 0;
  background: #fafafa;
}

.affiliate-product-card h2 {
  font-size: 1.15rem;
  color: var(--berry, #600329);
  margin-bottom: 0.5rem;
}

.affiliate-product-card p {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--green-deep, #003300);
  margin-bottom: 1rem;
}

.affiliate-shop-link {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: var(--berry, #600329);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  text-align: center;
  font-size: 0.95rem;
}

.affiliate-shop-link:hover {
  background: #7a0435;
  color: #fff;
}

.affiliate-disclaimer {
  max-width: 44rem;
  margin: 2.5rem auto 0;
  padding: 0 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--green-deep, #003300);
  text-align: center;
  opacity: 0.9;
}

.affiliate-back-link {
  display: block;
  text-align: center;
  margin: 1.5rem 0 0;
}
