/* ============================================================
   TRADEHUB B2B — BASE STYLES
   ============================================================ */

/* ── LOADING SCREEN ── */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at top right, rgba(79, 163, 199, 0.24), transparent 35%),
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 30%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition), visibility var(--transition);
}

#loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loading-logo {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.loading-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: bounce 0.8s ease infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

.loading-logo-image {
  width: min(420px, 78vw);
  height: auto;
  object-fit: contain;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,251,253,0.92));
  border: 1px solid rgba(255, 169, 77, 0.24);
  filter: drop-shadow(0 18px 34px rgba(8, 58, 92, 0.18));
  box-shadow:
    0 20px 44px rgba(8, 58, 92, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.88);
}

.loading-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
}

.loading-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green) 0%, var(--primary) 55%, var(--green-light) 100%);
  border-radius: 99px;
  animation: loadFill 1.2s ease forwards;
}

@keyframes loadFill {
  to { width: 100%; }
}

/* ── PAGE ANIMATIONS ── */
.page-enter {
  animation: pageEnter 0.20s var(--ease-standard);
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SECTION UTILITIES ── */
.section      { padding: 84px 0; }
.section-sm   { padding: 48px 0; }
.section-xs   { padding: 32px 0; }
.section-dark { background: var(--gray-50); }
.section-navy { background: var(--navy); }

:where(a, button, input, select, textarea, [data-nav], [role="button"], .product-card, .category-showcase-card, .section-nav-card) {
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    background-color var(--transition),
    color var(--transition),
    opacity var(--transition);
}

:where(button, [data-nav], [role="button"], .product-card, .category-showcase-card, .section-nav-card) {
  cursor: pointer;
}

:where(a, button, input, select, textarea, [data-nav], [role="button"]):focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.24);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.10);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.45s var(--ease-standard),
    transform 0.45s var(--ease-standard);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── SECTION HEADER ── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  cursor: pointer;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--gray-300); }
.breadcrumb .current { color: var(--text); }

/* ── EMPTY STATES ── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-state .empty-icon {
  font-size: 52px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── SPINNER ── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 48px auto;
}

.spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
  margin: 0;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── DIVIDERS ── */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: var(--space-6) 0;
}

/* ── PAGE SECTION HEADER ── */
.page-hero {
  background:
    radial-gradient(circle at top right, rgba(37,99,235,0.16), transparent 32%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 52px 0 40px;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 80% 50%, rgba(37,99,235,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  color: var(--white);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.page-hero p {
  color: rgba(255,255,255,0.72);
  font-size: 16px;
  max-width: 540px;
  position: relative;
  z-index: 1;
}

/* ── INFO PAGES (Terms, Privacy, etc.) ── */
.info-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px;
}

.info-page h1 {
  font-size: 36px;
  margin-bottom: 8px;
}

.info-page .meta {
  color: var(--text-muted);
  font-size: 13px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--gray-200);
  margin-bottom: 36px;
}

.info-page h2 {
  font-size: 20px;
  margin: 32px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

.info-page p {
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 14px;
  font-size: 15px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-on-scroll,
  .reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: none;
  }
}

.info-page ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 14px;
}

.info-page li {
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 6px;
  font-size: 15px;
}

/* ── PENDING NOTICE ── */
.pending-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--gray-50);
}

.pending-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-md);
}

.pending-icon { font-size: 56px; margin-bottom: 20px; }
.pending-card h2 { font-size: 26px; margin-bottom: 12px; }
.pending-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 8px;
}
