/* Nilova Stock — front (theme nilova selectors) */

.nst-hide-buy {
  display: none !important;
}

.nst-qty-hidden,
body.nst-oos .product_page-quantity,
.product_page-buttons.nst-oos-buy .product_page-quantity,
.variations_button.nst-oos-buy .product_page-quantity,
.single_add_to_cart_button.nst-hide-buy {
  display: none !important;
}

.product_item.nst-oos .product_item-buy {
  display: none !important;
}

.nst-badge {
  display: inline-block;
  margin: 0 0 0 8px;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  color: #8a2b2b;
  vertical-align: baseline;
}

.product_item-aviable + .nst-badge {
  display: block;
  margin: 4px 0 0;
}

.product_page-aviable.nst-limited-label {
  font-weight: 600;
}

/* Out-of-stock colour: still selectable (to see photo/price), just marked */
.product_page-variations__colors-block.nst-option-oos {
  position: relative;
  opacity: 0.55;
}

.product_page-variations__colors-block.nst-option-oos label {
  cursor: pointer;
}

.product_page-variations__colors-block.nst-option-oos label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  height: 1px;
  background: #323232;
  transform: translate(-50%, -50%) rotate(-45deg);
  pointer-events: none;
}

.variations_form select option.nst-option-oos {
  color: #999;
}

/* Catalogue card of an out-of-stock product: link stays clickable, Buy → label */
.product_item.nst-oos .product_item-addtocart {
  display: none !important;
}

.product_item .nst-oos-label {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 4.6rem;
  padding: 0 1.2rem;
  border: 1px solid #ECDDC6;
  border-radius: 1rem;
  background: #FCFCFC;
  color: #8c8c8c;
  font-size: 1.4rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
}

.product_item.nst-oos .product_item-img img {
  opacity: 0.8;
}

/* SKU (артикул) on catalogue cards and in the add-to-cart popup */
.product_item .nst-sku {
  margin: 0;
  color: #8c8c8c;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 120%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.product_item .nst-sku.nst-sku--empty {
  visibility: hidden;
}

/* Catalogue grid: the title has min-height 6rem + margin 1rem; tuck the SKU into that gap */
.catalog_products .product_item-title + .nst-sku {
  margin: -0.6rem 0 0.6rem;
}

.popup-product .nst-popup-sku {
  margin: 0.4rem 0 0;
  color: #8c8c8c;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 120%;
}

.popup-product .nst-popup-sku[hidden] {
  display: none;
}

@media screen and (max-width: 992px) {
  .product_item .nst-sku {
    font-size: 1rem;
  }

  .catalog_products .product_item-title + .nst-sku {
    margin: -0.4rem 0 0;
  }

  .popup-product .nst-popup-sku {
    font-size: 1.1rem;
    margin-top: 0.2rem;
  }
}

/* «Освящено» — pill on product photos (bottom-left; theme labels are top-left,
   the slider add-to-cart button is bottom-right and stays above it on hover).
   Icon: the client's priest drawing as a single-colour inline SVG (currentColor). */
.nst-blessed {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: calc(100% - 1.6rem);
  padding: 0.2rem 0.9rem 0.2rem 0.5rem;
  border: 1px solid rgba(199, 148, 71, 0.45);
  border-radius: 10rem;
  background: rgba(252, 252, 252, 0.9);
  color: #a8782f;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  box-sizing: border-box;
  overflow: hidden;
}

.nst-blessed .nst-blessed__icon {
  flex: 0 0 auto;
  display: block;
  width: auto;
  height: 1.8rem;
  color: #8a5f22;
}

.nst-blessed .nst-blessed__text {
  color: #a8782f;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main photo on the product page */
.product_page-slider > .nst-blessed {
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 3;
  padding: 0.3rem 1.2rem 0.3rem 0.6rem;
  font-size: 1.4rem;
  gap: 0.5rem;
}

.product_page-slider > .nst-blessed .nst-blessed__icon {
  height: 2.2rem;
}

/* Small cards in the popup slider «Вам может понравиться» */
.popup-product__more .nst-blessed {
  left: 0.5rem;
  bottom: 0.5rem;
  max-width: calc(100% - 1rem);
  padding: 0.15rem 0.7rem 0.15rem 0.4rem;
  font-size: 1.05rem;
  gap: 0.3rem;
}

.popup-product__more .nst-blessed .nst-blessed__icon {
  height: 1.5rem;
}

@media screen and (max-width: 992px) {
  .nst-blessed {
    left: 0.5rem;
    bottom: 0.5rem;
    max-width: calc(100% - 1rem);
    padding: 0.15rem 0.6rem 0.15rem 0.35rem;
    font-size: 0.95rem;
    gap: 0.3rem;
  }

  .nst-blessed .nst-blessed__icon {
    height: 1.4rem;
  }

  .product_page-slider > .nst-blessed {
    left: 1rem;
    bottom: 2.2rem; /* above the mobile swiper pagination bar (~1.2rem from the bottom) */
    padding: 0.25rem 0.9rem 0.25rem 0.5rem;
    font-size: 1.2rem;
  }

  .product_page-slider > .nst-blessed .nst-blessed__icon {
    height: 1.8rem;
  }

  .popup-product__more .nst-blessed {
    font-size: 0.9rem;
  }

  .popup-product__more .nst-blessed .nst-blessed__icon {
    height: 1.3rem;
  }
}

/* Out-of-stock: show «Нет в наличии» on the card without hover (theme hides availability) */
.catalog_products .product_item.nst-oos .product_item-aviable {
  display: block !important;
  height: auto;
  margin-bottom: 0.6rem;
  color: #8a2b2b;
}

@media screen and (max-width: 992px) {
  .product_item .nst-oos-label {
    min-height: 3.4rem;
    font-size: 1.1rem;
  }

  .catalog_products .product_item.nst-oos .product_item-aviable {
    font-size: 1.1rem;
    margin-bottom: 0;
  }
}
