@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.13 0 0);
  --card: oklch(0.98 0 0);
  --primary: oklch(0.13 0 0);
  --primary-foreground: oklch(1 0 0);
  --muted: oklch(0.95 0 0);
  --muted-foreground: oklch(0.5 0 0);
  --accent: oklch(0.92 0 0);
  --border: oklch(0.88 0 0);
  --whatsapp: oklch(0.62 0.19 145);
}

* { box-sizing: border-box; border-color: var(--border); }
html, body { margin: 0; padding: 0; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Syne', sans-serif; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Tailwind helper utilities mapped to tokens */
.font-heading { font-family: 'Syne', sans-serif; }
.bg-background { background-color: var(--background); }
.bg-foreground { background-color: var(--foreground); }
.bg-primary { background-color: var(--primary); }
.bg-accent { background-color: var(--accent); }
.bg-muted { background-color: var(--muted); }
.text-background { color: var(--background); }
.text-foreground { color: var(--foreground); }
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.border-border { border-color: var(--border); }

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--foreground);
  padding: 0.75rem 2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}
.btn-outline:hover { background: var(--primary); color: var(--primary-foreground); }

.section-padding { padding: 5rem 1.5rem; }

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background-color: var(--whatsapp);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px oklch(0 0 0 / 0.2);
  transition: transform 0.3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* Floating FAQ button */
.faq-float {
  position: fixed;
  bottom: 7rem;
  right: 1.5rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background-color: var(--foreground);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px oklch(0 0 0 / 0.2);
  border: none;
  transition: transform 0.3s ease;
}
.faq-float:hover { transform: scale(1.1); }
.faq-float .ping {
  position: absolute;
  top: 0; right: 0;
  width: 0.75rem; height: 0.75rem;
  border-radius: 9999px;
  background-color: var(--whatsapp);
  animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}

/* Chat panel */
.chat-panel {
  position: fixed;
  bottom: 11rem;
  right: 1.5rem;
  z-index: 50;
  width: calc(100vw - 3rem);
  max-width: 22rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 20px 50px oklch(0 0 0 / 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: scale-in 0.25s ease-out;
}
.chat-header {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-messages {
  flex: 1;
  max-height: 20rem;
  overflow-y: auto;
  padding: 1rem;
  background: oklch(0.92 0 0 / 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.chat-msg { display: flex; animation: fade-in 0.3s ease-out; }
.chat-msg.user { justify-content: flex-end; }
.chat-bubble {
  max-width: 85%;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}
.chat-msg.bot .chat-bubble { background: var(--background); border: 1px solid var(--border); }
.chat-msg.user .chat-bubble { background: var(--primary); color: var(--primary-foreground); }

.chat-quick {
  border-top: 1px solid var(--border);
  padding: 0.75rem;
  background: var(--background);
}
.chat-quick-btns { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.chat-quick-btn {
  font-size: 0.6875rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--background);
  transition: background 0.2s;
}
.chat-quick-btn:hover { background: var(--accent); }

/* Cart drawer */
.drawer-overlay {
  position: fixed; inset: 0;
  background: oklch(0.13 0 0 / 0.4);
  z-index: 50;
}
.drawer {
  position: fixed; right: 0; top: 0;
  height: 100%; width: 100%; max-width: 28rem;
  background: var(--background);
  z-index: 50;
  box-shadow: -10px 0 40px oklch(0 0 0 / 0.2);
  display: flex;
  flex-direction: column;
  animation: slide-in-right 0.3s ease-out;
}

/* Search modal */
.search-overlay { position: fixed; inset: 0; background: oklch(0.13 0 0 / 0.4); z-index: 50; }
.search-modal {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--background); padding: 1.5rem;
  box-shadow: 0 10px 40px oklch(0 0 0 / 0.25);
  max-height: 80vh; overflow-y: auto;
  animation: fade-in 0.25s ease-out;
}

/* Header underline anim (custom from React version) */
.nav-link {
  position: relative;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 1.25rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.75rem; left: 0;
  width: 100%; height: 2px;
  background: var(--foreground);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s;
}
.nav-link:hover { color: oklch(0.13 0 0 / 0.7); }
.nav-link.active { color: var(--foreground); }
.nav-link.active::after { transform: scaleX(1); }
.nav-group:hover .nav-link::after { transform: scaleX(1); }
.nav-group:hover .nav-link { color: var(--foreground); }
.nav-group:hover .chevron { transform: rotate(180deg); }
.chevron { transition: transform 0.3s ease-out; }

.dropdown {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%) translateY(0.5rem);
  padding-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-out;
}
.nav-group:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 20px 40px oklch(0 0 0 / 0.15);
  min-width: 200px;
  padding: 0.75rem 0;
}
.dropdown-card a {
  display: block;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: all 0.2s;
}
.dropdown-card a:hover { color: var(--foreground); background: var(--accent); }

/* Product card */
.product-card { transition: transform 0.3s ease; display: block; }
.product-card:hover { transform: translateY(-4px); }
.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  aspect-ratio: 3/4;
}
.product-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.product-card:hover img { transform: scale(1.05); }
.product-tag {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
}

/* Animations */
@keyframes bounce-slow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 4px 20px oklch(0 0 0 / 0.2), 0 0 0 0 oklch(0.62 0.19 145 / 0.5); }
  50% { box-shadow: 0 4px 20px oklch(0 0 0 / 0.2), 0 0 0 12px oklch(0.62 0.19 145 / 0); }
}
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes slide-in-right { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }

.animate-bounce-slow { animation: bounce-slow 2.4s ease-in-out infinite; }
.animate-pulse-soft { animation: pulse-soft 2.2s ease-out infinite; }
.animate-fade-in { animation: fade-in 0.3s ease-out; }

/* Logo invert (footer) */
.invert { filter: invert(1); }

/* Preloader */
#global-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
#global-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.preloader-img {
  width: 100px;
  height: auto;
  animation: pulse-elegant 1.3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes pulse-elegant {
  0%, 100% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}
