/* Everest v41: performance-safe visual refinements loaded after theme extension styles. */

/* The legacy mini-cart must never freeze the page behind the custom header. */
html.is-cart-open {
  overflow-y: auto !important;
}

/* Category cards keep their place inside the slider on hover. */
.page-homepage .categories__item,
.page-homepage .categories__item-in,
.page-homepage .categories__item:hover .categories__item-in,
.evx-home .evx-module-target--categories .categories__item,
.evx-home .evx-module-target--categories .categories__item-in,
.evx-home .evx-module-target--categories .categories__item:hover .categories__item-in,
body:not(.evx-home) .products-categories__item,
body:not(.evx-home) .products-categories__item:hover {
  transform: none !important;
}

.page-homepage .categories__item:hover .categories__item-image img,
.evx-home .evx-module-target--categories .categories__item:hover .categories__item-image img,
body:not(.evx-home) .products-categories__item:hover img {
  transform: none !important;
}

.evx-home .evx-module-target--categories .categories__item,
body:not(.evx-home) .products-categories__item {
  z-index: 1 !important;
}

/* Product actions are part of the card from the start, so hover cannot change its height. */
.products__item,
.products__item:hover,
.evx-home .evx-module-target--products .products__item,
.evx-home .evx-module-target--products .products__item:hover {
  height: auto !important;
  min-height: 0;
  z-index: 1 !important;
  transform: none !important;
}

.products__item-in,
.products__item:hover .products__item-in,
.products__item-in:hover,
.evx-home .evx-module-target--products .products__item-in,
.evx-home .evx-module-target--products .products__item:hover .products__item-in {
  height: 100%;
  transform: none !important;
}

.products__item-discount,
.products__item-action,
.products__item:hover .products__item-discount,
.products__item:hover .products__item-action {
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.products-featured__swiper .swiper-wrapper,
.evx-home .evx-module-target--products .swiper-wrapper {
  align-items: stretch;
}

.products-featured__swiper .swiper-slide,
.evx-home .evx-module-target--products .swiper-slide {
  height: auto !important;
}

/* A direct red trash button replaces the ambiguous three-dot menu. */
.evx-page-cart .cart__item-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.evx-page-cart .evx-cart-remove {
  display: inline-flex;
  width: 36px;
  height: 36px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: #c63f36;
  border: 1px solid #f0c9c5;
  border-radius: 10px;
  background: #fff3f2;
  box-shadow: none;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.evx-page-cart .evx-cart-remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.evx-page-cart .evx-cart-remove:hover,
.evx-page-cart .evx-cart-remove:focus-visible {
  color: #fff;
  border-color: #b9362f;
  background: #c63f36;
  outline: 0;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .evx-page-cart .evx-cart-remove {
    width: 32px;
    height: 34px;
    border-radius: 9px;
  }

  .evx-page-cart .evx-cart-remove svg {
    width: 17px;
    height: 17px;
  }
}

/* Larger model artwork while keeping every image clipped inside its card. */
.evx-home .evx-module-target--categories .categories__item-image {
  top: 58px !important;
  right: 7px !important;
  bottom: 4px !important;
  left: 7px !important;
}

.evx-home .evx-module-target--categories .categories__item-image img,
.evx-home .evx-module-target--categories .categories__item:hover .categories__item-image img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-position: center bottom !important;
  transform: scale(1.28) !important;
  transform-origin: center bottom;
}

.evx-home .evx-module-target--products .products__item-image {
  height: 340px !important;
  overflow: hidden;
}

.evx-home .evx-module-target--products .products__item-image img,
.evx-home .evx-module-target--products .products__item:hover .products__item-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: scale(1.5) !important;
  transform-origin: center;
}

/* Room for a clear, always-visible delete action in the cart. */
@media (min-width: 1200px) {
  .evx-page-cart .cart__item,
  .evx-page-cart .evx-cart-table-head {
    grid-template-columns: 150px minmax(190px, 1fr) 118px 145px 42px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .evx-page-cart .cart__item,
  .evx-page-cart .evx-cart-table-head {
    grid-template-columns: 128px minmax(0, 1fr) 110px 132px 42px;
  }
}

.evx-page-cart .evx-cart-remove {
  width: 40px;
  height: 40px;
  color: #fff;
  border-color: #c94239;
  border-radius: 12px;
  background: #c94239;
  box-shadow: 0 7px 17px rgba(158, 42, 35, .20);
}

.evx-page-cart .evx-cart-remove:hover,
.evx-page-cart .evx-cart-remove:focus-visible {
  border-color: #a92f29;
  background: #a92f29;
  box-shadow: 0 9px 20px rgba(134, 35, 30, .25);
}

@media (max-width: 767px) {
  .evx-home .evx-module-target--categories .swiper-slide,
  .evx-home .evx-module-target--categories .categories__item,
  .evx-home .evx-module-target--categories .categories__item-in {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .evx-home .evx-module-target--categories .categories__item-title {
    overflow-wrap: anywhere;
  }

  .evx-home .evx-module-target--categories .categories__item-image {
    top: 59px !important;
    right: 4px !important;
    bottom: 3px !important;
    left: 4px !important;
  }

  .evx-home .evx-module-target--categories .categories__item-image img,
  .evx-home .evx-module-target--categories .categories__item:hover .categories__item-image img {
    transform: scale(1.22) !important;
  }

  .evx-home .evx-module-target--products .products__item-image {
    height: 292px !important;
  }

  .evx-home .evx-module-target--products .products__item-image img,
  .evx-home .evx-module-target--products .products__item:hover .products__item-image img {
    transform: scale(1.44) !important;
  }

  .evx-page-cart .cart__item {
    grid-template-columns: 86px minmax(0, 1fr) 40px;
  }

  .evx-page-cart .evx-cart-remove {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }
}

@media (max-width: 389px) {
  .evx-home .evx-module-target--categories .categories__item-image {
    top: 56px !important;
  }

  .evx-home .evx-module-target--products .products__item-image {
    height: 260px !important;
  }
}

/* True phone-width cover: long Russian copy must never widen the page. */
@media (max-width: 575px) {
  .evx-home,
  .evx-home .app,
  .evx-home .evx-cover,
  .evx-home .evx-cover__hero,
  .evx-home .evx-cover__copy,
  .evx-home .evx-cover__visual {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .evx-home .evx-cover,
  .evx-home .evx-cover__copy,
  .evx-home .evx-cover__visual {
    overflow: hidden;
  }

  .evx-home .evx-cover__copy h1 {
    max-width: 100%;
    font-size: clamp(30px, 8.5vw, 35px) !important;
    line-height: 1.03;
    overflow-wrap: break-word;
  }

  .evx-home .evx-cover__copy h1 em {
    display: block;
  }

  .evx-home .evx-cover__copy > p,
  .evx-home .evx-cover__buttons,
  .evx-home .evx-cover__buttons a {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .evx-home .evx-cover__visual img {
    right: -2% !important;
    width: 130% !important;
    height: 72% !important;
  }

  .evx-home .header__mobile {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
  }

  .evx-home .header__mobile .header__nav {
    flex: 0 0 42px;
  }

  .evx-home .header__mobile .header__logo {
    position: absolute;
    left: 50%;
    width: 148px;
    max-width: 42vw;
    margin: 0 !important;
    transform: translateX(-50%);
  }

  .evx-home .header__mobile .header__logo img {
    max-width: 100% !important;
  }

  .evx-home .header__mobile .header__group {
    display: flex;
    flex: 0 0 82px;
    margin-left: auto;
    align-items: center;
    justify-content: flex-end;
  }

  .evx-home .header__mobile .header__acc,
  .evx-home .header__mobile .header__cart {
    flex: 0 0 40px;
  }
}

/* v42: clearer product galleries and category artwork. */
@media (min-width: 768px) {
  .evx-home .evx-module-target--categories .categories__item-front {
    width: 58%;
    padding: 24px 0 0 24px;
  }

  .evx-home .evx-module-target--categories .categories__item-title {
    max-width: 100%;
  }

  .evx-home .evx-module-target--categories .categories__item-image {
    top: 64px !important;
    right: 7px !important;
    bottom: 8px !important;
    left: 28% !important;
    align-items: flex-end;
    justify-content: flex-end;
  }

  .evx-home .evx-module-target--categories .categories__item-image img,
  .evx-home .evx-module-target--categories .categories__item:hover .categories__item-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: right bottom !important;
    transform: translate(-4%, 2%) scale(1.34) !important;
    transform-origin: right bottom;
  }

}

@media (min-width: 1200px) {
  .evx-page-product .sku__view-body > .row > .col-xl-6:first-child {
    min-height: 660px;
    background-color: #eef5f0;
    background-image:
      linear-gradient(rgba(31, 106, 71, .04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(31, 106, 71, .04) 1px, transparent 1px),
      radial-gradient(circle at 64% 42%, rgba(31, 106, 71, .13), transparent 34%);
  }

  .evx-page-product .sku__view-body > .row > .col-xl-6:first-child::after {
    right: 18px;
    bottom: 18px;
    color: rgba(31, 106, 71, .045);
    font-size: clamp(58px, 6vw, 96px);
  }

  .evx-page-product .sku__sticky {
    position: sticky;
    top: 92px;
    padding: 24px 18px;
  }

  .evx-page-product .sku__slide img {
    transform: translateY(3%) scale(2.35) !important;
    transform-origin: 50% 52%;
  }

  .evx-page-product .sku__desc {
    padding: 42px 48px !important;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .evx-page-product .sku__slide img {
    transform: translateY(2%) scale(1.82) !important;
  }
}

@media (max-width: 767px) {
  .evx-home .evx-module-target--categories .categories__item-image {
    top: 73px !important;
    right: 5px !important;
    bottom: 5px !important;
    left: 9px !important;
  }

  .evx-home .evx-module-target--categories .categories__item-image img,
  .evx-home .evx-module-target--categories .categories__item:hover .categories__item-image img {
    object-position: right bottom !important;
    transform: translate(5%, 4%) scale(1.27) !important;
    transform-origin: right bottom;
  }

  .evx-page-product .sku__slide img {
    transform: translateY(1%) scale(1.58) !important;
  }
}
