@import url('/assets/css/local-fonts.css');

:root {
  /* Colors - Red Sos Warm Artisan Bistro Palette */
  --bg-main: #FAF8F5;
  --bg-secondary: #F2ECE4;
  --bg-card: #FFFFFF;
  
  --color-primary: #1C1917;
  --color-secondary: #292524;
  --color-accent: #B91C1C;
  --color-accent-dark: #8B1515;
  --color-rose: rgba(185, 28, 28, 0.08);
  
  --color-dark-surface: #1C1917;
  --color-dark-border: #44403C;
  
  --color-green-muted: #4B6B55;
  --color-green-light: #E0EBE2;
  --color-gold: #D97706;
  
  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --border-color: #E5DFD5;
  --border-light: #F0EAE1;
  --color-disabled: #A8A29E;
  
  --status-success: #16A34A;
  --status-warning: #D97706;
  --status-error: #B91C1C;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
  
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;

  /* Global Horizontal Layout Tokens */
  --app-gutter: clamp(20px, 2vw, 32px);
  --app-gutter-right: calc(var(--app-gutter) - 15px);
  --section-gap: 16px;
  --card-gap: 16px;

  /* Border Radius */
  --radius-card: 24px;
  --radius-btn: 12px;
  --radius-pill: 999px;

  /* Shadows - Warm Organic Ambient */
  --shadow-sm: 0 2px 4px rgba(44, 30, 20, 0.04);
  --shadow-md: 0 4px 12px rgba(44, 30, 20, 0.06);
  --shadow-lg: 0 12px 32px rgba(44, 30, 20, 0.08);
}

/* Base Reset & Stable Scrollbar */
html {
  scrollbar-gutter: stable;
}

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

/* Custom Premium Scrollbar - Solid Dark Burgundy (#8B1515) by Default */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
}
::-webkit-scrollbar-thumb {
  background: #8B1515 !important;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: #5E0E0E !important;
}
.card:hover ::-webkit-scrollbar-thumb {
  background: #8B1515 !important;
}
.card ::-webkit-scrollbar-thumb:hover {
  background: #5E0E0E !important;
}

/* Universal No-Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar-track,
.no-scrollbar::-webkit-scrollbar-thumb {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
.no-scrollbar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Explicit Category Rails Scrollbar Suppression */
#category-filters-tier-1,
#category-filters-tier-2,
#channel-category-filters-tier-1,
#channel-category-filters-tier-2,
#recipe-category-filters-tier-1,
#recipe-category-filters-tier-2 {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
#category-filters-tier-1::-webkit-scrollbar,
#category-filters-tier-1::-webkit-scrollbar-track,
#category-filters-tier-1::-webkit-scrollbar-thumb,
#category-filters-tier-2::-webkit-scrollbar,
#category-filters-tier-2::-webkit-scrollbar-track,
#category-filters-tier-2::-webkit-scrollbar-thumb,
#channel-category-filters-tier-1::-webkit-scrollbar,
#channel-category-filters-tier-1::-webkit-scrollbar-track,
#channel-category-filters-tier-1::-webkit-scrollbar-thumb,
#channel-category-filters-tier-2::-webkit-scrollbar,
#channel-category-filters-tier-2::-webkit-scrollbar-track,
#channel-category-filters-tier-2::-webkit-scrollbar-thumb,
#recipe-category-filters-tier-1::-webkit-scrollbar,
#recipe-category-filters-tier-1::-webkit-scrollbar-track,
#recipe-category-filters-tier-1::-webkit-scrollbar-thumb,
#recipe-category-filters-tier-2::-webkit-scrollbar,
#recipe-category-filters-tier-2::-webkit-scrollbar-track,
#recipe-category-filters-tier-2::-webkit-scrollbar-thumb {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* Subcategory Dock / Island Keyframes */
@keyframes subcatSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Firefox standard scrollbars */
* {
  scrollbar-color: #8B1515 transparent;
  scrollbar-width: thin;
}

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography Classes */
.text-page-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.2; }
.text-section-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.3; }
.text-card-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.4; }
.text-body { font-size: 14px; font-weight: 400; line-height: 1.5; }
.text-small { font-size: 12px; font-weight: 500; color: var(--text-secondary); }

/* Common Layouts */
.container {
  width: 100%;
  max-width: 100%;
  padding: 0 var(--app-gutter-right) var(--app-gutter) var(--app-gutter);
  margin: 0 auto;
}

.flex-row { display: flex; flex-direction: row; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* Card System */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  height: 40px;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
}
.btn-primary:hover:not(:disabled) { 
  background-color: var(--color-accent); 
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}
.btn-secondary:hover:not(:disabled) { 
  background-color: #E2E4E8; 
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover:not(:disabled) { 
  background-color: var(--bg-secondary); 
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}
