/* Critical above-the-fold layout — cacheable, replaces inline block */
:root {
  --primary: #008c69;
  --primary-dark: #006e53;
  --primary-light: #c8e8dd;
  --primary-50: #daf0e8;
  --secondary: #523db8;
  --secondary-light: #ddd6f5;
  --warm: #f9a802;
  --warm-light: #f5e6c0;
  --accent: #008c69;
  --success: #008c69;
  --warning: #f59e0b;
  --danger: #e53e3e;
  --muted: hsl(215, 12%, 52%);
  --text-primary: hsl(215, 28%, 14%);
  --text-secondary: hsl(215, 18%, 38%);
  --bg-warm: hsl(35, 20%, 88%);
  --bg-warm-alt: hsl(35, 16%, 85%);
  --surface: hsl(35, 25%, 92%);
  --card-radius: 16px;
  --glass: hsla(35, 25%, 92%, 0.92);
  --glass-warm: hsla(35, 25%, 92%, 0.95);
  --border: hsl(35, 15%, 82%);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 40px -8px rgba(0, 140, 105, 0.15);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --blur: blur(20px) saturate(1.4);
}

*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: hidden; scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-warm);
  min-height: 100vh;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.site-header,
.navbar {
  background: linear-gradient(135deg, #003d2e 0%, #005a45 40%, #008c69 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 4px 20px rgba(0, 35, 28, 0.35);
  min-height: 58px;
}

.site-header .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 600;
}

.premium-brand { padding: 0; border-radius: 0; transition: none; }

.brand-logo-svg {
  height: 38px;
  width: auto;
  max-width: 172px;
  display: block;
}

.btn,
.btn-primary,
.btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  border: none;
  color: #fff;
  box-shadow: 0 8px 32px -4px hsla(160, 84%, 30%, 0.3);
}

.container,
.container-fluid {
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

.card,
.product-card,
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: none;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.card-body { padding: 1.25rem; }
.card-title { font-weight: 600; color: var(--text-primary); }

img { max-width: 100%; height: auto; display: block; }

.product-image,
.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-warm-alt);
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 140, 105, 0.12);
  background: #fff;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--text-primary); }

.text-white { color: #fff !important; }
.text-muted { color: var(--muted) !important; }

.skeleton-loading,
.skeleton {
  background: linear-gradient(90deg, var(--bg-warm-alt) 25%, hsl(35, 20%, 82%) 50%, var(--bg-warm-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes premiumFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.premium-float { animation: premiumFloat 6s ease-in-out infinite; }

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.live-ticker { overflow: hidden; white-space: nowrap; }

.live-ticker .ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 14px;
  margin-right: 18px;
  font-size: 0.82rem;
  opacity: 0.92;
}

footer,
.site-footer {
  background: hsl(220, 30%, 10%);
  color: hsla(0, 0%, 100%, 0.85);
  padding: 2rem 0;
}

.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll,
  .skeleton-loading,
  .skeleton {
    transition: none !important;
    animation: none !important;
  }
}
