:root {
  --lg-primary: #7e39ff;
  --lg-primary-dark: #6a2ed9;
  --lg-primary-light: #9b85fd;
  --lg-secondary: #ffc700;
  --lg-accent: #9CF5FF;
  --lg-bg: #1C2434;
  --lg-bg-alt: #24304d;
  --lg-bg-card: rgba(28, 36, 52, 0.95);
  --lg-bg-card-hover: rgba(40, 52, 74, 0.98);
  --lg-glass-border: rgba(255, 255, 255, 0.06);
  --lg-glass-border-hover: rgba(255, 255, 255, 0.12);
  --lg-text: #ffffff;
  --lg-text-secondary: #a0aec0;
  --lg-text-muted: #718096;
  --lg-border: rgba(255, 255, 255, 0.06);
  --lg-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --lg-shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.5);
  --lg-radius: 14px;
  --lg-radius-sm: 10px;
  --lg-radius-xs: 8px;
  --lg-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --lg-font: 'Vazirmatn', 'IRANSansX', 'Tahoma', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

.lg-wrapper {
  width: 100%;
  max-width: 100%;
  padding: 0 48px;
  font-family: var(--lg-font);
  color: var(--lg-text);
  direction: rtl;
  background: var(--lg-bg);
  min-height: 100vh;
}

.lg-hero,
.lg-wizard-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== HERO ===== */
.lg-hero {
  text-align: center;
  padding: 100px 20px 60px;
}

.lg-hero-title {
  font-size: 2.8em;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.lg-hero-title span {
  background: linear-gradient(135deg, var(--lg-primary-light), var(--lg-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lg-hero-subtitle {
  font-size: 1.05em;
  color: var(--lg-text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 2;
}

.lg-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 44px;
  font-size: 1em;
  font-weight: 700;
  font-family: var(--lg-font);
  color: #fff;
  background: var(--lg-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--lg-transition);
}

.lg-cta-btn:hover {
  background: var(--lg-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.35);
}

.lg-cta-arrow {
  display: inline-block;
  animation: lg-bounce 2s infinite;
}

@keyframes lg-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== WIZARD ===== */
.lg-wizard-container {
  max-width: 960px;
}

.lg-wizard-progress { margin-bottom: 44px; }

.lg-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  margin-bottom: 24px;
  overflow: hidden;
}

.lg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lg-primary), var(--lg-accent));
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lg-steps {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

.lg-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.2;
  transition: var(--lg-transition);
  cursor: default;
}

.lg-step-item.active { opacity: 1; }
.lg-step-item.completed { opacity: 0.5; }

.lg-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85em;
  transition: var(--lg-transition);
}

.lg-step-item.active .lg-step-circle {
  background: var(--lg-primary);
  border-color: var(--lg-primary);
  color: #fff;
}

.lg-step-item.completed .lg-step-circle {
  background: var(--lg-accent);
  border-color: var(--lg-accent);
  color: #fff;
  font-size: 1em;
}

.lg-step-label {
  font-size: 0.75em;
  color: var(--lg-text-muted);
  font-weight: 500;
}

.lg-step-item.active .lg-step-label {
  color: var(--lg-text);
  font-weight: 600;
}

/* ===== WIZARD BODY ===== */
.lg-wizard-body { min-height: 400px; }

/* ===== STEP HEADER ===== */
.lg-step-header {
  text-align: center;
  margin-bottom: 36px;
}

.lg-step-header h2 {
  font-size: 1.6em;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--lg-primary-light);
}

.lg-step-header p {
  color: var(--lg-text-secondary);
  font-size: 0.9em;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===== SLIDE ANIMATIONS ===== */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(60px); }
}

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-60px); }
}

.lg-step.slide-in-right {
  animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
  display: block !important;
}

.lg-step.slide-in-left {
  animation: slideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
  display: block !important;
}

.lg-step.slide-out-right {
  animation: slideOutRight 0.25s ease both;
}

.lg-step.slide-out-left {
  animation: slideOutLeft 0.25s ease both;
}

/* ===== STEP 1 — USAGE ===== */
#lg-step-1 {
  position: relative;
  padding: 40px 0 50px;
}

#lg-step-1::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(124, 92, 252, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(253, 121, 168, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#lg-step-1 > * { position: relative; z-index: 1; }

#lg-usage-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 0 auto 36px;
}

#lg-usage-options .lg-option-card {
  padding: 28px 18px 22px;
  border-radius: var(--lg-radius);
  background: var(--lg-bg-card);
  border: 1px solid var(--lg-glass-border);
  text-align: center;
  cursor: pointer;
  transition: var(--lg-transition);
  position: relative;
  user-select: none;
}

#lg-usage-options .lg-option-card:hover {
  background: var(--lg-bg-card-hover);
  border-color: var(--lg-glass-border-hover);
  transform: translateY(-6px);
  box-shadow: var(--lg-shadow-hover);
}

#lg-usage-options .lg-option-card.selected {
  border-color: var(--lg-primary);
  background: rgba(124, 92, 252, 0.08);
  transform: translateY(-4px);
}

#lg-usage-options .lg-option-card .lg-option-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65em;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: var(--lg-transition);
}

#lg-usage-options .lg-option-card.selected .lg-option-check {
  opacity: 1;
  transform: scale(1);
}

#lg-usage-options .lg-option-icon {
  font-size: 2em;
  margin-bottom: 14px;
  display: block;
}

#lg-usage-options .lg-option-label {
  font-weight: 700;
  font-size: 0.95em;
  margin-bottom: 6px;
}

#lg-usage-options .lg-option-desc {
  font-size: 0.75em;
  color: var(--lg-text-muted);
  line-height: 1.7;
}

/* ===== OPTIONS GRID (general) ===== */
.lg-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

/* ===== OPTION CARDS (general) ===== */
.lg-option-card {
  background: var(--lg-bg-card);
  border: 1px solid var(--lg-glass-border);
  border-radius: var(--lg-radius);
  padding: 28px 16px 22px;
  text-align: center;
  cursor: pointer;
  transition: var(--lg-transition);
  position: relative;
  user-select: none;
}

.lg-option-card:hover {
  background: var(--lg-bg-card-hover);
  border-color: var(--lg-glass-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--lg-shadow);
}

.lg-option-card.selected {
  border-color: var(--lg-primary);
  background: rgba(124, 92, 252, 0.08);
}

.lg-option-card .lg-option-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65em;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: var(--lg-transition);
  z-index: 2;
}

.lg-option-card.selected .lg-option-check {
  opacity: 1;
  transform: scale(1);
}

.lg-option-icon {
  font-size: 1.8em;
  margin-bottom: 12px;
  display: block;
  color: var(--lg-accent);
  line-height: 1;
}

.lg-option-icon svg {
  width: 32px;
  height: 32px;
  display: block;
  margin: 0 auto;
}

.lg-option-label {
  font-weight: 700;
  font-size: 0.9em;
  margin-bottom: 6px;
}

.lg-option-desc {
  font-size: 0.74em;
  color: var(--lg-text-muted);
  line-height: 1.7;
}

/* ===== PRICE CARDS ===== */
.lg-price-card { padding: 28px 16px 22px; }

.lg-price-card.disabled {
  opacity: 0.35;
  filter: blur(1px);
  pointer-events: none;
  cursor: not-allowed;
  position: relative;
}

.lg-price-card.disabled::after {
  content: "حداقل بودجه این دسته بالاتر است";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  color: var(--lg-accent);
  font-weight: 700;
  pointer-events: none;
  opacity: 1;
  filter: none;
}

.lg-price-icon { margin-bottom: 12px; color: var(--lg-accent); line-height: 1; }

.lg-price-icon svg { width: 28px; height: 28px; display: block; margin: 0 auto; }

.lg-price-amount {
  font-size: 0.82em;
  color: var(--lg-accent);
  font-weight: 600;
  margin-top: 10px;
  direction: ltr;
}

/* ===== BRAND CARDS ===== */
.lg-brand-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  text-align: right;
  position: relative;
}

.lg-brand-card .lg-option-label {
  margin-bottom: 0;
  flex: 1;
  font-size: 0.88em;
}

.lg-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--lg-radius-xs);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--lg-transition);
}

.lg-brand-card:hover .lg-brand-logo {
  transform: scale(1.06);
}

.lg-brand-initial {
  font-weight: 800;
  font-size: 1em;
  color: var(--lg-primary-light);
}

.lg-check-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--lg-transition);
}

.lg-brand-card.selected .lg-check-icon {
  background: rgba(124, 92, 252, 0.12);
}

.lg-brand-card.selected .lg-check-icon::after {
  content: '✓';
  color: var(--lg-primary);
  font-weight: 700;
  font-size: 0.9em;
}

.lg-brand-card.disabled {
  opacity: 0.3;
  filter: blur(0.8px);
  pointer-events: none;
  cursor: not-allowed;
}

.lg-disabled-reason {
  font-size: 0.65em;
  color: var(--lg-text-muted);
  text-align: center;
  margin-top: 4px;
  width: 100%;
  filter: none;
  opacity: 1;
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
}

.lg-price-card.disabled::after,
.lg-brand-card.disabled .lg-disabled-reason {
  filter: none;
  opacity: 1;
}

.lg-brand-msg {
  text-align: center;
  margin-bottom: 14px;
  font-size: 0.95em;
}

.lg-brand-msg-text {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(124, 92, 252, 0.1);
  border-radius: 20px;
  color: var(--lg-primary-light);
  font-weight: 700;
}

/* ===== SPECS ===== */
.lg-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.lg-spec-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lg-spec-group label {
  font-weight: 600;
  font-size: 0.8em;
  color: var(--lg-text-secondary);
}

.lg-spec-select {
  padding: 14px 18px;
  background: var(--lg-bg-alt);
  border: 1px solid var(--lg-glass-border);
  border-radius: var(--lg-radius-sm);
  color: var(--lg-text);
  font-size: 0.85em;
  font-family: var(--lg-font);
  cursor: pointer;
  transition: var(--lg-transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239494b8' d='M6 8.5L1.5 4h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  padding-left: 40px;
}

.lg-spec-select:hover { border-color: var(--lg-glass-border-hover); }

.lg-spec-select:focus {
  outline: none;
  border-color: var(--lg-primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.10);
}

.lg-spec-select option {
  background: var(--lg-bg);
  color: var(--lg-text);
  padding: 8px;
}

/* ===== BUTTONS ===== */
.lg-btn-group {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.lg-btn {
  padding: 14px 36px;
  font-size: 0.9em;
  font-weight: 700;
  font-family: var(--lg-font);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--lg-transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lg-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.lg-btn-primary {
  background: var(--lg-primary);
  color: #fff;
}

.lg-btn-primary:hover:not(:disabled) {
  background: var(--lg-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(124, 92, 252, 0.35);
}

.lg-btn-primary:active:not(:disabled) { transform: translateY(-1px); }

.lg-btn-primary-lg {
  padding: 16px 48px;
  font-size: 1em;
}

.lg-btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--lg-text-secondary);
  border: 1px solid var(--lg-glass-border);
}

.lg-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--lg-text);
  border-color: var(--lg-glass-border-hover);
  transform: translateY(-2px);
}

.lg-btn-text {
  background: none;
  color: var(--lg-primary-light);
  padding: 6px 16px;
  font-size: 0.82em;
}

.lg-btn-primary .lg-btn-text,
.lg-btn-primary-lg .lg-btn-text,
.lg-btn-primary:not(.lg-btn-text) .lg-btn-text { color: inherit; }

.lg-btn-text:hover { text-decoration: underline; }

.lg-btn-loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lg-spin 0.6s linear infinite;
}

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

/* ===== WARNING ===== */
.lg-warning-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(253, 203, 110, 0.04);
  border: 1px solid rgba(253, 203, 110, 0.12);
  border-radius: var(--lg-radius-sm);
  margin-bottom: 28px;
}

.lg-warning-icon { font-size: 1.4em; flex-shrink: 0; }

.lg-warning-content { flex: 1; }

.lg-warning-content strong {
  display: block;
  color: var(--lg-secondary);
  font-size: 0.9em;
  margin-bottom: 4px;
}

.lg-warning-content p {
  color: var(--lg-text-secondary);
  font-size: 0.82em;
  line-height: 1.8;
  margin: 0;
}

.lg-warning-close {
  background: none;
  border: none;
  color: var(--lg-text-muted);
  cursor: pointer;
  font-size: 1.1em;
  padding: 4px;
  line-height: 1;
  transition: var(--lg-transition);
}

.lg-warning-close:hover { color: var(--lg-text); }

/* ===== INSIGHTS ===== */
.lg-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.lg-insight-card {
  background: var(--lg-bg-card);
  border: 1px solid var(--lg-glass-border);
  border-radius: var(--lg-radius-sm);
  padding: 20px;
  transition: var(--lg-transition);
}

.lg-insight-card h4 {
  font-size: 0.85em;
  margin-bottom: 10px;
  color: var(--lg-primary-light);
}

.lg-insight-card p,
.lg-insight-card li {
  font-size: 0.82em;
  line-height: 1.8;
  color: var(--lg-text-secondary);
}

.lg-insight-card ul { list-style: disc; padding-right: 20px; }

.lg-insight-ai {
  background: rgba(124, 92, 252, 0.04) !important;
  border-color: rgba(124, 92, 252, 0.15) !important;
}

.lg-insight-ai p { color: var(--lg-text) !important; }

/* ===== LOADING & SKELETON ===== */
#lg-loading {
  text-align: center;
  padding: 40px 0;
}

.lg-loader {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.04);
  border-top-color: var(--lg-primary);
  border-radius: 50%;
  animation: lg-spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

#lg-loading p { color: var(--lg-text-muted); font-size: 0.85em; }

@keyframes lg-skeleton-pulse {
  0% { background: rgba(30, 30, 60, 0.5); }
  50% { background: rgba(40, 40, 72, 0.7); }
  100% { background: rgba(30, 30, 60, 0.5); }
}

.lg-skeleton-card { animation: lg-fadeUp 0.3s ease both !important; pointer-events: none; }

.lg-skeleton-img {
  width: 100%;
  height: 200px;
  background: rgba(30, 30, 60, 0.5);
  animation: lg-skeleton-pulse 1.8s ease-in-out infinite;
}

.lg-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(30, 30, 60, 0.5);
  animation: lg-skeleton-pulse 1.8s ease-in-out infinite;
}

/* ===== NO RESULTS ===== */
#lg-no-results {
  text-align: center;
  padding: 60px 20px;
}

.lg-no-results-icon { font-size: 3.5em; margin-bottom: 14px; display: block; }

#lg-no-results h3 {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: 700;
}

#lg-no-results p { color: var(--lg-text-secondary); margin-bottom: 28px; font-size: 0.9em; }

/* ===== RESULTS ===== */
.lg-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lg-border);
}

.lg-results-count {
  font-size: 0.85em;
  color: var(--lg-text-muted);
  font-weight: 500;
}

.lg-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.lg-product-card {
  background: var(--lg-bg-card);
  border: 1px solid var(--lg-glass-border);
  border-radius: var(--lg-radius);
  overflow: hidden;
  transition: var(--lg-transition);
  position: relative;
  animation: lg-fadeUp 0.4s ease both;
}

.lg-product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--lg-shadow-hover);
  border-color: var(--lg-glass-border-hover);
}

.lg-product-badges {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
}

.lg-badge {
  padding: 5px 14px;
  font-size: 0.68em;
  font-weight: 600;
  border-radius: 6px;
  display: inline-block;
  line-height: 1.5;
}

.lg-badge.usage { background: rgba(126, 57, 255, 0.15); color: var(--lg-primary-light); }
.lg-badge.premium { background: rgba(156, 245, 255, 0.12); color: var(--lg-accent); }
.lg-badge.best-value { background: rgba(255, 199, 0, 0.12); color: var(--lg-secondary); }
.lg-badge:not(.usage):not(.premium):not(.best-value) { background: rgba(126, 57, 255, 0.1); color: var(--lg-primary-light); }

.lg-product-score-wrap {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
}

.lg-product-score {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lg-bg-alt);
  border: 2px solid var(--lg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  font-weight: 700;
  color: var(--lg-primary-light);
}

.lg-product-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
  background: var(--lg-bg-alt);
  padding: 16px;
  transition: var(--lg-transition);
}

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

.lg-product-body { padding: 20px; }

.lg-product-title {
  font-size: 0.9em;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.6;
  min-height: 2.9em;
}

.lg-value-badge {
  flex-shrink: 0;
  font-size: 0.62em;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 212, 192, 0.12);
  color: var(--lg-accent);
  margin-top: 2px;
  white-space: nowrap;
}

.lg-product-title-text {
  color: var(--lg-text);
  font-weight: 800;
  font-size: 0.95em;
  line-height: 1.5;
}

.lg-product-rating {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lg-product-rating .star-rating {
  display: inline-block;
  direction: ltr;
}

.lg-product-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--lg-radius-xs);
  border: 1px solid var(--lg-glass-border);
}

.lg-spec-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72em;
  color: var(--lg-text-secondary);
  line-height: 1.4;
  font-weight: 600;
}

.lg-spec-item svg {
  flex-shrink: 0;
  color: var(--lg-primary-light);
}

.lg-spec-label {
  color: var(--lg-text-muted);
  font-weight: 400;
  margin-left: 2px;
}

.lg-match-reason {
  font-size: 0.75em;
  color: var(--lg-accent);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: rgba(0, 212, 192, 0.04);
  border-radius: var(--lg-radius-xs);
  border-right: 2px solid var(--lg-accent);
  line-height: 1.6;
}

.lg-usage-bars {
  margin: 10px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--lg-radius-xs);
}

.lg-usage-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
  font-size: 0.7em;
}

.lg-usage-bar-label {
  width: 62px;
  flex-shrink: 0;
  color: var(--lg-text-muted);
}

.lg-usage-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.lg-usage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lg-primary), var(--lg-accent));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.lg-usage-bar-score {
  width: 28px;
  text-align: left;
  color: var(--lg-text-secondary);
  font-weight: 600;
}


/* ===== MATCH BANNER ===== */
.lg-match-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(0, 212, 192, 0.04);
  border: 1px solid rgba(0, 212, 192, 0.1);
  border-radius: var(--lg-radius-sm);
  margin-bottom: 20px;
  font-size: 0.82em;
  color: var(--lg-text-secondary);
  line-height: 1.6;
  animation: lg-fadeUp 0.4s ease;
}

.lg-match-banner-icon { font-size: 1.2em; flex-shrink: 0; }
.lg-match-banner strong { color: var(--lg-accent); }

/* ===== SPEC ADVICE (Tier Comparison) ===== */
.lg-spec-advice-card {
  background: rgba(0, 212, 192, 0.04);
  border: 1px solid rgba(0, 212, 192, 0.1);
  border-radius: var(--lg-radius);
  margin-bottom: 28px;
  overflow: hidden;
  animation: lg-fadeUp 0.4s ease;
}

.lg-spec-advice-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(0, 212, 192, 0.04);
  border-bottom: 1px solid rgba(0, 212, 192, 0.08);
  font-weight: 700;
  font-size: 0.85em;
  color: var(--lg-accent);
}

.lg-spec-advice-icon { font-size: 1.2em; }

.lg-spec-advice-body { padding: 14px 20px; }

.lg-spec-advice-tier {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--lg-radius-xs);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: var(--lg-transition);
}

.lg-spec-advice-tier.current-tier {
  background: rgba(124, 92, 252, 0.06);
  border-color: rgba(124, 92, 252, 0.15);
}

.lg-spec-advice-tier-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.lg-spec-advice-tier-label {
  font-weight: 600;
  font-size: 0.82em;
  color: var(--lg-text);
}

.lg-spec-advice-tier-badge {
  font-size: 0.65em;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--lg-primary);
  color: #fff;
  display: inline-block;
}

.lg-spec-advice-tier-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.78em;
  color: var(--lg-text-secondary);
  line-height: 1.7;
  direction: ltr;
  text-align: left;
}

.lg-spec-advice-tier-specs span { white-space: nowrap; }

.lg-spec-advice-sep {
  color: var(--lg-text-muted);
  opacity: 0.3;
}

.lg-spec-advice-tier-note {
  font-size: 0.74em;
  color: var(--lg-text-muted);
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  line-height: 1.6;
}

.lg-spec-advice-tier-brands {
  font-size: 0.74em;
  color: var(--lg-accent);
  margin-top: 4px;
  padding: 4px 10px;
  line-height: 1.6;
}

.lg-spec-advice-note {
  font-size: 0.8em;
  color: var(--lg-text-secondary);
  padding: 10px 14px;
  background: rgba(124, 92, 252, 0.05);
  border-radius: var(--lg-radius-xs);
  margin-top: 4px;
  line-height: 1.7;
  text-align: center;
}

.lg-spec-advice-loading {
  text-align: center;
  padding: 20px;
  color: var(--lg-text-muted);
  font-size: 0.82em;
}

/* ===== KEYFRAMES ===== */
@keyframes lg-fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.lg-product-card:nth-child(1) { animation-delay: 0s; }
.lg-product-card:nth-child(2) { animation-delay: 0.06s; }
.lg-product-card:nth-child(3) { animation-delay: 0.12s; }
.lg-product-card:nth-child(4) { animation-delay: 0.18s; }
.lg-product-card:nth-child(5) { animation-delay: 0.24s; }
.lg-product-card:nth-child(6) { animation-delay: 0.30s; }
.lg-product-card:nth-child(7) { animation-delay: 0.36s; }
.lg-product-card:nth-child(8) { animation-delay: 0.42s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .lg-wrapper { padding: 0 20px; }

  .lg-hero { padding: 60px 16px 40px; }
  .lg-hero-title { font-size: 1.8em; }
  .lg-hero-subtitle { font-size: 0.9em; }

  .lg-wizard-progress { margin-bottom: 30px; }
  .lg-steps { padding: 0; }
  .lg-step-circle { width: 34px; height: 34px; font-size: 0.75em; }
  .lg-step-label { font-size: 0.65em; }

  #lg-usage-options { grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 100%; }
  #lg-usage-options .lg-option-card { padding: 22px 14px 18px; }

  .lg-options-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
  .lg-option-card { padding: 22px 12px 18px; }
  .lg-option-icon { font-size: 1.4em; }

  .lg-specs-grid { grid-template-columns: 1fr 1fr; }
  .lg-products-grid { grid-template-columns: 1fr; }
  .lg-insights { grid-template-columns: 1fr; }

  .lg-btn-group { flex-direction: column; }
  .lg-btn { width: 100%; justify-content: center; }

  .lg-step-header h2 { font-size: 1.3em; }
}

@media (max-width: 480px) {
  .lg-wrapper { padding: 0 12px; }

  .lg-hero { padding: 40px 12px 30px; }
  .lg-hero-title { font-size: 1.4em; }
  .lg-hero-subtitle { font-size: 0.82em; }

  #lg-usage-options { grid-template-columns: 1fr 1fr; gap: 8px; }
  #lg-usage-options .lg-option-card { padding: 18px 10px 14px; }
  #lg-usage-options .lg-option-icon { font-size: 1.5em; }

  .lg-options-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lg-option-card { padding: 16px 10px 14px; }
  .lg-option-icon { font-size: 1.2em; }

  .lg-specs-grid { grid-template-columns: 1fr; }
  .lg-products-grid { grid-template-columns: 1fr; }
  .lg-step-header h2 { font-size: 1.1em; }

  .lg-spec-advice-tier-specs { flex-direction: column; align-items: flex-start; gap: 1px; }
  .lg-spec-advice-sep { display: none; }
}

/* ===== ADMIN ===== */
.lg-admin-wrap {
  direction: rtl;
  font-family: var(--lg-font);
  padding: 20px;
}

.lg-admin-wrap h1 { font-size: 1.8em; margin-bottom: 24px; }

.lg-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.lg-admin-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.lg-admin-card h2 {
  font-size: 1.15em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.lg-admin-card-full { grid-column: 1 / -1; }

.lg-repeater-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 14px;
  background: #fafafa;
  border-radius: 8px;
}

.lg-repeater-row input { flex: 1; padding: 6px 10px; border: 1px solid #ddd; border-radius: 6px; }

.lg-repeater-fields {
  display: flex;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.lg-repeater-fields:first-child {
  flex: 0 0 300px;
}

.lg-repeater-fields:first-child input {
  flex: 1;
  min-width: 0;
}

.lg-repeater-fields:last-of-type {
  flex: 1;
  flex-direction: column;
  gap: 6px;
}

.lg-icon-preview {
  display: inline-flex;
  align-items: center;
  width: 32px;
  height: 32px;
  color: var(--lg-primary);
}

.lg-repeater-fields input[type="text"] {
  flex: 1;
  min-width: 0;
}

.lg-remove-row {
  color: #e74c3c !important;
  font-size: 1.2em;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 4px;
}

.lg-tax-radio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85em;
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  transition: all 0.15s;
}

.lg-tax-radio input { margin: 0; flex: none; }

.lg-tax-radio:has(input:checked) {
  background: var(--lg-primary);
  color: #fff;
  border-color: var(--lg-primary);
}

.lg-taxonomy-select {
  width: 100%;
  min-height: 80px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 0.85em;
  font-family: inherit;
}

.lg-taxonomy-select optgroup {
  font-weight: 700;
  color: var(--lg-primary);
  font-size: 0.85em;
  padding: 4px 0;
}

.lg-taxonomy-select option {
  padding: 4px 8px;
  font-weight: 400;
  color: #333;
}

.lg-taxonomy-hint {
  display: block;
  font-size: 0.75em;
  color: #999;
  margin-top: 2px;
}
