/* Import Google Font - Open Sans */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600&display=swap');

/* Affiliate Products Section - Modern Design CSS */
.aff-products-section {
  font-family: 'Open Sans', 'Roboto', sans-serif;
  font-size: 17px; /* Default text size set to 17px */
  max-width: 100%;
  margin: 20px auto;
  padding: 15px;
  box-sizing: border-box;
  /* Border removed as requested */
  isolation: isolate; /* Isolate this component to prevent style conflicts */
}

.aff-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.aff-main-header {
  background: linear-gradient(90deg, #6a5af9 0%, #e93a9a 100%);
  color: white;
  text-align: center;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.aff-main-header .aff-header-h4 {
  margin: 0;
  font-size: 24px; /* Increased to be proportional to the new default text size */
  font-weight: 500;
  letter-spacing: 0.2px;
  display: block;
}

.aff-products-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 20px;
  width: 100%;
}

/* Responsive grid layout based on available space */
@media (min-width: 300px) {
  .aff-products-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (min-width: 301px) and (max-width: 550px) {
  .aff-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 551px) {
  .aff-products-grid {
    grid-template-columns: repeat(4, 1fr);
}
  .aff-center-products {
    justify-content: center;
  }
  }
}

.aff-product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.aff-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.aff-product-header-1 {
  background-color: #ff9800;
  color: white;
  padding: 12px;
  text-align: center;
}

.aff-product-header-2 {
  background-color: #4caf50;
  color: white;
  padding: 12px;
  text-align: center;
}

.aff-product-header-3 {
  background-color: #f44336;
  color: white;
  padding: 12px;
  text-align: center;
}

.aff-product-header-4 {
  background-color: #00bcd4;
  color: white;
  padding: 12px;
  text-align: center;
}

.aff-product-header-1 .aff-header-h5,
.aff-product-header-2 .aff-header-h5,
.aff-product-header-3 .aff-header-h5,
.aff-product-header-4 .aff-header-h5 {
  margin: 0;
  font-size: 20px; /* Increased to be proportional to the new default text size */
  font-weight: 500;
  letter-spacing: 0.2px;
  display: block;
}

.aff-product-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.aff-product-image-container {
  padding: 15px;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 180px;
}

.aff-product-image {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.aff-features-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 10px;
}

.aff-feature-blue,
.aff-feature-yellow {
  width: 100%;
  padding: 8px;
  text-align: center;
  border-radius: 4px;
  font-weight: 400;
  font-size: 17px; /* Updated to match default text size */
  letter-spacing: 0.1px;
}

.aff-feature-blue {
  background-color: #e6f3ff;
  color: #0066cc;
}

.aff-feature-yellow {
  background-color: #fff8e6;
  color: #996600;
}

.aff-product-description {
  margin: 15px 10px;
  text-align: center;
  color: #616161;
  font-size: 17px; /* Updated to match default text size */
  line-height: 1.4;
  letter-spacing: 0.1px;
  font-weight: 400;
  flex-grow: 1;
}

.aff-button-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 15px;
  margin-top: auto;
}

.aff-cta-button {
  display: inline-block;
  background-color: #1976d2;
  color: white;
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 17px; /* Updated to match default text size */
  letter-spacing: 0.2px;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.aff-cta-button:hover {
  background-color: #1565c0;
  text-decoration: underline;
  font-size: 19px; /* Slightly larger than the default 17px */
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* Ensure all links in the affiliate section have a unique hover effect */
.aff-products-section a:hover {
  text-decoration: underline;
  font-size: larger;
  font-weight: bold;
  color: white;
  background-color: #1565c0;
  transition: all 0.3s ease;
}

/* Class for other links in the affiliate section */
.aff-link {
  color: #1976d2;
  text-decoration: none;
  transition: all 0.3s ease;
}

.aff-link:hover {
  text-decoration: underline;
  font-size: larger;
  font-weight: bold;
  color: white;
  background-color: #1565c0;
}

/* Ensure these hover styles don't affect links outside this component */
/* The isolation property is already set in the main .aff-products-section class */
