/* ============================
   FOOD GIST — style.css
   Premium UI/UX Overhaul
   ============================ */

/* ---- Global smooth scrolling ---- */
html { scroll-behavior: smooth; }

/* Scrollbar hide utility */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- Navbar scroll effect ---- */
#navbar {
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
#navbar.scrolled {
  background: rgba(253, 246, 236, 0.92);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  box-shadow: 0 1px 24px rgba(0,0,0,0.06);
}

/* ---- Navbar Dynamic Text Colors on Scroll ---- */
#navbar:not(.scrolled) .logo-text,
#navbar:not(.scrolled) .nav-link,
#navbar:not(.scrolled) #menu-toggle svg {
  color: rgba(255, 255, 255, 0.95);
}

#navbar.scrolled .logo-text {
  color: #3e2d1f; /* text-earth-900 */
}

#navbar.scrolled .nav-link,
#navbar.scrolled #menu-toggle svg {
  color: #5d422b; /* text-earth-700 */
}

#navbar .nav-link:hover {
  color: #d4861a !important; /* hover:text-brand-500 */
}

/* Book Event Button in Navbar */
#nav-book-btn {
  border-color: #d4861a;
  color: #b86a12;
}
#nav-book-btn:hover {
  background: #d4861a;
  color: white;
}

#navbar:not(.scrolled) #nav-book-btn {
  border-color: rgba(255, 255, 255, 0.7);
  color: rgba(255, 255, 255, 0.95);
}
#navbar:not(.scrolled) #nav-book-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  color: white;
}

#navbar.scrolled #menu-toggle:hover {
  background: #ede4d8; /* hover:bg-earth-100 */
}
#navbar:not(.scrolled) #menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Hero background ---- */
.hero-bg {
  background: url('images/hero-bg.jpg') center/cover no-repeat;
  background-attachment: fixed;
}

/* Animated scroll line */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.3); }
}

/* ---- Category Pills ---- */
.category-pill {
  background: #f9f5f0;
  color: #5d422b;
  border: 2px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-pill:hover {
  background: #faefd9;
  border-color: #d4861a;
  color: #b86a12;
  transform: translateY(-1px);
}
.category-pill.active {
  background: #d4861a;
  color: white;
  box-shadow: 0 4px 16px rgba(212, 134, 26, 0.35);
  transform: translateY(-1px);
}

/* ---- Food Cards ---- */
.food-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(237, 228, 216, 0.6);
  box-shadow: 0 1px 3px rgba(62, 45, 31, 0.04), 0 4px 12px rgba(62, 45, 31, 0.03);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.food-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(62, 45, 31, 0.1), 0 4px 16px rgba(62, 45, 31, 0.06);
}

.food-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.food-card:hover .food-card-img {
  transform: scale(1.05);
}

.add-to-cart-btn {
  background: linear-gradient(135deg, #d4861a, #b86a12);
  color: white;
  border-radius: 14px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(212, 134, 26, 0.25);
}
.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #b86a12, #964f10);
  box-shadow: 0 4px 16px rgba(212, 134, 26, 0.35);
  transform: translateY(-1px);
}
.add-to-cart-btn:active {
  transform: scale(0.96) translateY(0);
  box-shadow: 0 1px 4px rgba(212, 134, 26, 0.2);
}
.add-to-cart-btn.added {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

/* ---- Cart Drawer ---- */
#cart-drawer {
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
#cart-drawer.open {
  transform: translateY(0) translateX(0) !important;
}

/* Mobile drag handle */
#cart-drawer::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: #d9c9b2;
  border-radius: 4px;
  margin: 10px auto 0;
}
@media (min-width: 640px) {
  #cart-drawer::before { display: none; }
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #d9c9b2;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #5d422b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}
.qty-btn:hover {
  background: #faefd9;
  border-color: #d4861a;
  color: #b86a12;
  transform: scale(1.08);
}
.qty-btn:active {
  transform: scale(0.95);
}

/* ---- Gallery ---- */
.gallery-item {
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.gallery-card-1 {
  background: linear-gradient(to top, rgba(62, 45, 31, 0.9), transparent 50%), url('images/gallery/gallery-1.jpg') center/cover no-repeat;
}
.gallery-card-2 {
  background: linear-gradient(to top, rgba(62, 45, 31, 0.8), transparent 60%), url('images/gallery/gallery-2.jpg') center/cover no-repeat;
}
.gallery-card-3 {
  background: linear-gradient(to top, rgba(62, 45, 31, 0.8), transparent 60%), url('images/gallery/gallery-3.jpg') center/cover no-repeat;
}
.gallery-card-4 {
  background: linear-gradient(to top, rgba(62, 45, 31, 0.8), transparent 60%), url('images/gallery/gallery-4.jpg') center/cover no-repeat;
}
.gallery-card-5 {
  background: linear-gradient(to top, rgba(62, 45, 31, 0.8), transparent 60%), url('images/gallery/gallery-5.jpg') center/cover no-repeat;
}

/* ---- Delivery Options ---- */
.delivery-option-label {
  border-color: #d9c9b2;
  background: white;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.delivery-option-label:hover {
  border-color: #d4861a;
  background: #fdf8f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 134, 26, 0.08);
}
.delivery-option-label.selected {
  border-color: #d4861a;
  background: #fdf8f0;
  box-shadow: 0 0 0 3px rgba(212, 134, 26, 0.12), 0 4px 12px rgba(212, 134, 26, 0.08);
  transform: translateY(-2px);
}
.delivery-option-label.selected .delivery-option-icon {
  background: #faefd9;
}
.delivery-option-label.selected .delivery-option-icon svg {
  color: #d4861a;
}

/* ---- Toast animation ---- */
#toast {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#toast.show {
  animation: toastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
#toast.hide {
  animation: toastOut 0.3s ease forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px) scale(0.95); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translate(-50%, 0) scale(1); }
  to   { opacity: 0; transform: translate(-50%, 20px) scale(0.95); }
}

/* ---- Section entrance animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Food category label ---- */
.cat-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #3e2d1f;
  margin-bottom: 1.75rem;
  position: relative;
  letter-spacing: -0.02em;
}
.cat-label::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, #ecc26e, transparent);
  min-width: 40px;
}

/* ---- Food image placeholder (emoji fallback) ---- */
.food-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
}
.food-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.06), transparent 50%);
  pointer-events: none;
}

/* Checkout modal entrance */
#checkout-modal > div {
  animation: modalIn 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Mobile-specific checkout improvements ---- */
@media (max-width: 639px) {
  #checkout-modal > div {
    border-radius: 24px 24px 0 0;
    max-height: 95vh;
    margin-top: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }
  #checkout-modal {
    align-items: flex-end;
  }
}

/* ---- Premium button pulse on CTA ---- */
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(212, 134, 26, 0.25); }
  50% { box-shadow: 0 4px 24px rgba(212, 134, 26, 0.4); }
}

/* ---- Smooth input focus transitions ---- */
input, textarea, select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
