@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #080808;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1e1e1e;
  --border: #2a2a2a;
  --border-light: #333333;
  --accent: #e8a020;
  --accent-hover: #f5b942;
  --accent-dim: rgba(232,160,32,0.12);
  --accent-dim2: rgba(232,160,32,0.06);
  --red: #e84040;
  --red-hover: #ff5252;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #606060;
  --shadow: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── INGREDIENT BACKGROUND DECORATION ── */
.ing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  color: rgba(232, 160, 32, 0.10);
}

.ing { position: absolute; }
.ing-tl { top: -15px;  left: -15px; }
.ing-tr { top: -15px;  right: -15px; }
.ing-bl { bottom: 0;   left: -10px; }
.ing-br { bottom: 0;   right: -10px; }

@media (max-width: 640px) {
  .ing-tl, .ing-tr { width: 120px !important; height: 120px !important; }
  .ing-bl, .ing-br { width: 100px !important; height: 180px !important; }
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, .font-serif { font-family: 'Playfair Display', serif; }

.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
}

.nav-logo span { color: var(--text-primary); }

.nav-logo-img {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 6px;
}

@media (max-width: 480px) {
  .nav-logo-img { height: 36px; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cart {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  border: 1px solid rgba(232,160,32,0.3);
  color: var(--accent);
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.nav-cart:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.cart-badge {
  background: var(--accent);
  color: var(--bg-primary);
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-cart:hover .cart-badge {
  background: var(--bg-primary);
  color: var(--accent);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,160,32,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.btn-danger {
  background: rgba(232,64,64,0.15);
  color: var(--red);
  border: 1px solid rgba(232,64,64,0.3);
}

.btn-danger:hover {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

/* ── TAGS / BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(232,160,32,0.25);
}

.badge-green {
  background: rgba(52,211,153,0.12);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.25);
}

.badge-red {
  background: rgba(232,64,64,0.12);
  color: var(--red);
  border: 1px solid rgba(232,64,64,0.25);
}

.badge-blue {
  background: rgba(96,165,250,0.12);
  color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.25);
}

.badge-purple {
  background: rgba(167,139,250,0.12);
  color: #a78bfa;
  border: 1px solid rgba(167,139,250,0.25);
}

/* ── FORMS ── */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-input {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder { color: var(--text-muted); }

select.form-input { cursor: pointer; }

/* ── SECTION HEADER ── */
.section-header { text-align: center; margin-bottom: 4rem; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.section-label::before,
.section-label::after {
  content: '';
  height: 1px;
  width: 40px;
  background: var(--accent);
  opacity: 0.5;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── UTILITY ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid { display: grid; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* ── TOAST ── */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 320px;
  animation: slideInToast 0.3s cubic-bezier(0.4,0,0.2,1);
}

.toast.success { border-left: 3px solid #34d399; }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 2000;
  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 {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-close {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

/* ── PAGE SECTIONS ── */
.page-content {
  padding-top: 72px;
}

section {
  padding: 6rem 0;
}

section:first-child { padding-top: 0; }

/* ── HAMBURGER MENU ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .nav-links a::after { display: none; }

  .container { padding: 0 1.25rem; }

  section { padding: 4rem 0; }

  .section-header { margin-bottom: 2.5rem; }

  .section-header h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }

  th, td { padding: 0.65rem 0.75rem; font-size: 0.8rem; }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: 100%;
  }

  .toast { max-width: 100%; font-size: 0.85rem; }

  .nav-cart { font-size: 0; }
  .nav-cart svg { width: 20px; height: 20px; }
  .nav-cart-count { font-size: 0.65rem; width: 16px; height: 16px; top: -6px; right: -6px; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  section { padding: 3rem 0; }

  .btn { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
  .btn-lg { padding: 0.85rem 1.5rem; font-size: 0.9rem; }

  th { display: none; }
  td { padding: 0.6rem 0.5rem; font-size: 0.78rem; }

  .modal { margin: 0.5rem; border-radius: var(--radius); max-height: 95vh; overflow-y: auto; }
}

/* ── STAR RATING ── */
.stars { color: var(--accent); font-size: 0.85rem; letter-spacing: 2px; }

/* ── TABLE ── */
table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  padding: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

tr:hover td { background: var(--bg-card-hover); }

tr:last-child td { border-bottom: none; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fadeUp {
  animation: fadeUp 0.6s cubic-bezier(0.4,0,0.2,1) forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.4s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--accent-dim2);
  border: 1px solid rgba(232,160,32,0.25);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-toggle:hover {
  background: var(--accent-dim);
  border-color: rgba(232,160,32,0.5);
}

.lang-toggle .lt-it,
.lang-toggle .lt-en { color: var(--accent); transition: var(--transition); }

.lang-toggle .lt-sep {
  color: var(--text-muted);
  font-weight: 400;
  margin: 0 0.1rem;
}

/* ── MOBILE-FIRST TOUCH OPTIMIZATIONS ── */
@media (max-width: 768px) {
  /* Prevent iOS zoom on any input/select/textarea */
  input, select, textarea, .form-input {
    font-size: 16px !important;
  }

  /* Minimum 44px touch target on all interactive elements */
  .btn, button, [role="button"] {
    min-height: 44px;
  }

  /* Bigger tap area on nav items */
  .nav-links a {
    padding: 0.9rem 1.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Cart badge legible on mobile */
  .cart-badge {
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
  }

  /* Modal safe-area for iPhone notch/home bar */
  .modal-overlay {
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0)
             env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  }

  .modal {
    margin-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    max-height: calc(92vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Form groups more spacing for finger-friendly tapping */
  .form-group {
    gap: 0.4rem;
    margin-bottom: 0.25rem;
  }

  /* Bigger quantity buttons throughout */
  .cart-qty-btn, .item-modal-qty-btn {
    min-width: 44px;
    min-height: 44px;
  }
}
