* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #ffffff;
  height: 100vh;
  overflow: hidden; /* 🔒 page scrolling disabled */
}

.topbar {
  position: relative; /* 🔑 allows absolute centering */
  height: 60px;
  background: #0080ff;
  color: #fff;
  padding: 0 30px;
  display: flex;
  align-items: center;
}

.layout {
  height: calc(100vh - 40px);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 20px;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  height: 100%;
}

/* CATEGORIES */

.category {
  padding-bottom: 10px;
}

.left ul {
  list-style: none;
  margin-top: 15px;
}

.left li {
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 6px;
}

.left li:hover {
  background: #ddeffe;
}

.left li.active {
  background: #0088ff;
  color: #ffffff;
}

.left {
  display: flex;
  flex-direction: column;
  height: 110%;
  overflow: hidden; /* stop panel scrolling */
}

/* TITLE — FIXED */
.category-title {
  flex-shrink: 0;
  padding-bottom: 5px;
}

/* ONLY CATEGORY LIST SCROLLS */
#categories {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding-right: 6px;
}

/* PRODUCTS GRID */

.center {
  overflow-y: auto; /* ✅ products scroll */
}

.products {
  min-height: 10%;
  display: grid;
  grid-template-columns: repeat(4, 0.32fr);
  grid-auto-rows: 1fr;
  gap: 14px;
}

.product-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  font-size: 13px;
}

.product-card img {
  width: 95%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
}

.product-card button {
  margin-top: 6px;
  padding: 6px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: #0088ff;
  color: #fff;
  cursor: pointer;
}

.product-card button:hover {
  background: #ff0000d6;
}

/* TOP BAR */
.topbar {
  height: 60px;
  background: #0080ff;
  color: #fff;
  padding: 0 30px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar input {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  width: 240px;
}

/* LEFT */
.nav-left h1 {
  font-size: 18px;
}

/* CENTER SEARCH */
.nav-center {
  display: flex;
  justify-content: center;
}

.nav-center input {
  width: 420px;
  max-width: 100%;
  padding: 9px 16px;
  border-radius: 20px;
  border: none;
  outline: none;
}

#searchInput {
  position: absolute;
  left: 50%;
  transform: translateX(-50%); /* 🎯 true center */
  width: 420px;
  max-width: 90%;
  padding: 9px 16px;
  border-radius: 20px;
  border: none;
  outline: none;
  bottom: -16px;
}

/* SEARCH WRAPPER (centered already) */
.search-box {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  max-width: 90%;
}

/* SEARCH INPUT */
.search-box input {
  width: 100%;
  padding: 9px 16px;
  border-radius: 20px;
  border: none;
  outline: none;
}

/* SUGGESTIONS DROPDOWN */
.suggestions {
  position: absolute;
  top: 44px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 99;
}

.suggestions div {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

.suggestions div:hover {
  background: #f2f2f2;
}
