/* ==========================================
   포펙트 데이 (Pawfect Day) - Custom Styling
   ========================================== */

/* Base & Safe Area settings */
@layer base {
  html, body {
    width: 100vw;
    margin: 0;
    padding: 0;
  }
  body {
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
  }
  .pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .pt-safe {
    padding-top: env(safe-area-inset-top, 0px);
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* App Desktop Shell: on screens >= 640px, center the app with a sleek mobile preview border */
@media (min-width: 640px) {
  body {
    background-color: #f2e9e4;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  
  .app-viewport {
    max-width: 480px;
    width: 100%;
    min-height: 100vh;
    box-shadow: 0 10px 40px rgba(90, 65, 56, 0.12);
    border-left: 1px solid rgba(226, 191, 178, 0.35);
    border-right: 1px solid rgba(226, 191, 178, 0.35);
    position: relative;
    background-color: #fff8f5;
  }

  header.fixed, nav.fixed {
    max-width: 480px;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

@keyframes scaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@keyframes cartBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-down {
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-up {
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.heart-active {
  color: #ba1a1a !important;
  font-variation-settings: 'FILL' 1 !important;
  animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Modal Backdrop */
.modal-backdrop {
  background-color: rgba(31, 27, 23, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Toast Notification Styling */
#toast-container {
  pointer-events: none;
  z-index: 100;
}

#toast-notification {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(20px);
  opacity: 0;
}

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

/* Tab Switching Fade */
.tab-content {
  display: none;
}

.tab-content.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}
