/* Wedding Market Index — violet accent (matches site brand, no red undertone) */
.market-index-strip {
  padding: 0.35rem 0 0.15rem;
  background: transparent;
}

.market-index-widget {
  border-radius: 16px;
  border: 1px solid #ede9fe;
  background: linear-gradient(180deg, #fafaff 0%, #f5f3ff 100%);
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.06);
  padding: 0.65rem 0.75rem 0.55rem;
}

.market-widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  padding: 0 0.15rem;
}

.market-widget-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  color: #8b5cf6;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.market-widget-titles {
  flex: 1;
  min-width: 0;
}

.market-widget-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e1b2d;
  line-height: 1.2;
}

.market-widget-sub {
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}

.market-mock-banner {
  display: none;
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.market-mock-banner.visible {
  display: inline-block;
}

.market-index-status {
  margin: 0 0 0.4rem;
  padding: 0 0.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: #7c3aed;
  min-height: 0.9rem;
}

.market-index-status:empty {
  display: none;
}

.market-marquee-viewport {
  overflow: hidden;
  width: 100%;
  min-height: 5.75rem;
  direction: ltr;
  text-align: left;
}

.market-marquee-viewport.is-hidden {
  display: none;
}

.market-marquee-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: max-content;
  direction: ltr;
  will-change: transform;
}

.market-marquee-chunk {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 0.55rem;
  padding-inline-end: 0.55rem;
}

.market-card {
  flex: 0 0 148px;
  width: 148px;
  border-radius: 12px;
  padding: 0.5rem 0.55rem 0.35rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.market-card-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
  direction: rtl;
  text-align: right;
}

.market-card-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  direction: rtl;
}

.market-card-value {
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.1;
  white-space: nowrap;
}

.market-card-value.is-compact {
  font-size: 0.78rem;
  letter-spacing: -0.02em;
}

.market-card-change {
  font-size: 0.62rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.market-card-change.up {
  color: #8b5cf6;
}

.market-card-change.down {
  color: #94a3b8;
}

.market-card-change.flat {
  color: #94a3b8;
}

.market-sparkline {
  margin-top: 0.35rem;
  height: 36px;
  width: 100%;
}

.market-sparkline svg {
  display: block;
  width: 100%;
  height: 100%;
}

.market-sparkline path.line {
  fill: none;
  stroke: #c4b5fd;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.market-sparkline path.area {
  opacity: 0.75;
}

/* Loading skeleton cards */
.market-card.is-loading {
  border-color: #ede9fe;
  background: #fff;
}

.market-shimmer {
  display: inline-block;
  border-radius: 4px;
  background: linear-gradient(90deg, #ede9fe 0%, #f5f3ff 45%, #ede9fe 90%);
  background-size: 200% 100%;
  animation: market-shimmer 1.4s ease-in-out infinite;
}

.market-shimmer-value {
  width: 3.2rem;
  height: 0.85rem;
}

.market-shimmer-pct {
  width: 2.2rem;
  height: 0.55rem;
}

.market-sparkline-skeleton {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ede9fe 0%, #f5f3ff 40%, #ddd6fe 60%, #f5f3ff 100%);
  background-size: 220% 100%;
  animation: market-shimmer 1.6s ease-in-out infinite;
  opacity: 0.85;
}

@keyframes market-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

#market-index + #product-tour {
  padding-top: 0.5rem;
}

@media (min-width: 768px) {
  #market-index + #product-tour {
    padding-top: 0.65rem;
  }

  .market-index-strip {
    padding: 0.25rem 0 0.1rem;
  }

  .market-card {
    flex: 0 0 158px;
    width: 158px;
  }

  .market-widget-title {
    font-size: 0.98rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-marquee-viewport {
    overflow-x: auto;
  }
}
