/* 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;
    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;
}


/* === Product page buybox — consolidated (2026-04-06) === */

/* Availability row: stock + delivery side by side */
.ks-availability-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .75rem 0; }
.ks-stock-badge { display: inline-flex; align-items: center; gap: .375rem; padding: .375rem .75rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; border: 1px solid #d1fae5; background: #ecfdf5; color: #047857; }
.ks-delivery-badge { display: inline-flex; align-items: center; gap: .375rem; padding: .375rem .75rem; border-radius: 999px; font-size: .8125rem; font-weight: 500; border: 1px solid #fed7aa; background: #fff7ed; color: #c2410c; }

/* Product title */
.ks-product-title { font-size: 1.5rem; font-weight: 700; color: #0f172a; margin: 0 0 .5rem; line-height: 1.3; }

/* Price spacing */
.product-prices { margin-bottom: .25rem; }
.product-prices .current-price-value { font-size: 1.75rem; font-weight: 800; color: #f97316; }
.product-prices .tax-shipping-delivery-label { font-size: .8rem; color: #94a3b8; margin-top: .125rem; }

/* Rating inline */
.ets-rv-product-comments-additional-info { margin: .375rem 0; }
.ets-rv-product-comments-additional-info .comments-note { display: flex; align-items: center; gap: .375rem; font-size: .875rem; }

/* Features grid */
.ks-buybox-features { list-style: none; padding: 0; margin: .75rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; font-size: .8125rem; }
.ks-buybox-features li { display: flex; gap: .25rem; padding: .3rem 0; border-bottom: 1px solid #f1f5f9; }
.ks-bf-label { color: #64748b; white-space: nowrap; }
.ks-bf-value { color: #0f172a; font-weight: 600; }
.ks-buybox-divider { height: 1px; background: #e2e8f0; margin: .75rem 0; }

/* CTA area */
.product-actions { margin-top: .5rem; }

/* Trust badges — desktop: single row flex */
.ks-trust-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; padding-top: .75rem; border-top: 1px solid #e2e8f0; }
.ks-trust-badge { display: flex; align-items: center; gap: .375rem; font-size: .8125rem; color: #475569; font-weight: 500; white-space: nowrap; }
.ks-trust-badge-pills { display: inline-flex; gap: .25rem; align-items: center; }
.ks-pay-icon-visa, .ks-pay-icon-mc { display: inline-flex; align-items: center; justify-content: center; padding: .125rem .375rem; border-radius: .25rem; font-size: .625rem; font-weight: 700; color: #fff; line-height: 1; }
.ks-pay-icon-visa { background: #1a1f71; }
.ks-pay-icon-mc { background: #eb001b; }
.ks-pill { display: inline-flex; align-items: center; padding: .125rem .375rem; border-radius: .25rem; font-size: .625rem; font-weight: 600; background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; line-height: 1; }
.ks-inline-icon-sm { width: 18px; height: 18px; opacity: .7; flex-shrink: 0; }

/* Social proof */
.ks-social-proof { margin-top: .625rem; font-size: .8125rem; color: #475569; line-height: 1.7; }
.ks-social-proof strong { color: #0f172a; }

/* Header row3 — tighten gap with breadcrumb */
.breadcrumb { margin-top: .25rem; margin-bottom: .5rem; }

@media (max-width: 767px) {
  .ks-product-title { font-size: 1.25rem; }
  .ks-buybox-features { grid-template-columns: 1fr; }
  .ks-trust-badges { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .ks-trust-badge-pills { display: none; }
}

/* ─── FIX (2026-04-06): Mobile hero — prevent overflow on bundle card + social proof ─── */
@media (max-width: 768px) {
  .ks-hero-inner {
    gap: 24px !important;
    padding: 0 16px !important;
  }
  .ks-bundle-card {
    padding: 20px !important;
    border-radius: 16px !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .ks-bundle-products {
    gap: 10px !important;
    flex-wrap: wrap;
  }
  .ks-bundle-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    border-radius: 12px !important;
  }
  .ks-bundle-icon svg {
    width: 28px !important;
    height: 28px !important;
  }
  .ks-bundle-price {
    font-size: 1.75rem !important;
  }
  .ks-bundle-cta {
    padding: 12px !important;
    font-size: 0.875rem !important;
  }
  .ks-bundle-name {
    font-size: 0.8125rem !important;
  }
  .ks-bundle-name small {
    font-size: 0.75rem !important;
  }
  /* Social proof — keep on one line, prevent orphaned text */
  .ks-hero-social {
    flex-wrap: nowrap !important;
    gap: 8px !important;
    font-size: 0.8125rem !important;
    overflow: hidden;
  }
  .ks-hero-social p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ks-hero-avatars span {
    width: 24px !important;
    height: 24px !important;
    font-size: 9px !important;
  }
  /* Chips — 2-col grid on small screens */
  .ks-hero-chips {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
  }
  .ks-hero-chip {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
    min-height: 38px !important;
  }
}

/* ─── FIX (2026-04-06): "Jak to dziala" — ensure step 2 visible on small mobile ─── */
@media (max-width: 640px) {
  .ks-process-inner {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }
  .ks-proc-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: left !important;
    padding: 10px 16px !important;
    background: #F8FAFC;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
  }
  .ks-proc-num {
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }
  .ks-proc-line {
    display: none !important;
  }
}

/* ─── FIX (2026-04-06): Sticky ATC bar — mobile product pages ─── */
.ks-sticky-cart {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.ks-sticky-cart.visible {
  transform: translateY(0);
}
.ks-sticky-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #F97316;
  white-space: nowrap;
}
.ks-sticky-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #FB923C, #F97316, #EA580C);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(249,115,22,0.3);
  white-space: nowrap;
  transition: all 0.2s;
}
.ks-sticky-btn:active {
  transform: scale(0.97);
}
/* Back to top button */
.ks-back-to-top {
  position: fixed;
  bottom: 70px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.ks-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.ks-back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: #475569;
}
/* Hide on desktop */
@media (min-width: 769px) {
  .ks-sticky-cart,
  .ks-back-to-top {
    display: none !important;
  }
}

/* === Trust grid — clean 2x2 (2026-04-06 final) === */
.ks-trust-grid{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-top:1rem;padding-top:.75rem;border-top:1px solid #e2e8f0}
.ks-tg-item{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:#475569;font-weight:500}
.ks-tg-item img,.ks-tg-item svg{flex-shrink:0;opacity:.6}
@media(max-width:767px){.ks-trust-grid{grid-template-columns:1fr 1fr;gap:.375rem}.ks-tg-item{font-size:.75rem}}
