/* smooth transition for modal overlay & panel */
.modal-transition {
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}
.modal-panel-transition {
  transition:
    transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1),
    opacity 0.25s ease;
}
/* custom scrollbar for product description area */
.custom-scroll::-webkit-scrollbar {
  width: 5px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
/* thumb gallery active state simulation */
.thumb-active {
  border: 2px solid #3b82f6;
  opacity: 1;
  transform: scale(0.98);
}

/* Hide scrollbar when menu is open on mobile */
body.menu-open {
  overflow: hidden;
}

/* Better touch targets for mobile */
@media (max-width: 1023px) {
  .mobile-menu-item {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Smooth transitions */
#mobileMenu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Improve button responsiveness */
button:active {
  transform: scale(0.98);
}

/* Better dropdown arrow animation */
#mobileShopIcon {
  transition: transform 0.2s ease;
}

/* Toast notification styles */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-notification.hide {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Required field indicator */
.required:after {
  content: " *";
  color: #ca8e9f;
  font-weight: bold;
}

/* Mobile menu styles */
#mobileMenu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Ensure mobile menu is above everything */
#mobileMenu {
  z-index: 9999;
}

#mobileMenu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Ensure mobile menu is above everything */
#mobileMenu {
  z-index: 9999;
}

/* Overlay styles */
#mobileOverlay {
  transition: opacity 0.3s ease;
  z-index: 9998;
  width: 100vw;
  height: 100vh;
}

/* Hide scrollbar when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Better touch targets for mobile */
@media (max-width: 1023px) {
  #mobileMenu button,
  #mobileMenu a {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
  }

  /* Hamburger button improvements */
  #mobileMenuBtn {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition:
      transform 0.1s ease,
      background-color 0.2s ease;
  }

  /* Immediate visual feedback on touch */
  #mobileMenuBtn:active,
  #mobileMenuBtn.active {
    transform: scale(0.92);
    background-color: rgba(202, 142, 159, 0.2);
  }

  /* Remove default button delay on mobile */
  #mobileMenuBtn,
  #closeMenuBtn,
  #mobileShopBtn {
    touch-action: manipulation;
  }

  /* Improve button responsiveness */
  #mobileMenuBtn:active {
    transform: scale(0.95);
  }

  #mobileMenu button:active,
  #mobileMenu a:active {
    background-color: rgba(202, 142, 159, 0.1);
  }
}

/* Remove 300ms click delay on mobile */
button,
a {
  touch-action: manipulation;
}

/* Better dropdown arrow animation */
#mobileShopIcon {
  transition: transform 0.2s ease;
}

/* Ensure menu is visible when open */
#mobileMenu.translate-x-0 {
  transform: translateX(0) !important;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Desktop styles - ensure menu is hidden on desktop */
@media (min-width: 1024px) {
  #mobileMenu {
    display: none !important;
  }
  #mobileOverlay {
    display: none !important;
  }
}

/* Ensure menu slides from right on mobile */
@media (max-width: 1023px) {
  #mobileMenu {
    display: block;
    right: 0;
    left: auto;
  }
}

/* Fix for iOS Safari */
@supports (padding: max(0px)) {
  #mobileMenu .p-6 {
    padding-top: max(1.5rem, env(safe-area-inset-top));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}

/* Prevent text selection on double tap */
#mobileMenuBtn {
  user-select: none;
  -webkit-user-select: none;
}
