/* KluczeSoft v8 — CRO Phase 2 (2026-04-03) */

/* ─── MOBILE PRODUCT PAGE — Price+CTA above fold ─── */
@media (max-width: 768px) {
  /* Stack image full-width, then buybox */
  .product-container .pdp-col-image {
    padding: 0 !important;
    margin-bottom: 0;
  }
  .product-container .pdp-col-buybox {
    padding: 0 12px;
  }
  /* Product title smaller on mobile */
  #product h1.h1 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 8px;
  }
  /* Price bigger + prominent on mobile */
  .product-prices .current-price .current-price-value {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
  }
  /* Trust badges: 2-col grid on mobile */
  .ks-trust-badges {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
  }
  .ks-trust-badge {
    font-size: 11px !important;
    padding: 6px 8px !important;
  }
  .ks-trust-badge .ks-trust-badge-pills {
    display: none; /* hide payment icons on mobile to save space */
  }
  /* Features list: more compact on mobile */
  .ks-buybox-features {
    font-size: 12px;
    margin: 8px 0;
    padding: 8px 12px;
  }
  .ks-buybox-features li {
    padding: 3px 0;
  }
  /* Hide tab navigation on mobile, show as accordions */
  .pdp-tabs-wrapper .nav-tabs {
    flex-direction: column;
    border-bottom: none;
  }
  .pdp-tabs-wrapper .nav-link {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 4px;
    padding: 12px 16px;
    font-weight: 600;
  }
  .pdp-tabs-wrapper .tab-pane {
    padding: 12px 0;
  }
}

/* ─── CHECKOUT — Company field toggle ─── */
.ks-company-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 14px;
  color: #2081f2;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.15s;
}
.ks-company-toggle:hover { opacity: 0.8; }
.ks-company-toggle svg { flex-shrink: 0; }
.ks-company-fields {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.ks-company-fields.open {
  max-height: 300px;
  opacity: 1;
}

/* ─── CHECKOUT — Coupon field collapse ─── */
.ks-coupon-toggle {
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ks-coupon-toggle:hover { color: #2081f2; }
.ks-coupon-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.ks-coupon-wrapper.open {
  max-height: 120px;
}

/* ─── CHECKOUT — Mobile sticky order summary ─── */
@media (max-width: 768px) {
  .checkout-step .step-title {
    font-size: 1rem;
    padding: 12px 0;
  }
  /* Make checkout form fields bigger touch targets */
  #checkout input[type="text"],
  #checkout input[type="email"],
  #checkout input[type="tel"],
  #checkout select {
    min-height: 48px;
    font-size: 16px; /* prevents iOS zoom */
    padding: 10px 14px;
    border-radius: 8px;
  }
  /* Payment method labels bigger */
  .payment-option label {
    min-height: 48px;
    padding: 12px;
    display: flex;
    align-items: center;
  }
}

/* ─── PRODUCT FAQ Accordion ─── */
.ks-faq-section {
  margin: 24px 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 24px;
}
.ks-faq-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #0f172a;
}
.ks-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.ks-faq-item:hover { border-color: #cbd5e1; }
.ks-faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
  background: #f8fafc;
  user-select: none;
}
.ks-faq-question:hover { background: #f1f5f9; }
.ks-faq-question .ks-faq-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}
.ks-faq-item.open .ks-faq-chevron {
  transform: rotate(180deg);
}
.ks-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  padding: 0 16px;
}
.ks-faq-item.open .ks-faq-answer {
  max-height: 500px;
  padding: 0 16px 16px;
}

/* ─── PRICE ANCHORING — Retail price strikethrough ─── */
.ks-retail-price {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 2px;
}
.ks-retail-price del {
  color: #94a3b8;
}
.ks-retail-price .ks-save-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}

/* ─── EMPTY CART RECOVERY ─── */
.ks-cart-recovery {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e2e8f0;
}
.ks-cart-recovery h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #0f172a;
}
.ks-cart-recovery .products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
@media (max-width: 768px) {
  .ks-cart-recovery .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ─── CATEGORY — Quick add button ─── */
.ks-product-card .ks-quick-add {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #f97316;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
  z-index: 5;
}
.ks-product-card:hover .ks-quick-add {
  opacity: 1;
  transform: scale(1);
}
@media (max-width: 768px) {
  /* Always show on mobile (no hover) */
  .ks-product-card .ks-quick-add {
    opacity: 1;
    transform: scale(1);
  }
}

/* ─── HEADER TRUST STRIP ─── */
.ks-header-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 4px 0;
  font-size: 11px;
  color: #94a3b8;
  background: #0c1526;
  border-bottom: 1px solid #1e293b;
}
.ks-header-trust .ks-ht-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ks-header-trust svg { width: 12px; height: 12px; stroke: #22c55e; fill: none; stroke-width: 2; }
@media (max-width: 768px) {
  .ks-header-trust {
    gap: 12px;
    font-size: 10px;
    padding: 3px 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .ks-header-trust .ks-ht-item:nth-child(n+4) { display: none; }
}

/* ─── CART PAGE — Cross-sell section ─── */
.ks-cart-crosssell {
  margin-top: 24px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.ks-cart-crosssell h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}
/* ─── v8.1: MOBILE FOOTER — Collapse columns by default ─── */
@media (max-width: 767px) {
  .ks-footer-grid {
    gap: 0 !important;
  }
  .ks-footer-col:not(:first-child) .ks-footer-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin: 0;
    padding: 0;
  }
  .ks-footer-col.is-open .ks-footer-links {
    max-height: 400px;
    margin-bottom: 8px;
  }
  .ks-footer-col:not(:first-child) .ks-footer-heading {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    margin: 0;
    border-bottom: 1px solid #1e293b;
    font-size: 14px;
  }
  .ks-footer-col:not(:first-child) .ks-footer-heading::after {
    content: "+";
    font-size: 18px;
    font-weight: 300;
    color: #64748b;
    transition: transform 0.2s;
  }
  .ks-footer-col.is-open .ks-footer-heading::after {
    content: "−";
  }
  /* Brand column compact on mobile */
  .ks-footer-col:first-child {
    padding-bottom: 16px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 4px;
  }
  .ks-footer-desc {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }
  .ks-footer-contact li {
    padding: 4px 0 !important;
    font-size: 13px;
  }
  .ks-footer-badges {
    margin-top: 8px;
    gap: 6px !important;
  }
  .ks-footer-badge {
    font-size: 10px !important;
    padding: 4px 8px !important;
  }
  /* Bottom bar compact */
  .ks-footer-bottom {
    padding: 12px 16px !important;
  }
  .ks-footer-legal {
    font-size: 10px !important;
    text-align: center;
  }
  .ks-footer-legal span {
    display: block;
    margin-bottom: 4px;
  }
  .ks-footer-payments {
    justify-content: center !important;
    margin-top: 8px;
  }
  .ks-payment-icons-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px !important;
  }
  .ks-pay-badge {
    font-size: 9px !important;
    padding: 3px 6px !important;
  }
  .ks-footer-disclaimer {
    font-size: 9px !important;
    text-align: center;
    margin-top: 8px !important;
  }
}

/* ─── v8.1: MOBILE PRODUCT PAGE — Tighter spacing ─── */
@media (max-width: 768px) {
  /* Reduce excessive whitespace between sections */
  #product .product-accessories {
    padding: 16px 0;
  }
  #product .product-accessories .h5 {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  /* Tighter tabs */
  .pdp-tabs-wrapper {
    margin-top: 16px;
  }
  /* Reviews section compact */
  .product-reviews-section {
    padding: 16px 0;
  }
  /* Social proof strip compact */
  .ks-social-proof {
    padding: 8px 10px;
    font-size: 12px;
    gap: 8px;
  }
}

/* ─── v8.1: MOBILE HOMEPAGE — Tighter sections ─── */
@media (max-width: 768px) {
  .ks-hero {
    padding: 12px 0 20px !important;
  }
  .ks-cats {
    padding: 12px 0 !important;
  }
  /* Bestseller grid on mobile */
  .ks-bestsellers .products {
    gap: 8px;
  }
}

/* ─── v8.1: TABLET (768-1024) ─── */
@media (min-width: 768px) and (max-width: 1024px) {
  .ks-footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
  .product-container .pdp-col-image,
  .product-container .pdp-col-buybox {
    padding: 0 12px;
  }
}

/* ─── v8.2: LOGIN/AUTH PAGE — Mobile fixes ─── */
@media (max-width: 768px) {
  /* Login form card — dark theme consistency */
  #login-form .form-group,
  #login-form .form-control,
  .login-form .form-group,
  .login-form .form-control,
  [id*="login"] .form-control {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    min-height: 48px;
    font-size: 16px !important; /* prevents iOS zoom */
    padding: 12px 16px;
  }
  /* Login card background */
  .page-authentication .card,
  #content .login-form,
  .page-authentication .form-fields {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 12px;
    padding: 20px 16px;
  }
  /* Labels left-aligned */
  .page-authentication label,
  #login-form label {
    text-align: left !important;
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 6px;
  }
  /* Password show button */
  .input-group-btn .btn,
  [data-action="show-password"] {
    background: #334155 !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
    border-radius: 0 8px 8px 0 !important;
    min-height: 48px;
    padding: 8px 12px;
  }
  /* Login button */
  #submit-login,
  .page-authentication .btn-primary {
    min-height: 48px;
    font-size: 16px;
    border-radius: 10px;
  }
  /* Forgot password link */
  .forgot-password a,
  .no-account a {
    color: #f97316 !important;
  }
}

/* ─── v8.2: STICKY CART BAR — Only show on product pages ─── */
@media (max-width: 768px) {
  /* Hide sticky cart bar on non-product pages */
  body:not(#product) .ks-sticky-cart {
    display: none !important;
  }
  /* Also hide the "z VAT" / "Do koszyka" bar on login, cart, checkout */
  .page-authentication .ks-sticky-cart,
  .page-cart .ks-sticky-cart,
  #checkout .ks-sticky-cart {
    display: none !important;
  }
}

/* ─── v8.2: CART PAGE — Mobile improvements ─── */
@media (max-width: 768px) {
  /* Cart item row — more readable */
  .cart-item .product-line-info {
    font-size: 13px;
  }
  .cart-item .product-price {
    font-size: 16px;
    font-weight: 700;
  }
  /* Cart summary card */
  .cart-summary {
    border-radius: 12px;
    margin-top: 16px;
  }
  /* Checkout button bigger */
  .cart-detailed-actions .btn-primary {
    min-height: 52px;
    font-size: 16px;
    border-radius: 10px;
    width: 100%;
  }
  /* Coupon input */
  .block-promo input {
    min-height: 44px;
    font-size: 16px;
    border-radius: 8px;
  }
}

/* ─── v8.2: CHECKOUT PAGE — Mobile improvements ─── */
@media (max-width: 768px) {
  /* Step headings */
  .checkout-step .step-title {
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
  }
  /* Form labels */
  #checkout label {
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
  }
  /* Order summary in sidebar — sticky on mobile */
  .cart-grid-right {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 12px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    margin: 0 -15px;
    width: calc(100% + 30px);
  }
  /* Make checkout trust badges visible */
  #checkout .blockreassurance {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
  }
  #checkout .block-reassurance-item {
    flex: 1;
    min-width: 100px;
    font-size: 11px;
    padding: 6px 8px;
    text-align: center;
  }
}

/* ─── v8.2: MY ACCOUNT / AUTH — Desktop dark theme consistency ─── */
.page-authentication .card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
}
.page-authentication .form-control {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
}
.page-authentication .form-control::placeholder {
  color: #64748b;
}
.page-authentication .form-control:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}

/* ─── v8.2b: Hide empty sticky bar on non-product pages ─── */
body#authentication .ks-sticky-bar,
body#cart .ks-sticky-bar,
body#checkout .ks-sticky-bar,
body#my-account .ks-sticky-bar,
body#order-detail .ks-sticky-bar,
body#order-confirmation .ks-sticky-bar,
body#contact .ks-sticky-bar,
body#cms .ks-sticky-bar,
body#pagenotfound .ks-sticky-bar,
body#module-ybc_blog-blog .ks-sticky-bar {
  display: none !important;
}
/* Also hide reassurance strip floating on non-product pages */
body:not(#product) .blockreassurance_product {
  display: none !important;
}

/* ─── FIX: Blog pages — hide sticky product bar ─── */
.page-cms .ks-sticky-bar,
body[class*="controller-blog"] .ks-sticky-bar,
.blog-post .ks-sticky-bar {
  display: none !important;
}

/* ─── FIX: Blog text contrast — WCAG AA compliance ─── */
.post_content, .blog_content, .ybc-blog-wrapper .post_content p,
.ybc-blog-wrapper .post_content li,
.ybc-blog-wrapper .post_content td {
  color: #1a1a1a !important;
}
.ybc-blog-wrapper .post_content h2,
.ybc-blog-wrapper .post_content h3,
.ybc-blog-wrapper .post_content h4 {
  color: #0f172a !important;
}

/* ─── FIX: Blog mobile tables — horizontal scroll ─── */
@media (max-width: 767px) {
  .post_content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
  }
  .post_content table td,
  .post_content table th {
    white-space: normal;
    min-width: 120px;
  }
}

/* ─── FIX: Empty cart — stronger CTA button ─── */
.cart-empty a[href*="kategori"],
.cart-empty a[href*="window"],
.cart-empty .ks-browse-link,
a.continue-shopping {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.cart-empty a[href*="kategori"]:hover,
.cart-empty a[href*="window"]:hover,
.cart-empty .ks-browse-link:hover,
a.continue-shopping:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59,130,246,0.4);
}

/* ─── FIX: Checkout CRO — company toggle + coupon collapse ─── */
.ks-company-section.ks-collapsed {
  display: none;
}
.ks-company-toggle, .ks-coupon-toggle {
  cursor: pointer;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ks-company-toggle:hover, .ks-coupon-toggle:hover {
  color: #2563eb;
  text-decoration: underline;
}
.ks-coupon-wrapper.ks-collapsed {
  display: none;
}

/* ─── FIX: "Polecane produkty" box — safe emoji fallback ─── */
.ks-recommended-box .ks-box-title::before {
  content: "★ ";
  color: #f59e0b;
}

/* ─── Empty Cart Recovery Grid ─── */
.ks-recovery-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  text-align: center;
}
.ks-recovery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 767px) {
  .ks-recovery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
.ks-recovery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
  background: #fff;
}
.ks-recovery-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59,130,246,0.15);
  transform: translateY(-2px);
}
.ks-recovery-card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 10px;
}
.ks-recovery-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ks-recovery-info strong {
  font-size: 13px;
  line-height: 1.3;
  color: #1e293b;
}
.ks-recovery-price {
  font-size: 18px;
  font-weight: 700;
  color: #3b82f6;
}
.ks-recovery-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f0fdf4;
  color: #16a34a;
}

/* ─── FIX: Checkout company fields — force visible when section open ─── */
.ks-company-section:not(.ks-collapsed) .form-group,
.ks-company-section:not(.ks-collapsed) .ets-opc-field,
.ks-company-section:not(.ks-collapsed) [class*="form-group"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.ks-company-section:not(.ks-collapsed) input[name*="company"],
.ks-company-section:not(.ks-collapsed) input[name*="vat_number"] {
  display: block !important;
}

/* ─── FIX: Search autocomplete — show prices ─── */
.searchbar-autocomplete .autocomplete-price {
  display: block;
  font-weight: 700;
  color: #3b82f6;
  font-size: 14px;
  margin-top: 2px;
}
.searchbar-autocomplete .ui-menu-item a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 12px !important;
}
.searchbar-autocomplete .autocomplete-thumbnail {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain;
  flex-shrink: 0;
}
.searchbar-autocomplete .autocomplete-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.searchbar-autocomplete .product {
  font-size: 13px;
  line-height: 1.3;
  white-space: normal !important;
}

/* ─── OPTIMIZATION: Order confirmation page ─── */
/* Cross-sell on confirmation — "Co dalej?" section */
.ks-confirmation-upsell {
  margin: 24px 0;
  padding: 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(99,102,241,0.05));
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 12px;
}
.ks-confirmation-upsell h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1e293b;
}
.ks-confirmation-upsell .ks-recovery-grid {
  grid-template-columns: repeat(3, 1fr);
  max-width: 700px;
}
@media (max-width: 767px) {
  .ks-confirmation-upsell .ks-recovery-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── OPTIMIZATION: Checkout form UX ─── */
/* Payment options spacing */
.ets_onepagecheckout .payment-option,
.ets_onepagecheckout [class*="payment-method"] {
  margin-bottom: 8px;
}
/* Error messages styling */
.ets_onepagecheckout .alert-danger {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  border: 1px solid rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.05);
}

/* ─── OPTIMIZATION: Cart page ─── */
/* Urgency message stronger */
.ks-urgency-msg {
  text-align: center;
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 8px;
  font-size: 14px;
  color: #166534;
  font-weight: 500;
}
.ks-urgency-msg strong {
  display: block;
  font-size: 15px;
}

/* ─── v9: FIX — Star rating overlap in buybox ─── */
/* ETS Reviews positions .list-in-productlist absolutely for category cards;
   override to static inside the buybox container so it doesn't overlap breadcrumb */
.ks-buybox-rating-summary .product-list-reviews.list-in-productlist,
#ks-buybox-stars .product-list-reviews.list-in-productlist {
  position: static !important;
  top: auto !important;
  margin-bottom: 8px;
  justify-content: flex-start !important;
}
.ks-buybox-rating-summary .product-list-reviews,
#ks-buybox-stars .product-list-reviews {
  position: static !important;
  top: auto !important;
}
/* Ensure star count text is visible */
.ks-buybox-rating-summary .ets-rv-comments-nb {
  color: #64748b !important;
  font-size: 13px;
}

/* ─── v9: FIX — BLIK/P24 pill backgrounds (missing variant classes) ─── */
.ks-trust-badge-pills .ks-pill {
  background: #94a3b8;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.4;
}
.ks-trust-badge-pills .ks-pill-blik,
.ks-trust-badge-pills .ks-pill:nth-child(3) {
  background: #e6007a;
}
.ks-trust-badge-pills .ks-pill-p24,
.ks-trust-badge-pills .ks-pill:nth-child(4) {
  background: #d42127;
}

/* ─── v9: FIX — Payment icons as CSS badges (replacing broken CDN images) ─── */
.ks-pay-icon-visa,
.ks-pay-icon-mc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  vertical-align: middle;
}
.ks-pay-icon-visa {
  background: #1a1f71;
  color: #fff;
}
.ks-pay-icon-mc {
  background: linear-gradient(135deg, #eb001b 0%, #f79e1b 100%);
  color: #fff;
}

/* ─── v9: FIX — Trust badges alignment on desktop ─── */
.ks-trust-badges .ks-trust-badge {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.ks-trust-badge-pills {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: 4px !important;
}
.ks-trust-badge .ks-inline-icon-sm {
  flex-shrink: 0;
}

/* ─── v9: FIX — Hide broken <img> payment icons (replaced with CSS badges) ─── */
.ks-trust-badge-pills > img[src*="nicepay-dev"],
.ks-trust-badge-pills > img[src*="payment-icon"] {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════ */
/* EDITORIAL BLOG STYLING v10 — readable, professional       */
/* ═══════════════════════════════════════════════════════════ */

/* Blog content area — force readable text on any background */
.post_content,
.ybc-blog-wrapper .post_content,
#ybc-blog-content .post_content {
  color: #1e293b !important;
  font-size: 1.05rem !important;
  line-height: 1.8 !important;
  max-width: 780px;
}

/* Force white/light background on blog content area */
.ybc-blog-wrapper .ybc_item_content,
.ybc-blog-wrapper .ybc_blog_post_detail,
#ybc-blog-content {
  background: #fff !important;
  padding: 2rem 2.5rem !important;
  border-radius: 12px;
}

/* Headings — bold, dark, with spacing */
.post_content h2 {
  color: #0f172a !important;
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  margin: 2.5rem 0 1rem !important;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.post_content h3 {
  color: #1e293b !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin: 2rem 0 0.75rem !important;
}

.post_content h4 {
  color: #334155 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  margin: 1.5rem 0 0.5rem !important;
}

/* Paragraphs — proper spacing */
.post_content p {
  color: #1e293b !important;
  margin-bottom: 1.2rem !important;
  line-height: 1.8 !important;
}

/* Lists — indented, spaced */
.post_content ul, .post_content ol {
  color: #1e293b !important;
  padding-left: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}
.post_content li {
  color: #1e293b !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.7 !important;
}

/* Tables — editorial style with zebra striping */
.post_content table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5rem 0 2rem !important;
  font-size: 0.93rem !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.post_content table thead tr,
.post_content table tr:first-child {
  background: #0f172a !important;
  color: #f8fafc !important;
}
.post_content table thead th,
.post_content table tr:first-child td,
.post_content table tr:first-child th {
  color: #f8fafc !important;
  font-weight: 600 !important;
  padding: 12px 14px !important;
  text-align: left !important;
}
.post_content table td {
  padding: 10px 14px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}
.post_content table tr:nth-child(even) {
  background: #f8fafc !important;
}
.post_content table tr:hover {
  background: #f0f4ff !important;
}

/* Blockquotes — editorial callouts */
.post_content blockquote {
  border-left: 4px solid #3b82f6 !important;
  background: #f0f4ff !important;
  padding: 1rem 1.5rem !important;
  margin: 1.5rem 0 !important;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #1e293b !important;
}

/* Strong/bold text */
.post_content strong, .post_content b {
  color: #0f172a !important;
  font-weight: 700 !important;
}

/* Links — visible blue */
.post_content a {
  color: #2563eb !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post_content a:hover {
  color: #1d4ed8 !important;
}

/* Code blocks */
.post_content pre, .post_content code {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  padding: 1rem !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  overflow-x: auto;
}
.post_content code {
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 0.88em !important;
}

/* CTA boxes — the product recommendation sections */
.post_content .polecane-produkty,
.post_content div[style*="border-left: 4px solid #0066cc"] {
  background: #f0f4ff !important;
  border: 1px solid #dbeafe !important;
  border-left: 4px solid #2563eb !important;
  border-radius: 8px !important;
  padding: 1.25rem 1.5rem !important;
  margin: 2rem 0 !important;
}

/* Related articles section */
.post_content div[style*="background:#f0f4ff"] {
  border-radius: 8px !important;
  margin-top: 2rem !important;
}

/* FAQ sections — clean accordion look */
.post_content div[itemtype*="FAQPage"] {
  margin-top: 2rem !important;
}
.post_content div[itemtype*="Question"] {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 1rem 1.25rem !important;
  margin-bottom: 0.75rem !important;
}
.post_content div[itemtype*="Question"] h3 {
  color: #0f172a !important;
  font-size: 1.05rem !important;
  margin: 0 0 0.5rem !important;
}

/* Sources footer — subtle */
.post_content p:last-of-type em,
.post_content p em:only-child {
  color: #64748b !important;
  font-size: 0.88rem !important;
}

/* Hero image on blog posts */
.ybc-blog-wrapper .ybc_item_img img,
.ybc-blog-post-image img {
  border-radius: 12px 12px 0 0;
  width: 100%;
  object-fit: cover;
  max-height: 400px;
}

/* Blog post title */
.ybc-blog-wrapper h1,
.ybc_blog_post_detail h1 {
  color: #0f172a !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  margin-bottom: 1rem !important;
}

/* Blog post meta (date, category) */
.ybc-blog-wrapper .ybc_blog_post_meta,
.ybc-blog-wrapper .post_meta {
  color: #64748b !important;
  font-size: 0.88rem !important;
  margin-bottom: 1.5rem !important;
}

/* Mobile responsive */
@media (max-width: 767px) {
  .ybc-blog-wrapper .ybc_item_content,
  .ybc-blog-wrapper .ybc_blog_post_detail,
  #ybc-blog-content {
    padding: 1rem 1.25rem !important;
  }
  .post_content h2 {
    font-size: 1.3rem !important;
  }
  .post_content {
    font-size: 0.98rem !important;
  }
}


/* ═══ BLOG CONTENT FIX — actual class selectors ═══ */
.blog-post-content,
.blog-post-content p,
.blog-post-content li,
.blog-post-content td,
.blog_description p,
.blog_description li,
.blog_description td {
  color: #1e293b !important;
  font-size: 1.05rem !important;
  line-height: 1.8 !important;
}
.blog_description,
.blog-post-content {
  background: #ffffff !important;
  padding: 2rem !important;
  border-radius: 8px;
}
.blog-post-content h2,
.blog_description h2 {
  color: #0f172a !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin: 2.5rem 0 1rem !important;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}
.blog-post-content h3,
.blog_description h3 {
  color: #1e293b !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin: 2rem 0 0.75rem !important;
}
.blog-post-content strong,
.blog_description strong {
  color: #0f172a !important;
}
.blog-post-content a,
.blog_description a {
  color: #2563eb !important;
}
.blog-post-content table thead tr,
.blog-post-content table tr:first-child,
.blog_description table thead tr,
.blog_description table tr:first-child {
  background: #0f172a !important;
}
.blog-post-content table thead th,
.blog-post-content table thead td,
.blog-post-content table tr:first-child th,
.blog-post-content table tr:first-child td,
.blog_description table thead th,
.blog_description table tr:first-child td {
  color: #f8fafc !important;
  font-weight: 600 !important;
  padding: 12px 14px !important;
}
.blog-post-content table td,
.blog_description table td {
  color: #1e293b !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
.blog-post-content table tr:nth-child(even),
.blog_description table tr:nth-child(even) {
  background: #f8fafc !important;
}
.blog-post-content blockquote,
.blog_description blockquote {
  border-left: 4px solid #3b82f6 !important;
  background: #f0f4ff !important;
  padding: 1rem 1.5rem !important;
  margin: 1.5rem 0 !important;
  border-radius: 0 8px 8px 0;
  color: #1e293b !important;
}

/* ═══ ADD TO CART MODAL — clean, focused ═══ */

/* Hide the ETS cross-sell / similar items sections in cart modal */
#blockcart-modal .ets_crosssell_16,
#blockcart-modal .ets-crosssell-wrapper,
.blockcart-modal .ets_crosssell_16,
.blockcart-modal .ets-crosssell-wrapper,
#blockcart-modal .product-recommendations,
.modal-body .ets_crosssell_16 {
  display: none !important;
}

/* Hide 'CZĘSTO KUPOWANE RAZEM' and 'MOŻE CI SIĘ SPODOBAĆ' in modal */
#blockcart-modal h5,
#blockcart-modal .crossselling-title,
#blockcart-modal .frequently-bought-together,
#blockcart-modal .may-also-like,
.blockcart-modal .crossselling-products,
.blockcart-modal .frequently-bought,
#blockcart-modal .ets_cs_container,
.modal .ets_cs_container {
  display: none !important;
}

/* Tighter modal layout */
#blockcart-modal .modal-dialog,
.blockcart-modal .modal-dialog {
  max-width: 520px !important;
  margin: 2rem auto !important;
}

#blockcart-modal .modal-body,
.blockcart-modal .modal-body {
  padding: 1.5rem !important;
}

/* Product info in modal — cleaner */
#blockcart-modal .product-name,
.blockcart-modal .product-name {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}

#blockcart-modal .product-price,
.blockcart-modal .product-price {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #2563eb !important;
}

/* Cart summary in modal */
#blockcart-modal .cart-content p,
.blockcart-modal .cart-content p {
  font-size: 0.95rem !important;
  color: #334155 !important;
  margin-bottom: 0.4rem !important;
}

/* Total line — prominent */
#blockcart-modal .cart-content .cart-content-total,
.blockcart-modal .cart-content .product-total {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* CTA buttons — full width, proper spacing */
#blockcart-modal .cart-content-btn,
.blockcart-modal .cart-content-btn {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  margin-top: 1.25rem !important;
}

#blockcart-modal .cart-content-btn .btn,
.blockcart-modal .cart-content-btn .btn {
  width: 100% !important;
  padding: 14px 20px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  text-align: center !important;
  text-transform: none !important;
}

/* Continue shopping — outlined */
#blockcart-modal .cart-content-btn .btn-secondary,
.blockcart-modal .cart-content-btn .btn-secondary,
#blockcart-modal .cart-content-btn button[data-dismiss],
.blockcart-modal .cart-content-btn .btn:not(.btn-primary) {
  background: transparent !important;
  border: 2px solid #e2e8f0 !important;
  color: #334155 !important;
}

/* Checkout — strong orange CTA */
#blockcart-modal .cart-content-btn .btn-primary,
.blockcart-modal .cart-content-btn .btn-primary,
#blockcart-modal .cart-content-btn a[href*=zamow],
#blockcart-modal .cart-content-btn a[href*=koszyk] {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(249,115,22,0.3) !important;
}

/* Success checkmark header */
#blockcart-modal .modal-header,
.blockcart-modal .modal-header {
  background: #f0fdf4 !important;
  border-bottom: 1px solid #bbf7d0 !important;
  padding: 1rem 1.5rem !important;
}

#blockcart-modal .modal-header .modal-title,
.blockcart-modal .modal-header .modal-title {
  color: #166534 !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
}

/* Close button */
#blockcart-modal .modal-header .close,
.blockcart-modal .modal-header .close {
  font-size: 1.5rem !important;
  color: #64748b !important;
  opacity: 1 !important;
}

/* Cart badge in modal header */
#blockcart-modal .cart-products-count,
.blockcart-modal .cart-products-count {
  background: #2563eb !important;
  color: #fff !important;
  padding: 2px 8px !important;
  border-radius: 12px !important;
  font-size: 0.85rem !important;
}

/* ═══ CART MODAL — hide ETS cross-sell (actual selectors) ═══ */
#blockcart-modal .ets_crosssell_block,
.modal .ets_crosssell_block,
#blockcart-modal .ets_crosssell_added_popup_page,
.modal .ets_crosssell_added_popup_page {
  display: none !important;
}
