/*
 * Shared REGOS shop card styles.
 * Used by VirtueMart category grids and native home product modules.
 */

:root {
  --regos-shop-card-radius: var(--regos-vm-radius-card, var(--surface-radius, 22px));
  --regos-shop-card-control-radius: var(--regos-vm-radius-control, var(--control-radius, 16px));
  --regos-shop-card-pill-radius: var(--regos-vm-radius-pill, var(--pill-radius, 999px));
  --regos-shop-card-text: var(--regos-vm-text, var(--heading, #24344d));
  --regos-shop-card-muted: var(--regos-vm-muted, var(--muted, #667085));
  --regos-shop-card-accent: var(--regos-accent, var(--blue, #4d6b97));
  --regos-shop-card-button-bg: var(--navy, #0e2c5f);
  --regos-shop-card-badge-bg: var(--regos-vm-badge-top-bg, var(--red, #951111));
  --regos-shop-card-badge-border: var(--regos-vm-badge-top-border, rgba(149, 17, 17, .22));
  --regos-shop-card-badge-text: var(--regos-vm-badge-top-text, #fff);
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer,
.regos-home .home-module--products .product-container {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--regos-shop-card-radius);
  background: transparent;
  box-shadow: none;
  transition: border-color .2s ease, background .2s ease;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer:hover,
.regos-home .home-module--products .product-container:hover {
  border-color: rgba(77, 107, 151, .28);
  background: #fbfcfe;
  box-shadow: none;
  transform: none;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img,
.regos-home .home-module--products .spacer-img {
  position: relative;
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  min-height: 0;
  padding: 10px;
  border-radius: var(--regos-shop-card-radius) var(--regos-shop-card-radius) 18px 18px;
  background: #fff;
}

.regos-product-card-gallery {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  touch-action: pan-y;
}

.regos-product-card-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.regos-product-card-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.regos-product-card-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.regos-product-card-gallery img.regos-product-card-img,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img img,
.regos-home .home-module--products .spacer-img img {
  display: block !important;
  float: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none !important;
  padding: 0 !important;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
}

.regos-product-card-gallery-dots {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.regos-product-card-gallery-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(53, 63, 79, .28);
  transition: width .2s ease, background .2s ease;
}

.regos-product-card-gallery-dot.is-active {
  width: 14px;
  border-radius: 999px;
  background: var(--regos-shop-card-accent);
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner,
.regos-home .home-module--products .spacer-inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 8px 12px 14px;
  text-align: center;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-title,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-name-trunc,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product_s_desc,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .main_price,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-list-price,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-price,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .addtocart-area,
.regos-home .home-module--products .product-title,
.regos-home .home-module--products .product-name-trunc,
.regos-home .home-module--products .product_s_desc,
.regos-home .home-module--products .main_price,
.regos-home .home-module--products .product-list-price,
.regos-home .home-module--products .product-price,
.regos-home .home-module--products .addtocart-area {
  margin-right: 0;
  margin-left: 0;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .vm-product-rating-container,
.regos-home .home-module--products .vm-product-rating-container {
  min-height: 20px;
  margin: 0 0 8px;
  color: var(--regos-shop-card-muted);
  font-size: .78rem;
  line-height: 1.25;
  text-align: center;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-in-stock,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .stock,
.regos-home .home-module--products .product-in-stock,
.regos-home .home-module--products .stock {
  color: var(--regos-shop-card-muted);
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner h3,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner h5,
.regos-home .home-module--products .product-name-trunc,
.regos-home .home-module--products .spacer-inner h5 {
  min-height: 2.7em;
  max-height: 2.7em;
  margin: 0 0 10px;
  overflow: hidden;
  font-weight: 400;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-name-trunc,
.regos-home .home-module--products .product-name-trunc {
  font-weight: 400;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .vm-product-style-name,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-list-style-name,
.regos-home .home-module--products .product-name-trunc,
.regos-home .home-module--products .product-name-trunc a,
.regos-home .home-module--products .vm-product-style-name,
.regos-home .home-module--products .product-list-style-name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--regos-shop-card-text);
  font-size: .78rem;
  font-weight: 400 !important;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .vm-product-style-name:hover,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-list-style-name:hover,
.regos-home .home-module--products .product-name-trunc a:hover,
.regos-home .home-module--products .vm-product-style-name:hover,
.regos-home .home-module--products .product-list-style-name:hover {
  color: var(--regos-shop-card-accent);
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product_s_desc,
.regos-home .home-module--products .product_s_desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--regos-shop-card-muted);
  font-size: .92rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-price,
.regos-home .home-module--products .product-price {
  margin-top: auto;
  padding-top: 0;
  color: var(--regos-shop-card-text);
  font-weight: 700;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .main_price,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .product-list-price,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner > .PricesalesPrice,
.regos-home .home-module--products .main_price,
.regos-home .home-module--products .product-list-price {
  display: block;
  min-height: 30px;
  margin: 8px 0 12px;
  color: var(--regos-shop-card-text);
  text-align: center;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .PricesalesPrice,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .PricesalesPrice span,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .PricesalesPriceTt,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .PricesalesPriceTt span,
.regos-home .home-module--products .PricesalesPrice,
.regos-home .home-module--products .PricesalesPrice span,
.regos-home .home-module--products .PricesalesPriceTt,
.regos-home .home-module--products .PricesalesPriceTt span {
  color: var(--regos-shop-card-text) !important;
  font-size: .96rem !important;
  font-weight: 700 !important;
  line-height: 1.25;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .addtocart-area,
.regos-home .home-module--products .addtocart-area {
  margin-top: auto;
  margin-bottom: 0;
  text-align: center;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .addtocart-bar .cd-customization input.add-to-cart,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .addtocart-bar .cd-customization button.add-to-cart,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .addtocart-bar .cd-customization .add-to-cart-category,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .addtocart-bar .cd-customization .add-to-cart-category-disabled {
  min-height: 38px;
  border-radius: var(--regos-shop-card-pill-radius);
}

.regos-home .home-module--products .addtocart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 220px);
  min-height: 38px;
  margin: 0 auto;
  border-radius: var(--regos-shop-card-pill-radius);
  color: #fff;
  background: var(--regos-shop-card-button-bg);
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .addtocart-bar .calculate span.quantity-box input {
  border-radius: var(--regos-shop-card-control-radius);
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img .product-bottomleft,
:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img .product-topleft {
  right: 12px;
  left: 12px;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img .product-badges {
  max-width: calc(100% - 24px);
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner .product-price .percent-off {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 26px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border: 1px solid var(--regos-shop-card-badge-border);
  border-radius: var(--regos-shop-card-pill-radius);
  background: var(--regos-shop-card-badge-bg);
  color: var(--regos-shop-card-badge-text);
  box-shadow: none;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
  text-transform: none;
  white-space: nowrap;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner .product-price .percent-off::after {
  display: none;
}

:is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner .product-price .percent-off > span {
  margin-left: 0;
}

@media (max-width: 767.98px) {
  :is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img,
  .regos-home .home-module--products .spacer-img {
    padding: 8px;
  }

  :is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner,
  .regos-home .home-module--products .spacer-inner {
    padding: 8px 8px 12px;
  }
}

@media (max-width: 575.98px) {
  :is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img .product-bottomleft,
  :is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img .product-topleft {
    right: 8px;
    left: 8px;
  }

  :is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-img .product-badges {
    max-width: calc(100% - 16px);
  }

  :is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner .product-price .percent-off {
    top: 8px;
    right: 8px;
    min-height: 21px;
    max-width: calc(100% - 16px);
    padding: 4px 7px;
    font-size: .58rem;
  }

  :is(.category-view, .browse-view, .latest-view, .recent-view, .featured-view, .topten-view) .row .spacer .spacer-inner .product-price .percent-off .discount_off {
    display: none;
  }
}
