* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --warm-red: #E63946;
  --deep-brown: #4A2C2A;
  --subtle-green: #7CB342;
  --cream: #FFF8F0;
  --white: #FFFFFF;
  --card-bg: rgba(255, 248, 240, 0.85);
  --text-dark: #2D1F1E;
  --text-light: #7A6A68;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  padding-bottom: 80px;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FFF8F0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.4s, visibility 0.4s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__spinner {
  display: flex;
  gap: 8px;
}

.loader__dot {
  width: 14px;
  height: 14px;
  background: #E63946;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.loader__dot:nth-child(2) {
  animation-delay: 0.2s;
  background: #7CB342;
}

.loader__dot:nth-child(3) {
  animation-delay: 0.4s;
  background: #c9a84c;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-20px); }
}

.loader__text {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #7A6A68;
  font-weight: 500;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.header__logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--deep-brown);
}

.header_logo-icon {
  width: 28px;
  height: 28px;
}

.header__cart-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  position: relative;
  padding: 4px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--warm-red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__search {
  position: relative;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--white);
  border: 1px solid #e8e0d8;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
}

.search-input:focus {
  border: 1px solid var(--subtle-green);
}

.header__categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.header__categories::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid #e0d6cc;
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.category-pill--active {
  background: var(--warm-red);
  color: white;
  border-color: var(--warm-red);
}

/* Menu Grid */
.menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px 20px 100px;
}

/* Matte Glass Card */
.menu__card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.menu__card:hover {
  background: rgba(255, 248, 240, 0.95);
  box-shadow: 
    8px 8px 16px rgba(0, 0, 0, 0.06),
    -8px -8px 16px rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.menu__card:active {
  box-shadow: 
    inset 4px 4px 8px rgba(0, 0, 0, 0.06),
    inset -4px -4px 8px rgba(255, 255, 255, 0.8);
  transform: translateY(0) scale(0.98);
}

.menu__card-img {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.menu__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu__card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--warm-red);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu__card-body {
  padding: 16px;
}

.menu__card-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.menu__card-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.4;
}

.menu__card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu__card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--deep-brown);
}

.btn-add {
  background: var(--subtle-green);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-add:hover {
  background: #689f38;
}

.btn-add:active {
  transform: scale(0.95);
}

/* Bottom Tab Bar */
.tab-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  background: rgba(255, 248, 240, 0.98) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  display: flex !important;
  justify-content: space-around !important;
  padding: 12px 0 !important;
  z-index: 9999 !important;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 12px;
  transition: color 0.2s;
  color: var(--text-light);
}

.tab--active {
  color: var(--warm-red);
}

.tab__icon {
  font-size: 20px;
}

.tab__label {
  font-size: 0.7rem;
  font-weight: 600;
}

/* SVG Icon Base Styles */
.size-6 {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 0.2s ease, stroke 0.2s ease;
}

/* Tab Bar Icons */
.tab .size-6 {
  color: #7A6A68;
  margin: 0 auto 2px;
}

.tab--active .size-6 {
  color: #E63946;
}

/* Header Icons */
.header__back .size-6,
.header__cart-btn .size-6 {
  color: #4A2C2A;
}

/* Cart Badge Icon */
.cart-badge .size-6 {
  color: #FFFFFF;
}

/* Button Icons (Add to Cart, Chat, Reorder) */
.btn-add .size-6,
.btn-chat .size-6,
.btn-reorder .size-6 {
  width: 16px;
  height: 16px;
  color: currentColor;
}

/* Category Pill Icons */
.category-pill .size-6 {
  width: 16px;
  height: 16px;
  color: currentColor;
}

/* Hover States */
.tab:hover .size-6 {
  color: #E63946;
}

.header__back:hover .size-6 {
  color: #E63946;
}

/* Responsive */
@media (max-width: 480px) {
  .menu {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 16px;
  }

  .header {
    padding: 12px 16px 8px;
  }

  .header__logo {
    font-size: 20px;
  }
}