/* ==========================================================================
   Featured Products Grid Section Styles
   ========================================================================== */

.af-featured-products-section {
  padding: var(--spacing-section) 0;
  background-color: var(--surface-color-muted-dark);
}


/* Header Row Layout */
.af-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  /* Slightly reduced gap so it fits better on mobile */
  margin-bottom: var(--spacing-sm);
  flex-wrap: nowrap;
  /* CHANGED: Prevents the link from dropping to the next line */
}

/* Reset margin for the heading when in a flex row */
.af-section-header-row .af-section-heading {
  margin-bottom: 0;
  text-transform: uppercase;
  flex: 1 1 auto;
  /* Allows the title to take up available space safely */
}

/* View All Link */
.af-view-all-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-weight: 600;
  font-size: 1rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  /* ADDED: Forces the button to keep its shape and not get squished */
}

.af-view-all-link:hover {
  color: var(--primary-color-dark);
  transform: translateX(4px);
}

.af-view-all-link i {
  font-size: 0.875rem;
}

/* Divider below header */
.af-heading-divider {
  width: 72px;
  height: 4px;
  background-color: var(--accent-color);
  margin-bottom: var(--spacing-xl);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Product Card Styles
   ========================================================================== */

.af-product-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(2, 65, 38, 0.04) 0%, var(--surface-color) 28%);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  border: 1px solid rgba(2, 65, 38, 0.12);
  height: 100%;
}

.af-product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 65, 38, 0.2);
}

/* Image Wrapper */
.af-product-image-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(2, 65, 38, 0.95), rgba(2, 65, 38, 0.72));
}

.af-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  opacity: 0.92;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.af-product-card:hover .af-product-image {
  transform: scale(1.05);
  opacity: 1;
}

/* Category Badge overlay */
.af-badge-category {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  background-color: var(--secondary-color);
  color: var(--primary-color-dark);
  padding: 0.35rem 0.8rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
}

/* Content Area */
.af-product-content {
  display: flex;
  flex-direction: column;
  padding: var(--spacing-lg);
  flex-grow: 1;
}

.af-product-title {
  margin-bottom: var(--spacing-xs);
  color: var(--primary-color);
  font-size: 1.25rem;
  line-height: 1.3;
}

.af-product-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

/* Action Buttons Container */
.af-product-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: auto;
}

.af-action-btn {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
}

.af-desktop-action {
  display: inline-flex;
}

.af-mobile-action {
  display: none;
}

.af-product-actions .af-btn-primary {
  background-color: var(--primary-color);
  color: var(--surface-color);
}

.af-product-actions .af-btn-primary:hover {
  background-color: var(--primary-color-dark);
}

.af-product-actions .af-btn-outline {
  border-color: rgba(2, 65, 38, 0.35);
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.65);
}

.af-product-actions .af-btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--surface-color);
  border-color: var(--primary-color);
}

/* Tablet and up */
@media (min-width: 768px) {
  .af-product-actions {
    flex-direction: row;
  }

  .af-action-btn {
    flex: 1;
  }
}

/* Mobile WhatsApp behavior */
@media (max-width: 767px) {
  .af-desktop-action {
    display: none !important;
  }

  .af-mobile-action {
    display: inline-flex;
  }
}