/* WooCommerce UI */

.woocommerce span.onsale,
.woocommerce-page span.onsale,
.elementor-widget-woocommerce-product-images span.onsale {
  top: 4px !important;
  left: 4px !important;
  right: auto !important;
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  margin: 0 4px 0 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: #007c30;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  box-shadow: none;
  box-sizing: border-box;
}

.single-product .woocommerce-message {
  display: flex;
  width: min(1280px, calc(100% - 32px));
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin: 20px auto;
  padding: 16px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
}

.single-product .woocommerce-message::before {
  position: static;
  flex: 0 0 auto;
  margin-right: 0;
  color: #0b8f3a;
  font-size: 16px;
}

.single-product .woocommerce-message:focus,
.single-product .woocommerce-message:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

.single-product .woocommerce-message .button,
.single-product .woocommerce-message a.button,
.single-product .woocommerce-message .wc-forward {
  margin-left: auto;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #007c30;
  border-radius: 10px;
  background: #007c30;
  box-shadow: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.single-product .woocommerce-message .button:hover,
.single-product .woocommerce-message a.button:hover,
.single-product .woocommerce-message .wc-forward:hover {
  border-color: #066326;
  background: #066326;
  color: #fff;
}

.single-product .woocommerce-message .button:focus-visible,
.single-product .woocommerce-message a.button:focus-visible,
.single-product .woocommerce-message .wc-forward:focus-visible {
  outline: 2px solid #ce1720;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .single-product .woocommerce-message {
    width: calc(100% - 24px);
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .single-product .woocommerce-message .button,
  .single-product .woocommerce-message a.button,
  .single-product .woocommerce-message .wc-forward {
    margin-left: 0;
    width: 100%;
  }
}

/* Siatka archiwów WooCommerce: sklep, kategorie i wyniki wyszukiwania */

body.post-type-archive-product.woocommerce
  .elementor-wc-products
  ul.products.elementor-grid,
body.tax-product_cat.woocommerce
  .elementor-wc-products
  ul.products.elementor-grid {
  display: grid !important;
}

body.post-type-archive-product.woocommerce
  .elementor-wc-products
  ul.products.elementor-grid
  li.product,
body.tax-product_cat.woocommerce
  .elementor-wc-products
  ul.products.elementor-grid
  li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
}

@media (min-width: 1025px) {
  body.post-type-archive-product.woocommerce
    .elementor-wc-products
    ul.products.elementor-grid,
  body.tax-product_cat.woocommerce
    .elementor-wc-products
    ul.products.elementor-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  body.post-type-archive-product.woocommerce
    .elementor-wc-products
    ul.products.elementor-grid,
  body.tax-product_cat.woocommerce
    .elementor-wc-products
    ul.products.elementor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  body.post-type-archive-product.woocommerce
    .elementor-wc-products
    ul.products.elementor-grid,
  body.tax-product_cat.woocommerce
    .elementor-wc-products
    ul.products.elementor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Stepper ilości WooCommerce */

.woocommerce .quantity,
.woocommerce-page .quantity {
  display: inline-grid;
  width: auto;
  height: 46px;
  grid-template-columns: 40px 46px 40px;
  align-items: stretch;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
  box-sizing: border-box;
}

.woocommerce .quantity .qty,
.woocommerce-page .quantity .qty {
  width: 46px !important;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0 !important;
  border-right: 1px solid #eceef0 !important;
  border-left: 1px solid #eceef0 !important;
  border-radius: 0;
  background: #fff;
  box-shadow: none !important;
  color: #101010;
  font-size: 15px;
  font-weight: 500;
  line-height: 44px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
  box-sizing: border-box;
}

.woocommerce .quantity .qty::-webkit-inner-spin-button,
.woocommerce .quantity .qty::-webkit-outer-spin-button,
.woocommerce-page .quantity .qty::-webkit-inner-spin-button,
.woocommerce-page .quantity .qty::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.woocommerce .quantity .qty:focus,
.woocommerce .quantity .qty:focus-visible,
.woocommerce-page .quantity .qty:focus,
.woocommerce-page .quantity .qty:focus-visible {
  border: 0 !important;
  border-right: 1px solid #eceef0 !important;
  border-left: 1px solid #eceef0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.woocommerce .quantity .sb_quantity_stepper__button,
.woocommerce-page .quantity .sb_quantity_stepper__button {
  display: inline-flex;
  width: 40px !important;
  min-width: 0;
  height: 44px !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #101010 !important;
  font-family: inherit;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.woocommerce .quantity .sb_quantity_stepper__button:hover:not(:disabled),
.woocommerce-page .quantity .sb_quantity_stepper__button:hover:not(:disabled) {
  background: #f5f6f7 !important;
  color: #000 !important;
}

.woocommerce .quantity .sb_quantity_stepper__button:focus-visible,
.woocommerce-page .quantity .sb_quantity_stepper__button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #007c30;
  outline-offset: -2px;
}

.woocommerce .quantity .sb_quantity_stepper__button:disabled,
.woocommerce-page .quantity .sb_quantity_stepper__button:disabled {
  background: #fff !important;
  color: #b8bcc2 !important;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .woocommerce .quantity,
  .woocommerce-page .quantity {
    height: 44px;
    grid-template-columns: 36px 42px 36px;
  }

  .woocommerce .quantity .qty,
  .woocommerce-page .quantity .qty {
    width: 42px !important;
    height: 42px;
    line-height: 42px;
  }

  .woocommerce .quantity .sb_quantity_stepper__button,
  .woocommerce-page .quantity .sb_quantity_stepper__button {
    width: 36px !important;
    height: 42px !important;
  }
}

/* Globalne kafelki produktów WooCommerce */

.woocommerce ul.products li.product,
.elementor-wc-products ul.products li.product {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  padding: 12px !important;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 160ms ease;
}

.woocommerce ul.products li.product:hover,
.elementor-wc-products ul.products li.product:hover {
  border-color: #cfd3d8;
}

.woocommerce ul.products li.product .woocommerce-LoopProduct-link,
.elementor-wc-products ul.products li.product .woocommerce-LoopProduct-link {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  color: #101010;
  text-decoration: none;
}

.woocommerce ul.products li.product a img,
.elementor-wc-products ul.products li.product a img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 0 12px;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.elementor-wc-products ul.products li.product .woocommerce-loop-product__title {
  display: -webkit-box !important;
  min-height: 43px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #101010;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.woocommerce ul.products li.product .sb_product_card__net-content,
.elementor-wc-products ul.products li.product .sb_product_card__net-content {
  display: block;
  margin-top: 5px;
  color: #686868;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.woocommerce ul.products li.product .price,
.elementor-wc-products ul.products li.product .price {
  display: block;
  margin: auto 0 0;
  padding-top: 18px;
  color: #101010;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.woocommerce ul.products li.product .price del,
.elementor-wc-products ul.products li.product .price del {
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 400;
}

.woocommerce ul.products li.product .price ins,
.elementor-wc-products ul.products li.product .price ins {
  color: #101010;
  font-weight: 600;
  text-decoration: none;
}

.woocommerce ul.products li.product .button,
.elementor-wc-products ul.products li.product .button {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #007c30;
  border-radius: 8px;
  background: #007c30;
  box-shadow: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.woocommerce ul.products li.product .button:hover,
.elementor-wc-products ul.products li.product .button:hover {
  border-color: #066326;
  background: #066326;
  color: #fff;
}

.woocommerce ul.products li.product .button:focus-visible,
.elementor-wc-products ul.products li.product .button:focus-visible {
  outline: 2px solid #ce1720;
  outline-offset: 2px;
}

.woocommerce ul.products li.product .added_to_cart,
.elementor-wc-products ul.products li.product .added_to_cart {
  margin-top: 8px;
  color: #007c30;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 767px) {
  .woocommerce ul.products li.product,
  .elementor-wc-products ul.products li.product {
    padding: 10px !important;
    border-radius: 10px;
  }

  .woocommerce ul.products li.product .button,
  .elementor-wc-products ul.products li.product .button {
    min-height: 40px;
    padding-inline: 8px;
    font-size: 13px;
  }
}

/* Kompaktowy przycisk dodawania w prawym dolnym rogu kafelka */

.woocommerce ul.products li.product .price,
.elementor-wc-products ul.products li.product .price {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding-top: 14px;
  padding-right: 44px;
  box-sizing: border-box;
}

.woocommerce ul.products li.product .add_to_cart_button,
.elementor-wc-products ul.products li.product .add_to_cart_button {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 8px;
  background: #fff;
  color: #101010;
  font-size: 0;
  line-height: 0;
}

.woocommerce ul.products li.product .add_to_cart_button::before,
.elementor-wc-products ul.products li.product .add_to_cart_button::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("../svg/plus.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.woocommerce ul.products li.product .add_to_cart_button:hover,
.elementor-wc-products ul.products li.product .add_to_cart_button:hover {
  border-color: #bfc4ca;
  background: #f5f6f7;
}

.woocommerce ul.products li.product .add_to_cart_button:focus-visible,
.elementor-wc-products ul.products li.product .add_to_cart_button:focus-visible {
  outline: 2px solid #101010;
  outline-offset: 2px;
}

.woocommerce ul.products li.product .add_to_cart_button.loading::before,
.elementor-wc-products ul.products li.product .add_to_cart_button.loading::before {
  opacity: 0;
}

.woocommerce ul.products li.product .added_to_cart,
.elementor-wc-products ul.products li.product .added_to_cart {
  display: none;
}

@media (max-width: 767px) {
  .woocommerce ul.products li.product .price,
  .elementor-wc-products ul.products li.product .price {
    min-height: 32px;
    padding-right: 40px;
  }

  .woocommerce ul.products li.product .add_to_cart_button,
  .elementor-wc-products ul.products li.product .add_to_cart_button {
    right: 10px;
    bottom: 10px;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    border-radius: 7px;
  }
}
