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

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  color: #2d2d2d;
  background: #ffffff;
  min-height: 100vh;
}

/* ── HEADER ── */
.header {
  background: #fff;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #f0f0f0;
}

.header__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 40px;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  color: #2d2d2d;
  white-space: nowrap;
}

.logo em {
  font-style: normal;
  color: #6c5ce7;
}

/* search stub in header */
.header__search {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.header__search input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  border: 1.5px solid #ececec;
  border-radius: 10px;
  font-size: 13px;
  color: #2d2d2d;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s;
}

.header__search input:focus {
  border-color: #6c5ce7;
  background: #fff;
}

.header__search::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
}

/* ── BODY LAYOUT ── */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 40px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.main { min-width: 0; }

/* ── FILTERS ── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1.5px solid #ececec;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
  user-select: none;
}

.filter-chip input {
  display: none;
}

.filter-chip:hover {
  border-color: #6c5ce7;
  color: #6c5ce7;
}

.filter-chip.checked {
  background: #6c5ce7;
  border-color: #6c5ce7;
  color: #fff;
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #6c5ce7;
  transform: scaleX(0);
  transition: transform 0.2s;
}

.tab:hover { color: #6c5ce7; }

.tab.active {
  color: #6c5ce7;
}

.tab.active::after {
  transform: scaleX(1);
}

/* ── MENU SECTION ── */
.menu-section { display: none; }
.menu-section.active { display: block; }

/* ── MENU GRID ── */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* ── MENU CARD ── */
.menu-card {
  background: #fafafa;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, background 0.2s;
  cursor: default;
}

.menu-card:hover {
  background: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.1);
}

.menu-card__top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.menu-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #f0eeff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}

.menu-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.menu-card__emoji {
  font-size: 24px;
}

.menu-card__info { flex: 1; min-width: 0; }

.menu-card__name {
  font-weight: 700;
  font-size: 13px;
  color: #2d2d2d;
  line-height: 1.35;
  margin-bottom: 4px;
}

.menu-card__desc {
  font-size: 11px;
  color: #aaa;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-card__macros {
  font-size: 11px;
  color: #c0b8f8;
  margin-top: 3px;
}

.menu-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-card__price {
  font-size: 17px;
  font-weight: 800;
  color: #2d2d2d;
}

.menu-card__price span {
  font-size: 11px;
  font-weight: 500;
  color: #bbb;
}

.btn-add {
  background: #6c5ce7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.btn-add:hover { background: #5a4bd1; }
.btn-add:active { transform: scale(0.96); }

/* ── CART ── */
.cart {
  background: #fafafa;
  border-radius: 20px;
  padding: 20px;
  position: sticky;
  top: 88px;
}

.cart__title {
  font-size: 17px;
  font-weight: 800;
  color: #2d2d2d;
  margin-bottom: 16px;
}

.cart__empty {
  color: #ccc;
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

.cart__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #efefef;
}

.cart-item__name {
  flex: 1;
  color: #2d2d2d;
  line-height: 1.35;
  font-weight: 500;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cart-item__qty button {
  width: 20px;
  height: 20px;
  border: none;
  background: #ececec;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  color: #2d2d2d;
}

.cart-item__qty button:hover { background: #6c5ce7; color: #fff; }

.cart-item__qty span {
  font-weight: 700;
  min-width: 14px;
  text-align: center;
  font-size: 13px;
}

.cart-item__price {
  font-weight: 700;
  color: #6c5ce7;
  white-space: nowrap;
  font-size: 12px;
  flex-shrink: 0;
}

.cart__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px solid #ececec;
}

.cart__total span { font-size: 13px; font-weight: 600; color: #999; }
.cart__total strong { font-size: 20px; font-weight: 800; color: #2d2d2d; }

.cart__clear {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: transparent;
  border: 1.5px solid #ececec;
  border-radius: 10px;
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cart__clear:hover { border-color: #ff6b6b; color: #ff6b6b; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }
  .cart { position: static; }
  .menu-grid { grid-template-columns: 1fr; }
  .header { padding: 0 16px; }
}

@media (max-width: 600px) {
  .tabs { overflow-x: auto; }
  .tab { padding: 10px 14px; }
}
