/* Catalog presentation: scoped filters, stock details and manufacturer artwork. */

.catalog-filters form {
  position: relative;
  isolation: isolate;
}

.catalog-filter-actions {
  position: sticky;
  z-index: 12;
  bottom: 0;
  margin: 18px 0 0;
  padding: 14px 0 calc(2px + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 14px, #fff 100%);
}

.catalog-filters .dynamic-filter-submit {
  position: relative;
  min-height: 52px;
  margin: 0;
  box-shadow: 0 12px 26px rgba(181, 0, 18, .24);
}

.catalog-filters .dynamic-filter-submit > span {
  font-weight: 900;
}

.filter-section--subgroups {
  margin: 12px -9px 0;
  padding: 14px 9px 18px;
  background: #f7f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
}

.filter-section--subgroups h3 {
  margin-bottom: 4px;
}

.catalog-subgroup-option {
  min-height: 38px;
  padding: 7px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.catalog-subgroup-option:has(input:checked) {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #e7aeb4;
}

.product-card {
  border-radius: 16px;
}

.product-card__image {
  height: 224px;
  padding: 18px 18px 8px;
}

.product-card__body {
  padding: 12px 17px 16px;
}

.product-card__title {
  min-height: 44px;
  font-size: 15px;
  line-height: 1.42;
}

.product-card__secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.product-card__secondary-actions button,
.product-card__secondary-actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.product-card__secondary-actions button:hover,
.product-card__secondary-actions button.active,
.product-card__secondary-actions a:hover {
  color: var(--brand);
}

.product-card__secondary-actions button.active i {
  color: var(--brand);
}

.catalog-products--list .product-card__body {
  grid-template-rows: auto auto auto 1fr auto;
}

.catalog-products--list .product-card__stock {
  grid-row: 1;
}

.catalog-products--list .product-card__stores {
  grid-row: 2;
}

.catalog-products--list .product-card__bottom {
  grid-row: 3;
}

.catalog-products--list .product-card__secondary-actions {
  grid-column: 2;
  grid-row: 4;
  align-self: start;
}

.catalog-filter-actions .filter-reset {
  margin-top: 11px;
}

.stock-state--supplier,
.suggest-v16__stock--supplier,
.compare-stock.supplier {
  color: #176f87;
}

.compare-stock.available,
.compare-stock.many {
  color: var(--success);
}

.compare-stock.low {
  color: #b46900;
}

.stock-status--supplier {
  color: #135c72;
  background: #eaf7fb;
  border-color: #b9dfe9;
}

.stock-status--supplier > i {
  background: #197890;
}

.stock-status--supplier > span small {
  color: #3b6d79;
}

.availability-empty--supplier {
  background: #eaf7fb;
  border-color: #b9dfe9;
}

.availability-empty--supplier > i {
  color: #197890;
}

.product-card__brand-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.product-card__brand-logo img {
  width: auto;
  max-width: 92px;
  height: 28px;
  object-fit: contain;
  object-position: left center;
}

.product-card__brand-logo span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card__stock {
  min-height: 50px;
  gap: 10px;
  padding-top: 13px;
}

.product-card__stock > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: currentColor;
  background: color-mix(in srgb, currentColor 10%, #fff);
  border-radius: 10px;
  font-size: 15px;
}

.product-card__stock > span {
  gap: 2px;
}

.product-card__stock > span > b {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.product-card__stock strong {
  color: currentColor;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}

.product-card__stores,
.product-store-dropdown {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.product-card__stores summary,
.product-store-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.product-card__stores summary::-webkit-details-marker,
.product-store-dropdown summary::-webkit-details-marker {
  display: none;
}

.product-card__stores summary::after {
  color: var(--muted);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f078";
  transition: transform .16s ease;
}

.product-card__stores[open] summary::after,
.product-store-dropdown[open] summary > i:last-child {
  transform: rotate(180deg);
}

.product-card__stores summary > i,
.product-store-dropdown summary i {
  color: var(--brand);
}

.product-card__stores > div,
.product-store-dropdown > div {
  max-height: 230px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.product-card__stores p,
.product-store-dropdown p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
}

.product-card__stores p:last-child,
.product-store-dropdown p:last-child {
  border-bottom: 0;
}

.product-card__stores p > span,
.product-store-dropdown p > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.product-card__stores p b,
.product-store-dropdown p b {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.product-card__stores p small,
.product-store-dropdown p small {
  color: var(--muted);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.product-card__stores p > strong,
.product-store-dropdown p > strong {
  color: var(--success);
  font-size: 12px;
  white-space: nowrap;
}

.catalog-products--list .product-card__brand-logo {
  grid-column: 1;
  justify-content: flex-start;
}

.catalog-products--list .product-card__stores {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin: 0;
}

.catalog-products--list .product-card__bottom {
  grid-row: 3 / 6;
}

.product-detail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  margin-bottom: 8px;
}

.product-detail__brand img {
  width: auto;
  max-width: 130px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.product-detail__brand .eyebrow {
  margin: 0;
}

.product-store-dropdown {
  margin: -5px 0 17px;
  background: #fafbfb;
}

.product-store-dropdown summary {
  min-height: 46px;
  padding: 11px 12px;
}

.product-store-dropdown summary > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-store-dropdown summary > i:last-child {
  color: var(--muted);
  transition: transform .16s ease;
}

.availability-empty--available {
  background: var(--success-soft);
}

.availability-empty--available > i {
  color: var(--success);
}

.brand-card__mark--logo {
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
}

.brand-card__mark--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-settings-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.catalog-settings-checks .checkline--boxed {
  min-height: 52px;
  margin: 0;
  padding: 12px 14px;
}

.settings-sections {
  display: grid;
  gap: 18px;
}

.onec-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.onec-profile {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.onec-profile--active {
  background: #fff8f8;
  border-color: #d84b59;
  box-shadow: 0 0 0 2px rgba(181, 0, 18, .08);
}

.onec-test-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  color: #fff !important;
  background: #b50012;
  border: 2px solid #ffb4bc;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .05em;
  box-shadow: 0 6px 18px rgba(181, 0, 18, .3);
}

@media (max-width: 980px) {
  .onec-profile-grid { grid-template-columns: 1fr; }
}

.settings-save {
  position: sticky;
  z-index: 12;
  bottom: 14px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.settings-save .btn {
  min-height: 50px;
  box-shadow: 0 14px 30px rgba(181, 0, 18, .25);
  pointer-events: auto;
}

.brand-admin-cell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand-admin-cell > img,
.brand-admin-cell > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 42px;
  padding: 5px;
  object-fit: contain;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 950;
}

.brand-admin-cell > div {
  display: grid;
  min-width: 0;
}

.brand-admin-cell small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.brand-admin-preview {
  display: grid;
  place-items: center;
  min-height: 110px;
  padding: 16px;
  background: #f7f8f9;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.brand-admin-preview img {
  max-width: 240px;
  max-height: 90px;
  object-fit: contain;
}

@media (max-width: 1100px) {
  .header-actions > a:nth-child(2) {
    display: grid;
  }
}

@media (max-width: 1040px) {
  .catalog-settings-checks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .catalog-filter-actions {
    bottom: 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 760px) {
  .product-card__image {
    height: 210px;
  }

  .product-card__brand-logo {
    justify-content: flex-start;
  }

  .catalog-products--list .product-card__stores,
  .catalog-products--list .product-card__brand-logo,
  .catalog-products--list .product-card__bottom,
  .catalog-products--list .product-card__secondary-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .product-card__stores p {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-card__stores p > strong {
    justify-self: start;
  }

  .catalog-products--list .product-card__secondary-actions {
    align-self: stretch;
  }

  .product-detail__brand img {
    max-width: 105px;
    height: 30px;
  }

  .settings-save {
    bottom: 8px;
  }

  .settings-save .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .product-card__bottom {
    grid-template-columns: 1fr;
  }

  .product-card__buy {
    width: 100%;
  }
}
