.view-all {
  font-size: 12px;
  text-decoration: none;
  color: #111;
  font-weight: 200;
  letter-spacing: 0;
  white-space: nowrap;
}

.view-all:hover {
    color: #ff563f;
}

/* PRODUCTS GRID */

.shop-tools {
  background: #f5f3ea;
  border-bottom: 1px solid #c7c7c7;
  padding: 16px;
}

.shop-filter-form {
  width: 100%;
  display: grid;
  gap: 12px;
}

.shop-filter-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: stretch;
  gap: 12px;
  align-items: center;
}

.shop-filter-panel {
  grid-template-columns: auto auto auto minmax(220px, 320px) auto;
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: start;
  gap: 12px;
  align-items: end;
  display: grid;
  width: 100%;
  max-width: none;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: visible;
  transform: none;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  will-change: max-height, clip-path, opacity;
  transition:
    max-height .32s cubic-bezier(.22, 1, .36, 1),
    clip-path .3s cubic-bezier(.22, 1, .36, 1),
    opacity .2s ease;
}

.shop-filter-panel.open {
  width: 100%;
  max-width: none;
  max-height: 520px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
}

.shop-filter-form label,
.price-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.shop-filter-form input,
.shop-filter-form select,
.shop-filter-toggle,
.shop-sort-control {
  width: auto;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #111;
  padding: 8px 10px;
  font: inherit;
}

.shop-filter-toggle,
.shop-sort-control {
  width: 112px;
  height: 40px;
  min-width: 112px;
  max-width: 112px;
  min-height: 40px;
  max-height: 40px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  flex: 0 0 112px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.shop-control-arrow {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  transition: transform .22s ease;
}

.shop-filter-form select {
  min-width: 112px;
  max-width: 190px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.shop-filter-panel select {
  border: 1px solid #111;
  background: #fffdf6;
}

.shop-filter-toggle[aria-expanded="true"] {
  background: transparent;
  color: black;
}

.shop-filter-toggle[aria-expanded="false"] .shop-control-arrow {
  transform: rotate(180deg);
}

.shop-filter-toggle[aria-expanded="true"] .shop-control-arrow {
  transform: rotate(0deg);
}

.shop-active-filters {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-active-filters a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 6px 10px;
  color: #111;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-active-filters a span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-active-filter-remove {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
}

.price-filter {
  align-self: stretch;
}

.price-values {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 400;
}

.price-sliders {
  position: relative;
  min-height: 40px;
  border: 1px solid #111;
  background:
    linear-gradient(
      to right,
      transparent 0%,
      transparent var(--range-start, 0%),
      #111 var(--range-start, 0%),
      #111 var(--range-end, 100%),
      transparent var(--range-end, 100%),
      transparent 100%
    ),
    linear-gradient(to right, #d8d1c1, #d8d1c1);
  background-position: center;
  background-repeat: no-repeat;
  background-size: calc(100% - 16px) 3px, calc(100% - 16px) 3px;
  background-color: #fffdf6;
  display: grid;
  align-items: center;
  padding: 0 8px;
}

.price-sliders input[type="range"] {
  grid-area: 1 / 1;
  width: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.price-sliders input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #fffdf6;
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
}

.price-sliders input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
  border: 0;
}

.price-sliders input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #fffdf6;
  cursor: pointer;
  pointer-events: auto;
}

.price-sliders input[type="range"]::-moz-range-track {
  height: 3px;
  background: transparent;
  border: 0;
}

.shop-sort-control {
  display: inline-grid;
  grid-template-columns: 1fr auto;
  column-gap: 6px;
  justify-self: end;
  position: relative;
  white-space: nowrap;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  flex-basis: 150px;
  justify-content: center;
  justify-items: center;
}

.shop-sort-control span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
  min-width: 0;
}

.shop-sort-control span:first-child {
  justify-self: end;
}

.shop-sort-control .shop-control-arrow {
  transform: none;
  justify-self: start;
}

.shop-sort-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  max-width: 100%;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  border: none !important;
  background-color: transparent !important;
}

.shop-reset {
  min-height: 40px;
  border: 1px solid #111;
  color: #111;
  padding: 10px 14px;
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shop-reset {
  background: transparent;
}

.shop-reset:hover {
  background: #ff563f;
  border-color: #ff563f;
  color: #fff;
}

.shop-pagination-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--ap-surface, #f6f3ea);
  border-bottom: 1px solid #c7c7c7;
  padding: 14px 16px;
}

.shop-results-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #555;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #dedede;
  border-bottom: 1px solid #c7c7c7;
  width: 100%;
}

.home-product-rail {
  width: 100%;
  background: #dedede;
  border-bottom: 1px solid #c7c7c7;
  overflow: hidden;
  position: relative;
}

.home-product-track {
  --carousel-rows: 1;
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.home-carousel-spacer {
  display: none;
}

.home-product-track.is-dragging {
  scroll-behavior: auto;
}

.home-product-track::-webkit-scrollbar {
  display: none;
}

.home-product-track .product-card {
  flex: 0 0 25%;
  scroll-snap-align: start;
}

.home-product-track .product-card:last-child {
  border-right: 1px solid #c9c9c9;
}

.product-card {
  height: 420px;
  width: 100%;
  min-width: 0;
  border-right: 1px solid #c9c9c9;
  display: grid;
  grid-template-rows: 1fr 65px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .3s ease;
  overflow: hidden;
  border-right: 1px solid #c9c9c9;
}



.product-card:hover {
  background: #d8d8d8;
}

/* PRODUCT IMAGE */

.product-image {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .35s ease, transform .35s ease;
}

.main-img {
  width: 100%;
  height: 100%;
  opacity: 1;
}

.hover-img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  opacity: 0;
}

.product-card:hover .main-img {
  opacity: 0;
  transform: scale(1.04);
}

.product-card:hover .hover-img {
  opacity: 1;
  transform: scale(1);
}

/* PRODUCT INFO */

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #f8f8f8;
  border-top: 1px solid #c9c9c9;
  padding: 12px 13px;
  height: 65px;
  width: 100%;
  min-width: 0;
  text-transform: uppercase;
  font-size: clamp(10px, 1vw, 12px);
  line-height: 1.75;
  letter-spacing: 0;
  font-weight: 300;
  font-style: normal;
  transition: background .3s ease, color .3s ease;
}

.product-card:hover .product-info {
  background: #ffffff;
  color: #ff563f;
}

.price{
  font-size: clamp(12px, 1vw, 13px);
}

.shop-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  background: transparent;
  border-bottom: 0;
  padding: 0;
}

.shop-pagination a,
.shop-pagination-gap {
  min-width: auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #111;
  padding: 9px 12px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.shop-pagination a.active {
  background: transparent;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.shop-pagination a.disabled {
  color: #999;
  background: transparent;
  pointer-events: none;
}

.shop-pagination-gap {
  border-color: transparent;
  background: transparent;
  color: #777;
}

@media (max-width: 1100px) {
  .shop-filter-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  .shop-sort-control {
    grid-column: 3;
    grid-row: 1;
  }

  .price-filter {
    grid-column: auto;
  }

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

  .product-card:nth-child(2n) {
    border-right: none;
  }

  .product-card:nth-child(2n + 1) {
    border-right: 1px solid #c9c9c9;
  }
}

@media (max-width: 900px) {
  .shop-filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .price-filter {
    grid-column: 1 / -1;
  }

  .shop-filter-form select,
  .shop-reset {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* MOBILE */

@media (max-width: 650px) {
  .shop-tools {
    padding: 14px;
  }

  .shop-filter-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-content: space-between;
  }

  .shop-active-filters {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .shop-filter-panel {
    grid-row: 3;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .shop-pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-filter-form select,
  .shop-reset {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .price-filter {
    grid-column: 1 / -1;
  }

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

  .product-card {
    height: 320px;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #c9c9c9;
  }

  .product-image {
    height: 100%;
    padding: 0;
  }

  .product-info {
    height: 65px;
    font-size: 12px;
    padding: 12px 13px;
  }
}

@media (max-width: 480px) {
  .shop-filter-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .view-all {
    font-size: 12px;
  }

  .product-card {
    height: clamp(240px, 76vw, 300px);
  }
}

/* Home rails keep the infinite carousel behavior while matching shop density. */
.home-product-track .product-card,
.home-product-track .product-card:last-child,
.home-product-track .product-card:nth-child(2n),
.home-product-track .product-card:nth-child(2n + 1) {
  flex: 0 0 25%;
  height: clamp(360px, 30vw, 460px);
  border-right: 1px solid #c9c9c9;
  border-bottom: 0;
}

.home-product-track .product-info {
  min-height: 65px;
  font-size: clamp(10px, 1vw, 12px);
  line-height: 1.75;
  padding: 12px 13px;
}

.home-product-track .price {
  font-size: clamp(12px, 1vw, 13px);
}

@media (max-width: 1100px) {
  .home-product-track .product-card,
  .home-product-track .product-card:last-child,
  .home-product-track .product-card:nth-child(2n),
  .home-product-track .product-card:nth-child(2n + 1) {
    flex-basis: 50%;
    height: clamp(300px, 48vw, 420px);
  }
}

@media (max-width: 650px) {
  .home-product-track {
    --carousel-rows: 2;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 50%;
    grid-template-rows: repeat(2, minmax(0, auto));
  }

  .home-carousel-spacer {
    display: block;
    visibility: hidden;
    pointer-events: none;
  }

  .home-product-track .product-card,
  .home-product-track .product-card:last-child,
  .home-product-track .product-card:nth-child(2n),
  .home-product-track .product-card:nth-child(2n + 1) {
    width: 100%;
    height: clamp(240px, 62vw, 330px);
  }
}

@media (max-width: 420px) {
  .home-product-track .product-card,
  .home-product-track .product-card:last-child,
  .home-product-track .product-card:nth-child(2n),
  .home-product-track .product-card:nth-child(2n + 1) {
    height: clamp(220px, 70vw, 290px);
  }
}

@media (max-width: 360px) {
  .product-card,
  .product-card:nth-child(2n) {
    border-right: none;
  }

  .product-card:nth-child(2n + 1) {
    border-right: 1px solid #c9c9c9;
  }

  .home-product-track .product-card,
  .home-product-track .product-card:last-child,
  .home-product-track .product-card:nth-child(2n),
  .home-product-track .product-card:nth-child(2n + 1) {
    width: 100%;
  }
}
