/* Product listing cards. This file loads after storefront.css. */

/* XStore archive, category and product search grids share this markup. */
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid > .ajax-content > .product {
  position: relative;
  align-self: stretch;
  box-shadow: 0 2px 12px rgba(8,45,102,.045);
  transition: border-color .2s ease, box-shadow .2s ease;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid > .ajax-content > .product:hover {
  border-color: #B8D8EC;
  box-shadow: 0 9px 25px rgba(8,45,102,.09);
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product .content-product {
  position: relative;
  min-height: 100%;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-image-wrapper {
  position: static;
  padding: 12px 12px 0;
  background: #fff;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-content-image {
  height: auto;
  aspect-ratio: 1.15;
  border-radius: 8px;
  background: #F7FAFD;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-content-image > img,
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-content-image > .image-swap > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 9px;
  box-sizing: border-box;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-content-image .image-swap {
  height: 100%;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-details {
  padding: 14px 16px 72px;
}
/* Keep only the most specific category; commas are text nodes in XStore's output. */
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .products-page-cats {
  height: 17px;
  font-size: 0;
  line-height: 17px;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .products-page-cats a {
  display: none;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .products-page-cats a:last-of-type {
  display: inline;
  color: #5C718C;
  font-size: 11px;
  font-weight: 700;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-title {
  min-height: 4.2em;
  margin: 8px 0 12px;
  font-size: 14px;
  line-height: 1.4;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .price {
  min-height: 23px;
  font-size: 17px;
  line-height: 1.3;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .price del {
  margin-bottom: 2px;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .gpb-card-spec,
.gpb-home .gpb-product-info .gpb-card-spec {
  display: inline-block;
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  margin: 0 0 10px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #426788;
  background: #EAF6FD;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gpb-card-spec strong { color: #082D66; font-weight: 800; }
/* XStore's footer is nested in the image wrapper. Anchor its one useful action
   to the card, below the price, and suppress the image-overlay controls. */
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .footer-product {
  position: absolute !important;
  inset: auto 16px 16px !important;
  z-index: 2;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .footer-product > :is(.xstore-wishlist,.xstore-compare,.show-quickly) {
  display: none !important;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .footer-product > .button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-height: 42px;
  margin: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid #082D66 !important;
  border-radius: 7px !important;
  color: #fff !important;
  background: #082D66 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: center;
  text-decoration: none;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .footer-product > .button:hover {
  border-color: #1169B0 !important;
  background: #1169B0 !important;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .footer-product > .button:focus-visible,
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-content-image:focus-visible,
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-title a:focus-visible {
  outline: 3px solid #2E9CCA;
  outline-offset: 2px;
}
body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .onsale {
  padding: 5px 9px;
  border: 0;
  border-radius: 5px;
  background: #1584D9;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

/* Curated homepage rails use their own, simpler card markup. */
.gpb-home .gpb-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  box-shadow: 0 2px 12px rgba(8,45,102,.045);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.gpb-home .gpb-product-card:hover {
  border-color: #B8D8EC;
  box-shadow: 0 9px 25px rgba(8,45,102,.09);
}
.gpb-home .gpb-product-image {
  flex: 0 0 auto;
  aspect-ratio: 1.15;
  margin: 12px 12px 0;
  border-radius: 8px;
  background: #F7FAFD;
}
.gpb-home .gpb-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 9px;
  box-sizing: border-box;
  object-fit: contain;
}
.gpb-home .gpb-sale-label {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 5px;
  background: #1584D9;
  color: #fff;
  line-height: 1.2;
}
.gpb-home .gpb-product-info {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 38px 16px 16px;
}
.gpb-home .gpb-product-brand {
  position: absolute;
  top: 15px;
  right: 16px;
  left: 16px;
  min-height: 0;
  overflow: hidden;
  color: #5C718C;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gpb-home .gpb-product-info h3 {
  min-height: 4.2em;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
}
.gpb-home .gpb-product-info h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.gpb-home .gpb-product-price {
  min-height: 23px;
  margin-top: auto;
  font-size: 17px;
  line-height: 1.3;
}
.gpb-home .gpb-product-price del {
  display: block;
  margin-bottom: 2px;
}
.gpb-home .gpb-product-price ins {
  display: block;
}
.gpb-home .gpb-product-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 14px;
}
.gpb-home .gpb-product-actions .gpb-add-to-cart,
.gpb-home .gpb-product-actions .gpb-product-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #082D66;
  border-radius: 7px;
  background: #082D66;
  color: #fff !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}
.gpb-home .gpb-product-actions .gpb-add-to-cart:hover,
.gpb-home .gpb-product-actions .gpb-product-link:hover {
  border-color: #1169B0;
  background: #1169B0;
}
.gpb-home .gpb-product-actions:has(.gpb-add-to-cart) .gpb-product-link {
  display: none;
}
.gpb-home .gpb-product-actions .gpb-not-available {
  display: block;
  color: #5C718C;
  font-size: 11px;
  line-height: 1.4;
}
.gpb-home .gpb-product-image:focus-visible,
.gpb-home .gpb-product-info h3 a:focus-visible,
.gpb-home .gpb-product-actions a:focus-visible {
  outline: 3px solid #2E9CCA;
  outline-offset: 2px;
}

@media (max-width: 520px) {
  body:is(.post-type-archive-product,.tax-product_cat) .main-products-loop .products.products-grid .product-content-image {
    aspect-ratio: 1.4;
  }
  .gpb-home .gpb-product-rail .gpb-product-card {
    flex-basis: min(76vw,270px);
    min-width: 210px;
  }
}
