/* ==============================
   CSA Product Horizontal Scroll
================================ */

.csa-products {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 30px;

  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.csa-products::-webkit-scrollbar {
  height: 8px;
}

.csa-products::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.csa-product {
  flex: 0 0 320px;
  scroll-snap-align: start;

  background: #ffffff;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px;
  padding: 16px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.csa-product h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.csa-product img {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  margin: 10px 0;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #047857;
  margin-bottom: 4px;
}

.price-per-share {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
}

.renewal-freq {
  font-size: 13px;
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 10px;
}

.add-to-order-btn {
  width: 100%;
  padding: 10px;
  margin-top: 10px;

  font-weight: 700;
  background: #2563eb;
  color: #ffffff;
  border-radius: 6px;
}

.add-to-order-btn:hover {
  opacity: .75;
  text-decoration: underline;
}

.quantity-container {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-quantity {
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
}

#order-total,
#cart-totals {
  background: #f9fafb;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.cart-row:last-child {
  border-bottom: none;
}

.cart-label {
  font-weight: 600;
}

.cart-amount {
  font-weight: 700;
}

.billing-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 10px;
}

.billing-fields label {
  font-size: 13px;
  font-weight: 600;
}

.billing-fields input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

@media (max-width: 640px) {
  .billing-fields {
    grid-template-columns: 1fr;
  }
}

#stripe-payment-section {
  margin-top: 30px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

#submit-button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 800;
}

.csa-products::after {
  content: "→ Scroll";
  position: sticky;
  right: 0;
  font-size: 12px;
  color: #9ca3af;
}

.csa-product.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
