/* ==========================================================================
   Sparklegen – extra styles for the menu, search and filter overlays.
   The main design lives in style.css (generated from the design system).
   ========================================================================== */
.sg-overlay[hidden] { display: none !important; }
.sg-overlay { opacity: 0; transition: opacity .3s ease; }
.sg-overlay.is-open { opacity: 1; }

.sg-drawer { transform: translateX(100%); transition: transform .4s cubic-bezier(.22,.8,.3,1); }
.sg-overlay.is-open .sg-drawer { transform: none; }

.sg-drop { transform: translateY(-24px); transition: transform .35s cubic-bezier(.22,.8,.3,1); }
.sg-overlay.is-open .sg-drop { transform: none; }

.sg-sheet { transform: translateY(100%); transition: transform .38s cubic-bezier(.22,.8,.3,1); }
.sg-overlay.is-open .sg-sheet { transform: none; }

[data-grid][hidden], [data-grid] > li[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .sg-overlay, .sg-drawer, .sg-drop, .sg-sheet { transition: none; }
}

/* ==========================================================================
   Chat assistant ("Need help choosing?")
   ========================================================================== */
.sg-chat {
  --navy: #17223B; --ivory: #FFF6E8; --paper: #F5E6CF; --line: #E3CFA9; --emerald: #295C45; --honey: #C88A2C; --mulberry: #5A2032;
  position: fixed; z-index: 90; right: 20px; bottom: 20px;
  width: 400px; height: min(660px, calc(100dvh - 40px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--ivory); border-radius: 22px;
  box-shadow: 0 30px 70px -20px rgba(23,34,59,.55), 0 0 0 1px rgba(23,34,59,.06);
  opacity: 0; transform: translateY(16px) scale(.98); transform-origin: bottom right;
  transition: opacity .28s ease, transform .35s cubic-bezier(.22,.8,.3,1);
  font-family: var(--font-sans);
}
.sg-chat[hidden] { display: none; }
.sg-chat.is-open { opacity: 1; transform: none; }
.sg-chat-open [data-wa-float] { opacity: 0 !important; pointer-events: none; }
@media (max-width: 640px) {
  .sg-chat { inset: 0; width: auto; height: 100dvh; border-radius: 0; }
  .sg-chat-open { overflow: hidden; }
}

.sg-chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; background: var(--navy); color: var(--ivory); }
.sg-chat__avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; background: var(--ivory); flex: none; }
.sg-chat__avatar img { width: 26px; height: auto; }
.sg-chat__title { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.sg-chat__title strong { font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.sg-chat__title small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,246,232,.7); margin-top: 3px; }
.sg-chat__title i { width: 7px; height: 7px; border-radius: 99px; background: #5FD08A; }
.sg-chat__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; color: var(--ivory); }
.sg-chat__icon:hover { background: rgba(255,255,255,.1); }

.sg-chat__body { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth;
  background-image: radial-gradient(rgba(200,138,44,.12) 1px, transparent 1px); background-size: 18px 18px; }
.sg-msg { max-width: 86%; padding: 10px 14px; font-size: 14.5px; line-height: 1.5; border-radius: 16px; }
.sg-msg--bot { align-self: flex-start; background: #fff; color: #27211E; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.sg-msg--bot a { color: var(--emerald); font-weight: 700; text-decoration: underline; }
.sg-msg--user { align-self: flex-end; background: var(--navy); color: var(--ivory); border-bottom-right-radius: 6px; }
.sg-in { animation: sg-pop .45s cubic-bezier(.22,.8,.3,1) both; }
@keyframes sg-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sg-card { align-self: stretch; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 6px; }
.sg-group { border-bottom: 1px solid var(--paper); }
.sg-group:last-child { border-bottom: 0; }
.sg-group summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; cursor: pointer; list-style: none;
  font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); }
.sg-group summary::-webkit-details-marker { display: none; }
.sg-group summary::after { content: "+"; font-size: 18px; color: var(--honey); font-weight: 500; letter-spacing: 0; margin-left: 8px; }
.sg-group[open] summary::after { content: "–"; }
.sg-group summary em { margin-left: auto; font-style: normal; font-size: 11px; letter-spacing: .04em; text-transform: none; color: var(--emerald); }
.sg-group ul { padding: 0 4px 8px; }
.sg-item { border-radius: 12px; padding: 2px 6px; transition: background .2s; }
.sg-item.is-on { background: #FBF3E4; }
.sg-item label { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 14.5px; color: #27211E; }
.sg-item input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--emerald); flex: none; }
.sg-item__opts { display: none; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 0 10px 31px; }
.sg-item.is-on .sg-item__opts { display: flex; }
.sg-sizes { display: flex; gap: 6px; }
.sg-sizes button { min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; color: var(--navy); }
.sg-sizes button[aria-checked=true] { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.sg-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; }
.sg-qty button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 99px; color: var(--navy); }
.sg-qty button:hover { background: var(--paper); }
.sg-qty output { min-width: 22px; text-align: center; font-weight: 800; font-size: 14px; color: var(--navy); }
.sg-bulk { flex: 1; min-width: 180px; min-height: 38px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 14px; background: #fff; }
.sg-bulk:focus { outline: none; border-color: var(--navy); }

.sg-summary { padding: 14px 16px; font-size: 14px; }
.sg-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.sg-summary dt { color: #6B5E55; font-weight: 600; }
.sg-summary dd { color: var(--navy); font-weight: 700; word-break: break-word; }
.sg-summary__label { margin: 12px 0 4px; color: #6B5E55; font-weight: 600; }
.sg-summary ul { margin: 0 0 12px; padding-left: 18px; list-style: disc; color: var(--navy); font-weight: 600; }

.sg-chat__foot { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ivory); display: flex; flex-direction: column; gap: 10px; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-chips--stack { flex-direction: column; }
.sg-chip { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font-weight: 700; font-size: 14px; text-align: left; transition: all .2s; }
.sg-chips--stack .sg-chip { border-radius: 14px; }
.sg-chip:hover { background: var(--navy); color: var(--ivory); }
.sg-input { display: flex; align-items: center; gap: 8px; }
.sg-input input { flex: 1; min-width: 0; min-height: 48px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; padding: 0 18px; font-size: 15px; color: #27211E; }
.sg-input input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(200,138,44,.25); }
.sg-send { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 99px; background: var(--emerald); color: #fff; flex: none; }
.sg-send:hover { background: #1F4A37; }
.sg-row { display: flex; align-items: center; gap: 10px; }
.sg-row--links { justify-content: space-between; }
.sg-grow { flex: 1; }
.sg-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border-radius: 99px; font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.sg-back:hover { background: var(--paper); }
.sg-skip { align-self: center; font-size: 13.5px; font-weight: 700; color: #6B5E55; text-decoration: underline; min-height: 32px; }
.sg-error { color: #A23B3B; font-size: 13px; padding-left: 8px; }
@media (prefers-reduced-motion: reduce) { .sg-chat, .sg-in { transition: none; animation: none; } }
