/* ============================================================
   Fiore Pick — Custom CSS
   Tailwind CDN 으로 커버 안 되는 추가 스타일
   Flat UI Colors 2 — American Palette 기반
   ============================================================ */

/* ---- HTMX Loading Indicator ---- */
.htmx-indicator {
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: flex;
  opacity: 1;
}

/* ---- Line Clamp (Safari fallback) ---- */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #a99c8f;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #675d56;
}
.dark ::-webkit-scrollbar-thumb {
  background: #675d56;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: #a99c8f;
}

/* ---- Toast Notification ---- */
.toast {
  pointer-events: all;
  animation: toastSlideIn 0.3s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}
.toast.toast-exit {
  animation: toastSlideOut 0.25s ease-in forwards;
}
@keyframes toastSlideIn {
  from {
    transform: translateX(calc(100% + 1rem));
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(calc(100% + 1rem));
    opacity: 0;
  }
}

/* ---- Product Card Image Scale ---- */
article.group:hover .img-zoom {
  transform: scale(1.05);
}

/* ---- Navbar scroll backdrop ---- */
#navbar.scrolled > div:first-child {
  border-color: rgb(227 221 214 / 0.8);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}
.dark #navbar.scrolled > div:first-child {
  border-color: rgb(79 72 67 / 0.8);
}

/* ---- Gradient text ---- */
.text-gradient {
  background: linear-gradient(135deg, #755b4d 0%, #7f709c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Skeleton loading ---- */
.skeleton {
  background: linear-gradient(
    90deg,
    rgb(248 247 245) 25%,
    rgb(227 221 214) 50%,
    rgb(248 247 245) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.dark .skeleton {
  background: linear-gradient(
    90deg,
    rgb(21 19 18) 25%,
    rgb(55 50 47) 50%,
    rgb(21 19 18) 75%
  );
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Range input custom styling ---- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #755b4d;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #755b4d, 0 1px 3px rgba(0,0,0,0.2);
  transition: box-shadow 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 4px rgba(117, 91, 77, 0.25), 0 1px 3px rgba(0,0,0,0.2);
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 9999px;
  background: #e3ddd6;
}
.dark input[type="range"]::-webkit-slider-runnable-track {
  background: #4f4843;
}

/* ---- Focus visible styles ---- */
:focus-visible {
  outline: 2px solid #755b4d;
  outline-offset: 2px;
}
.dark :focus-visible {
  outline-color: #c7b3a5;
}

/* ---- Selection color ---- */
::selection {
  background: rgba(117, 91, 77, 0.16);
  color: inherit;
}
.dark ::selection {
  background: rgba(199, 179, 165, 0.24);
  color: inherit;
}

/* ---- Prose content for trend reports ---- */
.report-content {
  color: #241f1d;
  line-height: 1.75;
}
.dark .report-content {
  color: #f1efeb;
}
.report-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #241f1d;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.dark .report-content h2 {
  color: #f1efeb;
}
.report-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #241f1d;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.dark .report-content h3 {
  color: #f1efeb;
}
.report-content p {
  margin-bottom: 1rem;
}
.report-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.report-content li {
  margin-bottom: 0.25rem;
}

/* ---- Pricing card highlight ---- */
.pricing-recommended {
  position: relative;
  z-index: 1;
}
.pricing-recommended::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #755b4d, #7f709c);
  border-radius: calc(1rem + 2px);
  z-index: -1;
}

/* ---- Animation utilities ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Hero section decorative blob ---- */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: blobFloat 8s ease-in-out infinite;
}
@keyframes blobFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* ---- Badge pulse animation ---- */
.badge-pulse {
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ---- Print styles ---- */
@media print {
  nav, footer, .no-print {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}
