/* ============================================
   Pet Food Global - Design System
   Premium Pet Food E-Commerce
   ============================================ */

/* --- Design Tokens --- */
:root {
  --color-primary: #2D8B4E;
  --color-primary-light: #4CAF50;
  --color-primary-dark: #1E6B3A;
  --color-primary-rgb: 45, 139, 78;
  --color-warm-wood: #8B6914;
  --color-light-wood: #D4A76A;
  --color-soft-orange: #FF8C42;
  --color-soft-orange-light: #FFB380;
  --bg-primary: #FFF8F0;
  --bg-secondary: #F5F2ED;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  --text-primary: #2C2C2C;
  --text-secondary: #6B6B6B;
  --text-tertiary: #9B9B9B;
  --text-inverse: #FFFFFF;
  --text-accent: var(--color-primary);
  --border-light: #E8E4DF;
  --border-medium: #D4CFC8;
  --border-focus: var(--color-primary);
  --color-success: #2D8B4E;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 60px rgba(0, 0, 0, 0.16);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 400ms;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-loading: 500;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-height: 56px;
  --bottom-nav-height: 64px;
}

[data-theme="dark"] {
  --bg-primary: #1A1D23;
  --bg-secondary: #242830;
  --bg-card: #2A2E36;
  --bg-elevated: #32363E;
  --bg-overlay: rgba(0, 0, 0, 0.7);
  --text-primary: #F0EDE8;
  --text-secondary: #A8A4A0;
  --text-tertiary: #706C68;
  --border-light: #363B44;
  --border-medium: #464B54;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.3);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; border: none; outline: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed; inset: 0; z-index: var(--z-loading);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #0a1f14;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loading-bg {
  position: absolute; inset: 0; overflow: hidden;
}
.loading-bg-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: 0.7;
  filter: contrast(1.1) brightness(0.85);
  animation: loadingBgZoom 6s ease-in-out infinite alternate;
}
.loading-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.08) 70%, rgba(0,0,0,0.18) 100%);
}
#nano-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; opacity: 0.4; }
.loading-glow {
  position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,248,240,0.1) 0%, transparent 70%);
  animation: glowPulse 3s ease-in-out infinite; pointer-events: none; z-index: 2;
}
.loading-content { position: relative; z-index: 3; text-align: center; }
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loading-logo { width: 100px; height: 100px; position: relative; margin: 0 auto var(--space-xl); }
.loading-logo .paw-icon, .loading-logo .loading-icon { font-size: 48px; color: var(--color-primary-light); animation: pawBounce 1.5s ease-in-out infinite; text-shadow: 0 0 20px rgba(76,175,80,0.5); }
.loading-rings { position: absolute; inset: 0; }
.loading-ring { position: absolute; inset: -10px; border: 2px solid transparent; border-top-color: var(--color-primary-light); border-radius: 50%; animation: spin 2s linear infinite; }
.loading-ring.delay { inset: -20px; border-top-color: var(--color-soft-orange); animation-duration: 3s; animation-direction: reverse; }
.loading-ring.delay2 { inset: -30px; border-top-color: rgba(139,105,20,0.5); animation-duration: 4s; }
.loading-brand { font-family: var(--font-display); font-size: 1.75rem; color: #fff; margin-bottom: var(--space-sm); text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.loading-tagline { color: rgba(255,255,255,0.85); font-family: var(--font-display); font-size: 1.25rem; margin-bottom: var(--space-lg); text-align: center; text-shadow: 0 1px 5px rgba(0,0,0,0.3); }
.loading-progress { width: 200px; height: 3px; background: rgba(255,255,255,0.2); border-radius: var(--radius-full); overflow: hidden; margin: 0 auto; backdrop-filter: blur(4px); }
.loading-progress-bar { height: 100%; background: linear-gradient(90deg, var(--color-primary-light), var(--color-soft-orange)); border-radius: var(--radius-full); width: 0%; transition: width 0.3s ease; box-shadow: 0 0 8px rgba(76,175,80,0.5); }
.loading-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.loading-particle { position: absolute; width: 4px; height: 4px; background: var(--color-primary-light); border-radius: 50%; opacity: 0; animation: particleFloat 4s ease-in-out infinite; }

@keyframes pawBounce { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-10px) scale(1.1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glowPulse { 0%,100% { transform: scale(1); opacity: 0.2; } 50% { transform: scale(1.3); opacity: 0.35; } }
@keyframes particleFloat { 0% { opacity: 0; transform: translateY(100vh) scale(0); } 20% { opacity: 0.3; } 80% { opacity: 0.3; } 100% { opacity: 0; transform: translateY(-20vh) scale(1); } }
@keyframes loadingBgZoom { 0% { transform: scale(1); } 100% { transform: scale(1.05); } }
.loading-ring.delay2 { inset: -30px; border-top-color: var(--color-warm-wood); animation-duration: 4s; opacity: 0.5; }
.loading-particle {
  position: absolute; border-radius: 50%; opacity: 0;
  animation: particleFloat 4s ease-in-out infinite;
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* === AUTH === */
.auth-screen { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; background: var(--bg-primary); padding: var(--space-md); }
.auth-screen.hidden { display: none; }
.auth-container { width: 100%; max-width: 420px; background: var(--bg-card); border-radius: var(--radius-xl); padding: var(--space-2xl); box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: var(--space-xl); }
.auth-logo .logo-icon { font-size: 40px; color: var(--color-primary); margin-bottom: var(--space-sm); }
.auth-logo h1 { font-size: 1.5rem; }
.auth-logo p { color: var(--text-secondary); font-size: 0.875rem; margin-top: var(--space-xs); }
.auth-tabs { display: flex; background: var(--bg-secondary); border-radius: var(--radius-md); padding: 3px; margin-bottom: var(--space-lg); }
.auth-tab { flex: 1; padding: 10px; text-align: center; border-radius: calc(var(--radius-md) - 2px); font-weight: 500; color: var(--text-secondary); transition: all var(--duration-fast) ease; }
.auth-tab.active { background: var(--bg-card); color: var(--color-primary); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: var(--space-md); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
.form-input { width: 100%; padding: 12px 16px; background: var(--bg-secondary); border: 1.5px solid var(--border-light); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.95rem; transition: border-color var(--duration-fast) ease; }
.form-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1); }
.form-input::placeholder { color: var(--text-tertiary); }
.auth-divider { display: flex; align-items: center; gap: var(--space-md); color: var(--text-tertiary); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.social-login { display: flex; gap: var(--space-sm); }
.social-btn { flex: 1; padding: 10px; border: 1.5px solid var(--border-light); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; gap: var(--space-sm); color: var(--text-primary); font-size: 0.85rem; font-weight: 500; transition: all var(--duration-fast) ease; }
.social-btn:hover { background: var(--bg-secondary); }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.95rem; transition: all var(--duration-fast) ease; cursor: pointer; border: none; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); color: white; box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.3); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.4); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border: 1.5px solid var(--border-light); }
.btn-secondary:hover { background: var(--border-light); }
.btn-outline { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-outline:hover { background: rgba(var(--color-primary-rgb), 0.05); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-secondary); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center; }

/* === HEADER === */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); background: var(--bg-card); border-bottom: 1px solid var(--border-light); z-index: var(--z-sticky); display: flex; align-items: center; padding: 0 var(--space-md); transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) ease; }
.header.scrolled { box-shadow: var(--shadow-md); }
.header.hidden { transform: translateY(-100%); }
.header-logo { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--color-primary); flex-shrink: 0; }
.header-logo i { font-size: 24px; }
.header-search { flex: 1; max-width: 400px; margin: 0 var(--space-md); position: relative; }
.header-search input { width: 100%; padding: 8px 16px 8px 38px; background: var(--bg-secondary); border-radius: var(--radius-full); border: 1.5px solid transparent; color: var(--text-primary); font-size: 0.9rem; transition: all var(--duration-fast) ease; }
.header-search input:focus { border-color: var(--color-primary); background: var(--bg-card); }
.header-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); font-size: 16px; }
.header-actions { display: flex; align-items: center; gap: var(--space-xs); margin-left: auto; }
.header-action-btn { width: 38px; height: 38px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--duration-fast) ease; position: relative; }
.header-action-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.header-action-btn .badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; background: var(--color-soft-orange); color: white; font-size: 10px; font-weight: 700; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.header-action-btn .badge:empty { display: none; }

/* === MAIN CONTENT === */
.main-content { margin-top: var(--header-height); padding-bottom: calc(var(--bottom-nav-height) + 20px); min-height: calc(100vh - var(--header-height)); }
.page-section { display: none; animation: fadeInUp var(--duration-slow) var(--ease-out); }
.page-section.active { display: block; }

/* === HERO CAROUSEL === */
.hero-carousel { position: relative; overflow: hidden; border-radius: var(--radius-lg); margin: var(--space-md); }
.hero-slides { display: flex; transition: transform var(--duration-slow) var(--ease-out); }
.hero-slide { min-width: 100%; position: relative; aspect-ratio: 16/9; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 100%); display: flex; flex-direction: column; justify-content: center; padding: var(--space-xl); color: white; }
.hero-slide-overlay h2 { font-size: 1.5rem; color: white; margin-bottom: var(--space-sm); }
.hero-slide-overlay p { font-size: 0.9rem; opacity: 0.9; margin-bottom: var(--space-md); }
.hero-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all var(--duration-fast) ease; }
.hero-dot.active { background: white; width: 24px; border-radius: 4px; }

/* === SECTION HEADERS === */
.section-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg) var(--space-md) var(--space-md); }
.section-header h2, .section-header h3 { font-size: 1.15rem; }
.section-header .see-all { font-size: 0.85rem; color: var(--color-primary); font-weight: 500; }

/* === CATEGORY GRID === */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); padding: 0 var(--space-md); }
.category-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); padding: var(--space-md) var(--space-sm); background: var(--bg-card); border-radius: var(--radius-md); cursor: pointer; transition: all var(--duration-fast) ease; border: 1.5px solid transparent; }
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); border-color: var(--color-primary); }
.category-card.active { border-color: var(--color-primary); background: rgba(var(--color-primary-rgb), 0.05); }
.category-icon { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--bg-secondary); }
.category-icon img { width: 100%; height: 100%; object-fit: cover; }
.category-name { font-size: 0.75rem; font-weight: 500; color: var(--text-primary); text-align: center; }

/* === PRODUCT CARDS === */
.product-scroll { display: flex; gap: var(--space-md); overflow-x: auto; padding: 0 var(--space-md) var(--space-md); scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.product-scroll::-webkit-scrollbar { display: none; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); padding: 0 var(--space-md) var(--space-md); }
.product-card { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); transition: all var(--duration-normal) var(--ease-out); cursor: pointer; scroll-snap-align: start; flex-shrink: 0; width: 180px; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.product-grid .product-card { width: auto; }
.product-card-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-secondary); }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-normal) ease; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; background: var(--color-soft-orange); color: white; font-size: 0.7rem; font-weight: 700; border-radius: var(--radius-sm); }
.product-card-fav { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); font-size: 16px; transition: all var(--duration-fast) ease; }
.product-card-fav.active, .product-card-fav:hover { color: var(--color-error); }
.product-card-info { padding: var(--space-sm) var(--space-md) var(--space-md); }
.product-card-brand { font-size: 0.7rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }
.product-card-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-rating { display: flex; align-items: center; gap: 4px; margin: 4px 0; }
.product-card-rating i { font-size: 12px; color: var(--color-warning); }
.product-card-rating span { font-size: 0.75rem; color: var(--text-secondary); }
.product-card-price { display: flex; align-items: center; gap: var(--space-sm); }
.product-card-price .current { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--color-primary); }
.product-card-price .original { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-tertiary); text-decoration: line-through; }
.product-card-add { margin-top: var(--space-sm); width: 100%; padding: 8px; background: rgba(var(--color-primary-rgb), 0.08); color: var(--color-primary); border-radius: var(--radius-sm); font-weight: 600; font-size: 0.8rem; transition: all var(--duration-fast) ease; }
.product-card-add:hover { background: var(--color-primary); color: white; }

/* === AI RECOMMEND === */
.ai-recommend { margin: var(--space-md); padding: var(--space-lg); background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08), rgba(255,140,66,0.08)); border-radius: var(--radius-lg); border: 1px solid rgba(var(--color-primary-rgb), 0.15); }
.ai-recommend-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.ai-recommend-header i { font-size: 24px; color: var(--color-primary); }
.ai-modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.ai-module-card { padding: var(--space-md); background: var(--bg-card); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: all var(--duration-fast) ease; border: 1.5px solid transparent; }
.ai-module-card:hover { border-color: var(--color-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ai-module-card i { font-size: 28px; color: var(--color-primary); margin-bottom: var(--space-sm); }
.ai-module-card h4 { font-size: 0.8rem; font-family: var(--font-body); font-weight: 600; }
.ai-module-card p { font-size: 0.7rem; color: var(--text-secondary); margin-top: 2px; }

/* === PET CATEGORIES PAGE === */
.categories-hero { padding: var(--space-xl) var(--space-md); text-align: center; background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.05), rgba(212,167,106,0.1)); }
.categories-hero h2 { margin-bottom: var(--space-sm); }
.categories-hero p { color: var(--text-secondary); font-size: 0.9rem; }
.pet-categories-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); padding: var(--space-md); }
.pet-category-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; cursor: pointer; transition: all var(--duration-normal) ease; }
.pet-category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pet-category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-slow) ease; }
.pet-category-card:hover img { transform: scale(1.08); }
.pet-category-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: var(--space-md); color: white; }
.pet-category-overlay h3 { font-size: 1rem; color: white; }
.pet-category-overlay span { font-size: 0.75rem; opacity: 0.8; }

/* === PRODUCT DETAIL === */
.product-detail { padding-bottom: 80px; }
.product-gallery { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-secondary); }
.product-gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-back-btn { position: absolute; top: 12px; left: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; color: var(--text-primary); z-index: 2; }
.product-info { padding: var(--space-lg) var(--space-md); }
.product-brand-tag { display: inline-block; padding: 2px 10px; background: rgba(var(--color-primary-rgb), 0.1); color: var(--color-primary); font-size: 0.75rem; font-weight: 600; border-radius: var(--radius-full); margin-bottom: var(--space-sm); }
.product-title { font-size: 1.25rem; margin-bottom: var(--space-sm); }
.product-rating-row { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.product-stars { display: flex; gap: 2px; }
.product-stars i { font-size: 14px; color: var(--color-warning); }
.product-reviews { font-size: 0.85rem; color: var(--text-secondary); }
.product-price-row { display: flex; align-items: baseline; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.product-price-current { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--color-primary); }
.product-price-original { font-family: var(--font-mono); font-size: 1rem; color: var(--text-tertiary); text-decoration: line-through; }
.product-price-discount { padding: 2px 8px; background: rgba(239,68,68,0.1); color: var(--color-error); font-size: 0.75rem; font-weight: 700; border-radius: var(--radius-sm); }
.product-tabs { display: flex; border-bottom: 1px solid var(--border-light); padding: 0 var(--space-md); overflow-x: auto; scrollbar-width: none; }
.product-tabs::-webkit-scrollbar { display: none; }
.product-tab { padding: var(--space-md) var(--space-lg); font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; border-bottom: 2px solid transparent; transition: all var(--duration-fast) ease; }
.product-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.product-tab-content { padding: var(--space-lg) var(--space-md); }
.nutrition-table { width: 100%; border-collapse: collapse; }
.nutrition-table th, .nutrition-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 0.85rem; }
.nutrition-table th { font-weight: 600; color: var(--text-secondary); background: var(--bg-secondary); }
.nutrition-table td:last-child { font-family: var(--font-mono); text-align: right; }
.product-bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-card); border-top: 1px solid var(--border-light); padding: var(--space-sm) var(--space-md); display: flex; align-items: center; gap: var(--space-md); z-index: var(--z-sticky); padding-bottom: calc(var(--space-sm) + var(--safe-bottom)); display: none; }
.product-bottom-bar.visible { display: flex; }
.product-bottom-bar .price-display { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; color: var(--color-primary); }
.product-bottom-bar .btn { flex: 1; }

/* === INGREDIENTS === */
.ingredients-hero { padding: var(--space-xl) var(--space-md); text-align: center; background: linear-gradient(135deg, rgba(255,140,66,0.08), rgba(var(--color-primary-rgb),0.05)); }
.ingredients-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); padding: var(--space-md); }
.ingredient-card { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); cursor: pointer; transition: all var(--duration-normal) ease; }
.ingredient-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.ingredient-card-img { aspect-ratio: 4/3; overflow: hidden; }
.ingredient-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-normal) ease; }
.ingredient-card:hover .ingredient-card-img img { transform: scale(1.05); }
.ingredient-card-info { padding: var(--space-md); }
.ingredient-card-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.ingredient-card-info p { font-size: 0.8rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ingredient-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--space-sm); }
.ingredient-tag { padding: 2px 8px; background: rgba(var(--color-primary-rgb), 0.08); color: var(--color-primary); font-size: 0.7rem; border-radius: var(--radius-full); }

/* === AI PAGE === */
.ai-page { padding: var(--space-md); }
.ai-tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); margin-bottom: var(--space-lg); }
.ai-tool-card { padding: var(--space-lg); background: var(--bg-card); border-radius: var(--radius-lg); text-align: center; cursor: pointer; border: 1.5px solid var(--border-light); transition: all var(--duration-normal) ease; }
.ai-tool-card:hover { border-color: var(--color-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ai-tool-card i { font-size: 32px; color: var(--color-primary); margin-bottom: var(--space-sm); }
.ai-tool-card h4 { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.ai-tool-card p { font-size: 0.75rem; color: var(--text-secondary); }
.ai-chat-container { display: flex; flex-direction: column; height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 40px); }
.ai-chat-messages { flex: 1; overflow-y: auto; padding: var(--space-md) 0; display: flex; flex-direction: column; gap: var(--space-md); }
.ai-message { display: flex; gap: var(--space-sm); max-width: 85%; }
.ai-message.bot { align-self: flex-start; }
.ai-message.user { align-self: flex-end; flex-direction: row-reverse; }
.ai-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; flex-shrink: 0; }
.ai-message.user .ai-avatar { background: var(--color-soft-orange); }
.ai-bubble { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-lg); font-size: 0.9rem; line-height: 1.5; }
.ai-message.bot .ai-bubble { background: var(--bg-card); border: 1px solid var(--border-light); border-top-left-radius: 4px; }
.ai-message.user .ai-bubble { background: var(--color-primary); color: white; border-top-right-radius: 4px; }
.ai-chat-input-bar { display: flex; gap: var(--space-sm); padding: var(--space-md) 0; border-top: 1px solid var(--border-light); }
.ai-chat-input { flex: 1; padding: 10px 16px; background: var(--bg-secondary); border: 1.5px solid var(--border-light); border-radius: var(--radius-full); color: var(--text-primary); font-size: 0.9rem; }
.ai-chat-input:focus { border-color: var(--color-primary); }
.ai-quick-actions { display: flex; gap: var(--space-sm); overflow-x: auto; padding: var(--space-sm) 0; scrollbar-width: none; }
.ai-quick-actions::-webkit-scrollbar { display: none; }
.ai-quick-action { padding: 6px 14px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-full); font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; cursor: pointer; transition: all var(--duration-fast) ease; }
.ai-quick-action:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Calorie Calculator */
.calorie-calculator { background: var(--bg-card); border-radius: var(--radius-lg); padding: var(--space-lg); border: 1px solid var(--border-light); }
.calculator-form { display: flex; flex-direction: column; gap: var(--space-md); }
.calculator-result { margin-top: var(--space-lg); padding: var(--space-lg); background: rgba(var(--color-primary-rgb), 0.05); border-radius: var(--radius-md); text-align: center; }
.calorie-number { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--color-primary); }
.calorie-unit { font-size: 0.85rem; color: var(--text-secondary); }

/* === USER CENTER === */
.user-profile-header { padding: var(--space-xl) var(--space-md); text-align: center; background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08), rgba(212,167,106,0.08)); }
.user-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; margin: 0 auto var(--space-md); border: 3px solid var(--bg-card); box-shadow: var(--shadow-md); }
.user-name { font-size: 1.1rem; font-weight: 600; }
.user-email { font-size: 0.85rem; color: var(--text-secondary); }
.user-membership { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; background: linear-gradient(135deg, #D4A76A, #8B6914); color: white; font-size: 0.75rem; font-weight: 600; border-radius: var(--radius-full); margin-top: var(--space-sm); }
.user-stats { display: flex; justify-content: center; gap: var(--space-xl); margin-top: var(--space-lg); }
.user-stat { text-align: center; }
.user-stat-value { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; color: var(--color-primary); }
.user-stat-label { font-size: 0.75rem; color: var(--text-secondary); }
.user-menu { padding: var(--space-md); }
.user-menu-group { margin-bottom: var(--space-lg); }
.user-menu-group-title { font-size: 0.75rem; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; padding: 0 var(--space-md); margin-bottom: var(--space-sm); }
.user-menu-item { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md); background: var(--bg-card); cursor: pointer; transition: background var(--duration-fast) ease; }
.user-menu-item:hover { background: var(--bg-secondary); }
.user-menu-item i { font-size: 20px; color: var(--color-primary); width: 24px; text-align: center; }
.user-menu-item span { flex: 1; font-size: 0.9rem; }
.user-menu-item .arrow { color: var(--text-tertiary); font-size: 16px; }

/* Pet Profiles */
.pet-profile-card { display: flex; gap: var(--space-md); padding: var(--space-md); background: var(--bg-card); border-radius: var(--radius-lg); margin-bottom: var(--space-md); border: 1px solid var(--border-light); }
.pet-profile-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.pet-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pet-profile-info { flex: 1; }
.pet-profile-info h4 { font-size: 0.95rem; font-family: var(--font-body); }
.pet-profile-meta { display: flex; gap: var(--space-md); margin-top: 4px; font-size: 0.8rem; color: var(--text-secondary); }
.add-pet-card { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); padding: var(--space-lg); border: 2px dashed var(--border-medium); border-radius: var(--radius-lg); color: var(--text-secondary); cursor: pointer; transition: all var(--duration-fast) ease; }
.add-pet-card:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* === ADMIN DASHBOARD === */
.admin-dashboard { padding: var(--space-md); }
.admin-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); margin-bottom: var(--space-lg); }
.admin-stat-card { padding: var(--space-lg); background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-light); }
.admin-stat-card i { font-size: 24px; color: var(--color-primary); margin-bottom: var(--space-sm); }
.admin-stat-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; }
.admin-stat-label { font-size: 0.8rem; color: var(--text-secondary); }
.admin-stat-change { font-size: 0.75rem; font-weight: 600; margin-top: 4px; }
.admin-stat-change.up { color: var(--color-success); }
.admin-stat-change.down { color: var(--color-error); }
.admin-section { margin-bottom: var(--space-lg); }
.admin-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-md); }
.admin-section-header h3 { font-size: 1rem; }
.admin-table-wrapper, .admin-table-wrap { overflow-x: auto; background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border-light); margin-top: var(--space-md); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 0.8rem; }
.admin-table th { font-weight: 600; color: var(--text-secondary); background: var(--bg-secondary); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3px; }
.status-badge { padding: 2px 8px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; }
.status-badge.pending { background: rgba(245,158,11,0.1); color: var(--color-warning); }
.status-badge.completed { background: rgba(45,139,78,0.1); color: var(--color-success); }
.status-badge.cancelled { background: rgba(239,68,68,0.1); color: var(--color-error); }
.status-badge.processing { background: rgba(59,130,246,0.1); color: var(--color-info); }
.admin-quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
.admin-quick-action { padding: var(--space-md); background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: all var(--duration-fast) ease; }
.admin-quick-action:hover { border-color: var(--color-primary); }
.admin-quick-action i { font-size: 20px; color: var(--color-primary); margin-bottom: 4px; }
.admin-quick-action span { display: block; font-size: 0.7rem; color: var(--text-secondary); }

/* === CART === */
.cart-page { padding: var(--space-md); }
.cart-empty { text-align: center; padding: var(--space-3xl) var(--space-md); }
.cart-empty i { font-size: 64px; color: var(--text-tertiary); margin-bottom: var(--space-md); }
.cart-empty h3 { margin-bottom: var(--space-sm); }
.cart-empty p { color: var(--text-secondary); font-size: 0.9rem; }
.cart-item { display: flex; gap: var(--space-md); padding: var(--space-md); background: var(--bg-card); border-radius: var(--radius-md); margin-bottom: var(--space-sm); border: 1px solid var(--border-light); }
.cart-item-img { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.cart-item-variant { font-size: 0.8rem; color: var(--text-secondary); }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-sm); }
.cart-item-price { font-family: var(--font-mono); font-weight: 700; color: var(--color-primary); }
.qty-control { display: flex; align-items: center; border: 1px solid var(--border-light); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px; transition: all var(--duration-fast) ease; }
.qty-btn:hover { background: var(--bg-secondary); }
.qty-value { width: 32px; text-align: center; font-size: 0.85rem; font-weight: 600; border-left: 1px solid var(--border-light); border-right: 1px solid var(--border-light); line-height: 28px; }
.cart-item-remove { color: var(--text-tertiary); font-size: 18px; padding: 4px; transition: color var(--duration-fast) ease; }
.cart-item-remove:hover { color: var(--color-error); }
.cart-summary { position: sticky; bottom: calc(var(--bottom-nav-height) + 20px); background: var(--bg-card); border-top: 1px solid var(--border-light); padding: var(--space-md); margin: var(--space-md) calc(-1 * var(--space-md)) 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.05); }
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: var(--space-sm); font-size: 0.9rem; }
.cart-summary-row.total { font-weight: 700; font-size: 1.1rem; padding-top: var(--space-sm); border-top: 1px solid var(--border-light); }
.cart-summary-row.total .amount { font-family: var(--font-mono); color: var(--color-primary); }

/* === BOTTOM NAV === */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-height); background: var(--bg-card); border-top: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-around; z-index: var(--z-sticky); padding-bottom: var(--safe-bottom); }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; color: var(--text-tertiary); transition: color var(--duration-fast) ease; position: relative; }
.bottom-nav-item.active { color: var(--color-primary); }
.bottom-nav-item i { font-size: 22px; }
.bottom-nav-item span { font-size: 0.65rem; font-weight: 500; }
.bottom-nav-item .nav-badge { position: absolute; top: 0; right: 4px; min-width: 16px; height: 16px; background: var(--color-soft-orange); color: white; font-size: 10px; font-weight: 700; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* === SEARCH OVERLAY === */
.search-overlay { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--bg-primary); display: flex; flex-direction: column; transform: translateY(-100%); opacity: 0; transition: all var(--duration-normal) var(--ease-out); }
.search-overlay.open { transform: translateY(0); opacity: 1; }
.search-bar { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border-light); }
.search-bar input { flex: 1; padding: 10px; background: transparent; color: var(--text-primary); font-size: 1rem; }
.search-bar .close-search { font-size: 0.85rem; color: var(--color-primary); font-weight: 500; }
.search-results { flex: 1; overflow-y: auto; padding: var(--space-md); }
.search-suggestions { padding: var(--space-md); }
.search-suggestions h4 { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; margin-bottom: var(--space-sm); }
.search-tags { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.search-tag { padding: 6px 14px; background: var(--bg-secondary); border-radius: var(--radius-full); font-size: 0.8rem; color: var(--text-secondary); cursor: pointer; transition: all var(--duration-fast) ease; }
.search-tag:hover { background: var(--border-light); }

/* === MODAL === */
.modal-overlay { position: fixed; inset: 0; background: var(--bg-overlay); z-index: var(--z-modal); display: flex; align-items: flex-end; justify-content: center; opacity: 0; visibility: hidden; transition: all var(--duration-normal) ease; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-content { background: var(--bg-card); border-radius: var(--radius-xl) var(--radius-xl) 0 0; width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; transform: translateY(100%); transition: transform var(--duration-normal) var(--ease-out); }
.modal-overlay.open .modal-content { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg) var(--space-md); border-bottom: 1px solid var(--border-light); position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.modal-header h3 { font-size: 1.1rem; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--duration-fast) ease; }
.modal-close:hover { background: var(--bg-secondary); }
.modal-body { padding: var(--space-md); }

/* === TOAST === */
.toast-container { position: fixed; top: calc(var(--header-height) + 8px); right: var(--space-md); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-sm); }
.toast { padding: var(--space-sm) var(--space-md); background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: var(--space-sm); font-size: 0.85rem; transform: translateX(120%); transition: transform var(--duration-normal) var(--ease-spring); max-width: 300px; }
.toast.show { transform: translateX(0); }
.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-error); }
.toast.info { border-left: 3px solid var(--color-info); }

/* === THEME TOGGLE === */
.theme-toggle { position: relative; width: 38px; height: 38px; }

/* === SELECT DROPDOWN === */
.select-wrapper { position: relative; }
.select-wrapper select { appearance: none; width: 100%; padding: 10px 36px 10px 12px; background: var(--bg-secondary); border: 1.5px solid var(--border-light); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.9rem; cursor: pointer; }
.select-wrapper::after { content: '\EA4E'; font-family: 'remixicon'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; }

/* === RESPONSIVE === */
@media (min-width: 640px) {
  .category-grid { grid-template-columns: repeat(6, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .pet-categories-list { grid-template-columns: repeat(3, 1fr); }
  .ingredients-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .ai-tools-grid { grid-template-columns: repeat(4, 1fr); }
  .ai-modules { grid-template-columns: repeat(4, 1fr); }
  .hero-slide-overlay h2 { font-size: 2rem; }
}

@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .pet-categories-list { grid-template-columns: repeat(4, 1fr); }
  .ingredients-grid { grid-template-columns: repeat(4, 1fr); }
  .header-search { max-width: 500px; }
  .modal-content { border-radius: var(--radius-xl); margin-bottom: var(--space-xl); max-width: 600px; }
}

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
  .category-grid { grid-template-columns: repeat(8, 1fr); }
  .bottom-nav { display: none; }
  .main-content { padding-bottom: var(--space-xl); }
  .hero-slide-overlay { padding: var(--space-2xl); }
  .hero-slide-overlay h2 { font-size: 2.5rem; }
  .hero-slide-overlay p { font-size: 1.1rem; }
}

/* === RTL SUPPORT === */
[dir="rtl"] .header-search { margin: 0 var(--space-md); }
[dir="rtl"] .header-search i { left: auto; right: 12px; }
[dir="rtl"] .header-search input { padding: 8px 38px 8px 16px; }
[dir="rtl"] .product-card-badge { left: auto; right: 8px; }
[dir="rtl"] .product-card-fav { right: auto; left: 8px; }
[dir="rtl"] .hero-slide-overlay { background: linear-gradient(to left, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 100%); }

/* === FILTER CHIPS === */
.filter-chips { display: flex; gap: var(--space-sm); overflow-x: auto; padding: var(--space-sm) var(--space-md); scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { padding: 6px 16px; background: var(--bg-card); border: 1.5px solid var(--border-light); border-radius: var(--radius-full); font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; cursor: pointer; transition: all var(--duration-fast) ease; }
.filter-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-chip.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* === SKELETON LOADING === */
.skeleton { background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-light) 50%, var(--bg-secondary) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === DISCLAIMER === */
.disclaimer { padding: var(--space-md); background: rgba(245,158,11,0.05); border: 1px solid rgba(245,158,11,0.2); border-radius: var(--radius-md); font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.disclaimer i { color: var(--color-warning); margin-right: var(--space-xs); }

/* === MISSING LAYOUT STYLES === */
.app { width: 100%; min-height: 100vh; }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1400px; margin: 0 auto; }
.header-left { display: flex; align-items: center; gap: var(--space-md); flex-shrink: 0; }
.header-right { display: flex; align-items: center; gap: var(--space-xs); margin-left: auto; }

/* === SECTION BLOCK === */
.section-block { padding: 0 var(--space-md); margin-bottom: var(--space-lg); }

/* === AI FEATURES GRID (Home) === */
.ai-features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.ai-feature-card { padding: var(--space-md); background: var(--bg-card); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: all var(--duration-normal) ease; border: 1.5px solid transparent; }
.ai-feature-card:hover { border-color: var(--color-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ai-feature-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: rgba(var(--color-primary-rgb), 0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-sm); }
.ai-feature-icon i { font-size: 24px; color: var(--color-primary); }
.ai-feature-card h3 { font-size: 0.85rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 2px; }
.ai-feature-card p { font-size: 0.75rem; color: var(--text-secondary); }

/* === INGREDIENTS PREVIEW (Home) === */
.ingredients-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }

/* === PAGE TITLES === */
.page-title { font-size: 1.35rem; margin-bottom: var(--space-xs); }
.subsection-title { font-size: 1rem; font-family: var(--font-body); font-weight: 600; margin-bottom: var(--space-md); color: var(--text-secondary); }
.page-subtitle { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--space-lg); }

/* === CATEGORY CARD ICON/NAME === */
.category-icon { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; margin: 0 auto; }
.category-icon img { width: 100%; height: 100%; object-fit: cover; }
.category-name { font-size: 0.75rem; font-weight: 500; color: var(--text-primary); text-align: center; }

/* === AI CHAT ACTIONS === */
.ai-chat-actions { display: flex; gap: var(--space-sm); overflow-x: auto; padding: var(--space-sm) 0; scrollbar-width: none; }
.ai-chat-actions::-webkit-scrollbar { display: none; }
.ai-quick-btn { padding: 6px 14px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-full); font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; cursor: pointer; transition: all var(--duration-fast) ease; }
.ai-quick-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ai-chat-input-wrap { display: flex; gap: var(--space-sm); padding: var(--space-md) 0; border-top: 1px solid var(--border-light); }
.ai-chat-input-wrap .ai-chat-input { flex: 1; padding: 10px 16px; background: var(--bg-secondary); border: 1.5px solid var(--border-light); border-radius: var(--radius-full); color: var(--text-primary); font-size: 0.9rem; }
.ai-chat-input-wrap .ai-chat-input:focus { border-color: var(--color-primary); }
.ai-send-btn { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); color: white; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; transition: all var(--duration-fast) ease; }
.ai-send-btn:hover { transform: scale(1.05); box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.3); }

/* === AI MODULE ICON === */
.ai-module-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: rgba(var(--color-primary-rgb), 0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-sm); }
.ai-module-icon i { font-size: 24px; color: var(--color-primary); }

/* === CALORIE CALCULATOR FORM === */
.calc-form { display: flex; flex-direction: column; gap: var(--space-md); }
.calc-form .form-group label { font-size: 0.85rem; font-weight: 500; }
.calc-form select, .calc-form input[type="number"] { width: 100%; padding: 10px 14px; background: var(--bg-secondary); border: 1.5px solid var(--border-light); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.9rem; }
.calc-form select:focus, .calc-form input[type="number"]:focus { border-color: var(--color-primary); outline: none; }
#calorie-result { margin-top: var(--space-lg); padding: var(--space-lg); background: rgba(var(--color-primary-rgb), 0.05); border-radius: var(--radius-md); text-align: center; display: none; }

/* === NUTRITION BARS (Ingredient Detail) === */
.nutrition-bars { display: flex; flex-direction: column; gap: var(--space-sm); }
.nutrition-bar-item { }
.nutrition-bar-header { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 4px; }
.nutrition-bar-header span:first-child { color: var(--text-secondary); }
.nutrition-bar-header span:last-child { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); }
.nutrition-bar-track { height: 6px; background: var(--bg-secondary); border-radius: var(--radius-full); overflow: hidden; }
.nutrition-bar-fill { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light)); border-radius: var(--radius-full); transition: width 0.6s var(--ease-out); }

/* === SEARCH OVERLAY EXTRA === */
.search-back, .search-close-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 18px; flex-shrink: 0; }
.search-back:hover, .search-close-btn:hover { background: var(--bg-secondary); }
.search-input-wrap { flex: 1; display: flex; align-items: center; gap: var(--space-sm); background: var(--bg-secondary); border-radius: var(--radius-full); padding: 0 var(--space-md); }
.search-input-wrap i { color: var(--text-tertiary); font-size: 16px; }
.search-input-wrap input { flex: 1; padding: 10px 0; background: transparent; color: var(--text-primary); font-size: 0.95rem; border: none; }
.search-body { flex: 1; overflow-y: auto; padding: var(--space-md); }
.hot-search { margin-bottom: var(--space-lg); }
.hot-search h4 { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; margin-bottom: var(--space-sm); }
.hot-search-tags { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.hot-search-tag { padding: 6px 14px; background: var(--bg-secondary); border-radius: var(--radius-full); font-size: 0.8rem; color: var(--text-secondary); cursor: pointer; transition: all var(--duration-fast) ease; }
.hot-search-tag:hover { background: var(--border-light); color: var(--text-primary); }

/* === SOCIAL BUTTONS === */
.social-buttons { display: flex; gap: var(--space-sm); }
.social-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-xs); padding: 10px; background: var(--bg-secondary); border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 500; color: var(--text-primary); transition: all var(--duration-fast) ease; border: 1px solid var(--border-light); }
.social-btn:hover { background: var(--bg-card); border-color: var(--border-medium); }
.social-btn.google i { color: #4285F4; }
.social-btn.apple i { color: #000; }
.social-btn.facebook i { color: #1877F2; }

/* === AUTH EXTRAS === */
.auth-close { position: absolute; top: var(--space-md); right: var(--space-md); width: 36px; height: 36px; border-radius: 50%; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 20px; z-index: 1; }
.auth-close:hover { background: var(--border-light); }
.auth-logo { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; margin: 0 auto var(--space-md); }
.auth-switch { text-align: center; margin-top: var(--space-lg); font-size: 0.85rem; color: var(--text-secondary); }
.auth-switch a { color: var(--color-primary); font-weight: 600; }
.form-row { display: flex; align-items: center; justify-content: space-between; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; }
.forgot-link { font-size: 0.85rem; color: var(--color-primary); font-weight: 500; }

/* === LANG SELECTOR === */
.lang-selector { position: relative; }
.lang-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--space-sm); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all var(--duration-fast) ease; z-index: var(--z-dropdown); }
.lang-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-section-title { font-size: 0.7rem; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; padding: var(--space-sm) var(--space-sm) var(--space-xs); }
.lang-options { display: flex; flex-direction: column; gap: 2px; }
.lang-option { display: flex; align-items: center; gap: var(--space-sm); padding: 8px var(--space-sm); border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--text-primary); cursor: pointer; transition: background var(--duration-fast) ease; text-align: left; width: 100%; }
.lang-option:hover { background: var(--bg-secondary); }
.lang-option .flag { font-size: 1.1rem; }

/* === HERO EXTRAS === */
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 100%); }
.hero-badge { display: inline-block; padding: 4px 12px; background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; color: white; margin-bottom: var(--space-sm); }
.btn-hero { padding: 12px 28px; font-size: 0.95rem; }
.btn-outline-light { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); border-color: white; }

/* === PET PROFILES LIST === */
.pet-profiles-list { padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-md); }

/* === ADMIN ORDERS BODY === */
.admin-orders-body tr:hover { background: var(--bg-secondary); }

/* === MODAL === */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: flex-end; justify-content: center; opacity: 0; visibility: hidden; transition: all var(--duration-normal) ease; }
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: var(--bg-overlay); }
.modal-content { position: relative; background: var(--bg-card); border-radius: var(--radius-xl) var(--radius-xl) 0 0; width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; padding: 0; transform: translateY(100%); transition: transform var(--duration-normal) var(--ease-out); }
.modal.open .modal-content { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg) var(--space-lg) var(--space-md); position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.modal-header h3 { font-size: 1.1rem; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 18px; }
.modal-close:hover { background: var(--border-light); }
.modal-body { padding: 0 var(--space-lg) var(--space-lg); }

/* === INGREDIENT DETAIL (Modal Content) === */
.ingredient-detail { }
.ingredient-detail-img { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-md); }
.ingredient-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.ingredient-detail h2 { font-size: 1.25rem; margin-bottom: var(--space-xs); }

/* === RESPONSIVE ENHANCEMENTS === */
@media (min-width: 640px) {
  .ai-features-grid { grid-template-columns: repeat(4, 1fr); }
  .ingredients-preview { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .ai-features-grid { gap: var(--space-md); }
  .ingredients-preview { grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
  .modal-content { border-radius: var(--radius-xl); margin-bottom: var(--space-2xl); }
}
@media (min-width: 1024px) {
  .section-block { padding: 0 var(--space-xl); }
  .ingredients-preview { grid-template-columns: repeat(6, 1fr); }
}
