/* 5STAR AI EVERYWHERE + PRODUCT TYPOGRAPHY v5.
 * Display-only adjustments. Product descriptions, structured data, SEO fields,
 * schema, images, shipping and payment behavior are unchanged.
 */

/* Product page: force compact paragraphs even when pasted HTML contains font/size spans. */
body.fss-global-themed.single-product .woocommerce div.product :is(
  .woocommerce-product-details__short-description,
  .woocommerce-Tabs-panel--description,
  #tab-description,
  .woocommerce-product-details__description
) {
  font-size: 12px !important;
  line-height: 1.48 !important;
  letter-spacing: normal !important;
  overflow-wrap: anywhere;
}
body.fss-global-themed.single-product .woocommerce div.product :is(
  .woocommerce-product-details__short-description,
  .woocommerce-Tabs-panel--description,
  #tab-description,
  .woocommerce-product-details__description
) :is(p, span, div, font, li, b, strong, em, i, a, small, blockquote, td, th) {
  font-size: 12px !important;
  line-height: 1.48 !important;
  letter-spacing: normal !important;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body.fss-global-themed.single-product .woocommerce div.product :is(
  .woocommerce-product-details__short-description,
  .woocommerce-Tabs-panel--description,
  #tab-description
) :is(h1, h2, h3, h4, h5, h6) {
  font-size: 14px !important;
  line-height: 1.28 !important;
  letter-spacing: normal !important;
  margin-block: 10px 4px !important;
}
body.fss-global-themed.single-product .woocommerce div.product :is(
  .woocommerce-product-details__short-description,
  .woocommerce-Tabs-panel--description,
  #tab-description
) :is(p, ul, ol) {
  margin-block: 0 7px !important;
}
body.fss-global-themed.single-product .woocommerce div.product :is(
  .woocommerce-product-details__short-description,
  .woocommerce-Tabs-panel--description,
  #tab-description
) :is(ul, ol) {
  padding-inline-start: 19px !important;
}
/* Keep product page purchase buttons, prices and main title at readable size. */

/* Archive listings: clamp actual description excerpts to two smaller lines. */
body.fss-global-themed .woocommerce ul.products li.product :is(
  .ast-woo-product-description,
  .ast-woo-shop-product-description,
  .product-description,
  .short-description,
  .product-excerpt,
  .excerpt,
  .wc-block-components-product-summary
),
body.fss-global-themed .wc-block-grid__product :is(.wc-block-grid__product-description,.wc-block-components-product-summary),
body.fss-global-themed .wp-block-woocommerce-product-template li :is(.wp-block-post-excerpt,.wc-block-components-product-summary) {
  font-size: 10.5px !important;
  line-height: 1.35 !important;
  max-height: 2.70em !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  margin-block: 3px 5px !important;
}
body.fss-global-themed .woocommerce ul.products li.product :is(
  .ast-woo-product-description,
  .ast-woo-shop-product-description,
  .product-description,
  .short-description,
  .product-excerpt,
  .excerpt
) :is(p,span,div,font,li,small),
body.fss-global-themed .wc-block-grid__product :is(.wc-block-grid__product-description,.wc-block-components-product-summary) :is(p,span,div,font),
body.fss-global-themed .wp-block-woocommerce-product-template li .wp-block-post-excerpt :is(p,span,div,font) {
  font-size: 10.5px !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}

/* Existing assistant widget from homepage: visible, click-safe and readable on inner pages. */
body.fss-global-themed #fss-chat-widget.fss-chat {
  position: fixed !important;
  z-index: 2147481000 !important;
  right: 18px !important;
  bottom: 18px !important;
  width: auto !important;
  max-width: calc(100vw - 24px) !important;
  height: auto !important;
  overflow: visible !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  font-family: Arial, Helvetica, sans-serif;
}
body.fss-global-themed #fss-chat-widget .fss-chat-toggle {
  display: inline-flex !important;
  align-items: center !important;
  background: linear-gradient(120deg,#ff254d,#b9002a 52%,#043e96) !important;
  color: white !important;
  border: 1px solid #ff93a7 !important;
  box-shadow: 0 6px 22px #071d4a66 !important;
  border-radius: 999px !important;
  padding: 11px 16px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  cursor: pointer !important;
}
body.fss-global-themed #fss-chat-widget .fss-chat-panel {
  position: absolute !important;
  right: 0 !important;
  bottom: 58px !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(370px, calc(100vw - 25px)) !important;
  height: min(520px, calc(100dvh - 115px)) !important;
  background: #fff !important;
  color: #152744 !important;
  border: 1px solid #8baedb !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 45px #03142d80 !important;
  overflow: hidden !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.fss-global-themed #fss-chat-widget .fss-chat-panel[hidden] { display: none !important; }
body.fss-global-themed #fss-chat-widget .fss-chat-head {display:flex;align-items:center;gap:10px;background:linear-gradient(90deg,#07173a,#0b3d80);padding:12px;color:white}
body.fss-global-themed #fss-chat-widget .fss-chat-messages {display:flex;flex:1;min-height:0;overflow-y:auto;flex-direction:column;gap:9px;padding:10px;background:#f3f6fc}
body.fss-global-themed #fss-chat-widget .fss-chat-msg {font-size:12px!important;line-height:1.42!important;white-space:pre-wrap;overflow-wrap:anywhere}
body.fss-global-themed #fss-chat-widget .fss-chat-quick {display:flex;flex-wrap:wrap;gap:5px;padding:7px 10px}
body.fss-global-themed #fss-chat-widget .fss-chat-quick button {font-size:10px!important;padding:6px 8px!important;border:1px solid #a5bbd7!important;background:white!important;color:#15396b!important;border-radius:99px!important}
body.fss-global-themed #fss-chat-widget #fss-chat-form {display:flex;gap:6px;padding:0 8px;margin:0;min-height:36px}
body.fss-global-themed #fss-chat-widget #fss-chat-input {flex:1;min-width:0;width:auto;background:white;color:#182942;font-size:12px!important;padding:7px!important;border:1px solid #b8c7db;border-radius:6px}
body.fss-global-themed #fss-chat-widget #fss-chat-send {background:#ce1430!important;color:#fff!important;border-radius:6px;border:0!important;padding:4px 12px!important;font-size:13px!important}
body.fss-global-themed #fss-chat-widget .fss-chat-disclaimer {padding:6px 9px 9px;font-size:10px;color:#53647b}
body.fss-global-themed #fss-chat-widget .fss-visually-hidden {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:600px) {
  body.fss-global-themed #fss-chat-widget.fss-chat {right:10px!important;bottom:10px!important}
  body.fss-global-themed #fss-chat-widget .fss-chat-toggle {padding:10px 12px!important;font-size:11px!important}
  body.fss-global-themed #fss-chat-widget .fss-chat-panel {bottom:53px!important;width:calc(100vw - 20px)!important;max-height:calc(100dvh - 105px)!important}
}
