/* Images open the quick view. Keep inline catalogue actions outside the media. */
html [data-bs-product] :is(.product-item__action, .card-actions-toggle) {
  display: none !important;
}
html [data-bs-product] :is(.premium-card-image > a, a.product__media):focus-visible {
  outline: 2px solid #1558bc;
  outline-offset: -3px;
}
html .fidelity-quick .fidelity-quick-add:not(:disabled) {
  background: #1558bc;
  border-color: #1558bc;
  color: #fff;
}
html .fidelity-quick .fidelity-quick-add:not(:disabled):hover {
  background: #104b9f;
  border-color: #104b9f;
}

/* Same compact search mark in the brand and OEM product lists. */
html :is(.fidelity-catalog .cf-list-search, .oem-collection .oc-search-field) {
  --bs-list-search-ink: #626e7b;
  position: relative;
  gap: 10px;
}
html :is(.fidelity-catalog .cf-list-search, .oem-collection .oc-search-field)::before {
  content: "" !important;
  box-sizing: border-box;
  display: block;
  position: static;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin: 0;
  margin-inline: 3px 5px;
  border: 1.6px solid var(--bs-list-search-ink);
  border-radius: 50%;
  transform: translateY(-1px);
  background: transparent;
  mask: none;
  pointer-events: none;
}
html :is(.fidelity-catalog .cf-list-search, .oem-collection .oc-search-field)::after {
  content: "" !important;
  display: block;
  position: absolute;
  inset-inline-start: 14.4px;
  top: 50% !important;
  width: 6px;
  height: 1.6px;
  border-radius: 1px;
  transform: translateY(3px) rotate(45deg);
  transform-origin: left center;
  background: var(--bs-list-search-ink);
  pointer-events: none;
}
html[dir="rtl"] :is(.fidelity-catalog .cf-list-search, .oem-collection .oc-search-field)::after {
  transform: translateY(3px) rotate(-45deg);
  transform-origin: right center;
}
html .oem-collection .oc-search-field > svg {
  display: none !important;
}
html :is(.fidelity-catalog .cf-list-search, .oem-collection .oc-search-field):focus-within {
  --bs-list-search-ink: #1558bc;
}

/* Scale the image only. The separate scale property preserves per-SKU sizing. */
@property --bs-product-breath {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}
@keyframes bs-product-breath {
  0%, 100% { --bs-product-breath: 0; }
  50% { --bs-product-breath: .014; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html :is(.fidelity-catalog a.product__media, .premium-card-image > a, .oem-collection .oc-photo-open) {
    overflow: hidden;
    --bs-product-zoom: 1;
  }
  html :is(.fidelity-catalog a.product__media, .premium-card-image > a, .oem-collection .oc-photo-open) img {
    scale: calc(var(--bs-product-zoom, 1) + var(--bs-product-breath, 0));
    transform-origin: center;
    transition: scale 450ms cubic-bezier(.2,.7,.25,1), transform .5s ease;
  }
  html :is(.fidelity-catalog a.product__media, .premium-card-image > a, .oem-collection .oc-photo-open):hover {
    --bs-product-zoom: 1.035;
  }
  html :is(.fidelity-catalog a.product__media, .premium-card-image > a, .oem-collection .oc-photo-open):hover img {
    animation: bs-product-breath 2.6s ease-in-out 450ms infinite;
  }
}

/* Home collection cards: the photo moves inside its existing crop. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-home-section="collections"] :is(.bs-poster, .audio-card) {
    --bs-home-poster-scale: 1;
  }
  [data-home-section="collections"] .audio-card { overflow: hidden; }
  [data-home-section="collections"] :is(.bs-poster-frame > img, .audio-card > .audio-product) {
    scale: var(--bs-home-poster-scale);
    transition: scale 650ms cubic-bezier(.2,.7,.25,1), transform .5s ease;
  }
  [data-home-section="collections"] :is(.bs-poster, .audio-card):hover {
    --bs-home-poster-scale: 1.045;
  }
}

/* Three-row catalogue toolbar */
.bs-catalog-search-row,
.bs-catalog-view-row,
.bs-catalog-filter-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: clamp(10px, 2vw, 26px);
}
.bs-catalog-search-row {
  min-height: 62px;
  padding-block: 4px;
  border-bottom: 1px solid #e8edf2;
}
.bs-catalog-view-row { min-height: 50px; }
.bs-catalog-filter-row { min-height: 48px; }
.bs-catalog-three-rows .bs-catalog-search-row :is(.cf-list-search,.oc-search-field) {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0 !important;
  border: 0;
}
.bs-catalog-three-rows .bs-catalog-search-row input { height: 46px !important; }
.bs-catalog-three-rows .bs-catalog-search-row :is(.download,.bs-category-pdf) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 44px;
  max-width: 45%;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #1558bc;
  font: inherit;
  font-size: clamp(12px, 1.05vw, 16px);
  font-weight: 600;
  cursor: pointer;
}
.bs-catalog-search-row :is(.download,.bs-category-pdf) svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.bs-catalog-three-rows :is(.fc-toolbar,.oc-toolbar).bs-catalog-view-row {
  display: flex;
  flex-wrap: nowrap;
  margin: 5px 0 0;
  padding: 0;
  border: 0;
}
.bs-catalog-view-row :is(.fc-result-count,.oc-count) {
  flex: 0 1 auto !important;
  min-width: 0;
  margin: 0 !important;
  order: 0 !important;
}
.bs-catalog-view-row :is(.fc-view-modes,.oc-modes) {
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
}
.bs-catalog-three-rows .bs-catalog-filter-row {
  margin: 2px 0 22px;
  padding-block: 4px;
  border-bottom: 1px solid #edf0f3;
}
.bs-catalog-filter-row > :is(.fc-sort,.oc-sort) {
  flex: 0 0 auto;
  margin-inline-start: auto !important;
  max-width: 48%;
}
.bs-catalog-three-rows .bs-catalog-filter-row :is(.fc-sort-trigger,.oc-sort select) {
  min-width: 0;
  min-height: 44px;
  gap: 9px;
}
.bs-catalog-three-rows .bs-catalog-filter-row :is(.fc-sort-trigger,.oc-sort) > span {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  color: #687586;
}
.bs-catalog-three-rows .bs-catalog-filter-row .cf-quick { margin: 0; }
.bs-catalog-three-rows .bs-catalog-filter-row .fc-filter-toggle { margin-inline-end: 0; }
@media (max-width: 767px) {
  .bs-catalog-search-row { min-height: 52px; }
  .bs-catalog-filter-row { flex-wrap: wrap; gap: 2px 8px; }
  .bs-catalog-filter-row > :is(.fc-sort,.oc-sort) { max-width: 100%; }
  .bs-catalog-three-rows .bs-catalog-filter-row .fc-sort-trigger strong { display: inline; }
  .bs-catalog-three-rows .bs-catalog-filter-row :is(.fc-sort-trigger,.oc-sort select) { font-size: 13px !important; }
  .bs-catalog-three-rows .bs-catalog-filter-row :is(.fc-sort-trigger,.oc-sort) > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* Keep the same spacing and alignment in both catalogue implementations. */
html .bs-catalog-three-rows > .bs-catalog-search-row {
  min-height: clamp(56px, 5vw, 76px);
  margin: 0;
}
html .bs-catalog-three-rows .bs-catalog-search-row :is(.cf-list-search,.oc-search-field):has(input:focus-visible) {
  outline: 1px solid #7694b5;
  outline-offset: -1px;
  border-radius: 6px;
}
html .bs-catalog-three-rows .bs-catalog-search-row :is(.download,.bs-category-pdf) {
  color: #0047b9;
  font-size: clamp(12px, 1.05vw, 16px);
  line-height: 1.3;
  text-align: start;
}
html .bs-catalog-three-rows .bs-catalog-search-row :is(.download,.bs-category-pdf):disabled {
  opacity: .58;
  cursor: default;
}
html .bs-catalog-three-rows .bs-catalog-search-row .download > svg { fill: currentColor; }
html .bs-catalog-three-rows .cf-controls:has(.bs-catalog-filter-row) { margin: 0; }
html .bs-catalog-three-rows .cf-controls[hidden]:has(.bs-catalog-filter-row) { display: block; }
html .bs-catalog-three-rows .bs-catalog-filter-row {
  display: flex;
  justify-content: flex-start;
  gap: 4px clamp(6px, 1.4vw, 24px);
  margin: 2px 0 clamp(14px, 2vw, 30px);
  padding: 3px 0;
}
html .bs-catalog-three-rows .bs-catalog-filter-row .cf-quick { flex: 0 1 auto; }
html .bs-catalog-three-rows .bs-catalog-filter-row :is(.fc-sort-trigger,.oc-sort) {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}
html .bs-catalog-three-rows .bs-catalog-filter-row .oc-sort { width: auto; }
html .bs-catalog-three-rows .bs-catalog-filter-row .oc-sort select {
  position: static;
  opacity: 1;
  width: clamp(104px, 12vw, 185px);
  max-width: 100%;
}
html .bs-catalog-three-rows .bs-catalog-filter-row :is(.fc-sort-trigger,.oc-sort) > span {
  display: inline;
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
  overflow: visible;
  white-space: nowrap;
  font-size: clamp(12px, 1vw, 15px);
}
html .bs-catalog-three-rows .bs-catalog-filter-row .fc-sort-trigger strong {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html .bs-catalog-three-rows .bs-catalog-view-row .fc-toolbar-controls {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
@media (max-width: 767px) {
  html .bs-catalog-three-rows .bs-catalog-search-row { gap: 9px; }
  html .bs-catalog-three-rows .bs-catalog-search-row input { font-size: 15px !important; }
  html .bs-catalog-three-rows .bs-catalog-filter-row > :is(.fc-sort,.oc-sort) { max-width: 100%; }
  html .bs-catalog-three-rows .bs-catalog-filter-row .fc-sort-trigger { max-width: 100%; }
}

/* Keep the photographed scene continuous to the bottom of the smart-speaker card. */
html [data-home-section="collections"] .bs-poster-smart:last-child .bs-poster-frame {
  aspect-ratio: 16 / 9;
}
html [data-home-section="collections"] .bs-poster-smart .bs-poster-frame > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: 70% center;
}
@media (max-width: 600px) {
  html [data-home-section="collections"] .bs-poster-smart .bs-poster-frame > img {
    object-position: 72% center;
  }
  html [data-home-section="collections"] .bs-poster-smart:last-child .bs-poster-frame::after {
    background: linear-gradient(75deg, #081624ec, #08162432 48%, transparent 69%);
  }
}

@media (max-width: 600px) {
  html[dir="rtl"] [data-home-section="collections"] .bs-poster-smart:last-child .bs-poster-frame::after {
    background: linear-gradient(0deg, #081624d9, #08162426 43%, transparent 65%);
  }
}
