/**
 * Jabłonowscy Premium 4.10 — zakup wariantu na listingu i kafelki produktu.
 */

/* Listing: prawdziwa cena wybranego wariantu oraz natywny POST WooCommerce. */
.jkct-premium-v410 .woocommerce ul.products li.product .jkct-loop-variant-price {
  display: grid !important;
  min-height: 68px !important;
  padding: 11px 13px !important;
  align-content: center !important;
  gap: 5px !important;
  color: #4b2a19 !important;
  background: #f1ddbf !important;
  border: 1px solid rgba(79, 43, 24, .22) !important;
  border-radius: 4px 12px !important;
  text-align: center !important;
}

.jkct-premium-v410 .jkct-loop-variant-price > span {
  color: #6c4a34 !important;
  font: 800 8px/1.1 Arial, sans-serif !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

.jkct-premium-v410 .jkct-loop-variant-price > strong {
  color: #4b2a19 !important;
  font: 700 14px/1.2 Georgia, serif !important;
}

.jkct-premium-v410 .jkct-loop-choices.is-complete .jkct-loop-variant-price {
  color: #fff5e7 !important;
  background:
    radial-gradient(circle at 50% 0, rgba(215, 170, 99, .18), transparent 58%),
    #24120c !important;
  border-color: rgba(210, 163, 94, .56) !important;
}

.jkct-premium-v410 .jkct-loop-choices.is-complete .jkct-loop-variant-price > span {
  color: #e6c28b !important;
}

.jkct-premium-v410 .jkct-loop-choices.is-complete .jkct-loop-variant-price > strong {
  color: #fff5e7 !important;
  font-size: 20px !important;
}

.jkct-premium-v410 .jkct-loop-cart-form {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.jkct-premium-v410 .jkct-loop-add-to-cart {
  display: block !important;
  width: 100% !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 13px 16px !important;
  color: #fff5e7 !important;
  background: linear-gradient(135deg, #24120c, #5c341f) !important;
  border: 1px solid #c99654 !important;
  border-radius: 4px 13px !important;
  box-shadow: 0 9px 20px rgba(40, 21, 12, .16) !important;
  font: 800 12px/1.1 Arial, sans-serif !important;
  letter-spacing: .045em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: transform .2s ease, background-color .2s ease, opacity .2s ease !important;
}

.jkct-premium-v410 .jkct-loop-add-to-cart:not(:disabled):hover,
.jkct-premium-v410 .jkct-loop-add-to-cart:not(:disabled):focus-visible {
  background: linear-gradient(135deg, #3b2014, #72452a) !important;
  transform: translateY(-2px) !important;
}

.jkct-premium-v410 .jkct-loop-add-to-cart:disabled {
  color: rgba(74, 43, 26, .52) !important;
  background: #e4d7c4 !important;
  border-color: rgba(74, 43, 26, .18) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* Po uruchomieniu pełnego formularza znika wyłącznie dawny link „Wybierz opcje”. */
.jkct-premium-v410 .woocommerce ul.products li.product.jkct-loop-purchase-ready a.button.product_type_variable {
  display: none !important;
}

/* Karta produktu: select pozostaje w DOM dla WooCommerce, ale sterują nim kafelki. */
.jkct-premium-v410.single-product form.variations_form.jkct-product-tiles-ready .variations select[name^='attribute_'] {
  position: absolute !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.jkct-premium-v410.single-product form.variations_form.jkct-product-tiles-ready .variable-items-wrapper {
  display: none !important;
}

.jkct-premium-v410.single-product .jkct-product-option-tiles {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

.jkct-premium-v410.single-product .jkct-product-option-tiles--weight {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.jkct-premium-v410.single-product .jkct-product-option-tile {
  display: inline-flex !important;
  min-width: 0 !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 10px 9px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  color: #402316 !important;
  background: #fffaf1 !important;
  border: 1px solid rgba(70, 37, 20, .31) !important;
  border-radius: 5px 13px !important;
  box-shadow: none !important;
  font: 800 13px/1.15 Arial, sans-serif !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: none !important;
  cursor: pointer !important;
  transition: transform .2s ease, color .2s ease, background-color .2s ease, border-color .2s ease !important;
}

/* 4.10.1: prawdziwe rastry PNG zamiast figur rysowanych w CSS. */
.jkct-premium-v410.single-product .jkct-product-option-tile--form > span {
  position: relative !important;
  display: block !important;
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
  background-color: transparent !important;
  background-image: url('../icons-v44/bean.png') !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

.jkct-premium-v410.single-product .jkct-product-option-tile--form[data-value*='miel'] > span {
  background-color: transparent !important;
  background-image: url('../icons-v44/grounds.png') !important;
  border: 0 !important;
}

/* Divi i wtyczki wariantów nie mogą dokładać strzałek ani prostokątów. */
.jkct-premium-v410.single-product form.variations_form.jkct-product-tiles-ready .variations td.value::before,
.jkct-premium-v410.single-product form.variations_form.jkct-product-tiles-ready .variations td.value::after,
.jkct-premium-v410.single-product form.variations_form.jkct-product-tiles-ready .woo-variation-items-wrapper::before,
.jkct-premium-v410.single-product form.variations_form.jkct-product-tiles-ready .woo-variation-items-wrapper::after,
.jkct-premium-v410.single-product .jkct-product-option-tiles::before,
.jkct-premium-v410.single-product .jkct-product-option-tiles::after,
.jkct-premium-v410.single-product .jkct-product-option-tile::before,
.jkct-premium-v410.single-product .jkct-product-option-tile::after,
.jkct-premium-v410.single-product .jkct-product-option-tile--form > span::before,
.jkct-premium-v410.single-product .jkct-product-option-tile--form > span::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  content: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.jkct-premium-v410.single-product form.variations_form.jkct-product-tiles-ready .variations select[name^='attribute_'] {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: none !important;
}

.jkct-premium-v410.single-product form.variations_form.jkct-product-tiles-ready .variations select[name^='attribute_']::-ms-expand {
  display: none !important;
}

.jkct-premium-v410.single-product .jkct-product-option-tile:hover,
.jkct-premium-v410.single-product .jkct-product-option-tile:focus-visible {
  color: #29150d !important;
  background: #f0d9b7 !important;
  border-color: #9b6235 !important;
  transform: translateY(-2px) !important;
}

.jkct-premium-v410.single-product .jkct-product-option-tile[aria-pressed='true'] {
  color: #fff5e7 !important;
  background: linear-gradient(135deg, #24120c, #5c341f) !important;
  border-color: #d0a05d !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08) !important;
}

.jkct-premium-v410.single-product .jkct-product-option-tile[aria-pressed='true'] > span {
  background-color: transparent !important;
}

.jkct-premium-v410.single-product .jkct-product-option-tile:disabled {
  color: rgba(64, 35, 22, .40) !important;
  background: #eee5d8 !important;
  border-color: rgba(64, 35, 22, .12) !important;
  cursor: not-allowed !important;
  opacity: .72 !important;
  transform: none !important;
}

.jkct-premium-v410.single-product form.variations_form .reset_variations {
  display: inline-flex !important;
  margin-top: 10px !important;
  color: #684029 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

/* Cena wybranego wariantu pozostaje nad przyciskiem koszyka. */
.jkct-premium-v410.single-product form.variations_form .jkct-selected-price.has-price {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 560px) {
  .jkct-premium-v410.single-product .jkct-product-option-tiles--weight {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .jkct-premium-v410.single-product .jkct-product-option-tile {
    min-height: 54px !important;
    font-size: 12px !important;
  }
}
