/* ============================================
   Cafeteria Miami - Custom Styles
   ============================================ */

/* ---- Base & Global ---- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(200, 85, 160, 0.2);
  color: inherit;
}

/* ---- Hero Gradient ---- */
.hero-gradient {
  background: linear-gradient(
    135deg,
    #fce4ec 0%,        /* soft pink */
    #fdf2f8 20%,       /* lighter pink */
    #f5f0ff 35%,       /* whisper lavender-white */
    #e8faf8 55%,       /* soft mint */
    #d4f5f0 75%,       /* teal tint */
    #e0f7f5 100%       /* pale teal */
  );
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- Floating Decorative Shapes (Hero) ---- */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(40px);
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: #C855A0;
  top: 10%;
  left: -5%;
  animation: floatShape 8s ease-in-out infinite;
}

.shape-2 {
  width: 250px;
  height: 250px;
  background: #5EBFB7;
  top: 20%;
  right: -5%;
  animation: floatShape 10s ease-in-out infinite reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: #C855A0;
  bottom: 5%;
  left: 30%;
  animation: floatShape 12s ease-in-out infinite;
}

@keyframes floatShape {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

/* ---- Navigation ---- */
#navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #C855A0;
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ---- Location Selector Tabs ---- */
.location-tab {
  cursor: pointer;
}

/* Custom select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

/* ---- Category Filter Pills ---- */
.category-pill {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: pointer;
  border: 1px solid transparent;
}

.category-pill:hover {
  background-color: #fce4ec;
  color: #C855A0;
}

.category-pill.active {
  background-color: #C855A0;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(200, 85, 160, 0.3);
}

/* Hide scrollbar for category pills */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ---- Menu Card Image Placeholder ---- */
.menu-card-image {
  background: linear-gradient(
    135deg,
    #fce4ec 0%,
    #f8e8f4 30%,
    #e8f5f3 70%,
    #d4f5f0 100%
  );
  position: relative;
  overflow: hidden;
}

.menu-card-image::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 70%,
    rgba(200, 85, 160, 0.08) 0%,
    transparent 50%
  );
}

/* ---- Menu Card Hover ---- */
.menu-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-card:hover {
  transform: translateY(-4px);
}

/* ---- Add to Cart Button ---- */
.add-to-cart-btn {
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.add-to-cart-btn:hover::before {
  width: 300px;
  height: 300px;
}

/* ---- Text Clamp ---- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Floating Cart Button ---- */
#floating-cart {
  animation: cartPulse 3s ease-in-out infinite;
}

@keyframes cartPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(200, 85, 160, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(200, 85, 160, 0.5);
  }
}

#floating-cart:hover {
  animation: none;
  box-shadow: 0 8px 30px rgba(200, 85, 160, 0.4);
  transform: scale(1.05);
}

/* ---- Cart Added Animation ---- */
@keyframes cartBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  50% { transform: scale(0.9); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.cart-bounce {
  animation: cartBounce 0.5s ease;
}

/* ---- Added-to-cart feedback on button ---- */
.add-to-cart-btn.added {
  background-color: #5EBFB7 !important;
}

/* ---- Mobile Menu Transition ---- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

#mobile-menu.open {
  display: block;
  max-height: 300px;
}

/* ---- Scroll Fade-in Animation ---- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Review Cards ---- */
#reviews article {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#reviews article:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ---- Visit Us Cards ---- */
#visit .bg-white {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#visit > div > div > div.bg-white:hover {
  transform: translateY(-2px);
}

/* ---- Footer Links ---- */
footer a {
  transition: color 0.2s ease;
}

/* ---- Toast Notification ---- */
.toast {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 60;
  background: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ---- Modifier Popup ---- */
.modifier-panel {
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modifier-panel.open {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .modifier-panel {
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .modifier-panel.open {
    transform: scale(1);
    opacity: 1;
  }
}

.modifier-option {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.modifier-option:hover {
  background-color: #f9fafb;
}

.modifier-option.selected {
  background-color: #f0fdfa;
  border-color: #5EBFB7;
}

.modifier-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.modifier-option.selected .modifier-checkbox {
  background-color: #5EBFB7;
  border-color: #5EBFB7;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 640px) {
  .hero-gradient {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .floating-shape {
    opacity: 0.08;
  }

  .shape-1 { width: 150px; height: 150px; }
  .shape-2 { width: 120px; height: 120px; }
  .shape-3 { width: 100px; height: 100px; }

  #floating-cart {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }
}

/* ---- Print Styles ---- */
@media print {
  #navbar,
  #floating-cart,
  .toast,
  #location,
  .add-to-cart-btn,
  #leave-review-btn {
    display: none !important;
  }

  .hero-gradient {
    min-height: auto;
    padding: 20px 0;
    background: white;
  }

  .menu-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
