/* GENERAL RESET */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f9f9f9;
  color: #333;
  padding-bottom: 56px; /* space for fixed cart bar */
  box-sizing: border-box;
}

/* HEADER */
header {
  text-align: center;
  padding: 12px 12px 6px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logo {
  height: 38px;
  margin-bottom: 8px;
}

.search-box {
  margin: 0 auto;
  padding: 0 12px;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

.search-box input {
  width: 100%;
  padding: 8px 14px;
  border: 2px solid #EF3A62;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

/* CATEGORY GRID */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  justify-content: center;
}

.cat-btn {
  padding: 6px 12px;
  border: 1px solid #EF3A62;
  border-radius: 6px;
  background: #fff;
  color: #EF3A62;
  font-size: 13px;
  cursor: pointer;
}

.cat-btn.active {
  background: #EF3A62;
  color: #fff;
}

/* PRODUCTS */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 10px;
}

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.product-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #fff;
}

.p-body {
  padding: 8px;
  flex-grow: 1;
}

.p-body strong {
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.sku {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.meta {
  font-size: 11px;
  color: #999;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.price {
  color: #EF3A62;
  font-weight: bold;
  margin-bottom: 6px;
}

.add-btn {
  background: #EF3A62;
  color: white;
  border: none;
  width: 100%;
  padding: 6px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

/* PAGINATION */
.pagination {
  text-align: center;
  padding: 10px;
}

.pagination button {
  padding: 6px 12px;
  margin: 0 4px;
  border: none;
  background: #EF3A62;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.page-info {
  display: inline-block;
  margin: 0 8px;
  font-size: 13px;
  color: #555;
}

/* FLOATING NAVBAR */
.basket-floating {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 999;
  font-size: 14px;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.08);
  background: #fff;
}

.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Messenger Section */
.nav-left {
  width: 56px;
  background: #fff;
}

.chat-icon {
  background: #EF3A62;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

/* Place Order Section */
.nav-center {
  flex: 1;
  background: #EF3A62;
  color: white;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-center.hidden {
  display: none;
}

/* Cart Summary Section */
.nav-right {
  width: 80px;
  background: #FCE7EC;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
  position: relative;
}

#basketTotal {
  color: #444;
  font-weight: bold;
  font-size: 13px;
}

.qty {
  background: crimson;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  position: absolute;
  top: 6px;
  right: 6px;
}
/* Prevent accidental text selection on mobile */
.basket-floating *,
.basket-floating {
  user-select: none;
  -webkit-user-select: none;
}
.product-card.img-error {
  display: none !important;
}
/* PRICE FILTER */
#priceFilter {
  text-align: center;
  margin: 10px 0 6px;
}

#priceFilter label {
  margin-right: 6px;
  font-weight: 500;
  font-size: 14px;
  color: #555;
}

#priceSelect {
  padding: 6px 12px;
  border: 2px solid #EF3A62;
  border-radius: 6px;
  background: white;
  color: #EF3A62;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
