/* Small additions for the Flask version — the original design lives in style.css */
.pd-thumbs { display: flex; gap: 0.6rem; margin-top: 0.85rem; flex-wrap: wrap; }
.pd-thumb { width: 78px; height: 50px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid var(--border); background: var(--bg2); cursor: pointer; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.active { border-color: var(--primary); }
.pd-long-description { margin-top: 1.5rem; color: var(--text-muted); line-height: 1.8; }
.pd-long-description h2 { font-size: 1.1rem; color: var(--text); margin: 1.25rem 0 0.5rem; }
.pd-long-description p, .pd-long-description ul { margin-bottom: 0.85rem; }
.pd-long-description ul { padding-left: 1.25rem; list-style: disc; }
.info-text a { color: inherit; text-decoration: none; }
.info-text a:hover { color: var(--primary); }
.legal-wrap a { color: var(--primary); }
.legal-contact-box .btn-primary { color: #fff; }

/* =====================================================
   Product card buttons: View Details + Buy on Amazon
   - same height, never overflow, aligned at the bottom of every card
   - side by side when the card is wide enough, stacked when narrow
   ===================================================== */
.product-body { container-type: inline-size; }
.product-price { margin-bottom: 1rem; }
.product-actions {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0.5rem !important;
  margin-top: auto !important;
  flex-wrap: initial;
}
@container (min-width: 290px) {
  .product-actions { grid-template-columns: 1fr 1.35fr; }
}
.product-actions > a,
.product-actions > a.btn-sm-card {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 0.5rem 0.75rem !important;
  border-radius: 9px !important;
  font-family: inherit;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: initial !important;
}
.product-actions > a.btn-outline-sm {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.product-actions > a.btn-outline-sm:hover { background: var(--primary); color: #fff; }
.product-actions > a.btn-sm-card { border: 1.5px solid transparent !important; color: #fff; }
.product-actions > a.btn-sm-card i { font-size: 0.95em; }
.product-actions > a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Readable purple on the dark theme */
[data-theme="dark"] .product-actions > a.btn-outline-sm { color: #c4b5fd; border-color: #8b5cf6; }
[data-theme="dark"] .product-actions > a.btn-outline-sm:hover { color: #fff; background: var(--primary); border-color: var(--primary); }

/* Gradient buttons: paint the gradient under the border too, so no coloured strips show at the edges */
.btn-primary, .pd-btn-buy, .nl-form button, .cat-search-btn { background-origin: border-box; }

/* Fix from the original stylesheet: the base .filter-toggle-btn rule came after the media query,
   so the "Show Filters" button never appeared on tablets and phones. */
@media (max-width: 900px) {
  .filter-toggle-btn { display: flex; }
}
