/* BFMEDI adapter for the locally mirrored PeptiSources public storefront template. */
html { scroll-behavior: smooth; }
body.bf-target-replica { min-width: 320px; overflow-x: hidden; }
body.bf-target-replica section,
body.bf-target-replica h2[id] { scroll-margin-top: 132px; }

.bf-language-menu { position: relative; z-index: 80; }
.bf-language-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f8fafc;
  color: #172033;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.bf-language-menu summary::-webkit-details-marker { display: none; }
.bf-language-menu summary::after { content: "⌄"; margin-left: 7px; color: #64748b; }
.bf-language-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 230px;
  max-height: min(420px, 72vh);
  padding: 8px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15,23,42,.16);
}
.bf-language-menu:not([open]) > .bf-language-list { display: none; }

.bf-language-fallback {
  display: none !important;
}
.bf-language-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 7px;
  color: #334155;
  font-size: 13px;
  text-decoration: none;
}
.bf-language-list a:hover,
.bf-language-list a.active { background: #eef6ff; color: #1667a8; }
.bf-language-list strong { color: #64748b; font-size: 11px; }

.target-product-card { min-width: 0; }
.target-product-card[hidden] { display: none !important; }
.target-product-card button[data-cart-bound="true"] { cursor: pointer; }
.bf-no-results {
  grid-column: 1 / -1;
  padding: 48px 20px;
  color: #64748b;
  text-align: center;
}

.bf-mobile-menu {
  position: fixed;
  inset: 104px 0 auto;
  z-index: 70;
  display: none;
  max-height: calc(100vh - 104px);
  padding: 18px 20px 24px;
  overflow-y: auto;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 18px 35px rgba(15,23,42,.14);
}
.bf-mobile-menu.open { display: block; }
.bf-mobile-menu nav { display: grid; }
.bf-mobile-menu nav a {
  padding: 12px 4px;
  border-bottom: 1px solid #eef2f7;
  color: #172033;
  font-size: 15px;
  text-decoration: none;
}
.bf-mobile-languages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin-top: 16px;
}
.bf-mobile-languages a {
  padding: 9px 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 7px;
  background: #f8fafc;
  font-size: 12px !important;
}

.bf-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(2,8,23,.48);
}
.bf-cart-backdrop.open { display: block; }
.bf-cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 100;
  display: flex;
  width: min(430px, 92vw);
  padding: 24px;
  flex-direction: column;
  background: #fff;
  box-shadow: -18px 0 45px rgba(2,8,23,.2);
  transform: translateX(105%);
  transition: transform .25s ease;
}
.bf-cart-drawer.open { transform: translateX(0); }
.bf-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bf-cart-head h2 { color: #111827; font-size: 22px; font-weight: 700; }
.bf-cart-close {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #334155;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
}
.bf-cart-items { display: grid; gap: 10px; margin-top: 24px; overflow-y: auto; }
.bf-cart-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.bf-cart-item img { width: 58px; height: 58px; object-fit: contain; background: #f3f4f6; border-radius: 7px; }
.bf-cart-item strong { display: block; color: #111827; font-size: 13px; }
.bf-cart-item span { color: #64748b; font-size: 12px; }
.bf-cart-remove { border: 0; background: none; color: #94a3b8; cursor: pointer; }
.bf-cart-empty { padding: 50px 12px; color: #64748b; text-align: center; }
.bf-cart-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 18px; }
.bf-cart-checkout {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  background: #053559;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.bf-cart-note { color: #64748b; font-size: 11px; line-height: 1.5; text-align: center; }
.bf-cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}
.bf-cart-count.visible { display: block; }

.bf-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  padding: 11px 16px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 35px rgba(2,8,23,.22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .2s ease;
}
.bf-toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 767px) {
  body.bf-target-replica section,
  body.bf-target-replica h2[id] { scroll-margin-top: 104px; }
  .bf-cart-drawer { padding: 20px; }
  .bf-toast { right: 14px; bottom: 14px; left: 14px; text-align: center; }
}
