/* ========================================
   FLVR FOOD - Modern Food App Design
   Light Theme + Horizontal Scroll Layout
   ======================================== */

/* ========================================
   Light Theme Variables Override
   ======================================== */
:root {
  /* Light theme colors */
  --flvr-bg: #ffffff;
  --flvr-surface: #f8f9fa;
  --flvr-surface-elevated: #ffffff;
  
  --flvr-text-primary: #1a1a1a;
  --flvr-text-secondary: #6b7280;
  --flvr-text-muted: #9ca3af;
  
  --flvr-accent: #f97316;
  --flvr-accent-light: #fff7ed;
  --flvr-accent-hover: #ea580c;
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  
  /* Updated radius for food app feel */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Spacing adjustments */
  --section-padding: 24px;
  --card-gap: 16px;
}

/* Dark mode override */
[data-theme="dark"] {
  --flvr-bg: #0f0f0f;
  --flvr-surface: #1a1a1a;
  --flvr-surface-elevated: #262626;
  
  --flvr-text-primary: #ffffff;
  --flvr-text-secondary: #a1a1aa;
  --flvr-text-muted: #71717a;
  
  --glass-bg: rgba(30, 30, 30, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ========================================
   App Container
   ======================================== */
.app-container {
  min-height: 100vh;
  background: var(--flvr-bg);
  padding-bottom: 80px; /* Space for bottom nav on mobile */
}

@media (min-width: 768px) {
  .app-container {
    padding-bottom: 0;
  }
}

/* ========================================
   Search Bar (App Style)
   ======================================== */
.app-search {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px var(--section-padding);
  background: var(--flvr-bg);
  border-bottom: 1px solid var(--glass-border);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: var(--flvr-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 16px;
  color: var(--flvr-text-primary);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--flvr-accent);
  background: var(--flvr-surface-elevated);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--flvr-text-muted);
  pointer-events: none;
}

.search-filter-btn {
  position: absolute;
  right: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--flvr-text-secondary);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.search-filter-btn:hover {
  background: var(--flvr-accent-light);
  color: var(--flvr-accent);
}

/* ========================================
   Horizontal Scroll Sections
   ======================================== */
.scroll-section {
  padding: 20px 0;
  margin-bottom: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-padding);
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--flvr-text-primary);
}

.section-action {
  font-size: 14px;
  font-weight: 600;
  color: var(--flvr-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.section-action:hover {
  color: var(--flvr-accent-hover);
}

/* Horizontal Scroll Container */
.horizontal-scroll {
  display: flex;
  gap: var(--card-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px var(--section-padding);
  padding-bottom: 12px;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

/* ========================================
   Category Pills (Horizontal)
   ======================================== */
.category-pill {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--flvr-surface);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  scroll-snap-align: start;
  min-width: 80px;
}

.category-pill:hover {
  background: var(--flvr-accent-light);
  border-color: var(--flvr-accent);
}

.category-pill.active {
  background: var(--flvr-accent);
  border-color: var(--flvr-accent);
}

.category-pill.active .category-pill-icon,
.category-pill.active .category-pill-name {
  color: white;
}

.category-pill-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--flvr-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--flvr-text-secondary);
  font-size: 20px;
}

.category-pill.active .category-pill-icon {
  background: rgba(255, 255, 255, 0.2);
}

.category-pill-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--flvr-text-secondary);
  white-space: nowrap;
}

/* ========================================
   Product Cards (Horizontal)
   ======================================== */
.product-card-horizontal {
  flex-shrink: 0;
  width: 280px;
  background: var(--flvr-surface-elevated);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
  scroll-snap-align: start;
}

.product-card-horizontal:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.product-card-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card-horizontal:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  background: var(--flvr-accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.product-card-favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--flvr-text-muted);
  transition: all 0.2s ease;
}

.product-card-favorite:hover,
.product-card-favorite.active {
  background: var(--flvr-accent);
  color: white;
}

.product-card-info {
  padding: 16px;
}

.product-card-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--flvr-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--flvr-text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--flvr-text-secondary);
}

.product-card-rating svg {
  color: #fbbf24;
  fill: #fbbf24;
}

.product-card-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--flvr-text-primary);
}

.product-card-price .original {
  font-size: 14px;
  font-weight: 500;
  color: var(--flvr-text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

/* ========================================
   Category Sections (Vertical)
   ======================================== */
.category-section {
  padding: 24px var(--section-padding);
  border-top: 1px solid var(--glass-border);
}

.category-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.category-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  color: var(--flvr-text-primary);
}

.category-section-icon {
  width: 44px;
  height: 44px;
  background: var(--flvr-accent-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--flvr-accent);
}

/* ========================================
   Minimal List View
   ======================================== */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--flvr-surface-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-list-item:hover {
  background: var(--flvr-accent-light);
  border-color: var(--flvr-accent);
}

.product-list-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.product-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-list-info {
  flex: 1;
  min-width: 0;
}

.product-list-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--flvr-text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-list-category {
  font-size: 12px;
  color: var(--flvr-text-secondary);
  margin-bottom: 4px;
}

.product-list-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--flvr-accent);
}

.product-list-actions {
  display: flex;
  gap: 8px;
}

.product-list-btn {
  width: 40px;
  height: 40px;
  background: var(--flvr-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--flvr-text-secondary);
  transition: all 0.2s ease;
}

.product-list-btn:hover {
  background: var(--flvr-accent);
  border-color: var(--flvr-accent);
  color: white;
}

/* ========================================
   Product Detail Modal
   ======================================== */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.product-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background: var(--flvr-surface-elevated);
  border-radius: var(--radius-xl);
  overflow: hidden;
  z-index: 201;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.product-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.product-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  z-index: 10;
  transition: all 0.2s ease;
}

.product-modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.product-modal-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.product-modal-content {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 280px);
}

.product-modal-category {
  font-size: 13px;
  font-weight: 700;
  color: var(--flvr-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.product-modal-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--flvr-text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.product-modal-description {
  font-size: 15px;
  color: var(--flvr-text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-modal-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.product-modal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-modal-meta-label {
  font-size: 12px;
  color: var(--flvr-text-muted);
}

.product-modal-meta-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--flvr-text-primary);
}

.product-modal-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.product-modal-current-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--flvr-text-primary);
}

.product-modal-original-price {
  font-size: 20px;
  font-weight: 500;
  color: var(--flvr-text-muted);
  text-decoration: line-through;
}

.product-modal-actions {
  display: flex;
  gap: 12px;
}

.product-modal-btn {
  flex: 1;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.product-modal-btn-primary {
  background: var(--flvr-accent);
  color: white;
  border: none;
}

.product-modal-btn-primary:hover {
  background: var(--flvr-accent-hover);
}

.product-modal-btn-secondary {
  background: var(--flvr-surface);
  color: var(--flvr-text-primary);
  border: 2px solid var(--glass-border);
}

.product-modal-btn-secondary:hover {
  border-color: var(--flvr-accent);
  color: var(--flvr-accent);
}

/* ========================================
   Bottom Navigation (Mobile)
   ======================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 20px;
  color: var(--flvr-text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--flvr-accent);
}

.bottom-nav-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--flvr-accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide bottom nav on desktop */
@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
  
  .app-container {
    padding-bottom: 0;
  }
}

/* ========================================
   Desktop Navigation (Top Pills)
   ======================================== */
.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .desktop-nav-link {
    padding: 10px 20px;
    background: var(--flvr-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--flvr-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
  }
  
  .desktop-nav-link:hover,
  .desktop-nav-link.active {
    background: var(--flvr-accent);
    border-color: var(--flvr-accent);
    color: white;
  }
}

/* ========================================
   App Header
   ======================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--section-padding);
  background: var(--flvr-bg);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--flvr-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header-btn {
  width: 40px;
  height: 40px;
  background: var(--flvr-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--flvr-text-secondary);
  transition: all 0.2s ease;
}

.app-header-btn:hover {
  background: var(--flvr-accent-light);
  color: var(--flvr-accent);
}

/* ========================================
   Hero Banner
   ======================================== */
.hero-banner {
  margin: 0 var(--section-padding);
  padding: 24px;
  background: linear-gradient(135deg, var(--flvr-accent) 0%, var(--flvr-accent-hover) 100%);
  border-radius: var(--radius-xl);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-banner-content {
  position: relative;
  z-index: 1;
}

.hero-banner-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.hero-banner-subtitle {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 16px;
}

.hero-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: white;
  color: var(--flvr-accent);
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-banner-image {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 150px;
  height: 150px;
  opacity: 0.3;
}

/* ========================================
   Animations
   ======================================== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-section {
  animation: slideInUp 0.4s ease forwards;
}

.scroll-section:nth-child(1) { animation-delay: 0ms; }
.scroll-section:nth-child(2) { animation-delay: 100ms; }
.scroll-section:nth-child(3) { animation-delay: 200ms; }

/* ========================================
   Account Page Styles
   ======================================== */
.account-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.account-profile-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--flvr-accent) 0%, var(--flvr-accent-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.account-profile-info h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.account-profile-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.account-menu {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--gray-100);
  transition: background-color 0.2s ease;
}

.account-menu-item:last-child {
  border-bottom: none;
}

.account-menu-item:hover {
  background-color: var(--gray-50);
}

.account-menu-icon {
  width: 40px;
  height: 40px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--flvr-accent);
  flex-shrink: 0;
}

.account-menu-content {
  flex: 1;
}

.account-menu-title {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.account-menu-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.account-menu-arrow {
  color: var(--gray-400);
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--flvr-accent);
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
