/* =============================================
   ENHANCED UI/UX IMPROVEMENTS
   ============================================= */

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Enhanced Button Animations */
.btn,
.cta-button,
.order-btn,
button[class*="btn"],
a[class*="btn"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before,
.cta-button::before,
.order-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before,
.cta-button:hover::before,
.order-btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active,
.cta-button:active,
.order-btn:active {
  transform: scale(0.95);
}

/* Enhanced Card Hover Effects */
.menu-card,
.experience-card,
.stat-card,
div[class*="card"] {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card:hover,
.experience-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Image Zoom Effect on Hover */
.menu-image img,
.experience-image img {
  transition: transform 0.5s ease;
}

.menu-card:hover .menu-image img,
.experience-card:hover .experience-image img {
  transform: scale(1.1);
}

/* Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading {
  animation: shimmer 2s infinite;
  background: linear-gradient(
    to right,
    #f0f0f0 0%,
    #e0e0e0 20%,
    #f0f0f0 40%,
    #f0f0f0 100%
  );
  background-size: 1000px 100%;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Slide Up Animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

/* Scale In Animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-in {
  animation: scaleIn 0.5s ease-out;
}

/* Pulse Animation for Notifications */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Enhanced Focus States for Accessibility */
input:focus,
textarea:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(231, 76, 60, 0.4);
  outline-offset: 2px;
}

/* Skip to Content Link for Accessibility */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* Enhanced Form Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="date"],
textarea,
select {
  transition: all 0.3s ease;
  border: 2px solid #e0e0e0;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
  transform: translateY(-2px);
}

/* Enhanced Status Badges */
.status-badge,
span[class*="badge"] {
  animation: fadeIn 0.3s ease;
  transition: all 0.3s ease;
}

.status-badge:hover {
  transform: scale(1.05);
}

/* Enhanced Table Row Hover */
table tbody tr {
  transition: all 0.2s ease;
}

table tbody tr:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transform: scale(1.01);
}

/* Smooth Icon Rotations */
.fa-spin {
  animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Cart Count Badge */
.cart-count {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cart-count.updated {
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.3);
  }
  60% {
    transform: scale(1.1);
  }
}

/* Enhanced Dropdown Animations */
select {
  cursor: pointer;
  transition: all 0.3s ease;
}

select:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* Enhanced Navigation Link Underline Effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

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

/* Enhanced Flash Messages with Icons */
.flash-message,
.alert {
  animation: slideInDown 0.5s ease;
}

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

/* Enhanced Search Input */
input[type="search"],
.search-input {
  position: relative;
  transition: all 0.4s ease;
}

input[type="search"]:focus,
.search-input:focus {
  width: 120%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Enhanced Price Display */
.price {
  font-weight: 700;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.price:hover {
  transform: scale(1.1);
  text-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

/* Enhanced Hero Section Parallax Effect */
.hero {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Enhanced Loading Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Checkbox and Radio Styles */
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  transform: scale(1.2);
}

/* Enhanced Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 0.85rem;
  margin-bottom: 5px;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Enhanced Modal/Dialog Backdrop */
.modal-backdrop {
  animation: fadeIn 0.3s ease;
}

.modal-content {
  animation: scaleIn 0.3s ease;
}

/* Enhanced Progress Bar */
.progress-bar {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  animation: progress 2s ease-in-out;
}

@keyframes progress {
  from {
    width: 0%;
  }
}

/* Enhanced Page Transition */
.page-content {
  animation: fadeIn 0.5s ease;
}

/* Enhanced Logo Animation */
.logo-image {
  transition: all 0.4s ease;
}

.logo:hover .logo-image {
  transform: rotate(5deg) scale(1.1);
}

/* Enhanced Footer Links */
.footer a {
  position: relative;
  transition: all 0.3s ease;
}

.footer a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.footer a:hover::before {
  width: 100%;
}

/* Enhanced Gradient Text */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced Box Shadows on Scroll */
.sticky-header {
  transition: box-shadow 0.3s ease;
}

.sticky-header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Enhanced Image Lazy Load Effect */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Enhanced Success/Error States */
.success-state {
  animation: successPulse 0.6s ease;
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
  }
}

.error-state {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* Enhanced Quantity Controls */
.quantity-controls button {
  transition: all 0.2s ease;
}

.quantity-controls button:hover {
  transform: scale(1.2);
  background: var(--primary-color);
  color: white;
}

.quantity-controls button:active {
  transform: scale(1.1);
}

/* Enhanced Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Enhanced Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  animation: fadeIn 0.6s ease;
}

.empty-state i {
  font-size: 4rem;
  color: #ccc;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}
