/*
Theme Name: Mirchi Market Intelligence
Theme URI: https://mirchimarket.com
Description: AI-powered Indian red chilli market price analytics platform
Author: Mirchi Market
Version: 1.0.0
Tags: dashboard, analytics, market, agriculture
Text Domain: mirchi-market
*/

/* ── Google Fonts loaded via functions.php ── */

:root {
  --orange-400: #FB923C;
  --orange-500: #F97316;
  --orange-600: #EA580C;
  --amber-400:  #FBBF24;
  --amber-500:  #F59E0B;
  --slate-900:  #0F172A;
  --slate-800:  #1E293B;
  --slate-700:  #334155;
  --slate-600:  #475569;
  --slate-500:  #64748B;
  --slate-400:  #94A3B8;
  --slate-300:  #CBD5E1;
  --slate-200:  #E2E8F0;
  --slate-100:  #F1F5F9;
  --slate-50:   #F8FAFC;
  --white:      #FFFFFF;
  --green-400:  #4ADE80;
  --green-500:  #22C55E;
  --blue-500:   #3B82F6;
  --pink-500:   #EC4899;
  --red-500:    #EF4444;
  --violet-400: #818CF8;
  --emerald-400:#34D399;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--slate-100);
  color: var(--slate-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select { font-family: inherit; }
img { max-width: 100%; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--slate-100); }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 3px; }

/* ── Glass card ── */
.glass {
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ── Animation ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}
@keyframes countUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.chart-fade { animation: fadeIn .5s ease; }
.animate-pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }

/* ── Typography helpers ── */
.text-xs   { font-size: 12px; }
.text-sm   { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg   { font-size: 18px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }
.text-3xl  { font-size: 30px; }
.text-4xl  { font-size: 36px; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.tabular-nums   { font-variant-numeric: tabular-nums; }
.tracking-tight { letter-spacing: -.025em; }
.tracking-wide  { letter-spacing: .025em; }
.tracking-widest{ letter-spacing: .1em; }
.uppercase      { text-transform: uppercase; }
.leading-relaxed{ line-height: 1.625; }
.leading-tight  { line-height: 1.25; }

/* ── Color helpers ── */
.text-white   { color: #fff; }
.text-orange  { color: var(--orange-500); }
.text-slate-400{ color: var(--slate-400); }
.text-slate-500{ color: var(--slate-500); }
.text-slate-800{ color: var(--slate-800); }
.text-slate-900{ color: var(--slate-900); }
.text-green   { color: var(--green-500); }
.text-red     { color: var(--red-500); }

/* ── Layout helpers ── */
.container { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: 768px; margin: 0 auto; padding: 0 16px; }

/* ── Flex helpers ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.gap-8  { gap: 32px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }

/* ── Grid helpers ── */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Spacing helpers ── */
.p-3  { padding: 12px; }
.p-4  { padding: 16px; }
.p-5  { padding: 20px; }
.p-6  { padding: 24px; }
.p-8  { padding: 32px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Misc helpers ── */
.rounded    { border-radius: 4px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl{ border-radius: 16px; }
.rounded-full{ border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky   { position: sticky; }
.inset-0  { top: 0; left: 0; right: 0; bottom: 0; }
.top-0    { top: 0; }
.z-50     { z-index: 50; }
.w-full   { width: 100%; }
.h-full   { height: 100%; }
.min-h-screen { min-height: 100vh; }
.hidden   { display: none; }
.text-center { text-align: center; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }
.border-t { border-top: 1px solid var(--slate-200); }
.border-b { border-bottom: 1px solid var(--slate-200); }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.shadow    { box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); }
.shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  border-radius: 16px;
  transition: all .15s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--orange-500);
  color: #fff;
  padding: 12px 28px;
  font-size: 14px;
}
.btn-primary:hover { background: var(--orange-600); }
.btn-secondary {
  background: var(--white);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  padding: 12px 28px;
  font-size: 14px;
}
.btn-secondary:hover { border-color: var(--slate-300); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.btn-sm { padding: 6px 16px; font-size: 12px; border-radius: 20px; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
}
.badge-orange { background: #FFF7ED; color: var(--orange-600); border: 1px solid #FED7AA; }

/* ── Pill filter ── */
.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1.5px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-500);
  cursor: pointer;
  transition: all .15s ease;
}
.pill:hover { border-color: var(--slate-300); }
.pill.active {
  background: var(--slate-800);
  color: #fff;
  border-color: var(--slate-800);
}

/* ── Section header ── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-500);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -.025em;
  margin-bottom: 8px;
}

/* ── Loading overlay ── */
#mmi-loading {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 16px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--orange-500);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive grid ── */
.responsive-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.responsive-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) {
  .responsive-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .responsive-grid-4 { grid-template-columns: repeat(1, 1fr); }
  .responsive-grid-2 { grid-template-columns: repeat(1, 1fr); }
  .section-title { font-size: 22px; }
  .hide-mobile { display: none; }
}
