/* ==========================================================================
   Smart Contextual Recipe Ribbon — compact discovery strip
   ========================================================================== */

.kf-smart-ribbon {
  background: #fdf9f5;
  border-top: 1px solid #e8e2d9;
  border-bottom: 1px solid #e8e2d9;
  padding: 12px 0 14px;
  margin-bottom: 0;
  overflow: hidden;
}

/* --- Header row: label + arrows inline --- */
.kf-smart-ribbon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kf-smart-ribbon-titles {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kf-smart-ribbon-label {
  font-size: 14px;
  font-weight: 700;
  color: #2B354F;
  margin: 0;
  line-height: 1;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.kf-smart-ribbon-sublabel {
  font-size: 12px;
  color: #8a7e6e;
  margin: 0;
  font-weight: 400;
  white-space: nowrap;
}

/* --- Arrow buttons --- */
.kf-smart-ribbon-nav {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.kf-ribbon-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #e8e2d9;
  background: #fff;
  color: #2B354F;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}

.kf-ribbon-arrow svg {
  width: 14px;
  height: 14px;
}

.kf-ribbon-arrow:hover {
  background: #f5f0ea;
  border-color: #c4714b;
}

.kf-ribbon-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.kf-ribbon-arrow:disabled:hover {
  background: #fff;
  border-color: #e8e2d9;
}

/* --- Scrollable track --- */
.kf-smart-ribbon-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.kf-smart-ribbon-track::-webkit-scrollbar {
  display: none;
}

/* --- Individual card — compact horizontal layout --- */
.kf-ribbon-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e8e2d9;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding-right: 12px;
}

.kf-ribbon-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(120, 90, 50, 0.1);
  text-decoration: none;
  color: inherit;
}

/* --- Card image — small square thumb --- */
.kf-ribbon-card-img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  overflow: hidden;
}

.kf-ribbon-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Card body --- */
.kf-ribbon-card-body {
  padding: 6px 0;
  min-width: 0;
}

.kf-ribbon-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: #2B354F;
  line-height: 1.3;
  margin-bottom: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 150px;
}

.kf-ribbon-card-meta {
  display: flex;
  gap: 4px;
}

.kf-ribbon-card-stat {
  font-size: 10px;
  font-weight: 500;
  color: #8a7e6e;
  white-space: nowrap;
}

.kf-ribbon-card-stat + .kf-ribbon-card-stat::before {
  content: "·";
  margin-right: 4px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px) {
  .kf-smart-ribbon {
    padding: 10px 0 12px;
  }

  .kf-smart-ribbon-titles {
    flex-direction: column;
    gap: 0;
  }

  .kf-smart-ribbon-label {
    font-size: 12px;
  }

  .kf-smart-ribbon-sublabel {
    display: none;
  }

  .kf-ribbon-card-img {
    width: 56px;
    height: 56px;
  }

  .kf-ribbon-card-title {
    font-size: 12px;
    max-width: 120px;
  }

  .kf-ribbon-card-stat {
    font-size: 9px;
  }

  .kf-smart-ribbon-nav {
    display: none;
  }

  .kf-smart-ribbon-track {
    gap: 8px;
  }

  .kf-ribbon-card {
    padding-right: 10px;
    gap: 8px;
  }
}
