.kanews-reels-grid {
  --reels-cols: 6;
  display: grid;
  grid-template-columns: repeat(min(2, var(--reels-cols)), minmax(0, 1fr));
  gap: 12px 8px;
}

.kanews-reels-grid__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.kanews-reels-grid__thumb {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}

.kanews-reels-grid__thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kanews-reels-grid__user {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.kanews-reels-grid__thumb::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
  pointer-events: none;
}

.kanews-reels-grid__user img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.kanews-reels-grid__user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanews-reels-grid__caption {
  display: -webkit-box;
  margin: 6px 2px 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 576px) {
  .kanews-reels-grid {
    grid-template-columns: repeat(min(3, var(--reels-cols)), minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .kanews-reels-grid {
    grid-template-columns: repeat(var(--reels-cols), minmax(0, 1fr));
  }
}

/* Kesfet page strip: same cards, laid out as a horizontal scroller. */
.kanews-feed-reels {
  width: 100%;
  padding: 15px;
  transition: opacity 0.15s ease;
}

/* A filter tab with no matching reels renders nothing at all. */
.kanews-feed-reels:empty {
  display: none;
}

.kanews-feed-reels.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.kanews-feed-reels__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.kanews-feed-reels__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.kanews-feed-reels__all {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--kan-theme-color, #e50914);
  text-decoration: none;
}

.kanews-feed-reels__all:hover {
  text-decoration: underline;
}

.kanews-reels-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.kanews-reels-strip::-webkit-scrollbar {
  display: none;
}

.kanews-reels-strip > .kanews-reels-grid__item {
  flex: 0 0 auto;
  width: 108px;
  scroll-snap-align: start;
}

.kanews-reels-strip__more-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, #1f1f28, #000);
}

.kanews-reels-strip__more-thumb::after {
  content: none;
}

.kanews-reels-strip__more-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.kanews-reels-strip__more-text {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .kanews-reels-strip > .kanews-reels-grid__item {
    width: 112px;
  }
}
