/**
 * Bright Flower Upsell System - Scoped styles, no theme dependency.
 */

.bf-upsell-section {
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid #e5e7eb;
}

.bf-upsell-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #374151;
}

.bf-upsell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.bf-upsell-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.bf-upsell-cat-card:hover {
  border-color: #9ca3af;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bf-upsell-cat-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.bf-upsell-cat-placeholder {
  width: 100%;
  height: 120px;
  background: #f3f4f6;
  display: block;
}

.bf-upsell-cat-name {
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-align: center;
}

/* Modal */
.bf-upsell-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.bf-upsell-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.bf-upsell-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.bf-upsell-modal-content {
  position: relative;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.bf-upsell-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  z-index: 1;
}

.bf-upsell-modal-close:hover {
  color: #111;
}

.bf-upsell-modal-title {
  padding: 1.25rem 1.5rem 0;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111;
}

.bf-upsell-modal-products {
  padding: 1rem 1.5rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.bf-upsell-loading {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
}

.bf-upsell-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.bf-upsell-product-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.bf-upsell-product-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.bf-upsell-product-img-placeholder {
  width: 100%;
  height: 140px;
  background: #f3f4f6;
  display: block;
}

.bf-upsell-product-info {
  padding: 0.75rem;
}

.bf-upsell-product-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
  display: block;
}

.bf-upsell-product-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
}

.bf-upsell-add-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.bf-upsell-add-btn:hover {
  background: #374151;
}

.bf-upsell-add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.bf-upsell-empty {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
}
