/* KS-PRODUCT-TRUST-V1 — visible trust + rating + legal block, scoped to product page */

/* === Rating widget (Trusted Shops) === */
.ks-rating-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 13px;
  color: #78350f;
  text-decoration: none !important;
  transition: all .15s ease;
}
.ks-rating-widget:hover {
  border-color: #facc15;
  box-shadow: 0 2px 6px rgba(202, 138, 4, .15);
  transform: translateY(-1px);
}
.ks-rw-stars {
  position: relative;
  display: inline-block;
  width: 88px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 16'%3E%3Cg fill='%23e5e7eb'%3E%3Cpath d='M8 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L8 11.5l-3.9 2.1.8-4.4L1.6 6.1l4.5-.6z'/%3E%3Cpath d='M26 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L26 11.5l-3.9 2.1.8-4.4-3.3-3.1 4.5-.6z'/%3E%3Cpath d='M44 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L44 11.5l-3.9 2.1.8-4.4-3.3-3.1 4.5-.6z'/%3E%3Cpath d='M62 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L62 11.5l-3.9 2.1.8-4.4-3.3-3.1 4.5-.6z'/%3E%3Cpath d='M80 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L80 11.5l-3.9 2.1.8-4.4-3.3-3.1 4.5-.6z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
}
.ks-rw-star-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 16'%3E%3Cg fill='%23facc15'%3E%3Cpath d='M8 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L8 11.5l-3.9 2.1.8-4.4L1.6 6.1l4.5-.6z'/%3E%3Cpath d='M26 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L26 11.5l-3.9 2.1.8-4.4-3.3-3.1 4.5-.6z'/%3E%3Cpath d='M44 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L44 11.5l-3.9 2.1.8-4.4-3.3-3.1 4.5-.6z'/%3E%3Cpath d='M62 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L62 11.5l-3.9 2.1.8-4.4-3.3-3.1 4.5-.6z'/%3E%3Cpath d='M80 1.5l1.9 4 4.4.6-3.2 3.1.7 4.4L80 11.5l-3.9 2.1.8-4.4-3.3-3.1 4.5-.6z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
}
.ks-rw-score strong { font-weight: 700; font-size: 14px; }
.ks-rw-label { color: #92400e; font-size: 12px; }
.ks-rw-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: #fbbf24;
  color: #78350f;
  font-weight: 700;
  font-size: 11px;
  border-radius: 4px;
  letter-spacing: .02em;
}

/* === Legal/portal trust strip (cert + direct download) === */
.ks-legal-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  border: 1px solid #99f6e4;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
}
.ks-ls-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #0f172a;
  text-decoration: none !important;
}
.ks-ls-item svg { flex-shrink: 0; margin-top: 2px; }
.ks-ls-item strong { color: #0f766e; font-weight: 600; }
.ks-ls-item:hover strong { text-decoration: underline; }

/* === Sibling-version comparison strip === */
.ks-version-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.ks-vs-label {
  flex: 1 0 100%;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  margin-bottom: 4px;
}
.ks-vs-item {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12.5px;
  color: #0f172a;
  text-decoration: none !important;
  transition: all .15s;
  flex: 1 1 auto;
  min-width: 110px;
}
.ks-vs-item:hover {
  border-color: hsl(230 80% 56%);
  box-shadow: 0 2px 6px rgba(99, 102, 241, .15);
  color: hsl(230 80% 56%);
}
.ks-vs-item--current {
  background: linear-gradient(135deg, hsl(230 80% 96%), hsl(230 80% 92%));
  border-color: hsl(230 80% 76%);
  color: hsl(230 80% 36%);
  font-weight: 600;
  cursor: default;
  pointer-events: none;
}
.ks-vs-item .ks-vs-name { font-weight: 600; line-height: 1.2; }
.ks-vs-item .ks-vs-price { font-size: 11.5px; color: #64748b; margin-top: 2px; }
.ks-vs-item--current .ks-vs-price { color: hsl(230 80% 56%); }

/* === Mobile === */
@media (max-width: 767px) {
  .ks-rating-widget { width: 100%; flex-wrap: wrap; }
  .ks-rw-badge { margin-left: 0; }
  .ks-legal-strip { font-size: 12px; }
  .ks-vs-item { flex: 1 1 calc(50% - 4px); min-width: 0; }
}

/* === Dark mode === */
@media (prefers-color-scheme: dark) {
  .ks-rating-widget {
    background: linear-gradient(135deg, hsl(40 30% 12%) 0%, hsl(38 30% 14%) 100%);
    border-color: hsl(38 40% 22%);
    color: hsl(40 80% 80%);
  }
  .ks-rw-label { color: hsl(38 60% 65%); }
  .ks-legal-strip {
    background: linear-gradient(135deg, hsl(170 30% 10%), hsl(180 30% 12%));
    border-color: hsl(170 30% 24%);
  }
  .ks-ls-item { color: hsl(180 20% 88%); }
  .ks-ls-item strong { color: hsl(170 60% 60%); }
  .ks-version-strip { background: hsl(217 33% 12%); border-color: hsl(217 33% 18%); }
  .ks-vs-item { background: hsl(217 33% 16%); border-color: hsl(217 33% 22%); color: hsl(210 30% 86%); }
  .ks-vs-item--current { background: linear-gradient(135deg, hsl(230 50% 22%), hsl(230 50% 26%)); border-color: hsl(230 60% 50%); color: hsl(230 90% 78%); }
  .ks-vs-item .ks-vs-price { color: hsl(215 16% 62%); }
}

/* === KS-FAB-OVERLAP-FIX: keep back-to-top + chat above sticky cart === */
.ks-back-to-top,
.ks-chat-fab,
.tawk-min-container,
#ks-chat-root .ks-chat-bubble,
[id^="livechat-compact-container"] {
  bottom: 88px !important;
}
@media (max-width: 767px) {
  .ks-back-to-top,
  .ks-chat-fab,
  .tawk-min-container,
  #ks-chat-root .ks-chat-bubble,
  [id^="livechat-compact-container"] {
    bottom: 78px !important;
    right: 12px !important;
    left: auto !important;
  }
}

/* === KS-THUMB-ACTIVE-V1: stronger active state on product thumbnails === */
.product-thumbnails .thumb-container.selected,
.product-thumbnails .thumb-container .thumb.selected,
.product-thumbnails li.selected img,
.thumb-container.active img,
.product-images li.selected,
.product-images .selected img {
  outline: 2px solid hsl(230 80% 56%) !important;
  outline-offset: -1px !important;
  box-shadow: 0 0 0 1px hsl(230 80% 56%), 0 4px 12px rgba(99, 102, 241, .15) !important;
  border-radius: 8px !important;
}

/* === KS-PRICE-DOMINANT-V1: make price the visual anchor === */
.product-prices,
.product-price,
.current-price {
  margin: 14px 0 6px !important;
}
.product-prices .current-price-value,
.product-price .current-price-value,
.current-price .current-price-value,
.current-price > span:first-child {
  font-size: 2.4rem !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  color: hsl(230 80% 36%) !important;
  letter-spacing: -.02em !important;
  display: inline-block;
}
.product-discount .regular-price,
.product-prices .regular-price {
  font-size: 1rem !important;
  color: #94a3b8 !important;
  text-decoration: line-through !important;
  margin-right: 8px !important;
}
.product-prices .discount-percentage,
.product-prices .discount,
.product-prices .discount-amount {
  display: inline-flex !important;
  align-items: center !important;
  margin-left: 8px !important;
  padding: 4px 10px !important;
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: .8125rem !important;
  border-radius: 999px !important;
  vertical-align: middle !important;
}
.tax-shipping-delivery-label {
  font-size: .75rem !important;
  color: #94a3b8 !important;
  margin-top: 4px !important;
}
@media (max-width: 767px) {
  .product-prices .current-price-value,
  .product-price .current-price-value,
  .current-price > span:first-child {
    font-size: 2rem !important;
  }
}

/* === KS-STICKY-OVERLAP-FIX: prevent sticky bar covering content === */
body.product, body[class*=product], #product main {
  padding-bottom: 96px !important;
}
@media (max-width: 767px) {
  body.product, body[class*=product], #product main {
    padding-bottom: 80px !important;
  }
}

/* === KS-BREADCRUMB-CLEAN-V1: kill duplicate separators === */
.breadcrumb ol,
nav.breadcrumb ol,
.ks-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  margin: 0;
  padding: 12px 0;
  list-style: none;
}
.breadcrumb ol li,
nav.breadcrumb ol li,
.ks-breadcrumb ol li {
  display: inline-flex;
  align-items: center;
}
.breadcrumb ol li meta,
nav.breadcrumb ol li meta {
  display: none !important;
}
/* Hide stray text-only  /  separators after breadcrumb anchors when wrap-orphaned */
.breadcrumb ol li > br,
.breadcrumb ol li::after,
nav.breadcrumb ol li::after {
  content: none !important;
}
.breadcrumb-sep {
  color: #94a3b8 !important;
  font-size: 14px !important;
  margin: 0 4px !important;
}
