/**
 * Homepage "Uued tooted" — 6 columns desktop, horizontal scroll mobile.
 * Scoped to .ps-newproducts inside .miu-home-shell__products.
 */

body.page-index .miu-home-shell__products .ps-newproducts {
  --miu-new-gap: clamp(0.55rem, 0.9vw, 0.85rem);
  --miu-new-cols: 6;
  --miu-new-card-w: clamp(148px, 42vw, 200px);
}

body.page-index .miu-home-shell__products .ps-newproducts .module-products.container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

body.page-index .miu-home-shell__products .ps-newproducts .section-title {
  margin-bottom: 1rem;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__inner {
  padding: 0.48rem 0.52rem 0.68rem;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__title,
body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__title a {
  font-weight: 600 !important;
  letter-spacing: -0.015em;
  word-break: normal;
  overflow-wrap: break-word;
}

@media (min-width: 992px) {
  body.page-index .miu-home-shell__products .ps-newproducts .module-products__list .products {
    display: grid !important;
    grid-template-columns: repeat(var(--miu-new-cols), minmax(0, 1fr)) !important;
    gap: var(--miu-new-gap) !important;
    align-items: stretch;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature {
    min-width: 0;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__top {
    margin-bottom: 0.55rem;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__image-container,
  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature .thumbnail-container {
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__infos {
    gap: 0.28rem;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__title,
  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__title a {
    font-size: clamp(0.8125rem, 0.35vw + 0.68rem, 0.875rem) !important;
    line-height: 1.34 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3;
    -webkit-box-orient: vertical !important;
    overflow: hidden;
    min-height: calc(3 * 1.34em) !important;
    max-height: calc(3 * 1.34em);
  }

  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__price {
    font-size: clamp(0.8rem, 0.5vw + 0.62rem, 0.92rem) !important;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__bottom {
    gap: 0.42rem;
  }
}

/* Ostukorvi rida — kompaktne kogus + pikem CTA (premium) */
body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__form {
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 0.4rem !important;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__form .quantity-button {
  flex: 0 0 auto !important;
  width: 5.35rem !important;
  min-width: 5.35rem !important;
  max-width: 5.35rem !important;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__form .quantity-button .input-group {
  height: 2.55rem;
  border-radius: 11px;
  border-color: rgba(11, 43, 59, 0.12);
  background: #fff;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__form .quantity-button .btn {
  width: 1.55rem;
  min-width: 1.55rem;
  padding: 0;
  color: #0b2b3b;
  opacity: 0.72;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__form .quantity-button .btn:hover {
  opacity: 1;
  background: transparent;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__form .quantity-button input,
body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__form .quantity-button input.form-control {
  max-width: 1.65rem !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: #0b2b3b !important;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__add.btn,
body.page-index .miu-home-shell__products .ps-newproducts article.product-miniature .product-miniature__add.btn.btn-primary {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 2.55rem;
  padding: 0 0.65rem !important;
  gap: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  border-radius: 11px !important;
  box-shadow: none !important;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__add.btn:hover,
body.page-index .miu-home-shell__products .ps-newproducts article.product-miniature .product-miniature__add.btn.btn-primary:hover {
  transform: translateY(-1px);
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__add-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%);
  white-space: nowrap !important;
  border: 0 !important;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__add .material-icons {
  font-size: 1.45rem !important;
  line-height: 1;
  position: relative;
  top: 0.12em; /* material cart icon optical center sits high — nudge down */
  display: inline-block;
}

body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__details.btn {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.55rem;
  font-size: 0.76rem;
}

@media (max-width: 991.98px) {
  body.page-index .miu-home-shell__products .ps-newproducts .module-products__list {
    width: 100%;
    overflow: hidden;
    margin-left: calc(-1 * var(--bs-gutter-x, 0.75rem) * 0.5);
    margin-right: calc(-1 * var(--bs-gutter-x, 0.75rem) * 0.5);
    padding-left: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
    padding-right: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  }

  body.page-index .miu-home-shell__products .ps-newproducts .module-products__list .products {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--miu-new-gap) !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.35rem;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .module-products__list .products::-webkit-scrollbar {
    display: none;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .module-products__list .product-miniature {
    flex: 0 0 var(--miu-new-card-w);
    min-width: var(--miu-new-card-w);
    max-width: var(--miu-new-card-w);
    scroll-snap-align: start;
  }

  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__title,
  body.page-index .miu-home-shell__products .ps-newproducts .product-miniature__title a {
    font-size: 0.875rem !important;
    line-height: 1.34 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3;
    -webkit-box-orient: vertical !important;
    overflow: hidden;
    min-height: calc(3 * 1.34em) !important;
    max-height: calc(3 * 1.34em);
  }
}

@media (max-width: 575.98px) {
  body.page-index .miu-home-shell__products .ps-newproducts {
    --miu-new-card-w: 78vw;
    --miu-new-gap: 0.65rem;
  }
}

/* „Kõik uued tooted” — hover: no fill, mustard text (readable) */
body.page-index .module-products__buttons .btn-outline-primary:hover,
body.page-index .module-products__buttons .btn-outline-primary:focus-visible,
body.page-index .module-products__buttons .btn-outline-primary:active {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--miu-ee-mustard, #c9a227) !important;
  border-color: var(--miu-ee-mustard, #c9a227) !important;
  box-shadow: none !important;
}
body.page-index .module-products__buttons .btn-outline-primary:hover .material-icons,
body.page-index .module-products__buttons .btn-outline-primary:focus-visible .material-icons {
  color: inherit !important;
}