* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}
html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overflow-x: hidden;
}

body {
  background-color: #f8f9fa;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  touch-action: manipulation;
  overflow-x: hidden;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: clamp(10px, 2vw, 20px) clamp(10px, 3vw, 30px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #007bff;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-bar input {
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 180px;
  transition: 0.2s;
}
.search-bar input:focus {
  outline: none;
  border-color: #007bff;
}
.cart {
  position: relative;
  cursor: pointer;
  font-size: clamp(30px, 1.5vw, 30px);
}
.cart-count {
  position: absolute;
  top: -5px;
  right: -10px;
  background: #007bff;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(15px, 0.75vw, 15px);
}
main {
  flex: 1;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
h2 {
  margin-bottom: 15px;
  font-size: 1.3em;
}
.product-grid {
  display: flex;           /* Arrange items in a row */
  flex-wrap: wrap;         /* Wrap to next line when no space */
  gap: 20px;               /* Space between items */
}

.product {
  flex: 1 1 200px;         /* Grow/shrink, minimum width 200px */
  max-width: 200px;        /* Optional: limit max width */
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
}
.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.product img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.product-info {
  padding: 10px;
}
.product-title {
  font-size: 1.1em;
  margin-bottom: 10px;
  font-weight: bold;
}
.product-price {
  color: #007bff;
  font-weight: bold;
  margin-bottom: 10px;
}
.product button {
  width: 100%;
  padding: 10px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.2s;
}
.product button:hover {
  background: #0056b3;
}
footer {
  text-align: center;
  padding: 15px;
  background: #fff;
  color: #777;
  border-top: 1px solid #eee;
  font-size: 0.9em;
}
.plusbutton, .minusbutton {
  width:15%;
  height:10%;
  margin-left: 5%;
  margin-right: 5%;
  padding: 2px;
}
.plusbutton {
    margin-left: 5%;

}
.item-count,
#plusbutton,
#minusbutton {
  display: inline-block;
  vertical-align: middle;
}
.product-info {
  display: flex;
  flex-direction: column;
}

.product-info .item-controls {
  display: flex;
  align-items: center;
  gap: 3px; /* space between +, count, - */
  margin-top: 6px;
}
/* Filter button */
#filterBtn{
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 10px;
  font-size: 16px;
  transition: background 0.3s;
}
#AdminBtn {
  background: #007bff;
  color: white;
  border: none;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 10px;
  font-size: 16px;
  transition: background 0.3s;
  padding-top: 10px;
}
#filterBtn:hover {
  background: #0056b3;
}
/* Slide-in menu */
.filter-menu {
  position: fixed;
  top: 0;
  left: -250px; /* hidden by default */
  width: 250px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: left 0.3s ease;
  z-index: 1000;
}

.filter-menu.active {
  left: 0;
}

.filter-option {
  padding: 2vh 3vw;
  border: none;
  border-radius: 6px;
  background: #eee;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}
.filter-option:hover {
  background: #ddd;
}
.filter-option.active {
  background-color: #007bff;
  color: #fff;
}

.closeFilterX {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .search-bar input {
    width: 120px;
  }
}
