/**
 * OVERZEAS three-column product card layout for category pages.
 * Loaded by the ovzcardfeatures module in production.
 */

/* Feature dock: reserve space inside the image frame without covering the product. */
html body #products .products.grid .product-miniature .thumbnail-container {
  position: relative !important;
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 28px !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

html body #products .products.grid .product-miniature .thumbnail-container .product-thumbnail {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  aspect-ratio: 1 / 1 !important;
}

html body #products .products.grid .product-miniature .thumbnail-container > .ovz-card-features {
  position: absolute !important;
  top: auto !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  display: flex !important;
  width: auto !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  flex: 0 0 28px !important;
  align-items: center !important;
  align-content: center !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 3px 6px !important;
  overflow: hidden !important;
  background: #fff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.14) !important;
  box-sizing: border-box !important;
  text-align: left !important;
  z-index: 12 !important;
}

html body #products .products.grid .product-miniature .thumbnail-container > .ovz-card-features--disabled {
  display: flex !important;
  visibility: hidden !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  flex-basis: 28px !important;
  margin: 0 !important;
  pointer-events: none !important;
}

html body #products .products.grid .product-miniature .thumbnail-container .ovz-card-feature {
  display: inline-flex !important;
  height: 20px !important;
  min-height: 20px !important;
  max-width: 100% !important;
  flex: 0 1 auto !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 5px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid #d5d5d5 !important;
  border-radius: 2px !important;
  color: #444 !important;
  font-size: 11px !important;
  line-height: 18px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body #products .products.grid .product-miniature .thumbnail-container .quick-view {
  bottom: 28px !important;
}

@media (min-width: 992px) {
  html body #products .products.grid > .product-miniature {
    width: 33.333333% !important;
    max-width: 33.333333% !important;
    flex: 0 0 33.333333% !important;
    padding: 0 12px 12px !important;
  }

  html body #products .products.grid .product-miniature .product-block {
    margin: 6px 0 6px !important;
    padding: 0px !important;
  }

  html body #products .products.grid .product-miniature .thumbnail-container {
    width: calc(100% - 24px) !important;
    margin: 8px 12px 0 !important;
  }

  html body #products .products.grid .product-miniature .fmm_sticker_base_span img {
    width: 45px !important;
    max-width: 45px !important;
  }

  html body #products .products.grid .product-miniature .ovz-card-meta {
    width: calc(100% - 24px) !important;
    min-height: 28px !important;
    margin: 0 12px !important;
    padding: 6px 0 5px !important;
  }

  html body #products .products.grid .product-miniature .ovz-card-brand,
  html body #products .products.grid .product-miniature .ovz-card-reference {
    font-size: 12px !important;
    line-height: 15px !important;
  }

  html body #products .products.grid .product-miniature .product-title {
    height: 100px !important;
    min-height: 100px !important;
    max-height: 100px !important;
    flex: 0 0 100px !important;
    margin: 8px 0 9px !important;
    padding: 0 12px !important;
    font-size: 17px !important;
    line-height: 20px !important;
  }

  html body #products .products.grid .product-miniature .product-title > a {
    font-size: 17px !important;
    line-height: 20px !important;
  }

  html body #products .products.grid .product-miniature .product-right-block {
    min-height: 48px !important;
    padding: 0 12px !important;
  }

  html body #products .products.grid .product-miniature .ovz-card-features {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    margin: 0 !important;
    gap: 4px !important;
  }

  html body #products .products.grid .product-miniature .ovz-card-features--disabled {
    display: flex !important;
    visibility: hidden !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    margin: 0 !important;
  }

  html body #products .products.grid .product-miniature .ovz-card-feature {
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 5px !important;
    font-size: 11px !important;
    line-height: 18px !important;
  }

  html body #products .products.grid .product-miniature .reviews_list_stars {
    min-height: 21px !important;
    font-size: 13px !important;
    line-height: 15px !important;
  }

  html body #products .products.grid .product-miniature .reviews_list_stars .gsniprev-img-star-category {
    width: 13px !important;
    height: 13px !important;
  }

  html body #products .products.grid .product-miniature .product-price-and-shipping {
    height: 27px !important;
    min-height: 27px !important;
    line-height: 27px !important;
  }

  html body #products .products.grid .product-miniature .product-price-and-shipping .price {
    font-size: 28px !important;
    line-height: 30px !important;
  }

  html body #products .products.grid .product-miniature .product-list-actions {
    min-height: 55px !important;
    padding: 5px 12px 7px !important;
  }

  html body #products .products.grid .product-miniature .product-list-actions .btn,
  html body #products .products.grid .product-miniature .product-list-actions .add-to-cart {
    height: 44px !important;
    min-height: 44px !important;
    margin-top: 4px !important;
    font-size: 19px !important;
  }

  html body #products .products.grid .product-miniature .product-list-actions .icon-shopping-cart,
  html body #products .products.grid .product-miniature .product-list-actions .icon-magnifier {
    width: 48px !important;
    height: 44px !important;
    min-width: 48px !important;
    flex-basis: 48px !important;
    font-size: 28px !important;
  }

  html body #products .products.grid .product-miniature .product-list-actions .add-to-cart-label,
  html body #products .products.grid .product-miniature .product-list-actions .product-action-label {
    height: 44px !important;
    padding: 0 7px !important;
    font-size: 19px !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  html body #products .products.grid > .product-miniature {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
  }
}

/* Keep the New and discount labels in their desktop card corners on mobile. */
@media (max-width: 991px) {
  html body #products .products.grid .product-miniature .product-block > .new {
    top: 0.5rem !important;
    right: 20px !important;
    left: auto !important;
  }

  html body #products .products.grid .product-miniature .product-right-block {
    position: static !important;
  }

  html body #products .products.grid .product-miniature .discount.discount-percentage {
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    left: 0 !important;
  }
}
