/**
 * Bia2Host WHMCS Theme — Core Design System & RTL Engine
 * Native VibeFarsi RTL architecture. Zero external dependencies.
 * Version: 1.1.0 (Peyda Edition)
 */

@font-face {
  font-family: 'PeydaWeb';
  src: url('../fonts/PeydaWeb-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PeydaWeb';
  src: url('../fonts/PeydaWeb-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PeydaWeb';
  src: url('../fonts/PeydaWeb-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PeydaWeb';
  src: url('../fonts/PeydaWeb-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSansX';
  src: url('../fonts/IRANSansX-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSansX';
  src: url('../fonts/IRANSansX-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --b2h-font-sans: 'PeydaWeb', 'Peyda', 'IRANSansX', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --b2h-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Color Palette - Light */
  --b2h-brand: #2563EB;
  --b2h-brand-hover: #1D4ED8;
  --b2h-brand-subtle: #EFF6FF;
  --b2h-brand-text: #1E40AF;
  
  --b2h-accent: #38BDF8;
  --b2h-success: #059669;
  --b2h-success-subtle: #ECFDF5;
  --b2h-warning: #D97706;
  --b2h-warning-subtle: #FFFBEB;
  --b2h-danger: #DC2626;
  --b2h-danger-subtle: #FEF2F2;
  --b2h-info: #0284C7;
  --b2h-info-subtle: #F0F9FF;

  --b2h-bg: #F8FAFC;
  --b2h-surface: #FFFFFF;
  --b2h-surface-elevated: #FFFFFF;
  --b2h-border: #E2E8F0;
  --b2h-border-hover: #CBD5E1;
  --b2h-input-bg: #FFFFFF;
  
  --b2h-text: #0F172A;
  --b2h-text-muted: #64748B;
  --b2h-text-subtle: #94A3B8;

  /* Spacing & Radii */
  --b2h-radius-sm: 6px;
  --b2h-radius: 12px;
  --b2h-radius-lg: 16px;
  --b2h-radius-pill: 9999px;

  /* Shadows */
  --b2h-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --b2h-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --b2h-shadow-lg: 0 12px 28px -6px rgba(15, 23, 42, 0.1), 0 8px 12px -4px rgba(15, 23, 42, 0.06);

  /* Layout Dimensions */
  --b2h-header-height: 68px;
  --b2h-sidebar-width: 260px;
  --b2h-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --b2h-brand: #3B82F6;
  --b2h-brand-hover: #60A5FA;
  --b2h-brand-subtle: #1E293B;
  --b2h-brand-text: #93C5FD;

  --b2h-accent: #38BDF8;
  --b2h-success: #10B981;
  --b2h-success-subtle: #064E3B;
  --b2h-warning: #F59E0B;
  --b2h-warning-subtle: #78350F;
  --b2h-danger: #EF4444;
  --b2h-danger-subtle: #7F1D1D;
  --b2h-info: #38BDF8;
  --b2h-info-subtle: #0C4A6E;

  --b2h-bg: #090D16;
  --b2h-surface: #111827;
  --b2h-surface-elevated: #1F2937;
  --b2h-border: #1F293D;
  --b2h-border-hover: #374151;
  --b2h-input-bg: #0F172A;

  --b2h-text: #F8FAFC;
  --b2h-text-muted: #94A3B8;
  --b2h-text-subtle: #64748B;

  --b2h-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --b2h-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.5);
  --b2h-shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Keyframe Animations & Micro-Interactions
   ========================================================================== */
@keyframes b2hFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes b2hFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes b2hScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes b2hPulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
}

@keyframes b2hDotPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.75);
  }
}

/* CSS Reset & Baseline */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--b2h-font-sans);
}

html {
  font-family: var(--b2h-font-sans) !important;
  direction: rtl;
  text-align: right;
  background-color: var(--b2h-bg);
  color: var(--b2h-text);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-feature-settings: 'ss01', 'ss02';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--b2h-bg);
  color: var(--b2h-text);
  overflow-x: hidden;
  font-family: var(--b2h-font-sans) !important;
}

button, input, select, textarea, optgroup,
.b2h-app, .b2h-sidebar, .b2h-header, .b2h-content,
h1, h2, h3, h4, h5, h6, .b2h-btn, .b2h-card-title,
.b2h-product-title, .b2h-product-amount, .b2h-nav-link {
  font-family: var(--b2h-font-sans) !important;
}

/* Strict SVG & Media Constraints */
svg {
  vertical-align: middle;
  flex-shrink: 0;
}

.b2h-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.b2h-icon.size-4 {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}

.b2h-spec-label svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  color: var(--b2h-brand) !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.b2h-sidebar-brand img {
  max-height: 38px !important;
  max-width: 160px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

/* RTL / LTR Segregation Utility Classes */
.dir-ltr, [dir="ltr"] {
  direction: ltr !important;
  text-align: left !important;
}

.dir-rtl, [dir="rtl"] {
  direction: rtl !important;
  text-align: right !important;
}

.font-mono {
  font-family: var(--b2h-font-mono) !important;
  letter-spacing: normal !important;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Layout Hierarchy */
.b2h-app {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.b2h-sidebar {
  width: var(--b2h-sidebar-width);
  background: var(--b2h-surface);
  border-inline-end: 1px solid var(--b2h-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  height: 100vh;
  z-index: 40;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.b2h-sidebar-brand {
  height: var(--b2h-header-height);
  display: flex;
  align-items: center;
  padding-inline: 20px;
  border-bottom: 1px solid var(--b2h-border);
  text-decoration: none;
  gap: 12px;
}

.b2h-sidebar-brand img {
  max-height: 38px;
  width: auto;
  display: block;
}

.b2h-sidebar-brand .brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--b2h-text);
  letter-spacing: -0.02em;
}

.b2h-sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.b2h-nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--b2h-text-subtle);
  text-transform: uppercase;
  padding: 12px 12px 4px 12px;
  letter-spacing: 0.05em;
}

.b2h-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--b2h-radius-sm);
  color: var(--b2h-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--b2h-transition);
}

.b2h-nav-link:hover {
  background: var(--b2h-brand-subtle);
  color: var(--b2h-brand);
}

.b2h-nav-link.active {
  background: var(--b2h-brand);
  color: #FFFFFF;
}

.b2h-nav-link.active .b2h-icon {
  stroke: #FFFFFF;
}

.b2h-nav-badge {
  margin-inline-start: auto;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--b2h-radius-pill);
  font-weight: 700;
}

/* Main Content Area */
.b2h-main-wrapper {
  flex: 1;
  margin-inline-start: var(--b2h-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.b2h-header {
  height: var(--b2h-header-height);
  background: var(--b2h-surface);
  border-bottom: 1px solid var(--b2h-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
}

.b2h-header-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--b2h-bg);
  border: 1px solid var(--b2h-border);
  border-radius: var(--b2h-radius-sm);
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--b2h-text-muted);
  cursor: pointer;
  width: 240px;
  transition: var(--b2h-transition);
}

.b2h-header-search-btn:hover {
  border-color: var(--b2h-border-hover);
  color: var(--b2h-text);
}

.b2h-header-search-btn kbd {
  margin-inline-start: auto;
  font-size: 0.7rem;
  padding: 2px 6px;
  background: var(--b2h-surface);
  border: 1px solid var(--b2h-border);
  border-radius: 4px;
  font-family: var(--b2h-font-mono);
  color: var(--b2h-text-muted);
}

.b2h-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.b2h-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--b2h-radius-sm);
  background: var(--b2h-bg);
  border: 1px solid var(--b2h-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--b2h-text-muted);
  cursor: pointer;
  transition: var(--b2h-transition);
  position: relative;
  text-decoration: none;
}

.b2h-icon-btn:hover {
  background: var(--b2h-brand-subtle);
  color: var(--b2h-brand);
  border-color: var(--b2h-brand);
}

.b2h-content {
  flex: 1;
  padding: 28px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Button System */
.b2h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--b2h-radius-sm);
  cursor: pointer;
  transition: var(--b2h-transition);
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.25;
  white-space: nowrap;
}

.b2h-btn:disabled, .b2h-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.b2h-btn-primary {
  background: var(--b2h-brand);
  color: #FFFFFF;
}

.b2h-btn-primary:hover {
  background: var(--b2h-brand-hover);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.b2h-btn-secondary {
  background: var(--b2h-surface);
  color: var(--b2h-text);
  border-color: var(--b2h-border);
}

.b2h-btn-secondary:hover {
  background: var(--b2h-bg);
  border-color: var(--b2h-border-hover);
}

.b2h-btn-success {
  background: var(--b2h-success);
  color: #FFFFFF;
}

.b2h-btn-success:hover {
  background: #047857;
}

.b2h-btn-danger {
  background: var(--b2h-danger);
  color: #FFFFFF;
}

.b2h-btn-danger:hover {
  background: #B91C1C;
}

.b2h-btn-outline {
  background: transparent;
  border-color: var(--b2h-border);
  color: var(--b2h-text);
}

.b2h-btn-outline:hover {
  border-color: var(--b2h-brand);
  color: var(--b2h-brand);
}

.b2h-btn-ghost {
  background: transparent;
  color: var(--b2h-text-muted);
}

.b2h-btn-ghost:hover {
  background: var(--b2h-brand-subtle);
  color: var(--b2h-brand);
}

.b2h-btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 4px;
}

.b2h-btn-lg {
  padding: 14px 24px;
  font-size: 1rem;
  border-radius: var(--b2h-radius);
}

/* Card System */
.b2h-card {
  background: var(--b2h-surface);
  border: 1px solid var(--b2h-border);
  border-radius: var(--b2h-radius);
  box-shadow: var(--b2h-shadow-sm);
  overflow: hidden;
  transition: var(--b2h-transition);
}

.b2h-card-hover:hover {
  box-shadow: var(--b2h-shadow);
  border-color: var(--b2h-border-hover);
}

.b2h-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--b2h-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.b2h-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--b2h-text);
}

.b2h-card-body {
  padding: 24px;
}

.b2h-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--b2h-border);
  background: var(--b2h-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Stat Cards (Dashboard Metrics) */
.b2h-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.b2h-stat-card {
  background: var(--b2h-surface);
  border: 1px solid var(--b2h-border);
  border-radius: var(--b2h-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--b2h-shadow-sm);
  transition: var(--b2h-transition);
}

.b2h-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--b2h-shadow);
  border-color: var(--b2h-brand);
}

.b2h-stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--b2h-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.b2h-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--b2h-text);
}

.b2h-stat-label {
  font-size: 0.85rem;
  color: var(--b2h-text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Badges */
.b2h-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--b2h-radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.b2h-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.b2h-badge-success {
  background: var(--b2h-success-subtle);
  color: var(--b2h-success);
}

.b2h-badge-warning {
  background: var(--b2h-warning-subtle);
  color: var(--b2h-warning);
}

.b2h-badge-danger {
  background: var(--b2h-danger-subtle);
  color: var(--b2h-danger);
}

.b2h-badge-info {
  background: var(--b2h-info-subtle);
  color: var(--b2h-info);
}

.b2h-badge-neutral {
  background: var(--b2h-border);
  color: var(--b2h-text-muted);
}

/* Form Controls */
.b2h-form-group {
  margin-bottom: 20px;
}

.b2h-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--b2h-text);
  margin-bottom: 8px;
}

.b2h-input, .b2h-select, .b2h-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--b2h-radius-sm);
  border: 1px solid var(--b2h-border);
  background: var(--b2h-input-bg);
  color: var(--b2h-text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--b2h-transition);
}

.b2h-input:focus, .b2h-select:focus, .b2h-textarea:focus {
  border-color: var(--b2h-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.b2h-input::placeholder, .b2h-textarea::placeholder {
  color: var(--b2h-text-subtle);
}

/* Tables */
.b2h-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--b2h-radius);
  border: 1px solid var(--b2h-border);
  background: var(--b2h-surface);
  box-shadow: var(--b2h-shadow-sm);
}

.b2h-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.88rem;
}

.b2h-table th {
  background: var(--b2h-bg);
  color: var(--b2h-text);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--b2h-border);
  white-space: nowrap;
}

.b2h-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--b2h-border);
  color: var(--b2h-text);
  vertical-align: middle;
}

.b2h-table tr:last-child td {
  border-bottom: none;
}

.b2h-table tr:hover td {
  background: var(--b2h-bg);
}

/* Breadcrumb */
.b2h-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--b2h-text-muted);
  margin-bottom: 24px;
}

.b2h-breadcrumb a {
  color: var(--b2h-text-muted);
  text-decoration: none;
  transition: var(--b2h-transition);
}

.b2h-breadcrumb a:hover {
  color: var(--b2h-brand);
}

.b2h-breadcrumb-sep {
  color: var(--b2h-text-subtle);
}

/* Command Palette (Ctrl+K) */
.b2h-cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.b2h-cmd-backdrop.open {
  display: flex;
}

.b2h-cmd-modal {
  width: 100%;
  max-width: 580px;
  background: var(--b2h-surface);
  border: 1px solid var(--b2h-border);
  border-radius: var(--b2h-radius-lg);
  box-shadow: var(--b2h-shadow-lg);
  overflow: hidden;
  animation: b2hModalSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes b2hModalSlide {
  from { opacity: 0; transform: translateY(-16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.b2h-cmd-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--b2h-border);
  gap: 12px;
}

.b2h-cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  color: var(--b2h-text);
}

.b2h-cmd-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}

.b2h-cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--b2h-radius-sm);
  color: var(--b2h-text);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--b2h-transition);
}

.b2h-cmd-item:hover, .b2h-cmd-item.active {
  background: var(--b2h-brand-subtle);
  color: var(--b2h-brand);
}

/* Service Usage Bar */
.b2h-progress {
  width: 100%;
  height: 8px;
  background: var(--b2h-border);
  border-radius: var(--b2h-radius-pill);
  overflow: hidden;
}

.b2h-progress-bar {
  height: 100%;
  background: var(--b2h-brand);
  border-radius: var(--b2h-radius-pill);
  transition: width 0.4s ease;
}

/* Stepper for Cart */
.b2h-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}

.b2h-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--b2h-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.b2h-step.active {
  color: var(--b2h-brand);
}

.b2h-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--b2h-border);
  color: var(--b2h-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.b2h-step.active .b2h-step-num {
  background: var(--b2h-brand);
  color: #FFFFFF;
}

.b2h-step.completed .b2h-step-num {
  background: var(--b2h-success);
  color: #FFFFFF;
}

/* Mobile Responsiveness */
.b2h-mobile-menu-btn {
  display: none;
}

@media (max-width: 1024px) {
  .b2h-sidebar {
    transform: translateX(100%);
  }

  .b2h-sidebar.open {
    transform: translateX(0);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
  }

  .b2h-main-wrapper {
    margin-inline-start: 0;
  }

  .b2h-mobile-menu-btn {
    display: flex;
  }

  .b2h-header-search-btn {
    width: auto;
    padding: 8px;
  }

  .b2h-header-search-btn span, .b2h-header-search-btn kbd {
    display: none;
  }
}

@media (max-width: 640px) {
  .b2h-content {
    padding: 16px;
  }

  .b2h-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .b2h-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* --- VibeFarsi Micro-Animations & Elevations --- */
@keyframes b2hFadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes b2hPulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

.b2h-animate-fade {
  animation: b2hFadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.b2h-card {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

.b2h-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 16px 36px -12px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .b2h-card:hover {
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

.b2h-btn {
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.b2h-btn:hover {
  transform: translateY(-1px);
}

.b2h-btn:active {
  transform: scale(0.97);
}

/* --- High-End Cloud Store & Product Cards --- */
.b2h-store-wrapper {
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: b2hFadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.b2h-store-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(56, 189, 248, 0.04) 100%);
  border: 1px solid var(--b2h-border);
  border-radius: var(--b2h-radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

[data-theme="dark"] .b2h-store-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.b2h-store-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--b2h-surface);
  border: 1px solid var(--b2h-border);
  border-radius: var(--b2h-radius);
  box-shadow: var(--b2h-shadow-sm);
  margin-bottom: 24px;
}

/* ==========================================================================
   Storefront Catalog & Dedicated Server Grid
   ========================================================================== */
.b2h-store-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--b2h-border);
  animation: b2hFadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.b2h-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--b2h-radius-pill);
  background: var(--b2h-brand-subtle);
  color: var(--b2h-brand);
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 12px;
}

.b2h-store-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--b2h-text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.b2h-store-subtitle {
  font-size: 0.95rem;
  color: var(--b2h-text-muted);
  line-height: 1.6;
  max-width: 820px;
}

/* Category Filter Tabs */
.b2h-cat-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 28px;
  scrollbar-width: thin;
}

.b2h-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--b2h-radius-pill);
  background: var(--b2h-surface);
  border: 1px solid var(--b2h-border);
  color: var(--b2h-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.b2h-cat-pill:hover {
  background: var(--b2h-brand-subtle);
  color: var(--b2h-brand);
  border-color: var(--b2h-brand);
  transform: translateY(-2px);
}

.b2h-cat-pill.active {
  background: var(--b2h-brand);
  color: #FFFFFF !important;
  border-color: var(--b2h-brand);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

/* Product Cards Grid */
.b2h-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.b2h-product-card {
  background: var(--b2h-surface);
  border: 1px solid var(--b2h-border);
  border-radius: var(--b2h-radius);
  box-shadow: var(--b2h-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  animation: b2hFadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered entrance animation for cards */
.b2h-product-card:nth-child(1)  { animation-delay: 0.04s; }
.b2h-product-card:nth-child(2)  { animation-delay: 0.08s; }
.b2h-product-card:nth-child(3)  { animation-delay: 0.12s; }
.b2h-product-card:nth-child(4)  { animation-delay: 0.16s; }
.b2h-product-card:nth-child(5)  { animation-delay: 0.20s; }
.b2h-product-card:nth-child(6)  { animation-delay: 0.24s; }
.b2h-product-card:nth-child(7)  { animation-delay: 0.28s; }
.b2h-product-card:nth-child(8)  { animation-delay: 0.32s; }
.b2h-product-card:nth-child(9)  { animation-delay: 0.36s; }
.b2h-product-card:nth-child(10) { animation-delay: 0.40s; }
.b2h-product-card:nth-child(11) { animation-delay: 0.44s; }
.b2h-product-card:nth-child(12) { animation-delay: 0.48s; }

.b2h-product-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--b2h-brand);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.35), 0 0 24px rgba(37, 99, 235, 0.2);
}

.b2h-product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.b2h-product-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--b2h-text);
  line-height: 1.3;
}

.b2h-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--b2h-radius-pill);
  background: var(--b2h-success-subtle);
  color: var(--b2h-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
  white-space: nowrap;
}

.b2h-stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: b2hDotPulse 2s infinite ease-in-out;
}

.b2h-product-specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--b2h-border);
  border-radius: var(--b2h-radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.b2h-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
}

.b2h-spec-label {
  color: var(--b2h-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.b2h-spec-label svg {
  width: 16px;
  height: 16px;
  color: var(--b2h-brand);
  flex-shrink: 0;
}

.b2h-spec-val {
  font-weight: 700;
  color: var(--b2h-text);
  direction: ltr;
  text-align: right;
}

.b2h-product-pricing {
  border-top: 1px dashed var(--b2h-border);
  padding-top: 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.b2h-pricing-label {
  font-size: 0.8rem;
  color: var(--b2h-text-muted);
}

.b2h-pricing-value {
  text-align: left;
}

.b2h-product-amount {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--b2h-brand);
  line-height: 1.2;
}

.b2h-product-cycle {
  font-size: 0.78rem;
  color: var(--b2h-text-muted);
  margin-top: 2px;
}

.b2h-product-order-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--b2h-radius);
  text-decoration: none;
  background: var(--b2h-brand);
  color: #FFFFFF !important;
  border: 1px solid var(--b2h-brand);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.b2h-product-order-btn:hover {
  background: var(--b2h-brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

.b2h-product-order-btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Dark Mode Overrides for Legacy / Fallback Orderform Markup
   ========================================================================== */
[data-theme="dark"] .product,
[data-theme="dark"] .panel,
[data-theme="dark"] .card,
[data-theme="dark"] .card-body,
[data-theme="dark"] .panel-body,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .modal-content {
  background-color: var(--b2h-surface) !important;
  color: var(--b2h-text) !important;
  border-color: var(--b2h-border) !important;
}

[data-theme="dark"] .list-group-item.active {
  background-color: var(--b2h-brand) !important;
  color: #FFFFFF !important;
  border-color: var(--b2h-brand) !important;
}

[data-theme="dark"] .product-desc,
[data-theme="dark"] .product-pricing {
  color: var(--b2h-text) !important;
}

