/* Haystack Products - custom styles */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: #fff;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-thumb {
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-thumb-placeholder {
  aspect-ratio: 1;
  min-height: 280px;
}

.product-card-info {
  border-top: 1px solid #eee;
}

.product-gallery img {
  max-width: 100%;
  height: auto;
}

.buy-now-btn {
  cursor: pointer;
}

/* Checkout modal */
.checkout-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.checkout-modal-overlay.is-open {
  display: flex;
}

.checkout-modal {
  position: relative;
  background: #fff;
  max-width: 420px;
  width: 100%;
  padding: 2rem;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.checkout-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.checkout-modal-close:hover {
  color: #000;
}

.checkout-modal label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.checkout-modal input,
.checkout-modal select {
  border: 1px solid #ccc;
  border-radius: 4px;
}

#card-element {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.75rem;
}
