/* v2.5: final layout authority — must load after theme-facing widget styles. */
.hwsa {
  left: auto !important;
  right: var(--hwsa-right, 20px) !important;
  top: auto !important;
  bottom: var(--hwsa-bottom, 82px) !important;
  margin-top: 0;
  transform: none !important;
  z-index: 390 !important;
  isolation: isolate;
}

.hwsa-panel {
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: fixed !important;
  left: auto !important;
  right: var(--hwsa-right, 20px) !important;
  top: auto !important;
  bottom: calc(var(--hwsa-bottom, 82px) + var(--hwsa-height, 50px) + 12px) !important;
  max-height: calc(var(--hwsa-vv-height, 100dvh) - var(--hwsa-bottom, 82px) - var(--hwsa-height, 50px) - 32px) !important;
  z-index: 2147483000 !important;
  transform-origin: 100% 100% !important;
}

/* This must override the flex layout above: hidden is the single source of truth. */
.hwsa-panel[hidden] {
  display: none !important;
}

.hwsa-panel.opening { animation: hwsa-in-left .28s cubic-bezier(.22,.61,.36,1); }
@keyframes hwsa-in-left {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hwsa-header {
  flex: 0 0 72px !important;
  min-height: 72px !important;
}

.hwsa-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  box-sizing: border-box !important;
}

.hwsa-view,
#hwsa-flow-content,
.hwsa-search,
.hwsa-compare-list,
.hwsa-sticky-action,
.hwsa-product-card,
.hwsa-product-main { min-width: 0; max-width: 100%; }

.hwsa-view[data-view="flow"],
#hwsa-flow-content { overflow-x: hidden !important; }

.hwsa-search,
.hwsa-search input,
.hwsa-composer,
.hwsa-composer textarea { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }

.hwsa-search { display: block; overflow: hidden; }
.hwsa-search input {
  display: block;
  height: 44px;
  padding: 0 15px;
  border-radius: 999px;
}

/* Keep the compare search inside the dialog even when the active theme styles inputs. */
.hwsa-panel .hwsa-view[data-view="flow"],
.hwsa-panel #hwsa-flow-content {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.hwsa-panel .hwsa-search,
.hwsa-panel .hwsa-search input {
  display: block !important;
  box-sizing: border-box !important;
  inline-size: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.hwsa-panel .hwsa-search { overflow: hidden !important; }

.hwsa-compare-item { grid-template-columns: 54px minmax(0, 1fr) 24px; gap: 8px; width: 100%; min-width: 0; max-width: 100%; min-height: 68px; overflow: hidden; justify-content: start; justify-items: start; }
.hwsa-compare-item img,
.hwsa-compare-item .hwsa-product-placeholder {
  display: block;
  width: 54px !important;
  height: 54px !important;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.hwsa-compare-item strong { display: -webkit-box; white-space: normal; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.hwsa-compare-item > span { width: 100%; text-align: left; align-items: flex-start; }
.hwsa-product-main img { flex: 0 0 68px; align-self: center; }
.hwsa-product-main > div,
.hwsa-product-main h4,
.hwsa-product-main p { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

.hwsa-compare-list { overflow: hidden; }

/* Scheme C — graphite selection state: quiet catalogue, unmistakable choice. */
.hwsa-compare-list {
  display: grid;
  gap: 8px;
}

.hwsa-compare-item {
  padding: 7px !important;
  border: 1px solid #e4e6e7 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #111315 !important;
  box-shadow: none !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease !important;
}

.hwsa-compare-item:hover {
  border-color: #aeb4b8 !important;
  transform: translateY(-1px);
}

.hwsa-compare-item img,
.hwsa-compare-item .hwsa-product-placeholder {
  border: 1px solid #eff0f1;
  border-radius: 7px;
  background: #fff;
}

.hwsa-compare-item i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #687078;
  font-size: 17px;
  line-height: 1;
  transition: background-color .16s ease, color .16s ease;
}

.hwsa-compare-item.is-selected {
  border-color: #111315 !important;
  background: #111315 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.hwsa-compare-item.is-selected strong { color: #fff !important; }
.hwsa-compare-item.is-selected img,
.hwsa-compare-item.is-selected .hwsa-product-placeholder { border-color: rgba(255,255,255,.16); }
.hwsa-compare-item.is-selected i { background: #f4c900; color: #111315; font-size: 12px; font-weight: 800; }

.hwsa-compare-item:focus-visible {
  outline: 2px solid #f4c900;
  outline-offset: 2px;
}
.hwsa-sticky-action {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 8px 0 0;
  padding: 12px 0 2px;
  background: #fff;
}

.hwsa-composer {
  flex: 0 0 auto !important;
  min-height: 62px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  grid-template-columns: minmax(0, 1fr) 44px;
}

.hwsa-composer textarea {
  box-sizing: border-box !important;
  min-height: 42px !important;
  height: 42px !important;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  line-height: 20px !important;
  overflow: hidden !important;
}

.hwsa-composer .hwsa-send {
  align-self: center;
  justify-self: end;
  flex: 0 0 44px;
}

.hwsa-icon,
.hwsa-icon svg {
  color: #111315 !important;
}

.hwsa-more svg,
.hwsa-more svg circle {
  fill: #111315 !important;
  stroke: none !important;
}

.hwsa-close svg,
.hwsa-close svg path {
  fill: none !important;
  stroke: #111315 !important;
}

.hwsa-header-actions .hwsa-icon {
  background: transparent !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.hwsa-header-actions .hwsa-icon:hover,
.hwsa-header-actions .hwsa-icon:focus-visible {
  background: transparent !important;
  color: #fff !important;
}

.hwsa-header-actions .hwsa-more svg,
.hwsa-header-actions .hwsa-more svg circle {
  fill: #fff !important;
}

.hwsa-header-actions .hwsa-close svg,
.hwsa-header-actions .hwsa-close svg path {
  stroke: #fff !important;
}

.hwsa-message-time {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  line-height: 1;
  opacity: .58;
}

.hwsa-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.hwsa-new-chat-popover .hwsa-confirm-actions button {
  width: auto;
}

.hwsa-new-chat-popover .hwsa-confirm-actions .hwsa-secondary {
  border: 1px solid #d8dcde;
  background: #fff;
  color: #111315;
}

.hwsa-header {
  position: relative !important;
  padding-right: 82px !important;
}

.hwsa-header-actions {
  position: absolute !important;
  z-index: 40 !important;
  top: 50% !important;
  right: 10px !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(-50%) !important;
}

.hwsa-header-actions .hwsa-icon {
  display: grid !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.hwsa-header-actions .hwsa-close { z-index: 41 !important; }

.hwsa-header-actions .hwsa-icon svg {
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  overflow: visible !important;
}

.hwsa[data-state="open"] .hwsa-launcher,
.hwsa.is-open .hwsa-launcher {
  display: none !important;
}

/* Live WooCommerce result cards: calm, compact, and fully clickable. */
.hwsa-product-card-link {
  display: block !important;
  max-width: 100%;
  color: #111315 !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.hwsa-product-card-link:hover {
  border-color: #aeb4b8;
  box-shadow: 0 8px 18px rgba(17, 19, 21, .07);
  transform: translateY(-1px);
}

.hwsa-four-specs {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.hwsa-four-specs span {
  min-width: 0;
  overflow: hidden;
}

.hwsa-four-specs b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hwsa-product-link-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 12px 12px;
  padding: 9px 0 1px;
  border-top: 1px solid #e2e5e7;
  color: #111315;
  font-size: 11px;
  font-weight: 700;
}

.hwsa-product-link-cta b { font-size: 14px; line-height: 1; }
.hwsa-product-result-intro { margin: 0 0 8px; font-size: 12px; color: #687078; }
.hwsa-product-purpose { display: block; margin-top: 4px; color: #687078; font-size: 10px; line-height: 1.35; }
.hwsa-product-stock { display: block; margin-top: 5px; color: #8a5d00; font-size: 10px; font-weight: 700; }
.hwsa-product-stock.is-available { color: #47753a; }
.hwsa-support-link { display: inline-block; margin-top: 8px; font-weight: 700; }

.hwsa-fallback-copy { margin: 7px 0 0; }
.hwsa-fallback-actions { display: grid; gap: 7px; margin-top: 12px; }
.hwsa-fallback-actions button,
.hwsa-fallback-actions a {
  min-height: 34px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8dcde;
  border-radius: 8px;
  background: #fff;
  color: #111315;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.hwsa-fallback-actions button::before,
.hwsa-fallback-actions a::before { color: #f4c900; margin-right: 6px; }
.hwsa-fallback-actions button[data-action="guide"]::before { content: '◆'; }
.hwsa-fallback-actions button[data-action="compare"]::before { content: '◆'; }
.hwsa-fallback-actions a[href*="wa.me"]::before { content: '●'; }
.hwsa-fallback-actions a:not([href*="wa.me"])::before { content: '■'; }
.hwsa-fallback-actions button:hover,
.hwsa-fallback-actions a:hover { border-color: #111315; }

.hwsa-support-footer {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #dfe2e4;
  color: #687078;
  font-size: 11px;
  line-height: 1.45;
}

.hwsa-support-footer strong { color: #111315; font-size: 11px; }

@media (max-width: 640px) {
  .hwsa-panel {
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(388px, calc(100dvw - 24px)) !important;
    height: min(620px, calc(var(--hwsa-vv-height, 100dvh) - 164px)) !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    transform: translate(-50%, -50%) !important;
    transform-origin: 50% 50% !important;
    border-radius: 18px !important;
  }

  .hwsa-panel.opening {
    animation: hwsa-mobile-fade-in .22s cubic-bezier(.22, .61, .36, 1) both !important;
  }

  .hwsa-header {
    flex-basis: 68px !important;
    min-height: 68px !important;
  }

  .hwsa-composer {
    min-height: 62px !important;
    padding: 9px 10px 10px !important;
  }

  .hwsa-four-specs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hwsa-four-specs span:nth-child(2) { border-right: 0; }
  .hwsa-four-specs span:nth-child(-n + 2) { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #e2e5e7; }
}

@keyframes hwsa-mobile-fade-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@media (prefers-reduced-motion: reduce) {
  .hwsa-panel.opening { animation: none !important; }
}

/* ---- Launcher: layout and style taken from the site's original WhatsApp button ----
 * Source: honeywhale-home-adapter 1.3.2 (assets/whatsapp.css). Position is synced to the theme's
 * .scrollToTop button by widget.js; these are the same fallbacks the original used. */
:root {
  --hwsa-right: 20px;
  --hwsa-bottom: 82px;
  --hwsa-width: 50px;
  --hwsa-height: 50px;
}

@media (max-width: 768px) {
  :root { --hwsa-bottom: calc(132px + env(safe-area-inset-bottom)); }
}

.hwsa .hwsa-launcher {
  box-sizing: border-box !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: var(--hwsa-width, 50px) !important;
  height: var(--hwsa-height, 50px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #f5c518 !important;
  color: #111315 !important;
  box-shadow: 0 6px 24px #0003 !important;
  text-decoration: none;
}

.hwsa .hwsa-launcher > span {
  width: 100%;
  height: 100%;
  border: 0 !important;
  background: transparent !important;
}

.hwsa .hwsa-launcher svg { width: 56% !important; height: 56%; }
.hwsa .hwsa-launcher > span i { display: none !important; }
.hwsa .hwsa-launcher:focus-visible { outline: 3px solid #f5c518; outline-offset: 4px; }

/* The assistant takes the place of the site's floating WhatsApp button.
 * widget.js also detects and hides any other fixed WhatsApp button by its link. */
body.hwsa-replace-wa .hw-whatsapp-float,
body.hwsa-replace-wa .joinchat,
body.hwsa-replace-wa #joinchat,
body.hwsa-replace-wa #ht-ctc-chat,
body.hwsa-replace-wa .ht-ctc,
body.hwsa-replace-wa .wa__btn_popup,
body.hwsa-replace-wa #wa-widget,
body.hwsa-replace-wa .whatsapp-float,
body.hwsa-replace-wa .whatsapp-button,
body.hwsa-replace-wa .whatsapp-chat,
body.hwsa-replace-wa .floating-whatsapp,
body.hwsa-replace-wa .qlwapp,
body.hwsa-replace-wa #qlwapp,
body.hwsa-replace-wa .chaty-widget,
body.hwsa-replace-wa #chaty-widget-0 {
  display: none !important;
}

/* The panel is moved to <body> by widget.js, outside .hwsa, so it must set its own box model
 * instead of relying on the theme's global border-box rule. */
.hwsa-panel,
.hwsa-panel *,
.hwsa-panel *::before,
.hwsa-panel *::after {
  box-sizing: border-box;
}

/* Brand yellow distinguishes the assistant from a direct WhatsApp link. */
.hwsa:not(.is-ready) { display:none !important; }
.hwsa .hwsa-launcher svg { width:64% !important; height:64%; stroke-width:1.8; stroke-linejoin:round; }
.hwsa-launcher .hwsa-icon-spark { fill:#111315; stroke:#f5c518; stroke-width:1.2; }
.hwsa-faq-choices {display:grid;gap:10px;margin-top:12px;}
.hwsa-faq-choices button {text-align:left;line-height:1.5;text-transform:none;letter-spacing:normal;}
.hwsa-faq-answer {margin-top:8px;overflow-wrap:anywhere;}
.hwsa-faq-answer p {margin:0 0 8px;}
.hwsa-faq-answer ul,.hwsa-faq-answer ol {padding-left:20px;}
.hwsa-panel button:focus-visible,.hwsa-panel a:focus-visible {outline:2px solid #b58b00;outline-offset:3px;}

/* Small transparent mascot, sized for the 50px launcher on high-density screens. */
.hwsa .hwsa-launcher .hwsa-launcher-whale {display:block;width:40px;height:auto;max-width:none;object-fit:contain;} 
