/**
 * Bloques de recomendación en recetas (hub + detalle) — motor recommendations.js
 */

.cg-detail-smart {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(23, 55, 39, 0.14);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.92), rgba(238, 247, 233, 0.72));
  box-shadow: 0 14px 38px rgba(18, 63, 45, 0.08);
  display: grid;
  gap: 10px;
}

.cg-detail-smart strong {
  display: block;
  color: #123f2d;
  font-family: Outfit, Inter, sans-serif;
  font-size: 1.02rem;
}

.cg-detail-smart p {
  margin: 5px 0 4px;
  color: #667567;
  line-height: 1.45;
  font-size: 0.9rem;
}

.cg-detail-smart a:not(.cg-detail-smart-link) {
  display: block;
  padding: 10px 0;
  border-top: 1px solid rgba(23, 55, 39, 0.1);
  font-weight: 900;
  color: #123f2d;
  text-decoration: none;
}

.cg-detail-smart a:not(.cg-detail-smart-link):hover {
  color: #2f7d57;
}

.cg-detail-smart small {
  display: block;
  margin-top: 3px;
  color: #667567;
  font-weight: 700;
}

/* Tarjeta de sugerencia — recetas (sidebar + «También puede encajarte») */
.cg-content-pick-card,
.side-card .cg-recipe-related-link,
.cg-detail-smart .cg-detail-smart-link {
  text-decoration: none;
  color: #123f2d;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(23, 55, 39, 0.1);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(9, 39, 26, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.cg-content-pick-card:hover,
.side-card .cg-recipe-related-link:hover,
.cg-detail-smart .cg-detail-smart-link:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 125, 87, 0.28);
  box-shadow: 0 14px 32px rgba(9, 39, 26, 0.14);
  color: #2f7d57;
}

.cg-smart-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 55, 39, 0.12);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(238, 247, 233, 0.72));
  box-shadow: 0 8px 24px rgba(18, 63, 45, 0.05);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
}

.cg-smart-note strong {
  display: block;
  color: #123f2d;
  font-family: Outfit, Inter, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
}

.cg-smart-note span {
  display: block;
  color: #7a867d;
  line-height: 1.42;
  margin-top: 2px;
  font-size: 0.78rem;
}

.cg-smart-note button {
  border: 0;
  border-radius: 999px;
  background: #123f2d;
  color: #fff;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.recipe-card.cg-smart-pick {
  outline: 2px solid rgba(217, 155, 69, 0.5);
  box-shadow: 0 20px 52px rgba(18, 63, 45, 0.14);
}

@media (max-width: 680px) {
  .cg-smart-note {
    grid-template-columns: 1fr;
  }

  .cg-smart-note button {
    width: 100%;
  }
}

/* Sidebar detalle receta — «Recomendaciones relacionadas» con miniatura */
.side-card .cg-recipe-related-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.side-card .cg-recipe-related-list > li {
  margin: 0;
  padding: 0;
}

.side-card .cg-recipe-related-link {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.side-card .cg-recipe-related-link:hover {
  transform: translateY(-1px);
}

.side-card .cg-recipe-related-thumb {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  box-shadow: 0 6px 18px rgba(9, 39, 26, 0.12);
}

.side-card .cg-recipe-related-title {
  display: block;
  font-weight: 800;
  line-height: 1.3;
  font-size: 0.92rem;
}

.cg-detail-smart .cg-detail-smart-link {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-top: none;
  font-weight: 900;
}

.cg-detail-smart .cg-detail-smart-link .cg-recipe-related-thumb {
  width: 72px;
  height: 54px;
}

.cg-detail-smart .cg-detail-smart-link small {
  grid-column: 2;
  margin-top: -2px;
}

@media (max-width: 680px) {
  .side-card .cg-recipe-related-link {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .side-card .cg-recipe-related-list {
    gap: 14px;
    margin-bottom: 22px;
  }

  .side-card .cg-recipe-related-thumb {
    width: 76px;
    height: 58px;
  }
}
