/* ==========================================================================
   Pawnoir - Haute Pet Cuisine Web Application
   프리미엄 펫 오트 퀴진 & 맞춤 식단 전용 스타일시트
   ========================================================================== */

/* 폰트 및 기본 설정 */
@layer base {
  html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #faf9fa;
    color: #1b1c1d;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .pb-safe {
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
  }
  .pt-safe {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* 스크롤바 숨기기 (모바일 룩 & 필) */
::-webkit-scrollbar {
  display: none !important;
}
* {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* 탭 패널 애니메이션 */
.tab-content-panel {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}
.tab-content-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 모달 및 오버레이 백드롭 */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* 모달 컨텐츠 트랜지션 */
.modal-sheet {
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-sheet {
  transform: translateY(0);
}

.modal-center {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease-out, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-center {
  opacity: 1;
  transform: scale(1);
}

/* 드로어 트랜지션 (오른쪽 슬라이드) */
.drawer-content {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .drawer-content {
  transform: translateX(0);
}

/* 펄스 애니메이션 */
@keyframes softPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(109, 94, 0, 0.3);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 8px rgba(109, 94, 0, 0);
  }
}
.animate-soft-pulse {
  animation: softPulse 2.4s infinite;
}

/* 로딩 스피너 */
@keyframes spinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spinSlow 3s linear infinite;
}

/* 카드 호버 마이크로 인터랙션 */
.product-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.product-card:active {
  transform: scale(0.98);
}
@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(27, 28, 29, 0.08);
  }
}

/* 리플 / 버블 효과 */
.ripple-button {
  position: relative;
  overflow: hidden;
}

/* 럭셔리 라인 & 텍스처 */
.luxury-divider {
  background: linear-gradient(90deg, transparent, rgba(109, 94, 0, 0.25), transparent);
  height: 1px;
}

/* 체크박스 & 라디오 커스텀 */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  accent-color: #094cb2;
}

/* 데스크톱 중앙 컨테이너 래퍼 (모바일 퍼스트 앱 최적화) */
@media (min-width: 640px) {
  .app-container {
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    min-height: 100vh;
    background-color: #faf9fa;
  }
  header.fixed,
  nav.fixed {
    max-width: 540px;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}
