.cart-launcher,
.chat-launcher {
  position: fixed;
  z-index: 35;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 8px 15px 8px 9px;
  color: var(--paper);
  cursor: pointer;
  background: var(--night);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  box-shadow: 0 15px 35px rgba(9, 18, 34, .2);
  font-size: 11px;
  font-weight: 700;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.cart-launcher {
  left: 24px;
}

.chat-launcher {
  right: 24px;
  gap: 10px;
  padding-right: 13px;
  background: var(--coral);
  border-color: rgba(255, 255, 255, .38);
}

.cart-launcher:hover,
.cart-launcher:focus-visible,
.chat-launcher:hover,
.chat-launcher:focus-visible {
  background: var(--ink);
  box-shadow: 0 18px 40px rgba(9, 18, 34, .28);
  transform: translateY(-3px);
}

.chat-launcher:hover,
.chat-launcher:focus-visible {
  background: var(--coral);
}

.commerce-icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--night);
  background: var(--warm);
  border-radius: 50%;
}

.chat-icon {
  color: var(--paper);
  background: rgba(255, 255, 255, .18);
  font-size: 16px;
}

.cart-icon {
  position: relative;
  width: 17px;
  height: 17px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 3px 3px 7px 7px;
}

.cart-icon::before {
  position: absolute;
  top: -6px;
  left: 3px;
  width: 8px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  content: "";
}

.cart-icon::after {
  position: absolute;
  right: -2px;
  bottom: -4px;
  left: -2px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 0 0 0 transparent;
  content: "";
}

.cart-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  margin-left: 3px;
  padding: 0 5px;
  place-items: center;
  color: var(--night);
  background: var(--warm);
  border-radius: 999px;
  font-size: 10px;
}

.cart-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  visibility: hidden;
  background: rgba(9, 18, 34, .52);
  opacity: 0;
  transition: visibility .3s ease, opacity .3s ease;
}

.cart-backdrop.is-visible {
  visibility: visible;
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  visibility: hidden;
  width: min(430px, 100%);
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  box-shadow: -20px 0 55px rgba(9, 18, 34, .16);
  transform: translateX(105%);
  transition: visibility .35s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
}

.cart-drawer.is-open {
  visibility: visible;
  transform: translateX(0);
}

.drawer-header,
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 28px 28px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-kicker {
  margin: 0 0 5px;
  color: var(--coral);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.drawer-header h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
}

.drawer-close {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 23px;
  font-weight: 300;
  line-height: 1;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.drawer-close:hover,
.drawer-close:focus-visible {
  color: var(--coral);
  border-color: var(--coral);
  transform: rotate(8deg);
}

.cart-items {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 22px 28px;
  overscroll-behavior: contain;
}

.cart-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.cart-item-visual {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--paper);
  background: linear-gradient(135deg, var(--coral), var(--warm-deep));
  border-radius: 12px;
  font-size: 18px;
}

.cart-item-details {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cart-item-details strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-details span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.cart-item-button,
.cart-quantity {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
}

.cart-item-button {
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.cart-item-button:hover,
.cart-item-button:focus-visible {
  color: var(--coral);
  border-color: var(--coral);
}

.cart-item-button.remove {
  margin-left: 4px;
  color: var(--muted);
  border-color: transparent;
  background: transparent;
}

.cart-quantity {
  border-color: transparent;
  font-size: 11px;
  font-weight: 700;
}

.cart-empty {
  display: grid;
  flex: 1 1 auto;
  align-content: center;
  justify-items: center;
  padding: 40px 28px;
  text-align: center;
}

.cart-empty[hidden],
.cart-summary[hidden],
.cart-count[hidden] {
  display: none;
}

.empty-orbit {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: var(--coral);
  border: 1px solid rgba(226, 140, 120, .55);
  border-radius: 50%;
  box-shadow: 0 0 0 13px rgba(226, 140, 120, .07), 0 0 0 26px rgba(226, 140, 120, .035);
  font-size: 25px;
}

.cart-empty h3 {
  margin: 27px 0 7px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -.03em;
}

.cart-empty p {
  max-width: 230px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.drawer-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 24px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid currentColor;
}

.cart-summary {
  flex: 0 0 auto;
  padding: 21px 28px 27px;
  background: var(--cream);
  border-top: 1px solid var(--line);
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 11px;
}

.summary-row strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.03em;
}

.checkout-button {
  width: 100%;
  border: 0;
}

.checkout-button:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
}

.cart-summary p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.product-note {
  margin: 20px 0 12px;
  color: var(--coral);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.add-to-cart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  color: var(--night);
  cursor: pointer;
  background: var(--warm);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.add-to-cart:hover,
.add-to-cart:focus-visible {
  color: var(--paper);
  background: var(--night);
  transform: translateY(-2px);
}

.add-to-cart span {
  font-size: 18px;
  font-weight: 400;
  line-height: .7;
}

.chat-launcher-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.chat-launcher-copy strong {
  font-size: 11px;
  font-weight: 700;
}

.chat-launcher-copy small {
  color: rgba(255, 255, 255, .75);
  font-size: 9px;
  font-weight: 400;
}

.chat-status-dot {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  background: #a8e2b1;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(168, 226, 177, .13);
}

.chat-panel {
  position: fixed;
  z-index: 45;
  right: 24px;
  bottom: 92px;
  display: flex;
  visibility: hidden;
  width: min(370px, calc(100vw - 32px));
  height: min(590px, calc(100vh - 125px));
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 22px 55px rgba(9, 18, 34, .2);
  opacity: 0;
  transform: translateY(18px) scale(.97);
  transition: visibility .25s ease, opacity .25s ease, transform .25s ease;
}

.chat-panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chat-header {
  padding: 17px 18px 15px;
  background: var(--night);
  border-bottom: 0;
}

.chat-agent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-avatar {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--night);
  background: var(--warm);
  border-radius: 50%;
  font-size: 16px;
}

.chat-agent div {
  display: grid;
  gap: 1px;
}

.chat-agent strong {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.chat-agent span:not(.agent-avatar) {
  color: rgba(255, 253, 249, .55);
  font-size: 9px;
}

.chat-header .drawer-close {
  color: rgba(255, 253, 249, .7);
  border-color: rgba(255, 255, 255, .2);
}

.chat-header .drawer-close:hover,
.chat-header .drawer-close:focus-visible {
  color: var(--warm);
  border-color: var(--warm);
}

.chat-messages {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  padding: 18px;
  background: #fbfaf7;
  overscroll-behavior: contain;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 91%;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.chat-message p {
  margin: 0;
  padding: 11px 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px 15px 15px 4px;
  white-space: pre-wrap;
}

.chat-message.user {
  align-self: flex-end;
  color: var(--night);
}

.chat-message.user p {
  color: var(--night);
  background: var(--warm);
  border-color: var(--warm);
  border-radius: 15px 15px 4px 15px;
}

.message-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--coral);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 10px;
}

.chat-message:not(.user) .message-avatar {
  margin-bottom: 1px;
}

.typing {
  align-items: center;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 13px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px 15px 15px 4px;
}

.typing-dots i {
  display: block;
  width: 4px;
  height: 4px;
  background: var(--coral);
  border-radius: 50%;
  animation: typing-dot 1s ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: .15s;
}

.typing-dots i:nth-child(3) {
  animation-delay: .3s;
}

.chat-suggestions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px 3px;
  background: #fbfaf7;
  scrollbar-width: none;
}

.chat-suggestions::-webkit-scrollbar {
  display: none;
}

.chat-suggestions button {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--coral);
  cursor: pointer;
  background: var(--paper);
  border: 1px solid rgba(226, 140, 120, .35);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  transition: color .2s ease, background .2s ease;
}

.chat-suggestions button:hover,
.chat-suggestions button:focus-visible {
  color: var(--night);
  background: var(--warm);
}

.chat-form {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  padding: 10px 13px 7px;
  background: #fbfaf7;
}

.chat-form input {
  min-width: 0;
  flex: 1;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  font-family: var(--sans);
  font-size: 11px;
}

.chat-form input:focus-visible {
  border-color: var(--coral);
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(226, 140, 120, .1);
}

.chat-form button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--night);
  cursor: pointer;
  background: var(--warm);
  border: 0;
  border-radius: 50%;
  font-size: 19px;
  line-height: 1;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.chat-form button:hover,
.chat-form button:focus-visible {
  color: var(--paper);
  background: var(--coral);
  transform: translateY(-2px);
}

.chat-form button:disabled {
  cursor: wait;
  opacity: .5;
  transform: none;
}

.chat-disclaimer {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 15px 12px;
  color: var(--muted);
  background: #fbfaf7;
  font-size: 8px;
  line-height: 1.35;
  text-align: center;
}

.cart-toast {
  position: fixed;
  z-index: 80;
  bottom: 88px;
  left: 50%;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 15px;
  color: var(--paper);
  pointer-events: none;
  background: var(--night);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(9, 18, 34, .2);
  font-size: 11px;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity .25s ease, transform .25s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.cart-open {
  overflow: hidden;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

@keyframes typing-dot {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 760px) {
  .cart-launcher,
  .chat-launcher {
    bottom: 14px;
    min-height: 48px;
  }

  .cart-launcher {
    left: 14px;
    padding-right: 10px;
  }

  .chat-launcher {
    right: 14px;
  }

  .chat-panel {
    right: 14px;
    bottom: 76px;
    width: calc(100vw - 28px);
    height: min(590px, calc(100vh - 96px));
  }

  .cart-drawer {
    width: 100%;
  }

  .drawer-header,
  .cart-items,
  .cart-summary {
    padding-right: 20px;
    padding-left: 20px;
  }

  .cart-toast {
    bottom: 76px;
  }
}

@media (max-width: 480px) {
  .cart-launcher {
    padding-right: 8px;
  }

  .cart-launcher > span:nth-child(2) {
    display: none;
  }

  .chat-launcher {
    padding-right: 9px;
  }

  .chat-launcher-copy {
    display: none;
  }

  .chat-launcher .commerce-icon {
    width: 32px;
    height: 32px;
  }

  .chat-status-dot {
    margin-left: 0;
  }

  .cart-item {
    grid-template-columns: 37px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px;
  }

  .cart-item-visual {
    width: 37px;
    height: 37px;
  }

  .cart-item-details strong {
    font-size: 13px;
  }

  .cart-item-actions {
    gap: 1px;
  }

  .cart-item-button,
  .cart-quantity {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .cart-item-button.remove {
    margin-left: 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart-drawer,
  .cart-backdrop,
  .chat-panel,
  .cart-toast,
  .cart-launcher,
  .chat-launcher {
    transition: none;
  }
}
