/*
 * La Polaca WooCommerce base layer
 * Global visual rules for WooCommerce, Elementor product widgets and LaPolaca custom widgets.
 */

.woocommerce,
.woocommerce-page,
.woocommerce div.product,
.woocommerce form.cart,
.elementor-widget-woocommerce-product-add-to-cart,
.elementor-add-to-cart,
.lpc-atc-form,
.woocommerce button,
.woocommerce input,
.woocommerce select,
.woocommerce textarea,
.lpc-atc-form button,
.lpc-atc-form input,
.lpc-atc-form select,
.lpc-atc-form textarea {
  font-family: var(--lpc-font-text) !important;
  font-size: 12px !important;
}

/* WooCommerce + Elementor add-to-cart buttons */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button,
.woocommerce .single_add_to_cart_button,
.elementor-widget-woocommerce-product-add-to-cart .button,
.elementor-add-to-cart .button,
.elementor-add-to-cart .single_add_to_cart_button,
.lpc-atc-form .single_add_to_cart_button,
.lpc-atc-button {
  background: #1A1A1A !important;
  background-color: #1A1A1A !important;
  border-color: #1A1A1A !important;
  color: #FFFFFF !important;
  fill: #FFFFFF !important;
  font-family: var(--lpc-font-text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 0 !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .button:hover,
.woocommerce .single_add_to_cart_button:hover,
.elementor-widget-woocommerce-product-add-to-cart .button:hover,
.elementor-add-to-cart .button:hover,
.elementor-add-to-cart .single_add_to_cart_button:hover,
.lpc-atc-form .single_add_to_cart_button:hover,
.lpc-atc-button:hover,
.woocommerce button.button:focus,
.woocommerce a.button:focus,
.woocommerce input.button:focus,
.woocommerce .single_add_to_cart_button:focus,
.elementor-add-to-cart .single_add_to_cart_button:focus,
.lpc-atc-button:focus,
.woocommerce button.button:active,
.woocommerce a.button:active,
.woocommerce input.button:active,
.woocommerce .single_add_to_cart_button:active,
.elementor-add-to-cart .single_add_to_cart_button:active,
.lpc-atc-button:active,
.woocommerce button.button.disabled,
.woocommerce button.button:disabled,
.woocommerce button.button:disabled[disabled],
.woocommerce .single_add_to_cart_button.disabled,
.woocommerce .single_add_to_cart_button:disabled,
.woocommerce .single_add_to_cart_button.wc-variation-selection-needed,
.elementor-add-to-cart .single_add_to_cart_button.disabled,
.elementor-add-to-cart .single_add_to_cart_button:disabled,
.elementor-add-to-cart .single_add_to_cart_button.wc-variation-selection-needed,
.lpc-atc-form .single_add_to_cart_button.disabled,
.lpc-atc-form .single_add_to_cart_button:disabled,
.lpc-atc-form .single_add_to_cart_button.wc-variation-selection-needed,
.lpc-atc-button.disabled,
.lpc-atc-button:disabled,
.lpc-atc-button.wc-variation-selection-needed {
  background: #1A1A1A !important;
  background-color: #1A1A1A !important;
  border-color: #1A1A1A !important;
  color: #FFFFFF !important;
  fill: #FFFFFF !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

/* Fields */
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.elementor-add-to-cart input.input-text,
.elementor-add-to-cart select,
.lpc-atc-form input.input-text,
.lpc-atc-form select {
  font-family: var(--lpc-font-text) !important;
  font-size: 12px !important;
  border-radius: 0 !important;
  border: 1px solid #1A1A1A;
  box-shadow: none !important;
}

/* Variation table: keep native selects available to JS but visually quiet when custom swatches are present */
.lpc-atc-form .variations,
.elementor-add-to-cart .lpc-atc-form .variations {
  margin: 0 0 12px;
}

.lpc-atc-form .variations th.label,
.lpc-atc-form .variations td.value label {
  font-family: var(--lpc-font-text) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  text-transform: none !important;
}

/* LaPolaca swatches: strict 14px dots */
.lpc-atc-swatches,
.lpc-color-swatches {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

.lpc-atc-swatch,
.lpc-color-swatch,
button.lpc-atc-swatch,
button.lpc-color-swatch {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  position: relative !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
  line-height: 0 !important;
  font-size: 0 !important;
  overflow: visible !important;
}

.lpc-atc-swatch-color,
.lpc-color-swatch > span,
.lpc-atc-swatch.has-color .lpc-atc-swatch-color {
  box-sizing: border-box !important;
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  border-radius: 0 !important;
  background: var(--lpc-swatch-color, currentColor) !important;
  background-color: var(--lpc-swatch-color, currentColor) !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.lpc-atc-swatch img,
.lpc-color-swatch img {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  display: block !important;
}

.lpc-color-swatch.has-image > img {
  position: relative !important;
  z-index: 1 !important;
}

.lpc-color-swatch.has-image > span {
  display: none !important;
}

.lpc-atc-swatch-text,
.lpc-atc-swatch .lpc-atc-swatch-text,
.lpc-atc-swatch span:not(.lpc-atc-swatch-color),
.lpc-color-swatch .lpc-atc-swatch-text {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

.lpc-atc-swatch.is-active::after,
.lpc-atc-swatch[aria-pressed="true"]::after,
.lpc-color-swatch.is-active::after,
.lpc-color-swatch[aria-pressed="true"]::after {
  content: "" !important;
  position: absolute !important;
  left: 1px !important;
  right: 1px !important;
  bottom: -6px !important;
  height: 1px !important;
  background: #000 !important;
  pointer-events: none !important;
}

/* Keep product/gallery images from inheriting button/swatch dimensions */
.woocommerce div.product div.images img,
.lpc-product-gallery img,
.woo-gallery img,
.lait-native-product-gallery img {
  max-width: 100%;
  height: auto;
}

/* La Polaca default WooCommerce shop archive */
.lpc-elementor-catalog {
  width: 100%;
  margin: 0;
  padding: var(--lpc-page-top-offset, 120px) 0 0;
  background: transparent;
}

.lpc-elementor-archive-heading__title {
  margin: 0;
  font-family: var(--lpc-font-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lpc-elementor-archive-heading__description {
  max-width: 480px;
  margin-top: 24px;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
}

.lpc-elementor-archive-heading__description p {
  margin: 0;
}

.lpc-elementor-archive-products ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.lpc-elementor-archive-products ul.products::before,
.lpc-elementor-archive-products ul.products::after {
  display: none !important;
  content: none !important;
}

.lpc-elementor-archive-products ul.products > * {
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 !important;
}

@media (max-width: 767px) {
  .lpc-elementor-catalog {
    padding-top: var(--lpc-page-top-offset-mobile, 96px);
  }
}

.lpc-shop-archive {
  width: 100%;
  margin: 0;
  padding: 100px 0 0;
  color: #111;
  background: transparent;
}

.lpc-shop-archive__notices {
  padding: 0 clamp(14px, 3vw, 38px);
}

.lpc-shop-archive__intro {
  width: min(100%, var(--lpc-content-max-width, 1440px));
  margin: 0 auto;
  padding: clamp(28px, 4.8vw, 62px) clamp(20px, 2.8vw, 34px) clamp(28px, 4vw, 52px);
}

.lpc-shop-archive__title {
  margin: 0;
  font-family: var(--lpc-font-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lpc-shop-archive__description {
  max-width: 480px;
  margin-top: 24px;
  font-family: var(--lpc-font-text);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
  color: #111;
}

.lpc-shop-archive__description p {
  margin: 0;
}

.lpc-shop-archive__description p + p {
  margin-top: 10px;
}

.lpc-shop-archive__products {
  padding: 0 clamp(6px, 1vw, 12px) clamp(42px, 7vw, 90px);
}

.lpc-shop-archive ul.products,
.woocommerce .lpc-shop-archive ul.products,
.woocommerce-page .lpc-shop-archive ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
}

.lpc-shop-archive ul.products::before,
.lpc-shop-archive ul.products::after {
  display: none !important;
  content: none !important;
}

.lpc-shop-archive ul.products li.product,
.woocommerce .lpc-shop-archive ul.products li.product,
.woocommerce-page .lpc-shop-archive ul.products li.product {
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.lpc-shop-archive .lait-product-card {
  width: 100%;
  margin: 0;
}

.lpc-shop-archive .woocommerce-pagination {
  margin: clamp(28px, 4vw, 56px) 0 0;
  padding: 0 clamp(8px, 1.5vw, 18px);
  text-align: center;
}

.lpc-shop-archive .woocommerce-pagination ul.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0 !important;
  margin: 0;
  padding: 0;
}

.lpc-shop-archive .woocommerce-pagination ul.page-numbers li {
  border: 0 !important;
  margin: 0;
  padding: 0;
}

.lpc-shop-archive .woocommerce-pagination .page-numbers {
  min-width: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: transparent;
  border: 0;
  font-family: var(--lpc-font-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.lpc-shop-archive .woocommerce-pagination .page-numbers.current {
  border-bottom: 1px solid currentColor;
}

@media (max-width: 1024px) {
  .lpc-shop-archive ul.products,
  .woocommerce .lpc-shop-archive ul.products,
  .woocommerce-page .lpc-shop-archive ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .lpc-shop-archive__products {
    padding-left: 0;
    padding-right: 0;
  }

  .lpc-shop-archive ul.products,
  .woocommerce .lpc-shop-archive ul.products,
  .woocommerce-page .lpc-shop-archive ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }

  .lpc-shop-archive ul.products.lpc-grid-full,
  .woocommerce .lpc-shop-archive ul.products.lpc-grid-full,
  .woocommerce-page .lpc-shop-archive ul.products.lpc-grid-full {
    grid-template-columns: 1fr !important;
  }

  .lpc-shop-archive ul.products.lpc-grid-double,
  .woocommerce .lpc-shop-archive ul.products.lpc-grid-double,
  .woocommerce-page .lpc-shop-archive ul.products.lpc-grid-double {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  body.post-type-archive-product .lpc-elementor-catalog,
  body.tax-product_cat .lpc-elementor-catalog,
  body.tax-product_tag .lpc-elementor-catalog {
    position: relative;
    z-index: 1;
    padding-bottom: 120px;
    background: var(--lpc-color-background, #fff);
  }

  body.post-type-archive-product .lpc-elementor-catalog .elementor-widget-woocommerce-products,
  body.tax-product_cat .lpc-elementor-catalog .elementor-widget-woocommerce-products,
  body.tax-product_tag .lpc-elementor-catalog .elementor-widget-woocommerce-products,
  body.post-type-archive-product .lpc-elementor-catalog .elementor-widget-woocommerce-products .elementor-widget-container,
  body.tax-product_cat .lpc-elementor-catalog .elementor-widget-woocommerce-products .elementor-widget-container,
  body.tax-product_tag .lpc-elementor-catalog .elementor-widget-woocommerce-products .elementor-widget-container,
  body.post-type-archive-product .lpc-elementor-catalog .elementor-widget-woocommerce-products .woocommerce,
  body.tax-product_cat .lpc-elementor-catalog .elementor-widget-woocommerce-products .woocommerce,
  body.tax-product_tag .lpc-elementor-catalog .elementor-widget-woocommerce-products .woocommerce {
    height: auto !important;
    min-height: max-content;
    overflow: visible !important;
  }

  body.post-type-archive-product .lpc-elementor-catalog ul.products,
  body.tax-product_cat .lpc-elementor-catalog ul.products,
  body.tax-product_tag .lpc-elementor-catalog ul.products {
    margin-bottom: 0 !important;
    padding-bottom: 48px !important;
  }
}
