/*--------------------------------------------------------------
# Products catalog
--------------------------------------------------------------*/
/* Sticky sidebar needs visible overflow on ancestor (page-wrapper is overflow:hidden globally) */
.page-products .page-wrapper {
  overflow: visible;
}

.products-catalog {
  position: relative;
  display: block;
  padding: 32px 0 80px;
  background-color: var(--tanspot-primary);
}

@media (min-width: 992px) {
  .products-catalog {
    padding-top: 28px;
  }
}

.products-catalog__title {
  text-align: center;
  font-size: 46px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 56px;
  padding-top: 0;
  color: var(--tanspot-black);
}

.products-catalog__title span {
  color: var(--tanspot-base);
}

@media (min-width: 768px) {
  .products-catalog__title {
    margin-bottom: 64px;
  }
}

@media (max-width: 575px) {
  .products-catalog__title {
    font-size: 32px;
    margin-bottom: 40px;
  }
}

.products-catalog__empty {
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--tanspot-bdr-radius);
}

.products-catalog__toolbar {
  margin-bottom: 24px;
}

/* Two-column row: align tops so sticky sidebar works */
.products-catalog__layout.row {
  align-items: flex-start;
}

.products-catalog__nav-col {
  align-self: flex-start;
}

.products-catalog__toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 12px;
}

.products-catalog__search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}

.products-catalog__search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tanspot-base);
  pointer-events: none;
  z-index: 1;
}

.products-catalog__search {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 48px;
  border: 1px solid var(--tanspot-bdr-color);
  border-radius: var(--tanspot-bdr-radius);
  background-color: var(--tanspot-white);
  font-family: var(--tanspot-font);
  font-size: 15px;
  color: var(--tanspot-black);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.products-catalog__search:focus {
  outline: none;
  border-color: var(--tanspot-base);
  box-shadow: 0 0 0 3px rgba(var(--tanspot-base-rgb), 0.15);
}

.products-catalog__filters {
  flex: 0 1 240px;
  min-width: 180px;
}

.products-catalog__select {
  width: 100%;
  height: 52px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--tanspot-bdr-color);
  border-radius: var(--tanspot-bdr-radius);
  background-color: var(--tanspot-white);
  font-family: var(--tanspot-font);
  font-size: 15px;
  color: var(--tanspot-black);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23585b6b' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.products-catalog__select:focus {
  outline: none;
  border-color: var(--tanspot-base);
  box-shadow: 0 0 0 3px rgba(var(--tanspot-base-rgb), 0.15);
}

.products-catalog__view-toggle {
  display: flex;
  border: 1px solid var(--tanspot-bdr-color);
  border-radius: var(--tanspot-bdr-radius);
  overflow: hidden;
  background: var(--tanspot-white);
}

.products-catalog__view-btn {
  width: 52px;
  height: 50px;
  border: none;
  background: transparent;
  color: var(--tanspot-gray);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.products-catalog__view-btn:hover {
  color: var(--tanspot-base);
  background: rgba(var(--tanspot-base-rgb), 0.06);
}

.products-catalog__view-btn.is-active {
  background: var(--tanspot-base);
  color: var(--tanspot-white);
}

.products-catalog__meta {
  font-size: 14px;
  color: var(--tanspot-gray);
  margin: 0;
}

.products-catalog__nav {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

@media (min-width: 992px) {
  .products-catalog__nav {
    position: -webkit-sticky;
    position: sticky;
    top: 92px;
    z-index: 5;
    padding: 20px 18px;
    border-radius: var(--tanspot-bdr-radius);
    background: var(--tanspot-white);
    border: 1px solid var(--tanspot-bdr-color);
    box-shadow: 0 8px 30px rgba(var(--tanspot-black-rgb), 0.06);
    max-height: calc(100vh - 108px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .products-catalog__nav-title {
    flex-shrink: 0;
  }

  .products-catalog__nav-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.products-catalog__nav-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(var(--tanspot-base-rgb), 0.2);
  font-family: var(--tanspot-font-two);
  color: var(--tanspot-black);
}

.products-catalog__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.products-catalog__nav-link {
  display: block;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tanspot-gray);
  transition: background 0.25s ease, color 0.25s ease;
}

.products-catalog__nav-link:hover {
  background: rgba(var(--tanspot-base-rgb), 0.08);
  color: var(--tanspot-base);
}

.products-catalog__accordion > .products-catalog__cat {
  margin-bottom: 16px;
  background: var(--tanspot-white);
  border-radius: var(--tanspot-bdr-radius);
  border: 1px solid var(--tanspot-bdr-color);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(var(--tanspot-black-rgb), 0.04);
  scroll-margin-top: 120px;
}

.products-catalog__cat-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  font-family: var(--tanspot-font-two);
  font-weight: 600;
  font-size: 17px;
  color: var(--tanspot-black);
  user-select: none;
  transition: background 0.25s ease;
}

.products-catalog__cat-summary::-webkit-details-marker {
  display: none;
}

.products-catalog__cat-summary:hover {
  background: rgba(var(--tanspot-base-rgb), 0.04);
}

.products-catalog__cat-name {
  flex: 1;
}

.products-catalog__cat-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--tanspot-base);
  background: rgba(var(--tanspot-base-rgb), 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.products-catalog__cat-chevron {
  transition: transform 0.3s ease;
  color: var(--tanspot-gray);
}

.products-catalog__cat[open] .products-catalog__cat-chevron {
  transform: rotate(180deg);
}

.products-catalog__grid {
  display: grid;
  gap: 12px;
  padding: 0 22px 22px;
}

.products-catalog__accordion--grid .products-catalog__grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.products-catalog__accordion--list .products-catalog__grid {
  grid-template-columns: 1fr;
}

.products-catalog__item {
  min-width: 0;
}

.products-catalog__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--tanspot-primary);
  border-radius: 10px;
  border: 1px solid var(--tanspot-bdr-color);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.products-catalog__item:hover .products-catalog__card {
  border-color: rgba(var(--tanspot-base-rgb), 0.35);
  box-shadow: 0 8px 30px rgba(var(--tanspot-black-rgb), 0.08);
}

.products-catalog__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tanspot-white);
}

.products-catalog__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.products-catalog__item:hover .products-catalog__thumb img {
  transform: scale(1.04);
}

.products-catalog__body {
  padding: 18px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.products-catalog__item-title {
  font-family: var(--tanspot-font-two);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tanspot-black);
  margin: 0 0 10px;
}

.products-catalog__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--tanspot-gray);
  margin: 0 0 12px;
  flex: 0 0 auto;
}

.products-catalog__detail {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--tanspot-gray);
  flex: 1;
}

.products-catalog__spec-line {
  margin: 0 0 6px;
  font-weight: 400;
  color: var(--tanspot-gray);
}

/* Only the label + colon bold; values stay regular (matches live product pages) */
.products-catalog__spec-label {
  display: inline;
  font-weight: 700;
  color: var(--tanspot-black);
}

.products-catalog__spec-value {
  display: inline;
  font-weight: 400;
  color: var(--tanspot-gray);
}

.products-catalog__spec-note {
  margin: 10px 0 12px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--tanspot-gray);
}

.products-catalog__grades {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--tanspot-gray);
}

.products-catalog__grades li {
  margin-bottom: 4px;
}

.products-catalog__grades li:last-child {
  margin-bottom: 0;
}

/* List layout: fixed image frame, object-fit contain — full product visible, no harsh crop */
.products-catalog__accordion--list .products-catalog__card {
  flex-direction: row;
  align-items: flex-start;
}

.products-catalog__accordion--list .products-catalog__thumb {
  flex: 0 0 clamp(200px, 26vw, 280px);
  width: clamp(200px, 26vw, 280px);
  min-width: clamp(200px, 26vw, 280px);
  max-width: 280px;
  align-self: flex-start;
  box-sizing: border-box;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #f2f5f8 0%, #e9eef3 55%, #e2e8ef 100%);
  border-right: 1px solid rgba(var(--tanspot-bdr-color-rgb), 0.75);
}

.products-catalog__accordion--list .products-catalog__thumb img {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.products-catalog__accordion--list .products-catalog__item:hover .products-catalog__thumb img {
  transform: none;
}

.products-catalog__accordion--list .products-catalog__body {
  flex: 1;
  min-width: 0;
  padding: 20px 22px 22px;
}

@media (min-width: 768px) {
  .products-catalog__accordion--list .products-catalog__grades {
    column-count: 2;
    column-gap: 28px;
    padding-left: 0;
  }

  .products-catalog__accordion--list .products-catalog__grades li {
    break-inside: avoid;
    margin-bottom: 6px;
  }
}

@media (max-width: 575px) {
  .products-catalog__accordion--list .products-catalog__card {
    flex-direction: column;
  }

  .products-catalog__accordion--list .products-catalog__thumb {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 200px;
    max-height: none;
    aspect-ratio: 16 / 10;
    border-right: none;
    border-bottom: 1px solid rgba(var(--tanspot-bdr-color-rgb), 0.75);
    align-self: auto;
  }

  .products-catalog__accordion--list .products-catalog__thumb img {
    max-height: min(52vw, 240px);
  }

  .products-catalog__accordion--list .products-catalog__grades {
    column-count: 1;
  }
}

@media (max-width: 991px) {
  .products-catalog__nav {
    position: relative;
    top: auto;
    max-height: none;
    padding: 20px 18px;
    border-radius: var(--tanspot-bdr-radius);
    background: var(--tanspot-white);
    border: 1px solid var(--tanspot-bdr-color);
    box-shadow: 0 8px 30px rgba(var(--tanspot-black-rgb), 0.06);
  }

  .products-catalog__nav-list {
    max-height: 220px;
    overflow-y: auto;
  }
}
