/* ============================================
   GAIA Jewellery — Global Styles
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ============================================
   Disable text selection/copy on the public storefront.
   Scoped OFF for: the admin panel (.admin-panel), all form
   fields/contenteditable, and anything explicitly marked
   .selectable (e.g. order numbers customers need to copy
   for payment reference).
   ============================================ */
body:not(.admin-panel) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body:not(.admin-panel) input,
body:not(.admin-panel) textarea,
body:not(.admin-panel) [contenteditable],
body:not(.admin-panel) .selectable {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Serif headings everywhere by default */
h1, h2, h3, h4, .font-serif {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.01em;
}

/* Letter-spaced brand wordmark, matches IG identity */
.brand-wordmark {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.25em;
  font-weight: 500;
}

.brand-wordmark-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  letter-spacing: 0.15em;
  font-weight: 400;
}

/* Tagline signature style */
.tagline-signature {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  letter-spacing: 0.05em;
}

/* Smooth fade-in on scroll */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gold underline hover for nav links */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background-color: #A58A55;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Gold outline button */
.btn-gold {
  background-color: #A58A55;
  color: #F4F0E5;
  border: 1px solid #A58A55;
  transition: all 0.3s ease;
  letter-spacing: 0.08em;
}
.btn-gold:hover {
  background-color: transparent;
  color: #A58A55;
}

.btn-outline-cream {
  background-color: transparent;
  color: #F4F0E5;
  border: 1px solid #F4F0E5;
  transition: all 0.3s ease;
  letter-spacing: 0.08em;
}
.btn-outline-cream:hover {
  background-color: #F4F0E5;
  color: #31493C;
}

.btn-outline-green {
  background-color: transparent;
  color: #31493C;
  border: 1px solid #31493C;
  transition: all 0.3s ease;
  letter-spacing: 0.08em;
}
.btn-outline-green:hover {
  background-color: #31493C;
  color: #F4F0E5;
}

/* Product image zoom on hover (shop grid) */
.product-image-wrap {
  overflow: hidden;
}
.product-image-wrap img {
  transition: transform 0.6s ease;
}
.product-image-wrap:hover img {
  transform: scale(1.06);
}

/* Custom scrollbar for gallery thumbnails */
.gallery-thumbs::-webkit-scrollbar {
  height: 4px;
}
.gallery-thumbs::-webkit-scrollbar-thumb {
  background-color: #A58A55;
}

/* Zoom cursor for product gallery main image */
.zoomable {
  cursor: zoom-in;
}

/* Lightbox / zoom modal */
#zoom-modal {
  display: none !important;
}
#zoom-modal.active {
  display: flex !important;
}

/* Loading spinner */
.spinner {
  border: 2px solid rgba(165, 138, 85, 0.3);
  border-top-color: #A58A55;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* AI chat widget bubble pulse */
@keyframes gentle-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(165, 138, 85, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(165, 138, 85, 0); }
}
.chat-bubble-pulse {
  animation: gentle-pulse 2.5s infinite;
}

/* Mobile menu slide */
#mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s ease;
}
#mobile-menu.open {
  transform: translateX(0);
}

/* Hide scrollbar for horizontally-scrollable rows (e.g. shop filter tabs) while keeping scroll functional */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Simple 2-line text clamp (Tailwind 3 core has no line-clamp utility without the official plugin) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Announcement bar rotating-message fade transition (see Header.tsx +
   announcement-carousel.js). Message text fades out, swaps, fades back in —
   simple opacity crossfade rather than a sliding transform, so the bar's
   fixed 8px/2rem height never needs to accommodate a moving second line.
   BUG FIX (2026-09-22): admin-entered messages longer than the viewport width
   were wrapping onto a 2nd line inside the bar's fixed 32px height — since
   the bar centers its content vertically and clips overflow, that 2nd line
   rendered ON TOP of the 1st line instead of below it, looking like garbled
   overlapping text. white-space:nowrap + text-overflow:ellipsis forces every
   message onto a single line and gracefully truncates with "…" if it's ever
   too long for the current screen width (mobile included), instead of
   wrapping — guaranteeing no more overlap on any device or message length. */
.announcement-fade {
  /* display:block + explicit width:100% (rather than inline-block/auto) is
     required for text-overflow:ellipsis to actually engage inside a flex
     parent — an auto-width flex child's intrinsic size is its full unwrapped
     text width, so overflow/ellipsis never triggers without a bounded width. */
  display: block;
  width: 100%;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.announcement-fade.announcement-fade-out {
  opacity: 0;
}
