.tpo-store {
  max-width: 960px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2328;
}

.tpo-store * {
  box-sizing: border-box;
}

.tpo-loading,
.tpo-error {
  padding: 1rem;
  text-align: center;
}

.tpo-error {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
}

.tpo-category {
  margin-bottom: 2rem;
}

.tpo-category h2 {
  border-bottom: 2px solid #ffb703;
  padding-bottom: 0.4rem;
}

.tpo-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.tpo-product-card {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.tpo-product-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f2f4f7;
}

.tpo-product-body {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.tpo-product-body h3 {
  margin: 0;
  font-size: 1.05rem;
}

.tpo-product-desc {
  font-size: 0.85rem;
  color: #667085;
  flex: 1;
}

.tpo-allergens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tpo-allergen-badge {
  font-size: 0.7rem;
  background: #f2f4f7;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  color: #475467;
}

.tpo-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tpo-price {
  font-weight: 600;
}

.tpo-btn {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  background: #ffb703;
  color: #1f2328;
}

.tpo-btn:hover {
  background: #fb8500;
}

.tpo-btn-secondary {
  background: #f2f4f7;
  color: #1f2328;
}

.tpo-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tpo-cart-bar {
  position: sticky;
  bottom: 0;
  background: #1f2328;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.tpo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.tpo-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.tpo-modal h3 {
  margin-top: 0;
}

.tpo-field {
  margin-bottom: 1rem;
}

.tpo-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.tpo-field input[type="text"],
.tpo-field input[type="tel"],
.tpo-field input[type="number"],
.tpo-field select,
.tpo-field textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
}

.tpo-option-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
}

.tpo-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tpo-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e4e7ec;
  gap: 0.5rem;
}

.tpo-cart-item small {
  color: #667085;
  display: block;
}

.tpo-cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid #1f2328;
}

.tpo-note {
  font-size: 0.75rem;
  color: #667085;
}

.tpo-confirmation {
  text-align: center;
  padding: 1.5rem;
}

.tpo-confirmation h2 {
  color: #067647;
}

.tpo-status-lookup {
  border-top: 1px solid #e4e7ec;
  margin-top: 2rem;
  padding-top: 1rem;
}
