/* ═══════════════════════════════════════════════════════════════════════════
   GURA — Base CSS
   Design tokens, reset, typography, global utilities, animations
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:       #F15A24;
  --primary-light: #FF8A5C;
  --primary-dark:  #D14A18;
  --secondary:     #FBB03B;
  --secondary-light:#FDCB74;
  --accent:        #D4145A;
  --accent-light:  #F44E8A;

  /* Neutrals */
  --background:    #FFF8F0;
  --surface:       #FFFFFF;
  --text-dark:     #2D2D2D;
  --text-medium:   #6B6B6B;
  --text-light:    #9E9E9E;
  --divider:       #EEE5DC;
  --divider-light: #F5EDE4;
  --overlay:       rgba(45,45,45,0.45);

  /* Category Colors */
  --cat-food:        #F15A24;
  --cat-food-bg:     #FFEDE6;
  --cat-grocery:     #2D8C4E;
  --cat-grocery-bg:  #E5F5EC;
  --cat-pharmacy:    #D4145A;
  --cat-pharmacy-bg: #FCE4EF;
  --cat-electronics: #2563EB;
  --cat-electronics-bg:#EBF0FF;
  --cat-fashion:     #FBB03B;
  --cat-fashion-bg:  #FFF6E5;
  --cat-beauty:      #9B27AF;
  --cat-beauty-bg:   #F5E8FB;
  --cat-sports:      #0891B2;
  --cat-sports-bg:   #E0F4F9;
  --cat-home:        #92400E;
  --cat-home-bg:     #F5EDE6;

  /* Status */
  --success:   #059669;
  --success-bg:#E5F5EC;
  --warning:   #F59E0B;
  --warning-bg:#FFF6E5;
  --error:     #DC2626;
  --error-bg:  #FEE2E2;
  --info:      #2563EB;
  --info-bg:   #EBF0FF;

  /* Spacing Scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;
  --sp-9: 48px; --sp-10: 64px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs: 11px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 18px;
  --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: 36px;
  --fw-normal: 400; --fw-medium: 500; --fw-semibold: 600;
  --fw-bold: 700; --fw-extrabold: 800;
  --lh-tight: 1.25; --lh-normal: 1.5; --lh-relaxed: 1.7;

  /* Borders */
  --radius-sm: 6px;  --radius-md: 10px; --radius-lg: 16px;
  --radius-xl: 24px; --radius-full: 999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(45,45,45,0.06);
  --shadow-md:  0 4px 12px rgba(45,45,45,0.08);
  --shadow-lg:  0 8px 24px rgba(45,45,45,0.12);
  --shadow-xl:  0 16px 40px rgba(45,45,45,0.16);

  /* Transitions */
  --tr-fast:   150ms ease;
  --tr-normal: 250ms ease;
  --tr-slow:   400ms ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    500;
  --z-toast:    600;
  --z-tooltip:  700;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--text-dark);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ── Typography ───────────────────────────────────────────────────────────── */
h1 { font-size: var(--fs-3xl); font-weight: var(--fw-extrabold); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-xl);  font-weight: var(--fw-bold); line-height: var(--lh-tight); }
h4 { font-size: var(--fs-lg);  font-weight: var(--fw-semibold); }
h5 { font-size: var(--fs-md);  font-weight: var(--fw-semibold); }
h6 { font-size: var(--fs-sm);  font-weight: var(--fw-semibold); }

.text-xs    { font-size: var(--fs-xs); }
.text-sm    { font-size: var(--fs-sm); }
.text-md    { font-size: var(--fs-md); }
.text-lg    { font-size: var(--fs-lg); }
.text-xl    { font-size: var(--fs-xl); }
.text-muted { color: var(--text-light); }
.text-medium{ color: var(--text-medium);}
.text-primary{color: var(--primary);   }
.text-accent{ color: var(--accent);    }
.text-center{ text-align: center;      }
.text-right { text-align: right;       }
.fw-medium  { font-weight: var(--fw-medium);   }
.fw-semibold{ font-weight: var(--fw-semibold); }
.fw-bold    { font-weight: var(--fw-bold);     }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--divider); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Selection ────────────────────────────────────────────────────────────── */
::selection { background: var(--primary); color: #fff; }

/* ── Focus ────────────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}
@keyframes heartPop {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.3); }
  50%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

.animate-fade-in     { animation: fadeIn var(--tr-normal) both; }
.animate-fade-in-up  { animation: fadeInUp var(--tr-slow) both; }
.animate-fade-in-down{ animation: fadeInDown var(--tr-slow) both; }
.animate-slide-right { animation: slideInRight var(--tr-slow) both; }
.animate-scale-in    { animation: scaleIn var(--tr-normal) both; }
.animate-pulse       { animation: pulse 1.5s ease-in-out infinite; }

/* Staggered children */
.stagger > *:nth-child(1)  { animation-delay: 0ms; }
.stagger > *:nth-child(2)  { animation-delay: 50ms; }
.stagger > *:nth-child(3)  { animation-delay: 100ms; }
.stagger > *:nth-child(4)  { animation-delay: 150ms; }
.stagger > *:nth-child(5)  { animation-delay: 200ms; }
.stagger > *:nth-child(6)  { animation-delay: 250ms; }
.stagger > *:nth-child(7)  { animation-delay: 300ms; }
.stagger > *:nth-child(8)  { animation-delay: 350ms; }
.stagger > *:nth-child(9)  { animation-delay: 400ms; }
.stagger > *:nth-child(10) { animation-delay: 450ms; }
.stagger > *:nth-child(11) { animation-delay: 500ms; }
.stagger > *:nth-child(12) { animation-delay: 550ms; }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.truncate {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.line-clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.hidden   { display: none !important; }
.invisible{ visibility: hidden; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.cursor-pointer  { cursor: pointer; }
.no-select { user-select: none; }
.w-full { width: 100%; }
.h-full { height: 100%; }
