@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --green-deep: #0f2d22;
  --green-mid: #1d5a3a;
  --wood: #a66b2b;
  --wood-light: #d59a45;
  --sand: #f3e8d2;
  --text-main: #f7f6f4;
  --text-dark: #162019;
  --text-muted: #bccebf;    /* Tông màu bạc lục bảo nhẹ dịu mắt */
  --accent: #24b26b;
  --accent-glow: rgba(36, 178, 107, 0.25);
  
  --bg-gradient: radial-gradient(circle at 20% 20%, #15382b 0%, #0d251c 25%, #081711 60%, #040907 100%);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.07);
  --border-card-hover: rgba(36, 178, 107, 0.35);
  
  --white: #FFFFFF;
  --danger: #ff4d4f;
  --success: #24b26b;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.55);
  --radius: 20px;
  --radius-sm: 12px;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', serif;
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1160px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
  background: var(--wood);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--wood-light);
}

/* Header (Đồng bộ tuyệt đối index.html) */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(7, 17, 14, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}

nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
  font-weight: 600;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.brand span {
  font-family: var(--font-serif);
  letter-spacing: 0.6px;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  transition: var(--transition-smooth);
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

/* Hero Section */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 22px 40px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(36,178,107,0.12), rgba(36,178,107,0) 70%);
  filter: blur(30px);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4vw + 1rem, 3.8rem);
  margin-bottom: 14px;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, var(--white) 30%, var(--sand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 750px;
  margin: 0 auto;
  font-weight: 400;
}

/* Order Container */
.order-container {
  display: flex;
  gap: 40px;
  padding: 0 22px 100px;
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
}

/* Sidebar Categories */
.categories-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 110px;
  height: fit-content;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-card);
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.5px;
  color: var(--white);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.category-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.05);
}

.category-btn.active {
  background: linear-gradient(120deg, #1e7f4f, #24b26b);
  border-color: transparent;
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(36, 178, 107, 0.3);
}

.category-count {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 20px;
  transition: var(--transition-smooth);
}

.category-btn.active .category-count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

/* Menu Content & Transitions */
.menu-content {
  flex-grow: 1;
}

.menu-section {
  margin-bottom: 50px;
  scroll-margin-top: 110px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
  color: var(--white);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 45px;
  height: 3px;
  background: linear-gradient(90deg, var(--wood), var(--wood-light));
  border-radius: 2px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 25px;
}

/* Dynamic Fade In Animation when switching categories */
.menu-content.fade-transition {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Menu Card with Glowing Borders */
.menu-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
  position: relative;
}

.menu-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(36, 178, 107, 0.06), var(--shadow-lg);
  border-color: var(--border-card-hover);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 80%; /* 5:4 ratio */
  overflow: hidden;
  background: rgba(255,255,255,0.01);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-card:hover .card-img {
  transform: scale(1.06);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 30, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b4f1cf;
  border: 1px solid rgba(36, 178, 107, 0.25);
}

.card-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--white);
  line-height: 1.4;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.card-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #a3ecc0; /* Xanh ngọc lục bảo nhạt, cực kì bắt mắt và sang */
  letter-spacing: -0.2px;
}

.add-to-cart-btn {
  background: linear-gradient(120deg, #1e7f4f, #24b26b);
  color: var(--white);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(36, 178, 107, 0.25);
}

.add-to-cart-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 8px 20px rgba(36, 178, 107, 0.45);
}

/* Floating Cart Button with spring & pulse interaction */
.floating-cart {
  position: fixed;
  bottom: 30px;
  right: 35px;
  background: linear-gradient(135deg, var(--wood), var(--wood-light));
  color: var(--white);
  border: none;
  padding: 16px 28px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 990;
  transition: var(--transition-smooth);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.15);
}

.floating-cart:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55);
}

.floating-cart:active {
  transform: translateY(-2px) scale(0.97);
}

@keyframes springPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.16) rotate(-6deg); }
  65% { transform: scale(0.93) rotate(3deg); }
  85% { transform: scale(1.04) rotate(-1deg); }
  100% { transform: scale(1); }
}

.floating-cart.pulse-anim {
  animation: springPulse 0.45s cubic-bezier(0.25, 0.8, 0.25, 1.2) forwards;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background: rgba(12, 34, 26, 0.96); /* Glassmorphism sang trọng cho giỏ hàng */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: -15px 0 45px rgba(0,0,0,0.6);
  z-index: 1005;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.06);
}

.cart-drawer.open {
  transform: translateX(-450px);
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(7, 17, 14, 0.9);
  color: var(--white);
}

.cart-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.close-cart-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.close-cart-btn:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.cart-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
}

.cart-empty i {
  font-size: 3.5rem;
  margin-bottom: 18px;
  color: rgba(255,255,255,0.03);
}

.cart-item {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: var(--transition-smooth);
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.05);
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--white);
}

.cart-item-price {
  font-weight: 700;
  color: #a3ecc0;
  font-size: 0.9rem;
}

.cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255,255,255,0.01);
}

.qty-btn {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--white);
  transition: var(--transition-smooth);
}

.qty-btn:hover {
  background: rgba(255,255,255,0.08);
}

.qty-val {
  padding: 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  opacity: 0.7;
}

.remove-item-btn:hover {
  transform: scale(1.15);
  opacity: 1;
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(7, 17, 14, 0.95);
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 22px;
}

.cart-summary span:last-child {
  color: #a3ecc0;
}

.checkout-btn {
  width: 100%;
  padding: 15px 22px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  transition: var(--transition-smooth);
}

.checkout-zalo {
  background: #0068FF;
  color: var(--white);
  box-shadow: 0 6px 20px rgba(0, 104, 255, 0.25);
}

.checkout-zalo:hover {
  background: #0056D2;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 104, 255, 0.4);
}

.checkout-phone {
  background: linear-gradient(120deg, #1e7f4f, #24b26b);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(36, 178, 107, 0.25);
}

.checkout-phone:hover {
  background: linear-gradient(120deg, #155d3a, #1c8550);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(36, 178, 107, 0.4);
}

/* Cart Overlay with soft transition */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(4, 9, 7, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Toast Container with Spring Animation */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: rgba(12, 34, 26, 0.96);
  border: 1px solid var(--border-card);
  color: var(--white);
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  transform: translateY(120px) scale(0.85);
  opacity: 0;
  animation: slideUpSpring 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards, fadeOutUp 0.3s 2.7s forwards;
}

@keyframes slideUpSpring {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes fadeOutUp {
  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}

/* Zalo Float FAB */
.contact-fab {
  position: fixed;
  bottom: 110px;
  right: 35px;
  z-index: 980;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-btn-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0068FF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
}

.contact-btn-circle:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 25px rgba(0, 104, 255, 0.5);
}

.contact-btn-circle svg {
  width: 32px;
  height: 32px;
}

/* Responsive Layout */
@media (max-width: 1024px) {
  .order-container {
    flex-direction: column;
    padding-bottom: 80px;
  }
  
  .categories-sidebar {
    width: 100%;
    position: sticky;
    top: 85px;
    z-index: 98;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px 18px;
    border-radius: 0;
    box-shadow: var(--shadow-sm);
    margin: 0 -22px 25px;
    width: calc(100% + 44px);
    background: rgba(8, 23, 17, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: none;
    border-right: none;
    /* Hide scrollbars */
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  
  .categories-sidebar::-webkit-scrollbar {
    display: none;
  }
  
  .sidebar-title {
    display: none;
  }
  
  .category-list {
    flex-direction: row;
    gap: 12px;
  }
  
  .category-btn {
    padding: 8px 18px;
    display: inline-flex;
    gap: 8px;
    width: auto;
  }
  
  .floating-cart {
    bottom: 25px;
    right: 25px;
  }
  
  .contact-fab {
    bottom: 105px;
    right: 25px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Mobile ẩn nav-links giống index.html */
  }
  
  .hero {
    padding: 40px 16px 24px;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .order-container {
    padding: 0 16px 60px;
  }
  
  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }
  
  .cart-drawer {
    max-width: 100%;
  }
}
