/* Mobile layout corrections for the Upsell theme. */
@media (max-width: 574.98px) {
  .header-mobile__header {
    --up-flex-gap: 0.375rem;
  }

  .h-m-item-location {
    flex: 0 1 auto;
    min-width: 0;
  }

  .h-m-item-location .location,
  .h-m-item-location .bdtt-city-selector {
    min-width: 0;
  }

  .h-m-item-location .location__btn,
  .h-m-item-phone .btn,
  .h-m-item-phone button,
  .h-m-item-phone a,
  .h-m-item-mode-theme .btn,
  .h-m-item-mode-theme button,
  .h-m-item-bars {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .h-m-item-location .location__btn {
    max-width: 7.5rem;
  }

  .h-m-item-location .location__city {
    display: block;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .h-m-item-phone {
    margin-left: 0;
  }

  .h-m-item-text {
    flex: 0 1 6.25rem;
    min-width: 0;
    max-height: 2.75rem;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.15;
  }

  .h-m-item-text * {
    font-size: inherit !important;
    line-height: inherit !important;
  }

  .breadcrumbs {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .breadcrumbs::-webkit-scrollbar {
    display: none;
  }

  .breadcrumbs__item {
    flex: 0 0 auto;
  }

  .products__skus {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .cookies {
    left: 0.75rem;
    right: 0.75rem;
    padding: 0.75rem;
  }

  .cookies.pr-p-b {
    bottom: 7.5rem;
  }
}

/* Product photos: fit inside search tiles and the product gallery without cropping. */
.products__img-full,
.pr-images__swiper .swiper-slide {
  background-color: #fff;
}

.products__img-full img,
.pr-images__swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 339.98px) {
  .h-m-item-text {
    display: none;
  }

  .products,
  .products__wrap {
    --up-grid-columns: 1;
  }
}
/* Accessible SEO heading: visible to assistive technology, no layout shift. */
.bdtt-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Mobile header: keep the primary information in the first row and place the
   city selector on its own row immediately above search. */
@media (max-width: 1179.98px) {
  .header-mobile,
  .header-mobile__header {
    height: auto !important;
    min-height: 4.125rem;
  }

  .header-mobile__header {
    flex-wrap: wrap;
    padding-bottom: 0.25rem;
  }

  .header-mobile__header .h-m-item-location {
    order: 20;
    flex: 0 0 100%;
    width: 100%;
    margin-top: 0.25rem;
  }

  .header-mobile__header .h-m-item-location .location,
  .header-mobile__header .h-m-item-location .bdtt-city-selector {
    width: 100%;
  }

  .header-mobile__header .h-m-item-location .location__btn {
    width: auto;
    max-width: 100%;
    min-height: 2.25rem;
    justify-content: flex-start;
    padding-right: 0.5rem;
    padding-left: 0;
  }

  .header-mobile__header .h-m-item-location .location__city {
    max-width: calc(100vw - 5rem);
    text-align: left;
  }
}

/* Home catalog: compact category cards. Keep this scoped to the first
   categories block so product cards and category pages remain unchanged. */
.up-home .blocks__item-categories-1 .categories-sm__wrap {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.75rem;
}

.up-home .blocks__item-categories-1 .categories-sm__item {
  display: flex;
  min-width: 0;
  min-height: 10.5rem;
  flex-direction: column;
  align-items: center;
  padding: 0.625rem;
  text-align: center;
}

.up-home .blocks__item-categories-1 .categories-sm__img {
  width: 5.25rem;
  height: 5.25rem;
  flex: 0 0 5.25rem;
  margin: 0 0 0.5rem;
}

.up-home .blocks__item-categories-1 .categories-sm__img img {
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

.up-home .blocks__item-categories-1 .categories-sm__name {
  font-size: 0.875rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.up-home .blocks__item-categories-1 .categories-sm__count {
  margin-top: auto;
  padding-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.25;
}

@media (max-width: 1179.98px) and (min-width: 768px) {
  .up-home .blocks__item-categories-1 .categories-sm__wrap {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.625rem;
  }
}

@media (max-width: 767.98px) {
  .up-home .blocks__item-categories-1 .categories-sm__wrap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .up-home .blocks__item-categories-1 .categories-sm__item {
    min-height: 8.5rem;
    padding: 0.5rem;
  }

  .up-home .blocks__item-categories-1 .categories-sm__img {
    width: 4rem;
    height: 4rem;
    flex-basis: 4rem;
    margin-bottom: 0.375rem;
  }

  .up-home .blocks__item-categories-1 .categories-sm__name {
    font-size: 0.8125rem;
    line-height: 1.2;
  }

  .up-home .blocks__item-categories-1 .categories-sm__count {
    font-size: 0.6875rem;
  }
}

@media (max-width: 359.98px) {
  .up-home .blocks__item-categories-1 .categories-sm__wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Homepage company description: readable semantic layout with useful internal
   links. Colours are intentionally neutral so the block follows both themes. */
.ob-company {
  margin: 1.5rem 0 0;
  padding: clamp(1rem, 2.5vw, 2.25rem);
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-radius: 1rem;
  background: rgba(127, 127, 127, 0.055);
  color: inherit;
}

.ob-company h1,
.ob-company h2,
.ob-company p {
  margin-top: 0;
}

.ob-company h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.75rem);
  line-height: 1.08;
}

.ob-company h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.ob-company p,
.ob-company li,
.ob-company span {
  line-height: 1.65;
}

.ob-company a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.ob-company__hero {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(127, 127, 127, 0.2);
}

.ob-company__logo {
  display: block;
  width: 7.5rem;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.ob-company__eyebrow {
  margin-bottom: 0.5rem;
  color: #00a8b8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ob-company__lead {
  max-width: 68rem;
  margin-bottom: 0;
  font-size: 1.05rem;
}

.ob-company__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.ob-company__fact,
.ob-company__catalog a {
  border: 1px solid rgba(127, 127, 127, 0.18);
  border-radius: 0.75rem;
  background: rgba(127, 127, 127, 0.06);
}

.ob-company__fact {
  padding: 1rem;
}

.ob-company__fact strong,
.ob-company__fact span,
.ob-company__catalog strong,
.ob-company__catalog span {
  display: block;
}

.ob-company__fact strong,
.ob-company__catalog strong {
  margin-bottom: 0.25rem;
}

.ob-company__fact span,
.ob-company__catalog span {
  color: rgba(127, 127, 127, 0.95);
  font-size: 0.9rem;
}

.ob-company__section {
  min-width: 0;
}

.ob-company__section > :last-child {
  margin-bottom: 0;
}

.ob-company__catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.ob-company__catalog a {
  min-height: 7rem;
  padding: 1rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ob-company__catalog a:hover,
.ob-company__catalog a:focus-visible {
  border-color: #00a8b8;
  transform: translateY(-2px);
}

.ob-company__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(127, 127, 127, 0.2);
}

.ob-company__list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.ob-company__list li + li {
  margin-top: 0.35rem;
}

.ob-company__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
  font-style: normal;
}

.ob-company__contacts a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  background: #00a8b8;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 991.98px) {
  .ob-company__facts,
  .ob-company__catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .ob-company {
    margin-top: 1rem;
    border-radius: 0.75rem;
  }

  .ob-company__hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ob-company__logo {
    width: 5.5rem;
  }

  .ob-company__lead {
    font-size: 1rem;
  }

  .ob-company__facts,
  .ob-company__catalog,
  .ob-company__columns {
    grid-template-columns: 1fr;
  }

  .ob-company__catalog a {
    min-height: 0;
  }

  .ob-company__contacts {
    display: grid;
  }

  .ob-company__contacts a {
    justify-content: center;
  }
}
