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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f7f5;
  color: #1a1a1a;
  line-height: 1.45;
  min-height: 100vh;
}

.test-banner {
  background: #fff3cd;
  color: #7a5b00;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #f0e0a0;
}

.header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e5ebe7;
  flex-wrap: wrap;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 16px;
  flex: 1;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 15px;
}

.nav a.active,
.nav a:hover {
  color: #1b7a4a;
}

.header-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.balance-chip,
.user-chip {
  background: #e8f5ee;
  color: #1a5c3a;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.user-chip {
  background: #f0f0f0;
  color: #333;
}

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero h1 {
  color: #1a5c3a;
  font-size: 2rem;
  margin-bottom: 8px;
}

.hero p {
  color: #555;
  max-width: 560px;
  margin: 0 auto;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-row input {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border: 1px solid #cfd8d3;
  border-radius: 10px;
  font-size: 15px;
}

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

.chip {
  border: 1px solid #cfd8d3;
  background: #fff;
  color: #333;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.chip.active {
  background: #e8f5ee;
  border-color: #2d8a5e;
  color: #1a5c3a;
  font-weight: 600;
}

.stands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.stand-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5ebe7;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.stand-img {
  height: 150px;
  background-size: cover;
  background-position: center;
}

.stand-img.veg {
  background-image: linear-gradient(135deg, #c8e6c9, #81c784);
}

.stand-img.honey {
  background-image: linear-gradient(135deg, #ffe082, #ffb300);
}

.stand-img.veg2 {
  background-image: linear-gradient(135deg, #a5d6a7, #66bb6a);
}

.stand-body {
  padding: 14px;
}

.stand-body .tag {
  display: inline-block;
  font-size: 12px;
  color: #1a5c3a;
  background: #e8f5ee;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.stand-body h2 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.stand-body p {
  color: #666;
  font-size: 14px;
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.btn-primary {
  background: #1b7a4a;
  color: #fff;
}

.btn-primary:hover {
  background: #16653d;
}

.btn-secondary {
  background: #fff;
  color: #1b7a4a;
  border: 1px solid #1b7a4a;
}

.btn-block {
  width: 100%;
  text-align: center;
}

.footer {
  text-align: center;
  padding: 20px;
  color: #777;
  font-size: 13px;
}

.panel {
  background: #fff;
  border: 1px solid #e5ebe7;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.product-row,
.order-row,
.balance-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f0;
  flex-wrap: wrap;
}

.product-row:last-child,
.order-row:last-child,
.balance-row:last-child {
  border-bottom: none;
}

.price {
  font-weight: 700;
  color: #1a5c3a;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e8f5ee;
  color: #1a5c3a;
}

.status.pending {
  background: #fff3cd;
  color: #7a5b00;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  padding: 10px 12px;
  border: 1px solid #cfd8d3;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 400;
}

.note {
  background: #e8f5ee;
  border: 1px solid #b7dfc6;
  color: #1a5c3a;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
}

@media (max-width: 700px) {
  .header {
    gap: 12px;
  }
  .nav {
    width: 100%;
  }
}

.loc-line {
  color: #666;
  font-size: 13px;
  margin-bottom: 6px;
}

.location-box {
  background: #f7faf8;
  border: 1px solid #d5e6dc;
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
}

.location-box h3 {
  color: #1a5c3a;
  font-size: 1rem;
  margin-bottom: 8px;
}

.loc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #333;
}

.loc-list li {
  padding: 4px 0;
  border-bottom: 1px solid #e8efeA;
}

.loc-list li:last-child {
  border-bottom: none;
}

.loc-note {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.map-placeholder {
  background: #e8f5ee;
  border: 1px dashed #2d8a5e;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: #1a5c3a;
  font-size: 14px;
  font-weight: 600;
}

.map-placeholder span {
  display: block;
  margin-top: 6px;
  font-weight: 400;
  font-size: 12px;
  color: #555;
}

.btn-pi {
  background: #703d98;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-pi:hover { background: #5a2f7a; }
.btn-pi.signed-in {
  background: #1a5c3a;
  cursor: default;
}
.user-chip.logged-in {
  background: #e8f5ee;
  color: #1a5c3a;
  font-weight: 600;
}
.auth-gate {
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  background: #f3eef8;
  border-bottom: 1px solid #d4c4e8;
}
.auth-gate-inner {
  text-align: center;
  font-size: 14px;
  color: #333;
}
.auth-gate-inner p { margin: 4px 0; }
.auth-gate-inner .btn-pi { margin-top: 8px; }

.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e8eee9;
}
.cart-row .muted { color: #666; font-size: 14px; }

/* Force login + cart buttons clickable */
#pi-login-btn,
.pi-login-btn,
.btn-pi,
[data-add-cart],
#test-checkout-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 50;
  -webkit-tap-highlight-color: rgba(112, 61, 152, 0.3);
}
#pi-login-btn,
.pi-login-btn,
.btn-pi {
  background: #703d98 !important;
  color: #fff !important;
  border: none !important;
  padding: 10px 16px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: inline-block !important;
  min-height: 44px;
}
#pi-login-btn.signed-in,
.btn-pi.signed-in {
  background: #1a5c3a !important;
}
.header-right {
  position: relative;
  z-index: 60;
  flex-wrap: wrap;
}
