/* ═══════════════════════════════════════════════════════════
   Kairox Premium — Design system & feature UI
   ═══════════════════════════════════════════════════════════ */

/* ── Trust / Social proof bar ── */
.kp-trust-bar {
  position: relative;
  z-index: 2;
  padding: 14px 0;
  background: linear-gradient(90deg, rgba(0,240,255,0.06), rgba(168,85,247,0.06), rgba(0,240,255,0.06));
  border-block: 1px solid rgba(0,240,255,0.12);
  overflow: hidden;
}

.kp-trust-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.kp-trust-badges {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.kp-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.kp-trust-badge span:first-child { font-size: 1.1rem; }

.kp-live-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.kp-live-stat strong {
  color: var(--accent-cyan);
  font-weight: 700;
}

.kp-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 12px #00ff88;
  animation: kp-pulse 2s ease infinite;
}

@keyframes kp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ── Flash sale banner ── */
.kp-flash-sale {
  position: relative;
  margin: 0 auto 48px;
  max-width: var(--container-width, 1200px);
  padding: 0 24px;
}

.kp-flash-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,180,0,0.12), rgba(255,80,80,0.08));
  border: 1px solid rgba(255,180,0,0.35);
  overflow: hidden;
}

.kp-flash-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(255,200,0,0.15), transparent 55%);
  pointer-events: none;
}

.kp-flash-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255,180,0,0.2);
  color: #ffc107;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.kp-flash-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.kp-flash-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.kp-flash-timer {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.kp-flash-unit {
  text-align: center;
  min-width: 56px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
}

.kp-flash-unit strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffc107;
  line-height: 1;
}

.kp-flash-unit small {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

.kp-flash-progress {
  grid-column: 1 / -1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.kp-flash-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffc107, #ff6b6b);
  border-radius: inherit;
  transition: width 1s ease;
}

/* ── Community / vendors ── */
.kp-community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.kp-vendor-card {
  position: relative;
  padding: 24px;
  border-radius: 16px;
  background: var(--bg-card, rgba(255,255,255,0.03));
  border: 1px solid rgba(0,240,255,0.12);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.kp-vendor-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,240,255,0.35);
  box-shadow: var(--shadow-glow, 0 0 40px rgba(0,240,255,0.12));
}

.kp-vendor-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.kp-vendor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-main);
  color: #0a0a0f;
}

.kp-vendor-month {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffc107, #ff6b6b);
  color: #0a0a0f;
  font-size: 0.68rem;
  font-weight: 800;
}

.kp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.kp-gallery-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.kp-gallery-card:hover { transform: scale(1.02); }

.kp-gallery-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(0,240,255,0.08), rgba(168,85,247,0.12));
}

.kp-gallery-body { padding: 16px; }

/* ── CTA section ── */
.kp-cta-section {
  position: relative;
  padding: 72px 0;
  overflow: hidden;
}

.kp-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,240,255,0.1), transparent 65%);
  pointer-events: none;
}

.kp-cta-box {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 32px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(0,240,255,0.2);
  box-shadow: var(--shadow-glow);
}

.kp-cta-box h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 12px;
}

.kp-cta-box p {
  color: var(--text-secondary);
  margin: 0 0 24px;
  line-height: 1.7;
}

.kp-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Accent picker ── */
.accent-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.accent-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, border-color 0.2s;
}

.accent-dot:hover { transform: scale(1.15); }

.accent-dot.active {
  border-color: #fff;
  box-shadow: 0 0 10px currentColor;
}

.accent-dot[data-accent="cyan"] { background: #00f0ff; color: #00f0ff; }
.accent-dot[data-accent="purple"] { background: #a855f7; color: #a855f7; }
.accent-dot[data-accent="green"] { background: #00ff88; color: #00ff88; }
.accent-dot[data-accent="pink"] { background: #ff0080; color: #ff0080; }

.nav-link--shop.has-sale::after {
  content: '٪';
  position: absolute;
  top: -4px;
  inset-inline-end: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff6b6b;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-link--shop { position: relative; }

/* ── Onboarding modal ── */
.kp-onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

.kp-onboard-overlay.active {
  opacity: 1;
  visibility: visible;
}

.kp-onboard-modal {
  width: min(480px, 100%);
  padding: 36px 32px;
  border-radius: 24px;
  background: var(--bg-secondary);
  border: 1px solid rgba(0,240,255,0.25);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.kp-onboard-overlay.active .kp-onboard-modal {
  transform: translateY(0) scale(1);
}

.kp-onboard-emoji { font-size: 3rem; margin-bottom: 12px; }

.kp-onboard-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.kp-onboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, width 0.3s;
}

.kp-onboard-dot.active {
  background: var(--accent-cyan);
  width: 24px;
  border-radius: 999px;
}

.kp-onboard-code {
  display: inline-block;
  padding: 10px 20px;
  margin: 16px 0;
  border-radius: 12px;
  background: rgba(0,240,255,0.1);
  border: 1px dashed rgba(0,240,255,0.4);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
}

/* ── Product gallery ── */
.kp-product-gallery {
  display: grid;
  gap: 12px;
}

.kp-gallery-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.kp-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kp-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kp-gallery-thumb {
  flex: 0 0 72px;
  height: 52px;
  border-radius: 10px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: border-color 0.2s;
}

.kp-gallery-thumb.active,
.kp-gallery-thumb:hover { border-color: var(--accent-cyan); }

.kp-tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.kp-tech-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(0,240,255,0.08);
  border: 1px solid rgba(0,240,255,0.2);
  color: var(--accent-cyan);
}

.kp-demo-live {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.kp-demo-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00ff88;
  animation: kp-pulse 1.5s infinite;
}

/* ── Skeleton loading ── */
.kp-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.kp-skeleton-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.kp-skeleton-img {
  height: 180px;
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.06) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: kp-shimmer 1.4s infinite;
}

.kp-skeleton-body { padding: 16px; }

.kp-skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.06) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: kp-shimmer 1.4s infinite;
}

.kp-skeleton-line.short { width: 60%; }
.kp-skeleton-line.medium { width: 80%; }

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

/* ── Cart fly animation ── */
.kp-fly-item {
  position: fixed;
  z-index: 99999;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,240,255,0.4);
  transition: transform 0.65s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.65s;
}

/* ── Enhanced toast ── */
.toast.toast--premium {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.toast.toast--premium .toast-icon { font-size: 1.2rem; }

/* ── Kairox Studio wizard ── */
.kp-studio {
  max-width: 720px;
  margin: 0 auto 48px;
}

.kp-studio-progress {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.kp-studio-step {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  position: relative;
  transition: background 0.3s, color 0.3s;
}

.kp-studio-step.active,
.kp-studio-step.done {
  color: var(--accent-cyan);
  background: rgba(0,240,255,0.08);
}

.kp-studio-step.done { color: var(--accent-green, #00ff88); }

.kp-studio-card {
  padding: 32px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.kp-studio-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.kp-studio-opt {
  padding: 20px 12px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.kp-studio-opt:hover { border-color: rgba(0,240,255,0.4); }

.kp-studio-opt.selected {
  border-color: var(--accent-cyan);
  background: rgba(0,240,255,0.08);
}

.kp-studio-opt span { display: block; font-size: 1.8rem; margin-bottom: 8px; }

.kp-studio-range {
  width: 100%;
  margin: 16px 0;
  accent-color: var(--accent-cyan);
}

.kp-studio-estimate {
  padding: 20px;
  border-radius: 14px;
  background: rgba(0,240,255,0.06);
  border: 1px solid rgba(0,240,255,0.2);
  text-align: center;
  margin-top: 20px;
}

.kp-studio-estimate strong {
  font-size: 1.6rem;
  color: var(--accent-cyan);
}

.kp-studio-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

/* ── Roadmap page ── */
.kp-roadmap-page .kp-roadmap-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  justify-content: center;
}

.kp-tab {
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.kp-tab.active {
  background: var(--gradient-main);
  color: #0a0a0f;
  border-color: transparent;
  font-weight: 700;
}

.kp-panel { display: none; }
.kp-panel.active { display: block; }

.kp-changelog-item,
.kp-roadmap-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.kp-changelog-version {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan);
  white-space: nowrap;
}

.kp-roadmap-status {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  align-self: start;
}

.kp-roadmap-status.done { background: rgba(0,255,136,0.15); color: #00ff88; }
.kp-roadmap-status.progress { background: rgba(0,240,255,0.12); color: var(--accent-cyan); }
.kp-roadmap-status.planned { background: rgba(168,85,247,0.12); color: #c084fc; }

.kp-roadmap-timeline {
  position: relative;
  padding-inline-start: 28px;
}

.kp-roadmap-timeline::before {
  content: '';
  position: absolute;
  inset-inline-start: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan), rgba(168,85,247,0.3));
}

/* ── Dashboard premium ── */
.kp-notif-wrap {
  position: relative;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.kp-notif-bell {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.kp-notif-bell:hover,
.kp-notif-bell[aria-expanded="true"] {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.15);
}

.kp-notif-badge {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff6b6b;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

.kp-notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: min(340px, calc(100vw - 32px));
  max-height: min(420px, 70vh);
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  z-index: 200;
  display: none;
  flex-direction: column;
}

.kp-notif-panel.open {
  display: flex;
  animation: slide-up 0.22s ease;
}

.kp-notif-panel[hidden] {
  display: none !important;
}

.kp-notif-panel-head {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 240, 255, 0.04);
}

.kp-notif-panel-body {
  overflow-y: auto;
  max-height: min(360px, 60vh);
}

.kp-notif-item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: start;
  cursor: pointer;
  transition: background 0.2s;
}

.kp-notif-item:last-child { border-bottom: 0; }

.kp-notif-item:hover { background: rgba(0, 240, 255, 0.05); }

.kp-notif-item.unread {
  border-inline-start: 3px solid var(--accent-cyan);
  background: rgba(0, 240, 255, 0.03);
}

.kp-notif-item-text {
  display: block;
  margin-bottom: 4px;
}

.kp-notif-item-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.kp-notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.kp-reorder-btn { white-space: nowrap; }

.kp-wishlist-alert {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,180,0,0.08);
  border: 1px solid rgba(255,180,0,0.25);
  margin-bottom: 16px;
  font-size: 0.88rem;
}

/* ── Compare matrix premium ── */
.compare-table-wrap .compare-table th,
.compare-table-wrap .compare-table td {
  vertical-align: middle;
}

.compare-feature-yes { color: var(--accent-green, #00ff88); font-weight: 700; }
.compare-feature-no { color: var(--text-muted); }

/* ── Shop card social ── */
.product-card .kp-viewers {
  position: absolute;
  bottom: 8px;
  inset-inline-start: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  font-size: 0.68rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-card .kp-viewers-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff88;
}

/* ── Product card hover preview ── */
.product-card-3d .product-image {
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

.product-card-3d:hover .product-image {
  transform: scale(1.03);
}

.product-card.ku-flip:hover .product-image,
.product-card.ku-flip .product-image {
  transform: none;
}

.cart-bump {
  animation: kp-cart-bump 0.4s ease;
}

@keyframes kp-cart-bump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

@media (max-width: 768px) {
  .kp-flash-inner { grid-template-columns: 1fr; text-align: center; }
  .kp-flash-timer { justify-content: center; }
  .kp-trust-inner { justify-content: center; }
  .accent-picker { display: none; }
  .kp-onboard-modal { padding: 28px 20px; }
}
