/* Salis WooCommerce UX 1.1.0 – wizualne poprawki, bez zmian w logice zakupów */

/* PRODUKT: po usunięciu sidebaru opis i opinie zyskują przestrzeń */
body.single-product #sidebar,
body.single-product aside#sidebar { display: none !important; }
body.single-product #content {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
}
body.single-product #layout {
  width: min(1160px, calc(100% - 32px));
  max-width: 1160px;
  margin-inline: auto;
}
body.single-product .woocommerce div.product .woocommerce-product-gallery,
body.single-product .woocommerce div.product div.images {
  max-width: 100%;
}
body.single-product .woocommerce div.product .summary {
  color: #151515 !important;
}
body.single-product .woocommerce div.product .summary .price,
body.single-product .woocommerce div.product .summary .woocommerce-Price-amount {
  color: #222 !important;
}
body.single-product .summary .quantity input.qty,
body.single-product .summary .quantity .qty {
  color: #101828 !important;
  background: #fff !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #101828 !important;
  text-align: center !important;
  font-weight: 800 !important;
  min-width: 42px;
}
body.single-product .summary .single_add_to_cart_button {
  min-height: 44px;
  padding: 12px 19px !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  background: #e10600 !important;
  color: #fff !important;
  border-radius: 10px !important;
}
body.single-product .salis-review-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 20px;
  padding: 9px 13px;
  color: #1c1c1c !important;
  background: #fff8e9;
  border: 1px solid #f0d79f;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 750;
  text-decoration: none !important;
}
body.single-product .salis-review-link > span:first-child { color: #cc8400; letter-spacing: 1px; }
body.single-product .salis-review-link:hover { background: #fff0c9; }

/* OPINIE: pokazujemy jednocześnie opis i opinie, bez ucinania zakładki Opinie. */
body.single-product .woocommerce div.product .woocommerce-tabs,
body.single-product .woocommerce-tabs {
  display: block !important;
  clear: both !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-top: 24px;
  overflow: visible !important;
}
body.single-product .woocommerce-tabs ul.tabs { display: none !important; }
body.single-product .woocommerce-tabs .woocommerce-Tabs-panel,
body.single-product .woocommerce-tabs .woocommerce-tabs-panel,
body.single-product .woocommerce-tabs #tab-description,
body.single-product .woocommerce-tabs #tab-reviews {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  height: auto !important;
  overflow: visible !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 22px !important;
  padding: clamp(18px,3vw,34px) !important;
  border: 1px solid #e6e9ee !important;
  border-radius: 16px;
  background: #f8f9fb;
  color: #20252d !important;
}
body.single-product .woocommerce-tabs #tab-reviews { background: #fff; }
body.single-product .woocommerce-tabs #tab-reviews #reviews,
body.single-product .woocommerce-tabs #tab-reviews #comments {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}
body.single-product #reviews,
body.single-product #reviews p,
body.single-product #reviews .description,
body.single-product #reviews .meta,
body.single-product #reviews .comment-text {
  color: #252b34 !important;
  font-size: 15px;
  line-height: 1.65;
}
body.single-product #reviews h2,
body.single-product .woocommerce-tabs h2 { color: #131b2b !important; }
body.single-product #reviews .commentlist,
body.single-product #reviews ol.commentlist { margin: 16px 0 24px !important; padding: 0 !important; }
body.single-product #reviews ol.commentlist li {
  padding: 15px !important;
  margin: 0 0 13px !important;
  background: #f8f9fb !important;
  border: 1px solid #e8edf2 !important;
  border-radius: 12px !important;
}
body.single-product #reviews ol.commentlist li .comment-text {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}
body.single-product #reviews .star-rating { color: #bd7e00 !important; }

/* WPC FLY CART: jasny panel i rzeczywisty kontrast zawartości. */
.woofc-area,
.woofc-area .woofc-area-inner,
.woofc-area .woofc-area-top,
.woofc-area .woofc-area-mid,
.woofc-area .woofc-area-bot {
  background: #fff !important;
  color: #15202c !important;
}
.woofc-area { height: 100dvh !important; max-height: 100dvh !important; }
.woofc-area .woofc-area-inner { height: 100% !important; max-height: 100% !important; display: flex !important; flex-direction: column !important; min-height: 0 !important; }
.woofc-area .woofc-area-top, .woofc-area .woofc-area-bot { flex: 0 0 auto !important; }
.woofc-area,
.woofc-area .woofc-area-inner {
  box-sizing: border-box !important;
}
.woofc-area .woofc-area-top { border-bottom: 1px solid #e7eaf0 !important; }
.woofc-area .woofc-area-mid { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; overscroll-behavior: contain; }
.woofc-area,
.woofc-area a,
.woofc-area p,
.woofc-area span,
.woofc-area strong,
.woofc-area .woofc-item,
.woofc-area .woofc-item-name,
.woofc-area .woofc-item-name a,
.woofc-area .woofc-item-price,
.woofc-area .woofc-item-title,
.woofc-area .woofc-area-bot .woofc-total {
  color: #15202c !important;
  -webkit-text-fill-color: #15202c !important;
}
.woofc-area .woofc-item { border-bottom: 1px solid #edf0f3 !important; }
.woofc-area .woofc-item-remove,
.woofc-area .woofc-close { color: #172334 !important; }
.woofc-area .woofc-item-qty,
.woofc-area .woofc-item-qty-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 94px;
  min-height: 38px;
  gap: 0;
  border: 1px solid #d7dde6 !important;
  border-radius: 22px !important;
  background: #f7f9fc !important;
}
.woofc-area .woofc-item-qty .woofc-item-qty-inner {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-height: 34px;
  background: transparent !important;
}
.woofc-area .woofc-item-qty input,
.woofc-area .woofc-item-qty input[type="number"],
.woofc-area .woofc-item-qty-input,
.woofc-area .woofc-item-qty .qty {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 38px !important;
  min-width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 32px !important;
  text-align: center !important;
  appearance: textfield;
}
.woofc-area .woofc-item-qty-minus,
.woofc-area .woofc-item-qty-plus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  height: 32px !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  cursor: pointer;
  font-size: 18px !important;
  font-weight: 800 !important;
}
.woofc-area .salis-qty-number {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  min-height: 30px;
  color: #111827 !important;
  background: transparent !important;
  font-size: 16px;
  line-height: 1;
  font-weight: 850;
}
/* Zabezpieczenie przed ucinaniem stopki przy dolnej krawędzi ekranu. */
.woofc-area .woofc-area-bot {
  position: relative !important;
  z-index: 4 !important;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  border-top: 1px solid #dde3ec !important;
  box-sizing: border-box !important;
}
.woofc-area .woofc-area-bot .woofc-action .woofc-action-inner > div a,
.woofc-area .woofc-area-bot .woofc-action a,
.woofc-area .woofc-area-bot a.checkout,
.woofc-area .woofc-area-bot .checkout-button,
.woofc-area a.woofc-btn-checkout {
  min-height: 45px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #e10600 !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
/* Jeśli koszyk ma osobny przycisk "kontynuuj zakupy", pozostaje czytelny. */
.woofc-area .woofc-continue {
  color: #303b49 !important;
  -webkit-text-fill-color: #303b49 !important;
  background: #eef1f5 !important;
}
@media (max-width: 767px) {
  body.single-product #layout { width: calc(100% - 18px) !important; }
  body.single-product .woocommerce-tabs { padding-top: 12px; }
  body.single-product .woocommerce-tabs .woocommerce-Tabs-panel { padding: 16px !important; }
  .woofc-area { width: min(100vw, 430px) !important; max-width: 100vw !important; }
  .woofc-area .woofc-area-bot { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important; }
  .woofc-area .woofc-area-mid .woofc-item { padding-right: 40px !important; }
  .woofc-area .woofc-area-mid .woofc-item:hover .woofc-item-inner { transform: translate3d(0,0,0) !important; }
  .woofc-area .woofc-area-mid .woofc-item .woofc-item-inner .woofc-item-remove { right: -30px !important; }
}

/* =======================================================================
   SALIS UX 1.1.0 — trzy poprawki po uwagach do widoku produktów
   ======================================================================= */

/* 1. Usuwamy duży odstęp pomiędzy menu a produktem tylko na stronach produktów.
   Themify używa różnych kontenerów zależnie od szablonu; zachowujemy ~24px oddechu. */
body.single-product #middle {
  padding-top: 24px !important;
  margin-top: 0 !important;
  min-height: 0 !important;
}
body.single-product #layout,
body.single-product #content,
body.single-product #content .woocommerce,
body.single-product .woocommerce-notices-wrapper,
body.single-product .woocommerce div.product,
body.single-product .woocommerce-page div.product {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
body.single-product #content {
  padding-bottom: 30px !important;
}
body.single-product .woocommerce div.product div.images,
body.single-product .woocommerce div.product div.summary {
  margin-top: 0 !important;
}

/* 2. Żółty link do opinii zostaje; klasyczny szary blok z oceną z motywu znika.
   Usuwamy go też serwerowo przez remove_action w PHP. */
body.single-product .woocommerce-product-rating,
body.single-product .summary > .woocommerce-product-rating {
  display: none !important;
}
body.single-product .summary .salis-review-link {
  display: inline-flex !important;
  margin-top: 13px !important;
  margin-bottom: 18px !important;
}

/* 3. Jeden kurs danego rodzaju na zamówienie — bez kontrolek +/- na produkcie.
   Filtr WooCommerce egzekwuje tę regułę serwerowo; CSS jest zabezpieczeniem dla motywu. */
body.single-product.salis-one-course-per-order .summary form.cart .quantity,
body.single-product.salis-one-course-per-order .summary form.cart .quantity.buttons_added,
body.single-product.salis-one-course-per-order .summary form.cart button.plus,
body.single-product.salis-one-course-per-order .summary form.cart button.minus {
  display: none !important;
}

/* Dotyczy tylko koszyków zawierających kursy, oznaczonych przez JS.
   Dla niekursowych produktów standardowa regulacja ilości zostaje. */
.woofc-area .woofc-item.salis-ux-course-item .woofc-item-qty,
.woofc-area .woofc-item.salis-ux-course-item .woofc-item-qty-wrap,
.woofc-area .woofc-item.salis-ux-course-item .quantity {
  display: none !important;
}

@media (max-width: 767px) {
  body.single-product #middle { padding-top: 14px !important; }
  body.single-product #content { padding-top: 0 !important; }
  body.single-product .summary .salis-review-link { margin-top: 10px !important; }
}
