/*
  Isolated Featured Items styles
  IMPORTANT: All selectors prefixed with .featured-items- to avoid inheritance/leaks
*/

.featured-items-strip {
  --fi-card-width: 168px; /* ~30% smaller than typical 240px cards */
  --fi-image-height: 112px; /* fixed to prevent CLS, ~2:3 ratio */
  --fi-gap: 8px;
  --fi-title-size: 1rem;
  --fi-price-size: 0.95rem;
  --fi-muted: #6c757d;

  margin: 12px 0 8px 0;
  padding: 0 8px;
}

.featured-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.featured-items-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.featured-items-nav {
  display: flex;
  gap: 6px;
}

.featured-items-nav-btn {
  appearance: none;
  border: 1px solid #ced4da;
  background: #fff;
  color: #333;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
}

.featured-items-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: var(--fi-gap);
  scroll-behavior: smooth;
  padding-bottom: 6px; /* room for scrollbar */
}

.featured-items-row::-webkit-scrollbar {
  height: 8px;
}
.featured-items-row::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

.featured-items-card {
  flex: 0 0 auto !important;
  width: var(--fi-card-width) !important;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.featured-items-imgwrap {
  width: var(--fi-card-width);
  height: var(--fi-image-height);
  display: block;
  background: #f8f9fa;
}

.featured-items-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

.featured-items-body {
  padding: 6px 8px;
}

.featured-items-title-text {
  font-size: 0.86rem; /* slightly smaller so more fits per line */
  line-height: 1.1rem;
  height: 2.2rem; /* ~2 lines on desktop */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* default: 2 lines on desktop */
  -webkit-box-orient: vertical;
  margin: 0 0 4px 0;
}

.featured-items-price {
  font-size: var(--fi-price-size);
  font-weight: 600;
}

/* Compact on small screens but keep single row, no wrap */
@media (max-width: 576px) {
  .featured-items-strip { padding: 0 6px; }
  .featured-items-title { font-size: 1rem; }
  .featured-items-row { gap: 6px; }
  /* On small screens allow up to 3 lines and slightly smaller font to reduce truncation */
  .featured-items-title-text {
    font-size: 0.82rem;
    height: 3.3rem; /* ~3 lines on mobile */
    -webkit-line-clamp: 3;
  }
}
