@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  /* Core Palette - Açaí Purple & Golden Honey */
  --primary: #8b5cf6; /* Açaí Purple */
  --primary-dark: #6d28d9;
  --primary-soft: rgba(139, 92, 246, 0.1);
  --accent: #f59e0b; /* Golden Honey */
  --accent-hover: #d97706;
  --gold: #fde047; /* Bright Topping Gold */
  
  --bg-deep: #0f0714; /* Deepest Midnight Purple */
  --bg-main: #1a0b26;
  --bg-surface: rgba(30, 15, 45, 0.7);
  
  --text-main: #f8fafc;
  --text-dim: #cbd5e1;
  --text-muted: #94a3b8;
  
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(139, 92, 246, 0.15);
  
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.2);
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-soft);
}

body.modal-open {
  overflow: hidden;
}

/* Living Background */
.living-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, #1e0f2d 0%, #0f0714 100%);
  overflow: hidden;
}

.living-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(var(--primary-soft) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 8vw;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 7, 20, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.logo-image {
  height: 48px;
  transition: var(--transition);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.cart-nav-btn {
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.cart-nav-btn:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
}

/* Hero */
.hero {
  padding: 160px 8vw 100px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto 3rem;
}

.hero-nature {
  position: relative;
  background: radial-gradient(circle at top right, rgba(26, 11, 38, 0.7), rgba(15, 7, 20, 0.9)), url('/assets/acai_bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}

/* Semi-transparent overlay to ensure text contrast over the background image */
.hero-nature::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 7, 20, 0.4) 0%, rgba(15, 7, 20, 0.7) 100%);
  z-index: 1;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  text-align: left;
}

.hero-text {
  flex: 1;
  z-index: 2;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.hero-visual img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 50px rgba(139, 92, 246, 0.3));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.pill {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border: 1px solid var(--glass-border);
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

/* Base sections */
.section {
  padding: 100px 8vw;
}

.section-header {
  margin-bottom: 4rem;
  text-align: center;
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Product Cards */
.menu-grid, .highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}

.menu-card {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 1; /* For pseudo-elements */
}

.menu-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--primary);
  background: rgba(45, 20, 65, 0.9);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.3);
}

.menu-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/oseuacai.png');
  background-size: cover;
  background-position: center;
  z-index: -2;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
}

.menu-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 11, 38, 0.9) 0%, rgba(15, 7, 20, 0.98) 100%);
  z-index: -1;
  transition: var(--transition);
}

.menu-card:hover::before {
  transform: scale(1.1);
  opacity: 0.8;
}

.menu-card:hover::after {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(15, 7, 20, 0.95) 100%);
}

.menu-card img, .highlight-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  display: block;
}

.menu-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  -webkit-text-fill-color: white;
  display: inline-block;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.3) 0%, transparent 100%);
  padding: 0.2rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  transition: var(--transition);
}

.menu-card:hover h3 {
  background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
  transform: translateX(5px);
}

.price-tag {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* Modal System */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: var(--bg-main);
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.modal-content-inner {
  padding: 2.5rem;
}

.modal-header img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  -webkit-text-fill-color: white;
}

.modal-section {
  margin-top: 2rem;
}

.modal-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.modal-section-title h4 {
  font-size: 1.1rem;
  -webkit-text-fill-color: var(--text-dim);
}

.free-badge {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
}

.complements-list {
  display: grid;
  gap: 0.75rem;
}

.complement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  cursor: pointer;
}

.complement-item:hover {
  border-color: var(--primary-soft);
}

.complement-item.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.complement-info h5 {
  margin: 0;
  -webkit-text-fill-color: white;
  font-size: 1rem;
}

.complement-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
}

/* Selection Indicators */
.selection-tick {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.complement-item.selected .selection-tick {
  background: var(--primary);
  border-color: var(--primary);
}

.complement-item.selected .selection-tick i {
  color: white;
  font-size: 0.75rem;
}

/* Modal Footer */
.modal-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg-main);
  padding: 1.5rem 2.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-preview {
  display: flex;
  flex-direction: column;
}

.total-preview span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.total-preview strong {
  font-size: 1.5rem;
  color: var(--accent);
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 400px;
  height: 100vh;
  background: var(--bg-main);
  border-left: 1px solid var(--glass-border);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -20px 0 50px rgba(0,0,0,0.5);
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 2rem;
  scrollbar-width: thin;
}

.cart-checkout-form {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--glass-border);
}

.cart-checkout-form h4 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  -webkit-text-fill-color: var(--primary);
}

.sidebar-form-group {
  margin-bottom: 1.5rem;
}

.sidebar-form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.sidebar-input, .sidebar-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: white;
  font-family: inherit;
  transition: var(--transition);
}

.sidebar-input:focus, .sidebar-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

/* Radio Group as Cards */
.radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.radio-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.radio-label i {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.radio-label span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.radio-option input[type="radio"]:checked + .radio-label {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.radio-option input[type="radio"]:checked + .radio-label i {
  color: var(--primary);
}

.radio-option input[type="radio"]:checked + .radio-label span {
  color: white;
}

.delivery-details-sidebar {
  display: none; /* Controlled by JS but styled here */
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.cart-footer {
  padding: 2rem;
  background: var(--bg-main);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

.cart-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.cart-item-info h4 {
  margin-bottom: 0.25rem;
  -webkit-text-fill-color: white;
}

.cart-item-extras {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Animations */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.btn.primary {
  background: var(--primary);
  color: white;
}

.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Animations & Special Elements */
.floating-element {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
  filter: blur(2px);
  z-index: 0;
}

.leaf-1 { top: 10%; left: -5%; width: 250px; animation: leafFloat 8s ease-in-out infinite; }
.leaf-2 { top: 60%; right: -5%; width: 200px; animation: leafFloat 10s ease-in-out infinite reverse; }
.culinary-1 { bottom: 5%; left: 10%; width: 150px; animation: leafFloat 12s ease-in-out infinite; }

@keyframes leafFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(20px, 20px) rotate(5deg); }
}

.top-bar-animated {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  z-index: 2000;
  background-size: 200% 100%;
  animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.product-icon-anim {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.1;
  animation: floatFade 4s ease-in-out infinite;
}

.icon-1 { top: 20px; left: 15%; animation-delay: 0s; }
.icon-2 { top: 40px; left: 35%; animation-delay: 1s; }
.icon-3 { top: 30px; left: 65%; animation-delay: 2s; }
.icon-4 { top: 50px; left: 85%; animation-delay: 3s; }

@keyframes floatFade {
  0%, 100% { transform: translateY(0); opacity: 0.1; }
  50% { transform: translateY(-10px); opacity: 0.3; }
}

.nav-product-anim {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-links a:hover .nav-product-anim {
  transform: scale(1.2) rotate(15deg);
  color: var(--accent);
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, transparent 20%, rgba(15, 7, 20, 0.4) 100%);
  pointer-events: none;
  z-index: 500;
}

/* Feedback Styling */
#checkout-feedback {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

#checkout-feedback:empty {
  display: none;
}

.alert-info {
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary);
  padding: 1rem;
  border: 1px solid var(--primary-soft);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
  padding: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Vivid UX Classes */
.category-row {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.category-header-vivid {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.03) 50%, transparent 100%);
  border-left: 5px solid var(--primary);
  padding: 1.5rem 2.5rem;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.1);
}

.category-header-vivid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition);
}

.category-header-vivid:hover {
  transform: translateX(15px) scale(1.01);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.25) 0%, rgba(139, 92, 246, 0.05) 60%, transparent 100%);
  box-shadow: -15px 15px 40px rgba(139, 92, 246, 0.15);
}

.category-header-vivid:hover h3 {
  transform: scale(1.05);
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.category-header-vivid .cat-icon {
  font-size: 2rem;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.4));
  transition: var(--transition);
}

.category-header-vivid:hover .cat-icon {
  transform: rotate(0deg) scale(1.3);
  color: var(--gold);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.social-btn {
  width: 48px;
  height: 48px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.25rem;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.social-btn:hover {
  transform: translateY(-5px) scale(1.1);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2), var(--shadow-glow);
}

.social-btn.instagram:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-btn.tiktok:hover {
  background: #000;
  border-color: #00f2ea;
  text-shadow: 2px 2px #ff0050, -2px -2px #00f2ea;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 1rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

body.loading .living-bg {
  filter: blur(20px);
}

/* Mobile Adjustments */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .nav { padding: 1rem 5vw; }
  .cart-sidebar { width: 100%; right: -100%; }
  .modal-container { max-height: 100vh; border-radius: 0; }
  .modal-content-inner { padding: 1.5rem; }
  .hero { padding: 120px 5vw 60px; }
  .section { padding: 60px 5vw; }
  .section-header h2 { font-size: 2rem; }
  .category-header-vivid { padding: 1.25rem 1.75rem; }
  .category-header-vivid h3 { font-size: 1.6rem !important; }
  .menu-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}