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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #d48a50, #f7d8ba);
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
}

/* MAIN WRAPPER */
.menu-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: #f8efe4;
  border-radius: 30px 30px 0 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.menu-wrapper::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  background: #6d2f0d;
  border-radius: 50%;
  top: -120px;
  left: -120px;
  opacity: 0.12;
  pointer-events: none;
}

/* FIXED NAVBAR - IMPROVED FOR MOBILE */
.fixed-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #4a1d08;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 12px;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-logo {
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.12);
  padding: 4px 10px;
  border-radius: 40px;
  white-space: nowrap;
}

.nav-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.search-box {
  background: white;
  border-radius: 40px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-box span {
  font-size: 0.7rem;
}

.search-box input {
  border: none;
  outline: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.65rem;
  width: 80px;
  background: transparent;
}

.search-box input:focus {
  width: 100px;
  transition: width 0.2s ease;
}

.category-dropdown select {
  padding: 5px 10px;
  border-radius: 40px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  background: white;
  color: #4a1d08;
  cursor: pointer;
  font-size: 0.7rem;
  min-width: 110px;
}

.category-dropdown select:focus {
  outline: 2px solid #f4a460;
}

.order-badge {
  background: #f4a460;
  color: #4a1d08;
  border-radius: 40px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 70px;
  justify-content: center;
  transition: transform 0.1s ease;
}

.order-badge:active {
  transform: scale(0.95);
}

/* HERO SECTION - WITH TOP PADDING FOR FIXED NAVBAR */
.hero-header {
  background: #4a1d08;
  color: white;
  text-align: center;
  padding: 18px 16px 20px;
  position: relative;
  margin-top: 0;
}

.hero-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.hero-header p {
  margin-top: 6px;
  font-size: 0.75rem;
  opacity: 0.9;
}

.hero-header::before {
  content: '🥤';
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 30px;
  opacity: 0.12;
}

.hero-header::after {
  content: '🍝';
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 30px;
  opacity: 0.12;
}

/* ACTIVE CATEGORY BANNER */
.active-category-banner {
  background: #f4a460;
  padding: 8px 12px;
  text-align: center;
  font-weight: 700;
  color: #4a1d08;
  font-size: 0.8rem;
  border-bottom: 2px solid #e08e3a;
}

.active-category-banner span {
  background: #4a1d08;
  color: white;
  padding: 3px 10px;
  border-radius: 30px;
  font-size: 0.7rem;
  margin-left: 6px;
  display: inline-block;
}

/* MENU CONTENT */
.menu-content {
  padding: 20px 15px;
  background: #f8efe4;
  min-height: 500px;
}

.loading-spinner {
  text-align: center;
  padding: 40px;
  font-size: 1rem;
  color: #4a1d08;
}

.menu-section {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.menu-section:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.food-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 15px;
  transition: 0.3s;
}

.category-image {
  height: 140px;
  display: block;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  object-fit: cover;
}

.category-group {
  margin-bottom: 25px;
}

.category-group h3 {
  color: #8b4513;
  margin-bottom: 10px;
  font-size: 1.1rem;
  padding-left: 10px;
  border-left: 4px solid #d48a50;
  font-weight: 700;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
  flex-wrap: wrap;
  gap: 6px;
}

.menu-item:last-child {
  border-bottom: none;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.item-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: normal;
  word-break: break-word;
  max-width: 180px;
  line-height: 1.3;
}

.price {
  color: #4a1d08;
  font-weight: 700;
  background: #f6dfc7;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.add-to-cart {
  background: #4a1d08;
  color: white;
  border: none;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.65rem;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all 0.1s ease;
}

.add-to-cart:hover {
  background: #6d2f0d;
  transform: scale(1.02);
}

.add-to-cart:active {
  transform: scale(0.95);
}

/* CART PANEL */
.order-panel {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 300px;
  max-width: calc(100% - 30px);
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.3);
  z-index: 1050;
  transition: 0.25s ease;
}

.order-header {
  background: #4a1d08;
  color: white;
  padding: 12px 16px;
  border-radius: 24px 24px 0 0;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.85rem;
}

.order-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  background: #fff9f2;
  border-radius: 0 0 20px 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 5px;
  border-bottom: 1px solid #f0e0d0;
  flex-wrap: wrap;
  gap: 6px;
}

.cart-item-details {
  flex: 2;
  font-size: 0.75rem;
  font-weight: 500;
}

.cart-item-price {
  font-weight: 700;
  color: #4a1d08;
  font-size: 0.75rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0e0d0;
  padding: 3px 8px;
  border-radius: 30px;
}

.qty-btn {
  background: #4a1d08;
  color: white;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.qty-btn:hover {
  background: #6d2f0d;
}

.qty-btn:active {
  transform: scale(0.9);
}

.qty-num {
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  font-size: 0.8rem;
}

.total-row {
  font-weight: 800;
  background: #f7e5d4;
  padding: 10px;
  border-radius: 16px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.empty-msg {
  text-align: center;
  color: #a07a5c;
  padding: 20px;
  font-size: 0.8rem;
}

.footer {
  background: #4a1d08;
  color: white;
  text-align: center;
  padding: 14px;
  font-size: 0.7rem;
}

/* BACK TO TOP BUTTON */
.top-btn {
  position: fixed;
  bottom: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #4a1d08;
  color: white;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 1000;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-btn:hover {
  background: #6d2f0d;
  transform: scale(1.05);
}

.top-btn.show {
  opacity: 1;
  visibility: visible;
}

/* RESPONSIVE DESIGN - FIXED FOR 293x618 MOBILE */
@media (max-width: 550px) {
  body {
    padding-top: 95px;
  }
  
  .fixed-navbar {
    padding: 6px 10px;
  }
  
  .nav-logo {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  
  .search-box {
    padding: 3px 8px;
  }
  
  .search-box input {
    width: 65px;
    font-size: 0.6rem;
  }
  
  .search-box input:focus {
    width: 80px;
  }
  
  .category-dropdown select {
    padding: 4px 8px;
    font-size: 0.65rem;
    min-width: 95px;
  }
  
  .order-badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    min-width: 60px;
  }
  
  .hero-header {
    padding: 14px 12px 16px;
  }
  
  .hero-header h1 {
    font-size: 1.2rem;
  }
  
  .hero-header p {
    font-size: 0.65rem;
  }
  
  .hero-header::before,
  .hero-header::after {
    font-size: 24px;
  }
  
  .active-category-banner {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
  
  .active-category-banner span {
    font-size: 0.6rem;
    padding: 2px 8px;
  }
  
  .menu-content {
    padding: 15px 12px;
  }
  
  .menu-section {
    padding: 12px;
    margin-bottom: 20px;
  }
  
  .category-group h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  
  .category-image {
    height: 120px;
    margin-bottom: 12px;
    border-radius: 15px;
  }
  
  .item-name {
    font-size: 0.75rem;
    max-width: 140px;
  }
  
  .price {
    font-size: 0.7rem;
    padding: 2px 8px;
  }
  
  .add-to-cart {
    padding: 4px 10px;
    font-size: 0.6rem;
  }
  
  .order-panel {
    width: 280px;
    bottom: 10px;
    right: 10px;
  }
  
  .order-header {
    padding: 10px 14px;
    font-size: 0.8rem;
  }
  
  .order-list {
    max-height: 280px;
  }
  
  .cart-item-details {
    font-size: 0.7rem;
  }
  
  .cart-item-price {
    font-size: 0.7rem;
  }
  
  .qty-btn {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }
  
  .qty-num {
    font-size: 0.7rem;
  }
  
  .total-row {
    font-size: 0.75rem;
    padding: 8px;
  }
  
  .empty-msg {
    font-size: 0.7rem;
    padding: 15px;
  }
  
  .top-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    bottom: 10px;
    left: 10px;
  }
}

/* Extra small devices (293px width) */
@media (max-width: 380px) {
  body {
    padding-top: 105px;
  }
  
  .fixed-navbar {
    padding: 5px 8px;
  }
  
  .nav-container {
    gap: 5px;
  }
  
  .nav-logo {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  
  .nav-controls {
    gap: 4px;
  }
  
  .search-box {
    padding: 2px 6px;
  }
  
  .search-box span {
    font-size: 0.6rem;
  }
  
  .search-box input {
    width: 55px;
    font-size: 0.55rem;
  }
  
  .search-box input:focus {
    width: 70px;
  }
  
  .category-dropdown select {
    padding: 3px 6px;
    font-size: 0.6rem;
    min-width: 85px;
  }
  
  .order-badge {
    padding: 3px 8px;
    font-size: 0.65rem;
    min-width: 55px;
    gap: 3px;
  }
  
  .hero-header {
    padding: 12px 10px 14px;
  }
  
  .hero-header h1 {
    font-size: 1rem;
  }
  
  .hero-header p {
    font-size: 0.6rem;
  }
  
  .hero-header::before,
  .hero-header::after {
    font-size: 20px;
    opacity: 0.1;
  }
  
  .active-category-banner {
    padding: 5px 8px;
    font-size: 0.65rem;
  }
  
  .active-category-banner span {
    font-size: 0.55rem;
    padding: 2px 6px;
    margin-left: 5px;
  }
  
  .menu-content {
    padding: 12px 10px;
  }
  
  .menu-section {
    padding: 10px;
    border-radius: 16px;
  }
  
  .category-group h3 {
    font-size: 0.9rem;
    padding-left: 8px;
  }
  
  .category-image {
    height: 100px;
    border-radius: 12px;
  }
  
  .item-name {
    font-size: 0.7rem;
    max-width: 120px;
  }
  
  .price {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  
  .add-to-cart {
    padding: 3px 8px;
    font-size: 0.55rem;
  }
  
  .order-panel {
    width: 260px;
  }
  
  .order-header {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  
  .cart-item-details {
    font-size: 0.65rem;
  }
  
  .cart-item-price {
    font-size: 0.65rem;
  }
  
  .qty-btn {
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
  }
  
  .qty-num {
    font-size: 0.65rem;
    min-width: 15px;
  }
  
  .total-row {
    font-size: 0.7rem;
  }
  
  .footer {
    padding: 10px;
    font-size: 0.6rem;
  }
  
  .top-btn {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
}

/* Small desktop and tablet */
@media (min-width: 551px) and (max-width: 850px) {
  body {
    padding-top: 85px;
  }
  
  .hero-header h1 {
    font-size: 1.6rem;
  }
  
  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .nav-controls {
    justify-content: space-between;
    width: 100%;
  }
  
  .search-box,
  .category-dropdown,
  .order-badge {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .category-dropdown select,
  .search-box input {
    width: 100%;
  }
  
  .order-badge {
    justify-content: center;
  }
}

/* Desktop */
@media (min-width: 851px) {
  body {
    padding-top: 75px;
  }
  
  .hero-header h1 {
    font-size: 1.9rem;
  }
  
  .search-box input {
    width: 120px;
  }
  
  .search-box input:focus {
    width: 180px;
  }
}

/* LOADING ANIMATION */
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.loading-spinner {
  animation: pulse 1.5s ease-in-out infinite;
}