/* assets/css/style.css
   Small hand-written additions the Tailwind Play CDN can't generate on its
   own (keyframes, ::-webkit- pseudo-elements). Everything else uses plain
   Tailwind utility classes directly in the markup. */

html {
  scroll-behavior: smooth;
}

/* Hero slider crossfade */
.slide {
  opacity: 0;
  transition: opacity 900ms ease-in-out;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

/* Slow "Ken Burns" zoom on the active hero slide's image for a subtle
   sense of motion instead of a static photo. */
.slide img {
  transform: scale(1.06);
  transition: transform 6500ms ease-out;
}
.slide.is-active img {
  transform: scale(1);
}

/* Sticky header gains a shadow once the page has scrolled, so it reads
   as "lifted" above the content instead of blending into it. */
#site-header.is-scrolled {
  box-shadow: 0 4px 16px -4px rgb(0 0 0 / 0.08);
}

/* Generic scroll-reveal: elements start faded/offset and animate in once
   they enter the viewport (see the IntersectionObserver in main.js).
   Respects reduced-motion preferences. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .slide img { transition: none; transform: none; }
}

/* Product gallery thumbnail active ring */
.thumb-active {
  outline: 2px solid #3F6F2A;
  outline-offset: 2px;
}

/* Slim custom scrollbar for horizontal scrollers (category chips, etc.) */
.scrollbar-thin::-webkit-scrollbar { height: 6px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #E4E4E6; border-radius: 9999px; }

/* Skeleton loading shimmer for AJAX variant swaps */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0efe9 25%, #e8e6de 37%, #f0efe9 63%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* Fallback multi-line clamp for older browsers (Tailwind's line-clamp-* covers modern ones) */
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product description rendering (admin-authored via the rich-text editor).
   Tailwind's preflight reset strips default paragraph/list spacing and
   bullets, so this restores just enough to read as normal formatted text. */
.rich-content p { margin-bottom: 1em; }
.rich-content p:last-child { margin-bottom: 0; }
.rich-content ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1em; }
.rich-content ol { list-style: decimal; padding-left: 1.5em; margin-bottom: 1em; }
.rich-content li { margin-bottom: 0.25em; }
.rich-content strong, .rich-content b { font-weight: 600; color: inherit; }
.rich-content .ql-align-center { text-align: center; }
.rich-content .ql-align-right { text-align: right; }
.rich-content .ql-align-justify { text-align: justify; }

/* ============ MOBILE BOTTOM NAV (Admin > Content > Mobile Bottom Nav) ============
   Flipkart/Amazon-app style fixed icon bar, mobile only. `.has-mobile-nav`
   is only added to <body> when at least one active item exists, so pages
   never carry the extra bottom padding for an empty/unconfigured bar. */
.mobile-bottom-nav {
  display: none;
}
@media (max-width: 639px) {
  .has-mobile-nav .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background: #fff;
    border-top: 1px solid var(--line, #E8DFC9);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(35, 31, 26, 0.06);
  }
  /* Room at the bottom of the page so the fixed bar never overlaps content
     (e.g. the footer, or a sticky "Add to Cart" button on product pages). */
  .has-mobile-nav {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0));
  }
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 2px 6px;
  color: var(--muted, #6E6650);
  text-decoration: none;
  position: relative;
}
.mobile-nav-item.is-active {
  color: var(--accentDark, #3F6F2A);
}
.mobile-nav-item span {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}
.mobile-nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--accent, #C08A2E);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 999px;
  height: 15px;
  min-width: 15px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ ANNAKSHI ============ */
/* Serif headings get slightly tighter optical spacing; Tamil text inside
   headings falls back to Hind Madurai, which carries Tamil glyphs. */
.font-display { font-feature-settings: "kern", "liga"; }
:focus-visible { outline: 2px solid #C08A2E; outline-offset: 2px; }
.rich-content h2 { font-family: "Lora", "Hind Madurai", Georgia, serif; font-size: 1.5rem; font-weight: 700; color: #24441C; margin: 1.6em 0 0.5em; }
.rich-content h3 { font-family: "Lora", "Hind Madurai", Georgia, serif; font-size: 1.25rem; font-weight: 600; color: #24441C; margin: 1.5em 0 0.4em; }
.rich-content a { color: #3F6F2A; text-decoration: underline; text-underline-offset: 3px; }

/* Recipe method: numbered steps with a gold step number */
.recipe-method ol { list-style: none; counter-reset: step; padding-left: 0; }
.recipe-method ol > li { counter-increment: step; position: relative; padding-left: 2.6rem; margin-bottom: 1.1em; }
.recipe-method ol > li::before { content: counter(step); position: absolute; left: 0; top: 0.1em; width: 1.8rem; height: 1.8rem; border-radius: 9999px; background: #FBF1DC; color: #8A5E14; border: 1px solid #C08A2E; font: 600 0.85rem/1.8rem "Lora", Georgia, serif; text-align: center; }
/* Quill 2 marks bullet items inside <ol> with data-list="bullet" */
.recipe-method li[data-list="bullet"]::before { content: ""; width: 6px; height: 6px; top: 0.7em; left: 0.8rem; border: 0; background: #C08A2E; }
