/* ==========================================================================
   Importer UI — Home page + modal styles
   Inherits theme tokens via --bc-* custom properties in style.css.
   Does NOT duplicate any class already in the theme (bc-container, bc-btn*,
   bc-section*, bc-trust*, bc-cta-section, bc-page-hero, bc-anim keyframes).
   ========================================================================== */

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */

.bc-hero {
  background: var(--bc-navy);
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
}

/* Radial gradient background layer */
.bc-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 65% 30%, rgba(220,38,38,0.1), transparent),
    radial-gradient(ellipse 60% 50% at 20% 70%, rgba(220,38,38,0.06), transparent),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(30,64,120,0.2), transparent);
}

/* Noise texture overlay */
.bc-hero__noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Grid overlay */
.bc-hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Ensure container sits above bg layers.
   Use a wider max-width than the global --bc-container so the hero
   content fills more of the screen without widening the navbar. */
.bc-hero .bc-container {
  position: relative;
  z-index: 2;  
  width: min(1680px, calc(100vw - 64px));
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* 2-column grid layout */
.bc-hero__layout {
  display: grid;
  grid-template-columns: minmax(520px, 640px) minmax(520px, 620px);
  justify-content: space-between;
  gap: clamp(32px, 4vw, 80px);
  align-items: center;
  padding: 60px 0 80px;
}

/* Eyebrow / pill label */
.bc-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--bc-radius-pill);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  animation: bc-fadeUp 0.8s var(--bc-ease-out) both;
}

.bc-hero__eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--bc-accent);
  border-radius: 50%;
  animation: bc-pulse 2s infinite;
}

/* Hero title — Playfair Display serif */
.bc-hero__title {
  font-family: var(--bc-font-serif);
  font-size: clamp(42px, 5.5vw, 64px);
  line-height: 1.08;
  color: white;
  margin-bottom: 20px;
  animation: bc-fadeUp 0.8s var(--bc-ease-out) 0.1s both;
}

.bc-hero__title em {
  font-style: italic;
  color: var(--bc-accent);
}

.bc-hero__title-line {
  display: block;
}

/* Hero description */
.bc-hero__desc {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin-bottom: 32px;
  animation: bc-fadeUp 0.8s var(--bc-ease-out) 0.2s both;
}

/* Glassy URL input card */
.bc-url-input-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--bc-radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  animation: bc-fadeUp 0.8s var(--bc-ease-out) 0.3s both;
}

.bc-url-input-row {
  display: flex;
  gap: 8px;
}

.bc-url-platform-select {
  padding: 13px 14px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--bc-radius);
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-family: var(--bc-font);
  appearance: none;
  cursor: pointer;
  min-width: 140px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.bc-url-platform-select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.3);
}

.bc-url-platform-select option {
  background: var(--bc-navy, #0A1628);
  color: #fff;
}

.bc-url-input {
  flex: 1;
  padding: 13px 16px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--bc-radius);
  color: white;
  font-size: 14px;
  transition: all 0.2s var(--bc-ease);
}

.bc-url-input::placeholder {
  color: rgba(255,255,255,0.35);
}

.bc-url-input:focus {
  outline: none;
  border-color: var(--bc-accent);
  background: rgba(255,255,255,0.1);
}

/* Platform pills row */
.bc-url-platforms {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.bc-url-platforms__label {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
}

.bc-platform-pill {
  padding: 4px 12px;
  border-radius: var(--bc-radius-pill);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.04);
}

/* 3-stat flexbox */
.bc-hero__stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  animation: bc-fadeUp 0.8s var(--bc-ease-out) 0.5s both;
}

.bc-hero__stat-value {
  font-size: 26px;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.bc-hero__stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  font-weight: 500;
}

/* ==========================================================================
   2. FLOATING MARKETPLACE LOGOS  (right side of hero)
   ========================================================================== */

.bc-hero__showcase {
  position: relative;
  width: min(100%, 560px);
  height: 440px;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bc-fadeUp 0.8s var(--bc-ease-out) 0.4s both;
}

.bc-logo-float {
  position: absolute;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.4s var(--bc-ease), box-shadow 0.4s var(--bc-ease);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.bc-logo-float:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.bc-logo-float img {
  height: 110px;
  width: 110px;
  object-fit: contain;
  border-radius: 18px;
  transition: transform 0.3s ease;
}

.bc-logo-float:hover img {
  transform: scale(1.08);
}

.bc-logo-float__name {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
  text-align: center;
  padding-bottom: 4px;
}

/* 1688 — top-left */
.bc-logo-float--1 {
  top: 42px;
  left: 64px;
  animation: bc-float 6s ease-in-out infinite;
}

/* Taobao — top-right */
.bc-logo-float--2 {
  top: 18px;
  right: 64px;
  animation: bc-float 5s ease-in-out 0.8s infinite;
}

/* Pinduoduo — bottom-center (use calc for centering so float animation
   doesn't override the translateX and cause a slide glitch on load) */
.bc-logo-float--3 {
  bottom: 8px;
  left: calc(50% - 63px);
  animation: bc-float 7s ease-in-out 1.5s infinite;
}

/* Floating animation */
@keyframes bc-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* ==========================================================================
   3. HOW IT WORKS
   ========================================================================== */

.bc-hiw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.bc-hiw-card {
  position: relative;
  padding: 28px 24px;
  text-align: center;
  border-radius: var(--bc-radius-lg);
  background: var(--bc-bg);
  border: 1px solid var(--bc-grey-100);
  transition: all 0.3s var(--bc-ease);
}

.bc-hiw-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bc-shadow-lg);
  border-color: transparent;
}

.bc-hiw-card__num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bc-accent-soft);
  color: var(--bc-accent);
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.bc-hiw-card__icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.bc-hiw-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.bc-hiw-card p {
  font-size: 13px;
  color: var(--bc-text-secondary);
  line-height: 1.55;
}

.bc-hiw-card__arrow {
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bc-grey-300);
  font-size: 18px;
  z-index: 2;
}

/* Section between — flex header */
.bc-section-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}

/* Product grid — shared by trending + catalog */
.bc-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

/* Auth notice */
.bc-importer-auth {
  padding: 10px 0;
  color: rgba(255,255,255,0.5);
  font-size: 0.95rem;
}

/* Status in hero context */
.bc-hero .bc-importer__status.is-ok {
  color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   4. TRENDING PRODUCTS
   ========================================================================== */

.bc-trending {
  padding: 80px 0;
}

.bc-trending__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}

.bc-trending__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

/* ==========================================================================
   5. PRODUCT CARDS
   ========================================================================== */

.bc-pc {
  background: var(--bc-bg);
  border-radius: var(--bc-radius-lg);
  border: 1px solid var(--bc-grey-100);
  overflow: hidden;
  transition: all 0.3s var(--bc-ease);
  position: relative;
}

.bc-pc:hover {
  box-shadow: var(--bc-shadow-xl);
  border-color: transparent;
  transform: translateY(-4px);
}

.bc-pc:hover .bc-pc__img-overlay {
  opacity: 1;
}

.bc-pc:hover .bc-pc__img-inner {
  transform: scale(1.05);
}

.bc-pc__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bc-grey-100);
}

.bc-pc__img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  transition: transform 0.5s var(--bc-ease);
}

.bc-pc__img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bc-pc__img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--bc-ease);
}

.bc-pc__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.bc-pc__body {
  padding: 16px;
}

.bc-pc__platform {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--bc-grey-400);
  margin-bottom: 6px;
}

.bc-pc__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--bc-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  min-height: 40px;
}

.bc-pc__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.bc-pc__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--bc-navy);
}

.bc-pc__price-orig {
  font-size: 13px;
  color: var(--bc-grey-400);
  text-decoration: line-through;
}

.bc-pc__price-save {
  font-size: 11px;
  font-weight: 700;
  color: var(--bc-accent);
}

.bc-pc__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bc-pc__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.bc-pc__rating .stars {
  color: #F59E0B;
  font-size: 12px;
  letter-spacing: -1px;
}

.bc-pc__orders {
  font-size: 12px;
  color: var(--bc-grey-400);
}

/* ==========================================================================
   6. ANIMATIONS
   ========================================================================== */

.bc-anim-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s var(--bc-ease-out);
}

.bc-anim-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.bc-anim-fade.d1 { transition-delay: 0.1s; }
.bc-anim-fade.d2 { transition-delay: 0.2s; }
.bc-anim-fade.d3 { transition-delay: 0.3s; }
.bc-anim-fade.d4 { transition-delay: 0.4s; }

/* ==========================================================================
   7. MODALS — Video, Product Result, Product Sheet (kept from original)
   ========================================================================== */

/* Importer status */
.bc-importer__status {
  margin-top: 8px;
  font-size: 0.9rem;
  display: none;
}

.bc-importer__status.is-ok {
  display: block;
  color: var(--bc-muted);
}

.bc-importer__status.is-error {
  display: block;
  color: #b42318;
}

/* --- Video modal --- */

.bc-video-modal[hidden] {
  display: none;
}

.bc-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.bc-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.bc-video-modal__dialog {
  position: relative;
  width: min(920px, 92vw);
  margin: 8vh auto 0;
  background: var(--bc-bg);
  color: var(--bc-text);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.bc-video-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  color: #fff !important;
  font-size: 0.82rem !important;
  cursor: pointer;
}

.bc-video-modal__frame-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.bc-video-modal__frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Product result modal --- */

.bc-product-modal[hidden] {
  display: none;
}

.bc-product-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.bc-product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.bc-product-modal__dialog {
  position: relative;
  width: min(760px, 92vw);
  margin: 7vh auto 0;
  background: var(--bc-bg);
  color: var(--bc-text);
  border-radius: 10px;
  border: 1px solid var(--bc-border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.bc-product-modal__close {
  position: absolute;
  top: 20px;
  right: 22px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--bc-muted) !important;
  font-size: 2rem !important;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
}

.bc-product-modal__content {
  padding: 0;
}

/* --- Product sheet (inside modal) --- */

.bc-product-sheet__header {
  padding: 24px 80px 20px 26px;
  border-bottom: 1px solid var(--bc-border);
}

.bc-product-sheet__header h3 {
  margin: 0;
  font-size: clamp(1.25rem, 1.8vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
}

.bc-product-sheet__body {
  padding: 22px 26px 30px;
}

.bc-product-sheet__image {
  display: block;
  width: min(100%, 440px);
  max-height: 430px;
  object-fit: contain;
  margin: 0 auto 18px;
}

.bc-product-sheet__price {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.08;
}

.bc-product-sheet__title {
  margin: 12px 0 0;
  font-size: clamp(1.1rem, 1.35vw, 1.34rem);
  line-height: 1.42;
}

.bc-product-sheet__meta {
  margin: 6px 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: var(--bc-muted);
  text-transform: uppercase;
}

.bc-product-sheet__actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

.bc-product-sheet__action {
  border: 0 !important;
  border-radius: 999px !important;
  height: 46px;
  padding: 0 20px !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
}

.bc-product-sheet__action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bc-product-sheet__action--ghost {
  flex: 1 1 auto;
  border: 1px solid var(--bc-text) !important;
  background: transparent !important;
  color: var(--bc-text) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bc-product-sheet__action--ghost:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  text-decoration: none !important;
  color: var(--bc-text) !important;
}

.bc-product-sheet__action--solid {
  background: var(--bc-accent) !important;
  color: var(--bc-accent-text) !important;
}

.bc-product-sheet__action--solid:hover {
  opacity: 0.88;
}

body.bc-modal-open {
  overflow: hidden;
}

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */

/* Tablet / small desktop */
@media (max-width: 1024px) {
  .bc-hero__layout {
    grid-template-columns: 1fr;
  }

  .bc-hero__showcase {
    display: none;
  }

  .bc-hero__desc {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .bc-hiw-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bc-hiw-card__arrow {
    display: none;
  }

  .bc-trending__grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }

  .bc-hero__stats {
    gap: 24px;
  }

  .bc-hero__layout {
    padding: 40px 0 60px;
  }

  .bc-url-input-row {
    flex-direction: column;
  }

  .bc-url-input-card {
    padding: 14px;
  }

  .bc-url-platforms {
    flex-wrap: wrap;
  }

  .bc-hero__title {
    font-size: clamp(28px, 8vw, 42px);
  }

  .bc-hero__desc {
    font-size: 15px;
  }

  .bc-trending {
    padding: 56px 0;
  }

  .bc-product-modal__content {
    padding: 0;
  }

  .bc-product-sheet__header {
    padding: 18px 62px 16px 18px;
  }

  .bc-product-sheet__body {
    padding: 16px 18px 22px;
  }

  .bc-product-sheet__actions {
    flex-direction: column;
  }

  .bc-product-sheet__action {
    width: 100%;
  }
}
