/* =============================================================
   Krost – Product thumbnail tiles
   Category landings, subcategory product grids, and the
   featured-products slider on project pages.
   Matches the card media on krost.com.au/meeting-room-furniture-collection
   Markup is unchanged. Pseudo-elements supply the gradient layers.
   ============================================================= */

#th-products-list .th-item-product .th-img-container.th-cateogry-product-image,
#category-details .th-item-product .th-img-container.th-product-image,
#category-seating-details .th-item-product .th-img-container.th-product-image,
#workstations-categories .th-item-product .th-img-container.th-product-image,
#th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-img-container.th-product-image {
  position: relative !important;
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

#th-products-list .th-item-product .th-img-container.th-cateogry-product-image > a,
#category-details .th-item-product .th-img-container.th-product-image > a,
#category-seating-details .th-item-product .th-img-container.th-product-image > a,
#workstations-categories .th-item-product .th-img-container.th-product-image > a,
#th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-img-container.th-product-image > a {
  position: absolute !important;
  inset: 5% 3% !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#th-products-list .th-item-product .th-img-container.th-cateogry-product-image > a > img,
#category-details .th-item-product .th-img-container.th-product-image > a > img,
#category-seating-details .th-item-product .th-img-container.th-product-image > a > img,
#workstations-categories .th-item-product .th-img-container.th-product-image > a > img,
#th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-img-container.th-product-image > a > img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

#th-products-list .th-item-product:hover .th-img-container.th-cateogry-product-image > a > img,
#category-details .th-item-product:hover .th-img-container.th-product-image > a > img,
#category-seating-details .th-item-product:hover .th-img-container.th-product-image > a > img,
#workstations-categories .th-item-product:hover .th-img-container.th-product-image > a > img,
#th-product-slider[data-v-component-featuredproductslider] .th-item-product:hover .th-img-container.th-product-image > a > img {
  transform: scale(1.04);
}

#th-products-list .th-item-product .th-img-container.th-cateogry-product-image::before,
#category-details .th-item-product .th-img-container.th-product-image::before,
#category-seating-details .th-item-product .th-img-container.th-product-image::before,
#workstations-categories .th-item-product .th-img-container.th-product-image::before,
#th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-img-container.th-product-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, #ffffff 0%, #fefefe 18%, #f4f4f3 100%);
  mix-blend-mode: multiply;
}

#th-products-list .th-item-product .th-img-container.th-cateogry-product-image::after,
#category-details .th-item-product .th-img-container.th-product-image::after,
#category-seating-details .th-item-product .th-img-container.th-product-image::after,
#workstations-categories .th-item-product .th-img-container.th-product-image::after,
#th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-img-container.th-product-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(35, 31, 32, 0) 35%, rgba(35, 31, 32, 0.12) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

#th-products-list .th-item-product:hover .th-img-container.th-cateogry-product-image::after,
#category-details .th-item-product:hover .th-img-container.th-product-image::after,
#category-seating-details .th-item-product:hover .th-img-container.th-product-image::after,
#workstations-categories .th-item-product:hover .th-img-container.th-product-image::after,
#th-product-slider[data-v-component-featuredproductslider] .th-item-product:hover .th-img-container.th-product-image::after {
  opacity: 1;
}

#th-products-list .th-item-product .th-add-to-pinboard,
#category-details .th-item-product .th-add-to-pinboard,
#category-seating-details .th-item-product .th-add-to-pinboard,
#workstations-categories .th-item-product .th-add-to-pinboard,
#th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-add-to-pinboard {
  z-index: 3;
}

/* Feature tags: 14px → 13px. Mobile layouts keep their own tag scale. */
@media (min-width: 769px) {
  #th-products-list .th-item-product .th-tag-name,
  #category-details .th-item-product .th-tag-name,
  #category-seating-details .th-item-product .th-tag-name,
  #workstations-categories .th-item-product .th-tag-name,
  #th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-tag-name {
    gap: 4px;
    flex-wrap: wrap;
  }

  #th-products-list .th-item-product .th-tag-name .th-tag,
  #category-details .th-item-product .th-tag-name .th-tag,
  #category-seating-details .th-item-product .th-tag-name .th-tag,
  #workstations-categories .th-item-product .th-tag-name .th-tag,
  #th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-tag-name .th-tag {
    font-size: 13px !important;
    line-height: 1.75 !important;
    padding: 4px 7px !important;
    white-space: nowrap;
  }
}

/* Project featured-products rail: drop the mobile card chrome so the tile matches. */
@media (max-width: 768px) {
  #th-product-slider[data-v-component-featuredproductslider] .th-item-product {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    box-shadow: none !important;
  }

  #th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-item-footer {
    padding: 12px 0 0 !important;
    background: transparent !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #th-products-list .th-item-product .th-img-container.th-cateogry-product-image > a > img,
  #category-details .th-item-product .th-img-container.th-product-image > a > img,
  #category-seating-details .th-item-product .th-img-container.th-product-image > a > img,
  #workstations-categories .th-item-product .th-img-container.th-product-image > a > img,
  #th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-img-container.th-product-image > a > img,
  #th-products-list .th-item-product .th-img-container.th-cateogry-product-image::after,
  #category-details .th-item-product .th-img-container.th-product-image::after,
  #category-seating-details .th-item-product .th-img-container.th-product-image::after,
  #workstations-categories .th-item-product .th-img-container.th-product-image::after,
  #th-product-slider[data-v-component-featuredproductslider] .th-item-product .th-img-container.th-product-image::after {
    transition: none;
  }
}
