/**
 * main.css — Shared design system for all Naturabelle frontend pages
 * Version: 1.0  |  Extracted from per-page inline styles
 */

/* ── CSS VARIABLES ──────────────────────────────────────────────────────────── */
:root {
  --sage:            #7a8c6e;
  --sage-light:      #a8b89a;
  --sage-dark:       #4f6047;
  --cream:           #f7f3ed;
  --warm-white:      #fdfaf6;
  --terracotta:      #c4724a;
  --terracotta-light:#e8a882;
  --gold:            #b8975a;
  --gold-light:      #d4b47a;
  --bark:            #5c4a32;
  --text-dark:       #2a2218;
  --text-mid:        #5a5040;
  --text-light:      #8a7d6e;
  --border:          #e2dbd0;
  --shadow:          rgba(90, 60, 20, 0.08);
}

/* ── BASE RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-white);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ── TOPBAR ──────────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--sage-dark);
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 7px 0;
}
.topbar a { color: rgba(255,255,255,0.8); text-decoration: none; transition: color .2s; }
.topbar a:hover { color: #fff; }

/* ── HEADER ──────────────────────────────────────────────────────────────────── */
header {
  background: var(--warm-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px var(--shadow);
  transition: box-shadow .3s;
}
header.scrolled { box-shadow: 0 4px 30px rgba(90,60,20,0.14); }
.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img  { height: 46px; width: auto; display: block; }

/* ── SEARCH BAR (header) ─────────────────────────────────────────────────────── */
.search-bar {
  flex: 1; max-width: 420px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  display: flex; align-items: center;
  padding: 0 16px; gap: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.search-bar:focus-within { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(122,140,110,0.15); }
.search-bar input {
  border: none; background: transparent;
  font-family: 'DM Sans', sans-serif; font-size: 0.85rem;
  color: var(--text-dark); width: 100%; padding: 9px 0; outline: none; cursor: pointer;
}
.search-bar button { background: none; border: none; color: var(--text-light); cursor: pointer; }

/* ── HEADER BUTTONS ──────────────────────────────────────────────────────────── */
.btn-header {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: all .2s; text-decoration: none;
  border: 1.5px solid transparent;
}
.btn-login  { color: var(--sage-dark); border-color: var(--sage-light); background: transparent; }
.btn-login:hover { background: var(--sage-dark); color: #fff; border-color: var(--sage-dark); }
.btn-search-mobile { display: none; color: var(--text-dark); background: var(--cream); border-color: var(--border); padding: 8px 12px; }
.btn-cart  { background: var(--terracotta); color: #fff; position: relative; }
.btn-cart:hover { background: var(--bark); }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--gold); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}

/* ── MAIN NAV ────────────────────────────────────────────────────────────────── */
nav.main-nav { background: var(--warm-white); border-bottom: 1px solid var(--border); position: relative; z-index: 500; }
.nav-list { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex; align-items: center; gap: 5px;
  padding: 14px 18px; font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dark); text-decoration: none; transition: color .2s;
  white-space: nowrap; position: relative;
}
.nav-list > li > a::after {
  content: ''; position: absolute; bottom: 0; left: 18px; right: 18px;
  height: 2px; background: var(--sage-dark);
  transform: scaleX(0); transition: transform .25s;
}
.nav-list > li > a:hover::after, .nav-list > li.active > a::after { transform: scaleX(1); }
.nav-list > li > a:hover, .nav-list > li.active > a { color: var(--sage-dark); }

/* Dropdown */
.nav-dropdown {
  position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 15px 30px var(--shadow);
  min-width: 200px; padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 100; list-style: none;
}
.nav-list > li.open .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown li { width: 100%; }
.nav-dropdown a {
  display: block; padding: 10px 18px;
  font-size: 0.8rem; color: var(--text-dark); text-decoration: none;
  transition: background .2s, color .2s;
  white-space: nowrap; text-transform: none; letter-spacing: 0; font-weight: 400;
}
.nav-dropdown a::after { display: none !important; }
.nav-dropdown a:hover { background: var(--cream); color: var(--sage-dark); }
.promo-nav > a { background: var(--terracotta) !important; color: #fff !important; border-radius: 4px; margin: 6px 4px; padding: 8px 16px !important; }
.promo-nav > a::after { display: none !important; }
.promo-nav > a:hover { background: var(--bark) !important; }

/* ── MOBILE NAV ──────────────────────────────────────────────────────────────── */
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.3rem; color: var(--text-dark); cursor: pointer; padding: 4px; }
.mobile-nav {
  max-height: 0; overflow: hidden;
  background: var(--warm-white); border-top: 1px solid var(--border);
  padding: 0 20px; opacity: 0;
  transition: max-height .32s ease, opacity .25s ease, padding .32s ease;
}
.mobile-nav.open { max-height: 500px; opacity: 1; padding: 20px; }
.mobile-nav a { display: block; padding: 10px 0; font-size: 0.9rem; color: var(--text-dark); text-decoration: none; border-bottom: 1px solid var(--border); }

/* ── SEARCH OVERLAY ──────────────────────────────────────────────────────────── */
.search-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(42,34,24,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 100px; opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay-inner {
  background: var(--warm-white); border-radius: 20px; padding: 24px;
  width: 90%; max-width: 620px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  transform: translateY(-20px); transition: transform .3s;
}
.search-overlay.open .search-overlay-inner { transform: translateY(0); }
.search-overlay-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--cream); border: 2px solid var(--sage);
  border-radius: 50px; padding: 12px 20px;
}
.search-overlay-bar input {
  flex: 1; border: none; background: transparent;
  font-family: 'DM Sans', sans-serif; font-size: 1rem;
  color: var(--text-dark); outline: none;
}
.search-overlay-bar button { background: none; border: none; cursor: pointer; }
.search-close { color: var(--text-light); font-size: 1.1rem; }
.search-hints { margin-top: 18px; }
.search-hints-title { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light); margin-bottom: 10px; }
.search-hint-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.search-hint-tag {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: 50px; padding: 5px 14px;
  font-size: 0.78rem; color: var(--text-mid); cursor: pointer; transition: all .2s;
}
.search-hint-tag:hover { background: var(--sage-dark); color: #fff; border-color: var(--sage-dark); }
.search-autocomplete { margin-top: 10px; max-height: 320px; overflow-y: auto; border-radius: 12px; border: 1px solid var(--border); background: var(--warm-white); }
.search-ac-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; cursor: pointer; transition: background .15s; text-decoration: none; color: inherit; }
.search-ac-item:hover { background: var(--cream); }
.search-ac-img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.search-ac-name { font-size: .9rem; color: var(--text-dark); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.search-ac-cat  { font-size: .75rem; color: var(--text-light); }
.search-ac-price { margin-left: auto; font-size: .88rem; font-weight: 600; color: var(--sage-dark); white-space: nowrap; padding-left: 8px; }
.search-ac-empty { text-align: center; padding: 20px; color: var(--text-light); font-size: .85rem; }

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: #fff; border-radius: 14px; padding: 14px 18px;
  min-width: 260px; max-width: 340px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border-left: 4px solid var(--sage-dark);
  display: flex; align-items: center; gap: 12px;
  pointer-events: all;
  animation: slideInRight .35s ease;
  transition: opacity .3s, transform .3s;
}
.toast.success { border-left-color: var(--sage-dark); }
.toast.error   { border-left-color: var(--terracotta); }
.toast.info    { border-left-color: var(--gold); }
.toast.hiding  { opacity: 0; transform: translateX(20px); }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--sage-dark); }
.toast.error   .toast-icon { color: var(--terracotta); }
.toast.info    .toast-icon { color: var(--gold); }
.toast-msg   { font-size: 0.82rem; color: var(--text-dark); line-height: 1.4; flex: 1; font-weight: 500; }
.toast-close { background: none; border: none; color: var(--text-light); cursor: pointer; padding: 0; font-size: 0.8rem; }

/* ── LOGIN POPUP ──────────────────────────────────────────────────────────────── */
.login-popup-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(42,34,24,0.55); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.login-popup-overlay.open { opacity: 1; visibility: visible; }
.login-popup-inner {
  background: var(--warm-white); border-radius: 24px; padding: 40px 36px;
  max-width: 380px; width: 100%; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25); position: relative;
  transform: scale(0.92) translateY(10px); transition: transform .3s;
}
.login-popup-overlay.open .login-popup-inner { transform: scale(1) translateY(0); }
.login-popup-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--cream); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-light); font-size: 0.82rem; transition: all .2s;
}
.login-popup-close:hover { background: var(--text-dark); color: #fff; }
.login-popup-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #ffe0e0, #ffb3b3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; font-size: 1.6rem; color: #e05757;
  animation: heartBeat .6s ease;
}
@keyframes heartBeat { 0%{transform:scale(1)} 30%{transform:scale(1.2)} 60%{transform:scale(.95)} 100%{transform:scale(1)} }
.login-popup-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 600; color: var(--text-dark); margin-bottom: 10px; }
.login-popup-text  { font-size: 0.83rem; color: var(--text-light); line-height: 1.6; margin-bottom: 24px; }
.login-popup-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.login-popup-btn-primary {
  background: var(--sage-dark); color: #fff; border-radius: 50px;
  padding: 13px 20px; font-size: 0.85rem; font-weight: 600; text-decoration: none;
  transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-popup-btn-primary:hover { background: var(--bark); color: #fff; transform: translateY(-1px); }
.login-popup-btn-secondary {
  background: transparent; color: var(--sage-dark); border: 1.5px solid var(--sage-light);
  border-radius: 50px; padding: 12px 20px; font-size: 0.85rem; font-weight: 600; text-decoration: none;
  transition: all .2s; display: flex; align-items: center; justify-content: center;
}
.login-popup-btn-secondary:hover { background: var(--sage-dark); color: #fff; border-color: var(--sage-dark); }
.login-popup-note { font-size: 0.7rem; color: var(--text-light); }

/* ── BREADCRUMB ──────────────────────────────────────────────────────────────── */
.breadcrumb-wrap { background: var(--cream); border-bottom: 1px solid var(--border); padding: 12px 0; }
.breadcrumb { margin: 0; font-size: 0.75rem; }
.breadcrumb-item a { color: var(--text-light); text-decoration: none; transition: color .2s; }
.breadcrumb-item a:hover { color: var(--sage-dark); }
.breadcrumb-item.active { color: var(--text-dark); font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-light); }

/* ── FOOTER ──────────────────────────────────────────────────────────────────── */
footer { background: var(--text-dark); color: rgba(255,255,255,0.75); padding: 60px 0 0; }
.footer-logo-img  { height: 50px; width: auto; display: block; }
.footer-desc { font-size: 0.82rem; line-height: 1.7; margin-top: 12px; max-width: 260px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6); font-size: 0.85rem; transition: all .2s; text-decoration: none;
}
.footer-social a:hover { background: var(--sage); color: #fff; }
.footer-col-title { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.9); font-weight: 700; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.5); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--sage-light); }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.82rem; }
.footer-contact-item i { color: var(--sage-light); margin-top: 2px; width: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; margin-top: 40px; }
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.35); }
.payment-icons { display: flex; gap: 8px; align-items: center; }
.payment-icon { background: rgba(255,255,255,0.12); border-radius: 5px; padding: 4px 10px; font-size: 0.68rem; color: rgba(255,255,255,0.6); font-weight: 600; }

/* ── WHATSAPP FLOAT BUTTON ───────────────────────────────────────────────────── */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 54px; height: 54px;
  background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem;
  box-shadow: 0 6px 20px rgba(37,211,102,0.4);
  text-decoration: none; transition: transform .3s;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }
.whatsapp-float::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(37,211,102,0.4);
  animation: waPulse 2s ease-out infinite;
}
@keyframes waPulse { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.5); } }

/* ── BACK TO TOP ─────────────────────────────────────────────────────────────── */
.back-top {
  position: fixed; bottom: 24px; left: 24px; z-index: 999;
  width: 42px; height: 42px;
  background: var(--sage-dark); color: #fff; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
  cursor: pointer; opacity: 0; pointer-events: none; transition: all .3s;
  box-shadow: 0 4px 14px rgba(79,96,71,0.35);
}
.back-top.visible { opacity: 1; pointer-events: all; }
.back-top:hover { background: var(--bark); transform: translateY(-2px); }
@media (max-width: 991px) {
  .whatsapp-float { bottom: 16px; right: 16px; width: 48px; height: 48px; font-size: 1.25rem; }
  .back-top { display: none !important; }
}

/* ── SCROLL ANIMATIONS ───────────────────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }
.fade-up.delay-4 { transition-delay: 0.4s; }

/* ── NEWSLETTER SECTION ──────────────────────────────────────────────────────── */
.newsletter-section { background: linear-gradient(135deg, var(--sage-dark) 0%, #3a4f34 100%); padding: 60px 0; color: #fff; }
.newsletter-section h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; }
.newsletter-form { display: flex; gap: 10px; max-width: 440px; }
.newsletter-form input { flex: 1; background: rgba(255,255,255,0.12); border: 1.5px solid rgba(255,255,255,0.25); border-radius: 50px; padding: 12px 20px; color: #fff; font-family: 'DM Sans', sans-serif; font-size: 0.85rem; outline: none; transition: border-color .2s; }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form input:focus { border-color: rgba(255,255,255,0.6); }
.newsletter-form button { background: var(--terracotta); color: #fff; border: none; border-radius: 50px; padding: 12px 24px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all .2s; white-space: nowrap; }
.newsletter-form button:hover { background: var(--bark); transform: translateY(-1px); }

/* ── ALERT/FLASH MESSAGES ────────────────────────────────────────────────────── */
.alert-banner { border-radius: 12px; padding: 14px 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.alert-banner.success { background: #eef6ee; border: 1px solid #b8d8b8; color: #2d6a2d; }
.alert-banner.error   { background: #fdf2f0; border: 1px solid #e8b8b0; color: #8a2018; }
.alert-banner.info    { background: #fef9ee; border: 1px solid #e8d8a0; color: #7a5a18; }

/* ── SHARED MOBILE BREAKPOINTS ───────────────────────────────────────────────── */
@media (max-width: 991px) {
  .search-bar          { display: none; }
  .btn-search-mobile   { display: flex; }
  .mobile-menu-btn     { display: block; }
  nav.main-nav         { display: none; }
}
@media (max-width: 767px) {
  .btn-header span.hide-sm { display: none; }
  .topbar .hide-mobile     { display: none !important; }
}
