/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 *
 * NOTE: Do NOT use @import for other stylesheets here - it doesn't work with digested filenames
 * in production. Instead, include them separately using stylesheet_link_tag in the layout.
 */

/* Premium Restaurant Typography */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&family=Lato:wght@300;400;500;600;700&display=swap');

/* Gavhar Restaurant Brand Colors */
:root {
  --color-primary: #E9D799;
  --color-secondary: #0d3c32;
  --color-text-primary: #0d3c32;
  --color-text-secondary: #4a5568;
  --color-background: #FAF8F3;
  --color-cream: #FAF8F3;
  --color-light-gold: #F4E7C7;
  --color-medium-green: #1a5c4a;
}

/* Premium body styling with paper texture */
body {
  background: linear-gradient(135deg, #FAF8F3 0%, #FDFCF8 50%, #FAF8F3 100%);
  font-family: 'Lato', 'Inter', system-ui, sans-serif;
  color: var(--color-text-primary);
  background-attachment: fixed;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 100vh;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 35px,
      rgba(233, 215, 153, 0.02) 35px,
      rgba(233, 215, 153, 0.02) 70px
    );
  pointer-events: none;
  z-index: -1;
}

/* Premium headings */
.font-serif {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--color-text-primary);
}

/* Hide scrollbars for horizontal scrolling */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Image optimization and loading states */
.lazy-image {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.lazy-loading {
  opacity: 0.6;
  transform: scale(0.98);
}

.lazy-loaded {
  opacity: 1;
  transform: scale(1);
}

.lazy-error {
  opacity: 0.5;
  background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
}

/* Modal fixed width to prevent jumping */
.fixed-modal-width {
  width: 32rem; /* lg equivalent - 30% smaller, better proportions */
  max-width: calc(100vw - 2rem); /* Ensure it fits on mobile */
}

/* Image container consistency */
.modal-image-container {
  min-height: 213px; /* Adjusted for 3:2 ratio (320px * 2/3) */
}

/* Carousel image transitions */
[data-carousel-image] {
  transition: opacity 0.3s ease-in-out;
}

/* Responsive modal width */
@media (max-width: 768px) {
  .fixed-modal-width {
    width: calc(100vw - 1rem);
    max-width: none;
  }

  .modal-image-container {
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .fixed-modal-width {
    width: calc(100vw - 0.5rem);
    margin: 0.25rem;
  }

  .modal-image-container {
    min-height: 160px;
  }
}

/* WebP fallback support */
.webp .webp-image {
  display: block;
}
.no-webp .webp-image {
  display: none;
}
.webp .fallback-image {
  display: none;
}
.no-webp .fallback-image {
  display: block;
}

@media (max-width: 767px) {
  .max-h-mobile-modal {
    max-height: 90vh;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 767px) {
    .max-h-mobile-modal {
      max-height: 90dvh;
    }
  }
}

/* Premium Menu Card Styling */
.menu-card {
  background: linear-gradient(135deg, #ffffff 0%, rgba(250, 248, 243, 0.9) 100%);
  border: 1px solid rgba(233, 215, 153, 0.15);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-card:hover::before {
  opacity: 1;
}

.menu-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 25px rgba(13, 60, 50, 0.12),
    0 0 0 1px rgba(233, 215, 153, 0.2);
}

/* Premium Shadow Effects */
.premium-shadow {
  box-shadow:
    0 1px 3px rgba(13, 60, 50, 0.08),
    0 4px 6px rgba(13, 60, 50, 0.05),
    0 10px 20px rgba(13, 60, 50, 0.03);
}

.premium-shadow-hover:hover {
  box-shadow:
    0 5px 15px rgba(13, 60, 50, 0.15),
    0 10px 30px rgba(13, 60, 50, 0.08);
}

/* Category & Subcategory Premium Styling removed - using inline styles instead */

/* Price Badge Premium Style */
.price-badge {
  background: linear-gradient(135deg, var(--color-primary), #F4E7C7);
  color: var(--color-secondary);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.35rem 1rem;
  border-radius: 1.5rem;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(233, 215, 153, 0.35);
}

/* Premium Button Styling */
.btn-premium {
  background: var(--color-secondary);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-premium:hover {
  background: var(--color-medium-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 60, 50, 0.25);
}

.btn-premium:active {
  transform: translateY(0);
}

/* Menu Image Container Premium */
.menu-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f8f7f5, #ede8e0);
}

.menu-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(13, 60, 50, 0.05) 100%);
  pointer-events: none;
}

.menu-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card:hover .menu-image-container img {
  transform: scale(1.08);
}

/* Ornamental Dividers */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 215, 153, 0.4), transparent);
}

.ornament-divider span {
  color: var(--color-primary);
  font-size: 1.25rem;
}

/* Premium Header */
.premium-header {
  background: linear-gradient(135deg, #0d3c32 0%, #1a5c4a 100%);
  position: relative;
  z-index: 40;
}

/* Gold Accent Line */
.gold-accent-line {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary) 20%, var(--color-primary) 80%, transparent);
  margin: 1.5rem 0;
}

/* Search Toggle Animations */
.search-transition {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(233, 215, 153, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(233, 215, 153, 0);
  }
}

/* Enhanced Search Button States */
.search-button-active {
  animation: pulseGlow 1.5s ease-in-out;
}

/* Smooth height transitions for header */
.header-compact {
  transition: padding 0.3s ease-in-out, height 0.3s ease-in-out;
}

/* Search input focus effects */
.search-input-focus {
  animation: fadeSlideIn 0.3s ease-out forwards;
}

/* Category fade effects */
.category-fade {
  animation: fadeSlideOut 0.2s ease-out forwards;
}

.category-fade-in {
  animation: fadeSlideIn 0.3s ease-out forwards;
}

/* Professional transform utilities */
.transform-gpu {
  transform: translateZ(0);
  will-change: transform;
}

.rotate-smooth {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Search results highlight animation */
@keyframes highlightResult {
  0% {
    background-color: rgba(233, 215, 153, 0.3);
  }
  100% {
    background-color: transparent;
  }
}

.search-result-highlight {
  animation: highlightResult 0.5s ease-out;
}
