/**
 * Mom's Food Restaurant - Enhanced Custom CSS
 * Modern, mobile-first, fast-loading design with gradients and icons
 * Bootstrap 5 + Custom enhancements for admin-level frontend
 */

/* ===============================================
   CSS CUSTOM PROPERTIES (Variables)
   =============================================== */
:root {
  /* Brand Colors */
  --primary-color: #ff6b35;
  --primary-dark: #e55a2b;
  --primary-light: #ff8559;
  --secondary-color: #2c3e50;
  --accent-color: #f39c12;
  --success-color: #25d366;
  --success-dark: #1ea352;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #25d366 0%, #1ea352 100%);
  --gradient-warm: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
  --gradient-hero: linear-gradient(135deg, rgba(255, 107, 53, 0.9) 0%, rgba(247, 147, 30, 0.9) 100%);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  
  /* Spacing */
  --section-padding: 5rem 0;
  --card-radius: 1rem;
  --btn-radius: 0.5rem;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
  --shadow-card: 0 5px 25px rgba(255, 107, 53, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* ===============================================
   GLOBAL STYLES
   =============================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--secondary-color);
  background: #f8f9fa;
  overflow-x: hidden;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

/* Text Gradients */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.loading-spinner {
  text-align: center;
}

/* ===============================================
   HEADER STYLES
   =============================================== */

/* Top Bar */
.top-bar {
  background: var(--gradient-primary);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.top-bar-info .info-item {
  margin-right: 2rem;
  opacity: 0.95;
}

.top-bar-info .info-item i {
  margin-right: 0.5rem;
  width: 16px;
}

/* Main Navigation */
.main-navbar {
  background: white;
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
  transition: var(--transition-normal);
}

.main-navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow-lg);
}

/* Brand */
.navbar-brand {
  text-decoration: none !important;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.brand-tagline {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: -2px;
}

/* Navigation Links */
.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--secondary-color) !important;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: var(--btn-radius);
  transition: var(--transition-fast);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background: var(--gradient-primary);
  color: white !important;
  transform: translateY(-2px);
}

.navbar-nav .nav-link i {
  margin-right: 0.5rem;
}

/* CTA Button */
.navbar-cta .btn {
  padding: 0.5rem 1.5rem;
  font-weight: 600;
}

/* ===============================================
   FLOATING WHATSAPP BUTTON
   =============================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.whatsapp-float {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--gradient-success);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
  animation: float 3s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
  box-shadow: 0 10px 40px rgba(37, 211, 102, 0.3);
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ===============================================
   HERO SECTION
   =============================================== */
.hero-section {
  background: var(--gradient-hero);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 0;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: var(--btn-radius);
}

.hero-features {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.feature-item i {
  font-size: 1.25rem;
  color: var(--accent-color);
}

/* Hero Image Placeholder */
.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.hero-card-placeholder {
  background: white;
  border-radius: var(--card-radius);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  color: var(--secondary-color);
  transform: rotate(2deg);
  transition: var(--transition-slow);
}

.hero-card-placeholder:hover {
  transform: rotate(-2deg) scale(1.05);
}

.hero-card-placeholder .hero-icon {
  font-size: 4rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

/* ===============================================
   OFFERS SECTION
   =============================================== */
.offers-section {
  background: var(--gradient-secondary);
  color: white;
}

.offers-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.offer-banner {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.offer-banner:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.offer-content h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.offer-content p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.discount-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-warm);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.875rem;
}

.coupon-code {
  background: rgba(255, 255, 255, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.5);
  padding: 0.75rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 1px;
  margin: 1rem 0;
}

/* ===============================================
   SECTION STYLES
   =============================================== */
.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.section-subtitle {
  font-size: 1.125rem;
  color: #6c757d;
  max-width: 600px;
  margin: 0 auto;
}

/* ===============================================
   CATEGORY CARDS
   =============================================== */
.category-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 1px solid #f0f0f0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-card);
  border-color: var(--primary-light);
}

.category-icon {
  font-size: 3rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.category-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.category-description {
  color: #6c757d;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* ===============================================
   MENU ITEM CARDS
   =============================================== */
.menu-item-card {
  background: white;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.menu-item-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.item-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition-slow);
}

.menu-item-card:hover .item-image {
  transform: scale(1.05);
}

.item-image-placeholder {
  height: 200px;
  background: var(--gradient-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  opacity: 0.9;
  position: relative;
}

.item-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.item-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
}

.item-description {
  color: #6c757d;
  margin-bottom: 1rem;
  flex-grow: 1;
  font-size: 0.95rem;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.item-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.item-price-original {
  font-size: 1rem;
  color: #6c757d;
  text-decoration: line-through;
  margin-left: 0.5rem;
}

/* Item Badges */
.item-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10;
}

.badge-veg {
  background: var(--success-color);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
}

.badge-non-veg {
  background: #dc3545;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
}

.badge-featured {
  background: var(--gradient-primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
}

/* ===============================================
   BUTTONS
   =============================================== */
.btn {
  border-radius: var(--btn-radius);
  font-weight: 500;
  transition: var(--transition-fast);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
  color: white;
}

.btn-whatsapp {
  background: var(--gradient-success);
  border-color: var(--success-color);
  color: white;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
  background: var(--success-dark);
  border-color: var(--success-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Button Loading State */
.btn-loading {
  pointer-events: none;
  position: relative;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===============================================
   CONTACT SECTION
   =============================================== */
.contact-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.contact-info {
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-top: 0.25rem;
}

.contact-item h5 {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: #6c757d;
  margin: 0;
}

.whatsapp-qr-placeholder {
  background: white;
  border-radius: var(--card-radius);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
}

/* ===============================================
   MENU PAGE STYLES
   =============================================== */
.menu-header {
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  padding: 4rem 0 2rem;
}

.menu-filters {
  background: white;
  padding: 2rem 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.75rem 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  background: white;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
  color: white;
  text-decoration: none;
}

/* Search Bar */
.menu-search {
  max-width: 400px;
  margin: 0 auto 2rem;
}

.search-input {
  border-radius: 25px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
  outline: none;
}

/* ===============================================
   FOOTER STYLES
   =============================================== */
.site-footer {
  background: var(--secondary-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-features {
    flex-direction: column;
    gap: 1rem;
  }
  
  .offers-slider {
    grid-template-columns: 1fr;
  }
  
  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
  }
  
  .filter-tab {
    flex-shrink: 0;
  }
  
  .floating-whatsapp {
    bottom: 15px;
    right: 15px;
  }
  
  .whatsapp-float {
    width: 55px;
    height: 55px;
    font-size: 1.25rem;
  }
  
  .whatsapp-tooltip {
    display: none;
  }
  
  .brand-tagline {
    display: none;
  }
}

@media (max-width: 576px) {
  .hero-section {
    text-align: center;
  }
  
  .hero-content {
    padding: 1rem 0;
  }
  
  .category-card,
  .menu-item-card {
    margin-bottom: 1.5rem;
  }
  
  .item-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .contact-actions {
    margin-top: 2rem;
  }
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-pattern {
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(247, 147, 30, 0.1) 0%, transparent 50%);
}

.lazy-load {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-load.loaded {
  opacity: 1;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow-md: 0 4px 15px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .whatsapp-float {
    animation: none;
  }
}

/* Print styles */
@media print {
  .floating-whatsapp,
  .top-bar,
  .navbar-cta,
  .hero-buttons,
  .btn {
    display: none !important;
  }
  
  .hero-section {
    background: white !important;
    color: black !important;
  }
  
  .text-gradient {
    -webkit-text-fill-color: black !important;
  }
}
