/* صفحه پیشنهاد بودجه — حرفه‌ای + لحظه‌ای */
.budget-pro-page {
  padding-bottom: 2.5rem;
}

.budget-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.35rem;
  border-radius: 1.25rem;
  background: var(--hero-bg, linear-gradient(135deg, var(--brand-soft) 0%, var(--card) 55%));
  color: var(--hero-fg, var(--text));
  border: var(--hero-border, 1px solid rgba(var(--brand-rgb), 0.16));
  box-shadow: var(--hero-shadow, 0 10px 26px rgba(15, 15, 40, 0.07));
  position: relative;
  overflow: hidden;
}

.budget-hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 4px;
  background: var(--hero-accent, var(--brand));
  border-radius: 4px 0 0 4px;
}

.budget-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.budget-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hero-accent, var(--brand));
}

.budget-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  font-weight: 800;
  color: var(--hero-fg, var(--text));
  line-height: 1.3;
}

.budget-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--hero-muted, var(--muted));
}

.budget-rate-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.budget-rate-pill {
  background: var(--hero-chip-bg, rgba(var(--brand-rgb), 0.12));
  color: var(--hero-chip-fg, var(--brand));
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.budget-rate-pill--alt { opacity: 0.95; }

.budget-rate-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}

.budget-panel {
  padding: 1.15rem 1.15rem 1.25rem;
  border-radius: 1.2rem;
  background: var(--card, #fff);
  border: 1px solid var(--border, rgba(15, 20, 40, 0.08));
  box-shadow: 0 10px 24px rgba(15, 20, 40, 0.05);
}

.budget-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.budget-panel-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.budget-panel-head p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.budget-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.budget-live-dot.is-busy {
  background: #f59e0b;
  animation: budget-pulse 1s ease-out infinite;
}

@keyframes budget-pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.budget-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.budget-field > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.budget-input-wrap {
  position: relative;
}

.budget-input-wrap i {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  opacity: 0.85;
}

.budget-input-wrap .form-control {
  height: 52px;
  padding-right: 2.6rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  background: rgba(var(--brand-rgb), 0.03);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.budget-input-wrap .form-control:focus {
  border-color: rgba(var(--brand-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.14);
  background: var(--card, #fff);
}

.budget-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.budget-presets button {
  border: 1px solid rgba(var(--brand-rgb), 0.16);
  background: rgba(var(--brand-rgb), 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.budget-presets button.is-active,
.budget-presets button:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.budget-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: baseline;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(var(--brand-rgb), 0.18);
}

.budget-meta strong {
  font-size: 0.9rem;
  color: var(--brand);
}

.budget-meta span {
  font-size: 0.8rem;
  color: var(--muted);
}

.budget-status,
.budget-empty {
  text-align: center;
  padding: 2.2rem 1rem;
  border-radius: 1.15rem;
  background: var(--card, #fff);
  border: 1px dashed rgba(var(--brand-rgb), 0.22);
  color: var(--muted);
}

.budget-status i,
.budget-empty i {
  font-size: 1.6rem;
  color: var(--brand);
  margin-bottom: 0.65rem;
  display: inline-block;
  opacity: 0.85;
}

.budget-status p,
.budget-empty p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.budget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.budget-grid.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.budget-card {
  display: flex;
  flex-direction: column;
  border-radius: 1.1rem;
  overflow: hidden;
  background: var(--card, #fff);
  border: 1px solid var(--border, rgba(15, 20, 40, 0.08));
  box-shadow: 0 10px 22px rgba(15, 20, 40, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.budget-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 20, 40, 0.09);
}

.budget-card-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #f5f7fc;
  overflow: hidden;
}

.budget-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.budget-type {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
}

.budget-type--bar { color: #059669; }
.budget-type--melted { color: #dc2626; }
.budget-type--jewelry { color: var(--brand); }

.budget-card-body {
  padding: 0.8rem 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.budget-card-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.budget-card-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.budget-card-price {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.25rem;
}

.budget-card-price strong {
  font-size: 0.95rem;
  color: var(--text);
}

.budget-card-price strong small {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.budget-card-price span {
  font-size: 0.72rem;
  color: #059669;
  font-weight: 700;
}

.budget-fit {
  height: 4px;
  border-radius: 99px;
  background: rgba(var(--brand-rgb), 0.1);
  overflow: hidden;
  margin: 0.25rem 0 0.35rem;
}

.budget-fit i {
  display: block;
  height: 100%;
  width: var(--fit, 50%);
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #22c55e));
  border-radius: inherit;
}

.budget-card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: auto;
}

.budget-btn-primary {
  flex: 1;
  height: 38px;
  border-radius: 0.75rem;
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.budget-btn-ghost {
  width: 38px;
  height: 38px;
  border-radius: 0.75rem;
  border: 1px solid rgba(var(--brand-rgb), 0.2) !important;
  background: rgba(var(--brand-rgb), 0.08) !important;
  color: var(--brand) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

html[theme-color="dark"] .budget-panel,
html[theme-color="dark"] .budget-card,
html[theme-color="dark"] .budget-status,
html[theme-color="dark"] .budget-empty {
  background: var(--card);
  border-color: var(--border);
}

html[theme-color="dark"] .budget-card-media {
  background: #1a2035;
}

html[theme-color="dark"] .budget-type {
  background: rgba(18, 22, 42, 0.9);
}

html[theme-color="dark"] .budget-input-wrap .form-control {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

@media (min-width: 768px) {
  .budget-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1200px) {
  .budget-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
