/* Community shelf — "From local creators to global brands" */

.community-shelf-section {
  padding: 64px 0;
}

.community-shelf-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.community-shelf-intro .eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5533ff;
  margin-bottom: 8px;
}

.community-shelf-intro h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
  color: #1a1a1a;
  max-width: 640px;
  margin: 0;
}

.community-cat-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 28px -20px 0;
  padding: 0 20px;
}

.community-cat-slider::-webkit-scrollbar {
  display: none;
}

.community-cat-chip {
  flex: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(26, 26, 26, 0.15);
  background: #fff;
  color: #81827d;
  border-radius: 999px;
  padding: 9px 18px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.community-cat-chip:hover {
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.community-cat-chip[aria-current="true"] {
  background: #5533ff;
  border-color: #5533ff;
  color: #fff;
}

.community-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 16px;
}

.community-shelf-head h3 {
  font-size: 21px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0;
}

.community-shelf-head .more {
  font-size: 16px;
  font-weight: 500;
  color: #5533ff;
  white-space: nowrap;
}

.community-railwrap {
  position: relative;
}

.community-rail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -20px;
  padding: 4px 20px 6px;
}

.community-rail::-webkit-scrollbar {
  display: none;
}

.community-card {
  flex: 0 0 200px;
  display: block;
  color: inherit;
  text-decoration: none;
}

.community-card .ph {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: #ecece8;
}

.community-card .ph .cover {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card .ph .fallback {
  display: block;
  position: absolute;
  inset: 0;
  background: #faf0fe;
}

.community-card:nth-child(3n + 2) .ph .fallback {
  background: #f0f6d9;
}

.community-card:nth-child(3n) .ph .fallback {
  background: #e8e6ff;
}

.community-card .ph .avatar {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #81827d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.community-card .ph .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card .info {
  display: block;
  padding: 10px 2px 0;
}

.community-card .info h4 {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-nav-btn {
  position: absolute;
  top: calc((200px * 1.25) / 2 - 18px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(26, 26, 26, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: #81827d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.72;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  z-index: 5;
}

.community-railwrap:hover .community-nav-btn {
  opacity: 0.92;
}

.community-nav-btn:hover {
  opacity: 1;
  color: #1a1a1a;
  border-color: rgba(26, 26, 26, 0.15);
}

.community-nav-btn:focus-visible {
  opacity: 1;
  color: #1a1a1a;
}

.community-nav-btn.prev {
  left: -18px;
}

.community-nav-btn.next {
  right: -18px;
}

@media screen and (max-width: 1200px) {
  .community-nav-btn.prev {
    left: 6px;
  }
  .community-nav-btn.next {
    right: 6px;
  }
}

@media screen and (max-width: 780px) {
  .community-nav-btn {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .community-shelf-section {
    padding: 48px 0;
  }
  .community-shelf-intro h2 {
    font-size: 20px;
    line-height: 1.3;
  }
}

@media screen and (max-width: 480px) {
  .community-card {
    flex-basis: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-rail {
    scroll-behavior: auto;
  }
}
