/* ==========================================================================
   Sehat Bazar — design system
   Tokens: cream/white base (client brief) + turmeric-gold & plum accents
   (a spice-bazar palette, deliberately not the terracotta/serif cliché).
   Display face: Fraunces (warm, soft-curved serif) — used with restraint.
   Body face: Manrope. Utility/price face: Space Mono (bazaar price-tag feel).
   ========================================================================== */

:root {
  --cream: #FAF6EF;
  --cream-deep: #F1E9DA;
  --white: #FFFFFF;
  --ink: #2B2118;
  --ink-soft: #5B4E40;
  --turmeric: #C98A2C;
  --turmeric-deep: #A8721F;
  --plum: #6B2737;
  --plum-deep: #521D2A;
  --sage: #6E7B5C;
  --blush: #E8C4B8;
  --line: rgba(43, 33, 24, 0.12);

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --shadow-soft: 0 20px 60px -20px rgba(43, 33, 24, 0.25);
  --shadow-tag: 0 10px 24px -8px rgba(107, 39, 55, 0.35);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

a { color: inherit; }

/* ---------- texture: fine paper grain over the cream base ---------- */
.bazar-grain {
  position: relative;
}
.bazar-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(43,33,24,0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  z-index: 0;
}

/* ---------- eyebrow labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--plum);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--turmeric);
  display: inline-block;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--plum);
  color: var(--cream);
  box-shadow: var(--shadow-tag);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--plum-deep); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline:hover { transform: translateY(-2px); background: var(--ink); color: var(--cream); }
.btn-gold {
  background: var(--turmeric);
  color: var(--ink);
}
.btn-gold:hover { transform: translateY(-2px); background: var(--turmeric-deep); color: var(--cream); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.8rem; }

/* ---------- navigation ---------- */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#site-nav.scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 24px -18px rgba(43,33,24,0.35);
}
.nav-link {
  position: relative;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.3rem 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--turmeric);
  transition: right 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { right: 0; }
.nav-link.active { color: var(--plum); }

.cart-badge {
  min-width: 1.15rem;
  height: 1.15rem;
  font-size: 0.65rem;
}

/* ---------- logo wordmark (placeholder until real logo is dropped in) ---------- */
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:#ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.05rem;
  box-shadow: inset 0 0 0 2px rgba(250,246,239,0.35);
}
.logo-mark-img {
  background: #ffffff;
  box-sizing: border-box;
  padding: 5px;
  object-fit: contain;
  box-shadow: inset 0 0 0 2px rgba(43,33,24,0.08), 0 1px 4px rgba(43,33,24,0.12);
}

/* ---------- hero: layered stacked-card drop shadows (index.php) ---------- */
.hero-stack {
  position: relative;
  isolation: isolate;
}
.hero-stack::before,
.hero-stack::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  z-index: -1;
}
.hero-stack::before {
  background: var(--turmeric);
  transform: rotate(-3deg) translate(-10px, 10px);
  opacity: 0.55;
}
.hero-stack::after {
  background: var(--plum);
  transform: rotate(2.5deg) translate(12px, 16px);
  opacity: 0.4;
}
.hero-stack-inner {
  background: var(--white);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

/* ---------- marquee ticker ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.marquee-track {
  display: inline-flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 2.2rem;
}
.marquee-item.dot::before {
  content: '●';
  color: var(--turmeric);
  margin-right: 2.2rem;
}

/* ---------- botanical line-art accents ---------- */
.botanical {
  color: var(--turmeric);
  opacity: 0.55;
}

/* ---------- carousel (index1.php) — awning / market-stall styling ---------- */
.bazar-carousel {
  position: relative;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.bazar-carousel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 22px;
  z-index: 3;
  background: repeating-linear-gradient(115deg, var(--plum) 0 26px, var(--turmeric) 26px 52px);
  clip-path: polygon(0 0,100% 0,100% 55%,95% 100%,90% 55%,85% 100%,80% 55%,75% 100%,70% 55%,65% 100%,60% 55%,55% 100%,50% 55%,45% 100%,40% 55%,35% 100%,30% 55%,25% 100%,20% 55%,15% 100%,10% 55%,5% 100%,0 55%);
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.carousel-slide.is-active { opacity: 1; z-index: 1; }
.carousel-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 10px;
}
.carousel-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--turmeric);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum);
  opacity: 0.75;
  transition: all 0.3s ease;
}
.carousel-dot.is-active {
  background: var(--turmeric);
  color: var(--ink);
  opacity: 1;
  transform: scale(1.12);
}

/* ---------- price tag (signature bazar element) ---------- */
.price-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cream);
  background: var(--plum);
  padding: 0.35rem 0.9rem 0.35rem 0.7rem;
  border-radius: 3px 10px 10px 3px;
  transform: rotate(-2deg);
  box-shadow: var(--shadow-tag);
}
.price-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cream);
}

/* ---------- stamp badge (bazar seal) ---------- */
.stamp {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 2px dashed var(--plum);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-8deg);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--plum);
  line-height: 1.3;
  flex-shrink: 0;
}

/* ---------- cards ---------- */
.card {
  background: var(--white);
  border-radius: 22px;
  border: 1px solid var(--line);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

/* ---------- team avatar stamp (Our Story) ---------- */
.avatar-stamp {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--cream);
  position: relative;
  box-shadow: var(--shadow-soft);
}
.avatar-stamp::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1.5px dashed rgba(250,246,239,0.55);
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ---------- section divider (botanical, not generic wave) ---------- */
.bazar-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--turmeric);
}
.bazar-divider .line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- menu page ---------- */
.menu-row {
  border-bottom: 1px dashed var(--line);
}
.menu-row:last-child { border-bottom: none; }
.menu-price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--plum);
  white-space: nowrap;
}
.menu-price .unit {
  font-size: 0.65rem;
  color: var(--ink-soft);
  font-weight: 500;
  display: block;
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.menu-price-mp {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--turmeric-deep);
  border: 1px dashed var(--turmeric);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}

/* ---------- menu tabs ---------- */
.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: sticky;
  top: 80px;
  z-index: 20;
  background: var(--cream);
  padding: 0.9rem 0;
}
.menu-tab {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  transition: all 0.25s ease;
  cursor: pointer;
}
.menu-tab:hover {
  border-color: var(--turmeric);
  color: var(--ink);
}
.menu-tab.is-active {
  background: var(--plum);
  border-color: var(--plum);
  color: var(--cream);
  box-shadow: var(--shadow-tag);
}
.menu-panel {
  display: none;
}
.menu-panel.is-active {
  display: block;
  animation: menuFade 0.4s ease;
}
@keyframes menuFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.menu-subhead {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--turmeric-deep);
}

/* ---------- forms (Contact page) ---------- */
.field {
  position: relative;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--turmeric);
  box-shadow: 0 0 0 4px rgba(201,138,44,0.15);
}
.field label {
  position: absolute;
  left: 1rem;
  top: 0.9rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  pointer-events: none;
  transition: all 0.2s ease;
  transform-origin: left top;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-0.55rem) scale(0.72);
  color: var(--plum);
}
.field textarea { resize: vertical; min-height: 120px; }

/* ---------- misc ---------- */
.clip-scallop {
  clip-path: polygon(0 8%, 5% 0, 95% 0, 100% 8%, 100% 100%, 0 100%);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.animate-shake { animation: shake 0.4s ease; }
.animate-shake input, .animate-shake textarea { border-color: var(--plum) !important; }

::selection {
  background: var(--turmeric);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--turmeric);
  outline-offset: 3px;
}
