/* FiberPart rotating product/topic showcase */
.fp-topic-section,
.fp-topic-section * { box-sizing: border-box; }

.fp-topic-section {
  direction: rtl;
  padding: 12px 0 22px;
  color: var(--text, #2b2330);
}

.fp-topic-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.fp-topic-heading h2 {
  margin: 4px 0 2px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.fp-topic-heading p {
  margin: 0;
  color: var(--muted, #7d7185);
  font-size: 12px;
  line-height: 1.8;
}

.fp-topic-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--orange, #ff6a00);
  font-size: 12px;
  font-weight: 800;
}

.fp-topic-showcase {
  --topic-interval: 5200ms;
  overflow: hidden;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #f1ddd4);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(88, 47, 40, .08);
}

.fp-topic-tabs-shell {
  overflow: hidden;
  border-bottom: 1px solid var(--line, #f1ddd4);
  background: rgba(255,255,255,.92);
}

.fp-topic-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 720px;
}

.fp-topic-tab,
.fp-topic-panel {
  --topic-tone: var(--orange, #ff6a00);
  --topic-soft: #fff0e7;
}
.tone-orange { --topic-tone: var(--orange, #ff6a00); --topic-soft: #fff0e7; }
.tone-purple { --topic-tone: var(--purple, #7b4dff); --topic-soft: #f1edff; }
.tone-red { --topic-tone: var(--red, #ff445d); --topic-soft: #fff0f3; }
.tone-green { --topic-tone: var(--green, #27c38b); --topic-soft: #eafaf4; }
.tone-violet { --topic-tone: var(--violet, #9f52ff); --topic-soft: #f7efff; }

.fp-topic-tab {
  position: relative;
  min-height: 50px;
  padding: 8px 9px 10px;
  border: 0;
  border-left: 1px solid #f3e5df;
  background: transparent;
  color: var(--muted, #7d7185);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.fp-topic-tab:last-child { border-left: 0; }
.fp-topic-tab > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.fp-topic-tab > span i { font-size: 12px; }
.fp-topic-tab:hover { background: #fffaf8; }
.fp-topic-tab.active {
  color: var(--text, #2b2330);
  background: #fff;
  font-weight: 900;
}
.fp-topic-tab.active > span i { color: var(--topic-tone); }
.fp-topic-tab:focus-visible {
  outline: 2px solid var(--topic-tone);
  outline-offset: -3px;
}

.fp-topic-progress {
  position: absolute;
  right: 10px;
  left: 10px;
  bottom: 4px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
}
.fp-topic-tab.active .fp-topic-progress { background: #f2e9e4; }
.fp-topic-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--topic-tone);
}
.fp-topic-tab.active .fp-topic-progress i {
  animation: fpTopicCycle var(--topic-interval) linear forwards;
}
.fp-topic-showcase.is-paused .fp-topic-tab.active .fp-topic-progress i {
  animation-play-state: paused;
}
@keyframes fpTopicCycle { from { width: 0; } to { width: 100%; } }

.fp-topic-stage { position: relative; min-height: 222px; }
.fp-topic-panel {
  display: none;
  grid-template-columns: 1.18fr .82fr;
  align-items: center;
  gap: 22px;
  min-height: 222px;
  padding: 20px 22px;
  animation: fpTopicFade .26s ease;
}
.fp-topic-panel.active { display: grid; }
@keyframes fpTopicFade {
  from { opacity: .18; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.fp-topic-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--topic-tone);
  background: var(--topic-soft);
  font-size: 12px;
  font-weight: 900;
}
.fp-topic-copy h3 {
  margin: 5px 0 6px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}
.fp-topic-copy p {
  max-width: 650px;
  margin: 0 0 11px;
  color: var(--muted, #7d7185);
  font-size: 12px;
  line-height: 1.95;
}
.fp-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.fp-topic-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line, #f1ddd4);
  border-radius: 9px;
  background: #fffaf8;
  color: var(--muted, #7d7185);
  font-size: 12px;
}
.fp-topic-meta b { color: var(--text, #2b2330); font-size: 12px; }
.fp-topic-meta i { color: var(--topic-tone); }
.fp-topic-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--topic-tone);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--topic-tone) 22%, transparent);
  transition: transform .2s ease, filter .2s ease;
}
.fp-topic-action:hover { transform: translateY(-1px); filter: brightness(.97); }

.fp-topic-visual {
  position: relative;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 170px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--topic-tone) 18%, #efe2dc);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--topic-soft), #fff 60%, #fff9f6);
}
.fp-topic-visual::before {
  content: "";
  position: absolute;
  top: -66px;
  left: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--topic-tone) 13%, transparent);
}
.fp-topic-orb {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--topic-tone);
  color: #fff;
  font-size: 19px;
  transform: rotate(-4deg);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--topic-tone) 24%, transparent);
}
.fp-topic-mini-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(245px, 82%);
  padding: 7px 9px;
  border: 1px solid rgba(226, 212, 205, .82);
  border-radius: 10px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 15px rgba(43, 35, 48, .045);
  transition: transform .18s ease, border-color .18s ease;
}
.fp-topic-mini-card:nth-of-type(2) { margin-right: 18px; }
.fp-topic-mini-card:nth-of-type(3) { margin-right: 6px; }
.fp-topic-mini-card:hover { transform: translateX(-2px); border-color: var(--topic-tone); }
.fp-topic-mini-card > i {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: var(--topic-soft);
  color: var(--topic-tone);
}
.fp-topic-mini-card b { display: block; font-size: 12px; }
.fp-topic-mini-card small { display: block; margin-top: 1px; color: var(--muted, #7d7185); font-size: 12px; }

@media (max-width: 760px) {
  .fp-topic-section { padding: 8px 0 18px; }
  .fp-topic-heading { align-items: flex-start; }
  .fp-topic-heading p, .fp-topic-more { display: none; }
  .fp-topic-tabs-shell {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .fp-topic-tabs-shell::-webkit-scrollbar { display: none; }
  .fp-topic-tabs { display: flex; min-width: max-content; }
  .fp-topic-tab { flex: 0 0 132px; width: 132px; min-height: 47px; }
  .fp-topic-stage { min-height: 332px; }
  .fp-topic-panel {
    grid-template-columns: 1fr;
    gap: 11px;
    min-height: 332px;
    padding: 14px;
  }
  .fp-topic-copy h3 { font-size: 16px; }
  .fp-topic-visual { min-height: 145px; }
}

@media (max-width: 460px) {
  .fp-topic-showcase { border-radius: 15px; }
  .fp-topic-panel { padding: 12px; }
  .fp-topic-copy p { font-size: 12px; }
  .fp-topic-meta { gap: 4px; }
  .fp-topic-meta span { padding: 4px 6px; }
  .fp-topic-visual { min-height: 140px; padding: 12px; }
  .fp-topic-orb { width: 42px; height: 42px; font-size: 17px; }
  .fp-topic-mini-card { width: min(235px, 84%); }
}

@media (prefers-reduced-motion: reduce) {
  .fp-topic-panel,
  .fp-topic-tab.active .fp-topic-progress i { animation: none !important; }
  .fp-topic-action,
  .fp-topic-mini-card { transition: none !important; }
}
