/* Apply catalog details to both storefront themes. */
body#main {
  --pls-card-column-gap: 28px;
  --pls-card-row-gap: 32px;
}

@media (max-width: 1180px) {
  body#main {
    --pls-card-column-gap: 24px;
    --pls-card-row-gap: 28px;
  }
}

@media (max-width: 767px) {
  body#main {
    --pls-card-column-gap: 16px;
    --pls-card-row-gap: 22px;
  }
}

body#main .prolife-home-main :is(.ph-grid-pro, .ph-grid-plas, .ph-nutri-track) {
  --pp-gap: var(--pls-card-column-gap);
  gap: var(--pp-gap) !important;
}

body#main :is(
  .coll-cat-grid:has(> article.coll-cat-product),
  .nutr-grid:has(> article.nutr-product),
  .v3-grid:has(> article.v3-card)
),
body#main.pls-retail-unified :is(.catalog_block.items, .row):not(.owl-carousel):has(> .catalog-block-view__item) {
  gap: var(--pls-card-row-gap) var(--pls-card-column-gap) !important;
}

/* The alternate Aspro theme uses percentage-width flex columns. */
body#main:not(.pls-retail-unified) .catalog_block.items:not(.owl-carousel) > .catalog-block-view__item {
  padding-inline: calc(var(--pls-card-column-gap) / 2) !important;
  margin-block-end: var(--pls-card-row-gap);
}

/* Keep Owl's measured stage and slide widths while spacing out the product tiles. */
body#main .catalog_block.owl-carousel .owl-stage > .owl-item > .catalog-block-view__item {
  box-sizing: border-box;
  padding-inline: calc(var(--pls-card-column-gap) / 2) !important;
}

body#main:not(.pls-retail-unified) .v3-grid > article.v3-card + article.v3-card {
  margin-block-start: var(--pls-card-row-gap);
}

body#main .display_list > .list_item_wrapp + .list_item_wrapp {
  margin-block-start: var(--pls-card-row-gap);
}

body#main :is(.plas-reco__row, .plas-lk-reco__track) {
  column-gap: var(--pls-card-column-gap);
}

body#main .plas-lk-reco__track > .v3-card {
  flex-basis: calc((100% - var(--pls-card-column-gap) * (var(--lk-visible) - 1)) / var(--lk-visible));
}

@media (max-width: 900px) {
  body#main .plas-lk-reco__track > .v3-card {
    flex-basis: calc((100% - var(--pls-card-column-gap) * 2) / var(--lk-visible));
  }
}

/* Keep full descriptions and offers separate from listing captions. */
body#main :is(
  .prolife-home-main :is(.ph-product-card, .ph-nutri-card) .ph-product-tag,
  .nutr-product :is(.nutr-card-tags, .nutr-card-tag, .nutr-card-label),
  .v3-card__tag,
  .v3-card.plas-reco__card .plas-reco__reason
),
body#main.pls-retail-unified .catalog-block-view__item .item_info .preview_text {
  display: none !important;
}

/* The official installment widget follows the current price at its existing mount. */
body#main :is(.ph-product-card, .ph-nutri-card, article.coll-cat-product, article.nutr-product, article.v3-card,
             .catalog-block-view__item, .list_item_wrapp, .table-view__item)
  :is(.pls-card-rating, .rating, .votes_block, .blog-info__rating--top-info) {
  display: none !important;
}

body#main .prolife-home-main :is(.ph-product-content, .ph-nutri-card__body) {
  display: flex !important;
  flex-direction: column !important;
}

body#main .prolife-home-main :is(.ph-product-content, .ph-nutri-card__body) > h3,
body#main article.v3-card .v3-card__body > .v3-card__title {
  order: -4 !important;
}

body#main .prolife-home-main :is(.ph-product-content, .ph-nutri-card__body) > h3 {
  margin-bottom: auto !important;
}

body#main .prolife-home-main :is(.ph-product-content, .ph-nutri-card__body) > :is(.ph-old-price, .pls-bf26-bonus-price),
body#main article.v3-card .v3-card__body > .pls-bf26-bonus-price,
body#main .catalog-block-view__item .item_info--bottom_block > .pls-bf26-bonus-price {
  order: -3 !important;
}

body#main .prolife-home-main :is(.ph-product-content, .ph-nutri-card__body) > :is(.ph-price, .ph-nutri-card__price),
body#main article.v3-card .v3-card__body > :is(.v3-card__price, .pls-price-integration),
body#main .catalog-block-view__item .item_info--bottom_block > :is(.cost.prices, .pls-bf26-native-pair) {
  order: -1 !important;
}

body#main :is(.catalog-block-view__item .item_info--bottom_block, .list_item_wrapp .information,
             .table-view__item .item-price):has(> [data-pls-dolyame-mount]) {
  display: flex;
  flex-direction: column;
}

/* In horizontal views the price, loyalty details and actions share one column. */
body#main :is(.list_item_wrapp .information, .table-view__item .item-price):has(> [data-pls-dolyame-mount])
  > :not([data-pls-dolyame-mount]),
body#main .catalog-block-view__item .item_info--bottom_block > .bonus-system-block {
  order: -1;
}

body#main :is(
  .prolife-home-main :is(.ph-product-card, .ph-nutri-card) :is(h3, .ph-price, .ph-nutri-card__price, .ph-old-price, .ph-button),
  article.coll-cat-product :is(h3, .coll-cat-price, .coll-cat-old-price, .coll-cat-link),
  .nutr-product :is(h3, .nutr-price, .nutr-price-line, .nutr-old-price, .nutr-link),
  .v3-card :is(.v3-card__title, .v3-card__price, .v3-card__na),
  :is(.catalog-block-view__item, .list_item_wrapp.item_wrap, .table-view__item.main_item_wrapper) :is(
    .item-title,
    .item-title :is(a, span),
    .preview_text,
    .cost.prices :is(.price, .values_wrapper, .price_value, .price_currency, .price_value_block),
    .item-stock,
    .item-stock .value,
    :is(.to-cart, .in-cart),
    :is(.to-cart, .in-cart) > span
  )
) {
  font-family: var(--pls-retail-font, Montserrat, Arial, sans-serif) !important;
}

@media (hover: hover) {
  body#main:is(.site_s1, .pls-retail-unified) :is(
    .prolife-home-main :is(.ph-grid-pro, .ph-grid-plas, .ph-nutri-track) :is(.ph-product-card, .ph-nutri-card) .ph-product-actions .ph-buy-button.add2basket,
    article.coll-cat-product .coll-cat-actions .add2basket,
    .nutr-product .nutr-cart.add2basket,
    .v3-card .v3-card__cart.add2basket,
    :is(.catalog-block-view__item .catalog_item_wrapp .footer_button, .list_item_wrapp.item_wrap, .table-view__item.main_item_wrapper) .btn:is(.to-cart, .in-cart)
  ):hover {
    background: var(--pls-retail-accent, #D3FF97) !important;
    color: #111 !important;
  }

  body#main :is(.list_item_wrapp.item_wrap, .table-view__item.main_item_wrapper, .catalog-block-view__item) .btn:is(.to-cart, .in-cart):hover .svg-inline-fw {
    color: inherit !important;
  }

  body#main :is(.list_item_wrapp.item_wrap, .table-view__item.main_item_wrapper, .catalog-block-view__item) .btn:is(.to-cart, .in-cart):hover .svg-inline-fw svg :is(path:not([fill="none"]), use) {
    fill: currentColor !important;
  }

  body#main:is(.site_s1, .pls-retail-unified) :is(
    .prolife-home-main :is(.ph-product-card, .ph-nutri-card) .ph-product-actions .ph-buy-button.add2basket,
    article.coll-cat-product .coll-cat-actions .add2basket,
    .nutr-product .nutr-cart.add2basket,
    .v3-card .v3-card__cart.add2basket,
    .catalog-block-view__item .catalog_item_wrapp .footer_button .btn:is(.to-cart, .in-cart)
  ):hover::before {
    background-color: #111 !important;
  }
}

/* Keep product stickers on the same baseline and clear of the favorite control. */
body#main .pp-badges,
body#main .stickers.custom-font {
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0 !important;
  max-width: calc(100% - 36px) !important;
}

body#main .stickers.custom-font {
  display: flex;
}

body#main .pp-badges > :is(.pp-badge, .pls-day-badge--stack),
body#main .stickers.custom-font > div > [class^="sticker_"],
body#main .pls-day-badge--card {
  box-sizing: border-box;
  flex: 0 0 auto !important;
  margin: 0 !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 7px !important;
  font-family: var(--pls-retail-font, Montserrat, Arial, sans-serif) !important;
  font-size: 11px !important;
  line-height: 20px !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}

body#main .pp-badges > .pp-badge--sale:is([data-pp-badge*="%"], .pls-bf26-badge) {
  padding-inline: 5px !important;
  font-variant-numeric: tabular-nums;
}

body#main .pp-badges:has(> .pls-day-badge--stack) {
  max-width: 100% !important;
}

body#main .pp-badges:has(> .pls-day-badge--stack)
  > :is(.pp-badge, .pls-day-badge--stack) {
  padding-inline: 2px !important;
}

body#main:is(.pls-retail-unified, .site_s1) :is(.ph-product-card, .ph-nutri-card, .coll-cat-product, .nutr-product, .v3-card, .catalog_item_wrapp):has(
  .pp-badges > .pls-day-badge--stack ~ .pp-badge
) :is(.plas-fav, .nutr-fav, .coll-cat-fav, .v3-card__fav, .v3-fav, .wish_item_button) {
  top: 26px !important;
}

@media (max-width: 640px) {
  body#main .pp-badges > :is(.pp-badge, .pls-day-badge--stack),
  body#main .stickers.custom-font > div > [class^="sticker_"],
  body#main .pls-day-badge--card {
    height: 20px !important;
    min-height: 20px !important;
    padding-inline: 4px !important;
    font-size: 10px !important;
    line-height: 18px !important;
  }

  body#main .pp-badges > .pp-badge--sale:is([data-pp-badge*="%"], .pls-bf26-badge) {
    padding-inline: 3px !important;
  }
}

@media (max-width: 360px) {
  body#main .pp-badges > .pp-badge,
  body#main .pp-badges > .pp-badge--sale:is([data-pp-badge*="%"], .pls-bf26-badge) {
    padding-inline: 2px !important;
  }
  body#main .pp-badges:has(> .pls-day-badge--stack) > :is(.pp-badge, .pls-day-badge--stack) {
    padding-inline: 1px !important;
    letter-spacing: -.25px !important;
  }

  body#main:is(.pls-retail-unified, .site_s1) :is(.ph-product-card, .ph-nutri-card, .coll-cat-product, .nutr-product, .v3-card, .catalog_item_wrapp):has(
    .pp-badges > .pp-badge ~ .pp-badge
  ) :is(.plas-fav, .nutr-fav, .coll-cat-fav, .v3-card__fav, .v3-fav, .wish_item_button) {
    top: 26px !important;
  }
}