:root {
  --bs-primary: #0097B2;
  --bs-primary-rgb: 0, 151, 178;
}

/* Brand helpers */
.brand-gradient {
  background: linear-gradient(135deg, #0097B2 0%, #007a8f 100%);
  color: #fff !important;
}

/******** Bootstrap overrides ********/
.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: #00859b;
  --bs-btn-hover-border-color: #00859b;
  --bs-btn-active-bg: #007a8f;
  --bs-btn-active-border-color: #007a8f;
}
.btn-outline-primary {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--bs-primary);
  --bs-btn-hover-border-color: var(--bs-primary);
}
.bg-primary {
  background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important;
}
.text-primary {
  color: rgba(var(--bs-primary-rgb), 1) !important;
}

/* Common components using the brand color */
.progress-fill { background-color: var(--bs-primary) !important; }

/* Focus ring using primary */
.form-control:focus,
.form-select:focus,
.btn:focus,
.btn:active:focus {
  box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25) !important;
}

/* Shared ebook thumbnail: portrait 732x1024 */
.thumb-ebook {
  aspect-ratio: 732 / 1024;
  width: 100%;
  overflow: hidden;
  background: #f8f9fa;
  border-top-left-radius: .375rem;
  border-top-right-radius: .375rem;
}
.thumb-ebook img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* HTML description formatting for products */
.product-description p {
  margin-bottom: 0.5rem;
}
.product-description br {
  display: block;
  content: "";
  margin: 0.25rem 0;
}
.product-description strong {
  font-weight: 600;
}
.product-description em {
  font-style: italic;
}
.product-description a {
  color: #0d6efd;
  text-decoration: underline;
}

/* Truncate long descriptions on card views */
.product-description.truncate {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
  line-height: 1.5em;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Ensure cards don't break layout */
.card {
  overflow: hidden;
}

.card-body {
  overflow: hidden;
}
