/* Figma P01 / P05. Scope shared catalogue card markup to the chat rail. */
#chat[data-chat-shell] .chatProductCart {
  position:absolute;top:0;right:8px;display:flex;align-items:center;justify-content:center;
  min-width:44px;height:44px;gap:4px;color:#2b1421;text-decoration:none;font:600 12px/16px Manrope,sans-serif;
}
.chatProductCart img {width:22px;height:22px}
#chat[data-chat-shell] .chatProducts {
  display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;
  margin:12px -16px;padding:0 16px 8px;
}
#chat .chatProducts .plpCard {
  flex:0 0 173px;width:173px;min-width:0;margin:0;padding:0;border:0;
  display:block;background:#fff;color:#2b1421;font-family:Manrope,sans-serif;
}
#chat .chatProducts .plpCardMedia {height:132px}
#chat .chatProducts :is(.plpCardImage,.plpCardName) {
  display:block;width:100%;border:0;background:none;color:inherit;margin:0;padding:0;cursor:pointer;
}
#chat .chatProducts .plpCardImage {height:132px;overflow:hidden;border-radius:3px;background:#f5f5f3}
#chat .chatProducts .plpCardImage img {display:block;width:100%;height:100%;object-fit:cover}
#chat .chatProducts .plpCardInfo {display:flex;flex-direction:column;padding:6px 0 0}
#chat .chatProducts :is(.plpCardName,.plpCardPrice) {
  font:600 13px/18px Manrope,sans-serif;text-align:left;overflow-wrap:anywhere;
}
#chat .chatProducts .plpCardName {order:-1;min-height:44px;align-content:start}
#chat .chatProducts .plpCardPrice {order:1;margin:10px 0 0}
#chat .chatProducts :is(.plpCardType,.plpCardUnavailable) {
  margin:0;color:#687783;letter-spacing:normal;text-transform:none;font:400 11px/16px Manrope,sans-serif;
}
#chat .chatProducts .plpCardAction {
  display:block;position:absolute;right:8px;bottom:8px;width:44px;height:44px;
  min-width:44px;margin:0;padding:0;border:0;border-radius:22px;background:#2b1421;
}
#chat .chatProducts .plpCardAction[hidden] {display:none}
#chat .chatProducts .plpCardAction::after {content:none}
#chat .chatProducts .plpCardAction:not(.isAdded) .assetBag.assetDesktop {
  display:block;position:static;width:44px;height:44px;transform:none;
}
#chat .chatProducts .plpCardAction .assetMobile {display:none}
#chat .chatProducts .plpCardAction.isAdded {
  display:flex;align-items:center;justify-content:center;gap:7px;width:99px;color:#faf3eb;
}
#chat .chatProducts .plpCardAction.isAdded .assetBag.assetDesktop {display:block}
#chat .chatProducts .srOnly {
  position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;
}
#chat[data-chat-shell] :is(.chatCardDesktopPrice,.chatCardInCart),
#chat[data-chat-shell] #messages .chatCardDesktopEmpty {display:none}
@media(min-width:761px) {
  #chat[data-chat-shell] .chatProducts > [data-chat-desktop-hidden],
  #chat[data-chat-shell] .chatProducts:not(:has(> .plpCard:not([data-chat-desktop-hidden]))),
  #chat[data-chat-shell] .chatCardMobilePrice {display:none}
  #chat[data-chat-shell] .chatCardDesktopPrice {display:inline}
  #chat[data-chat-shell] #messages .chatCardDesktopEmpty:not([hidden]) {display:table}
  #chat[data-chat-shell] .chatProducts .plpCard {height:auto;min-height:0;overflow:visible}
  #chat[data-chat-shell] .chatCardInCart:not([hidden]) {
    display:grid;place-items:center;min-height:40px;order:2;margin:8px 0 0;
    border-radius:8px;background:#f1f3f4;color:#2b1421;text-align:center;
    font:600 13px/18px Manrope,sans-serif;
  }
}
.chatProductView {
  box-sizing:border-box;width:min(100%, 540px);max-width:100%;max-height:calc(100dvh - 32px);
  border:0;padding:0;border-radius:12px;background:#fff;color:#2b1421;
  font:400 14px/20px Manrope,sans-serif;overscroll-behavior:contain;
}
.chatProductView::backdrop {background:rgb(255 255 255 / 82%)}
.chatProductView [hidden] {display:none!important}
body:has(.chatProductView[open]) #chat[data-chat-shell]::backdrop {background:transparent;backdrop-filter:none}
.chatProductView .chatProductClose {
  position:absolute;top:16px;left:16px;z-index:1;width:44px;height:44px;
  display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:#fff;color:#2b1421;
}
.chatProductClose img {width:23px;height:23px}
.chatProductGalleryFrame {position:relative;flex:none}
.chatProductGallery {
  display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;background:#f5f5f3;
}
.chatProductGallery img {
  display:block;flex:0 0 100%;width:100%;aspect-ratio:390/397;max-height:55dvh;object-fit:cover;scroll-snap-align:start;
}
.chatProductDots {position:absolute;bottom:0;inset-inline:0;display:flex;justify-content:center;pointer-events:none}
.chatProductDots button {width:44px;height:44px;border:0;padding:0;background:none;pointer-events:auto}
.chatProductDots button::before {content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#fff;border:1px solid #2b1421}
.chatProductDots button[aria-current="true"]::before {background:#2b1421;border-color:#fff}
.chatProductDots .chatGalleryArrow,.chatExpandedDots {display:none}
.chatProductDots .chatGalleryArrow::before {content:none}
.chatProductBody {padding:16px}
.chatProductBody h2 {margin:0;font:600 14px/20px Manrope,sans-serif}
.chatProductBody h3 {margin:14px 0 4px;font:600 13px/18px Manrope,sans-serif}
.chatProductBody ul {margin:0;padding-left:18px;color:#687783;font-size:12px;line-height:18px}
.chatProductPrice {margin:4px 0 0;font:600 13px/18px Manrope,sans-serif}
.chatProductStatus {margin:8px 0 0}
.chatProductStatus:empty {display:none}
.chatProductChoice {display:grid;gap:4px;margin-top:12px}
.chatProductChoice select {min-height:44px;width:100%;font:inherit;color:inherit}
.chatProductFooter {position:sticky;bottom:0;margin-top:auto;background:#fff;padding:8px 16px max(12px, env(safe-area-inset-bottom))}
.chatProductFooter .chatProductBuy,.chatProductRetry {
  width:100%;min-height:49px;border:0;border-radius:4px;background:#2b1421;color:#fff;
  font:700 15px/22px Manrope,sans-serif;
}
.chatProductFooter button:disabled {opacity:.55}
.chatProductView:not([data-qv-state="ready"]) .chatProductBody {padding-top:72px}
:is(.chatProductSkeletonPhoto,.chatProductSkeletonText,.chatProductVariantGroups) {display:none}
.chatProductNoPhoto {display:grid;place-items:center;width:100%;aspect-ratio:1;margin:0;color:#7e6c76}
.chatProductComposition {margin-top:12px}
.chatProductComposition summary {cursor:pointer}
@media(max-width:760px) {
  .chatProductView {width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0}
  .chatProductView[open],.chatProductLayout {display:flex;flex-direction:column}
  .chatProductLayout {flex:1 1 auto}
  .chatProductGallery {flex:none}
  .chatProductClose {top:max(16px,env(safe-area-inset-top))}
  :is(.chatProductEyebrow,.chatProductDescription,.chatProductUnit,.chatProductPurchaseNote) {display:none}
}

/* P06: expanded photo is a layer of Quick View, with its own Back entry. */
.chatProductGallery .chatPhotoSurface {
  display:block;flex:0 0 100%;width:100%;padding:0;border:0;background:none;
  scroll-snap-align:start;cursor:zoom-in;
}
.chatProductGallery .chatPhotoSurface img {pointer-events:none}
.chatProductView[data-expanded-photo] {
  height:calc(100dvh - 32px);overflow:hidden;
}
.chatProductView[data-expanded-photo] > :not(.chatExpandedPhoto) {visibility:hidden}
.chatExpandedPhoto {position:absolute;inset:0;overflow:hidden;background:#f5f5f3}
.chatExpandedTrack {
  display:flex;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;
  overscroll-behavior-x:contain;scrollbar-width:none;
}
.chatExpandedSlide {
  flex:0 0 100%;width:100%;height:100%;scroll-snap-align:start;
}
.chatExpandedTrack img {
  display:block;width:100%;height:100%;object-fit:cover;
}
.chatExpandedClose {
  position:absolute;top:max(26px,env(safe-area-inset-top));left:11px;width:44px;height:44px;
  display:grid;place-items:center;border:0;padding:0;background:none;color:#2b1421;
}
.chatExpandedClose::before {
  content:'';position:absolute;width:35px;height:36px;border-radius:2px;background:#f5f5f3;
}
.chatExpandedClose img {position:relative;width:23px;height:23px}
.chatExpandedCount {
  position:absolute;right:16px;bottom:max(37px,env(safe-area-inset-bottom));min-width:71px;
  padding:8px 10px;border-radius:2px;background:#f5f5f3;font:400 12px/17px Manrope,sans-serif;
}
@media(max-width:760px) {
  .chatProductView[data-expanded-photo] {height:100dvh}
}
@media(min-width:761px) {
  .chatProductView {
    box-sizing:border-box;width:min(920px,calc(100vw - 48px));
    max-height:calc(100dvh - 32px);border:1px solid #dce4e8;border-radius:16px;
    box-shadow:0 12px 32px rgb(43 20 33 / 10%);
  }
  .chatProductView .chatProductClose {position:absolute;inset:12px 16px auto auto}
  .chatProductLayout {
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;
    gap:28px;min-height:510px;padding:55px 27px 34px 23px;
  }
  .chatProductView[data-qv-variants] .chatProductLayout {
    grid-template-columns:minmax(0,420px) minmax(0,350px);gap:clamp(28px,5vw,63px);
    padding-right:36px;
  }
  .chatProductGalleryFrame,.chatProductSkeletonPhoto {
    min-width:0;aspect-ratio:1;border-radius:8px;overflow:hidden;
  }
  .chatProductGallery {scrollbar-width:none}
  .chatProductGallery img {aspect-ratio:1;max-height:none}
  .chatProductDots,.chatExpandedDots {
    display:flex;align-items:center;inset:auto auto 12px 50%;transform:translateX(-50%);
    padding:0 6px;border-radius:24px;background:#fff;box-shadow:0 1px 2px rgb(43 20 33 / 10%);
  }
  .chatProductDots .chatGalleryArrow {display:grid;place-items:center;flex:none}
  .chatGalleryArrow img {width:18px;height:18px}
  .chatProductDots .chatGalleryDot {
    width:8px;min-width:8px;height:44px;display:grid;place-items:center;flex:none;
  }
  .chatProductDots .chatGalleryDot::before {
    width:4px;height:4px;margin:0;border:0;background:#beb4ba;
  }
  .chatProductDots .chatGalleryDot[aria-current="true"]::before {background:#2b1421}
  .chatProductBody {min-width:0;padding:0}
  .chatProductView:not([data-qv-state="ready"]) .chatProductBody {padding:0}
  .chatProductEyebrow {margin:0 0 8px;color:#7e6c76;font:700 11px/16px Manrope,sans-serif;text-transform:uppercase}
  .chatProductBody h2 {
    margin:0;color:#2b1421;font:600 27px/1.35 Unbounded,sans-serif;
    text-transform:uppercase;overflow-wrap:anywhere;
  }
  .chatProductView[data-qv-variants] .chatProductBody h2 {font-size:23px;line-height:1.43}
  .chatProductDescription {margin:16px 0 32px;color:#7e6c76;font:400 14px/20px Manrope,sans-serif}
  .chatProductPrice {margin:24px 0 8px;font:700 30px/44px Manrope,sans-serif}
  .chatProductUnit {margin:0 0 24px;font:500 13px/19px Manrope,sans-serif}
  .chatProductChoice {display:none}
  .chatProductVariantGroups {
    display:grid;gap:24px;padding-top:24px;border-top:1px solid #e8e2e6;
  }
  .chatProductVariantGroup {min-width:0;margin:0;padding:0;border:0}
  .chatProductVariantGroup legend {padding:0;font:600 16px/24px Manrope,sans-serif}
  .chatProductVariantValue {margin-left:12px;color:#7e6c76;font:400 14px/20px Manrope,sans-serif}
  .chatProductVariantRow {display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
  .chatProductPackageRow {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .chatProductSwatch,.chatProductVariantButton {
    display:grid;place-items:center;min-width:48px;min-height:44px;padding:4px 8px;
    border:1px solid #ded9dc;border-radius:4px;background:#fff;color:#2b1421;
    font:600 15px/22px Manrope,sans-serif;
  }
  .chatProductSwatch {width:44px;min-width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:50%}
  .chatProductSwatch::before {content:'';width:30px;height:30px;border-radius:50%;background:var(--chat-qv-swatch)}
  .chatProductSwatch[aria-pressed="true"] {border-color:#2b1421}
  .chatProductVariantButton[aria-pressed="true"] {background:#2b1421;color:#fff}
  .chatProductFooter {position:static;padding:32px 0 0}
  .chatProductVariantGroups[hidden] + .chatProductFooter {border-top:1px solid #e8e2e6}
  .chatProductFooter .chatProductBuy,.chatProductRetry {min-height:54px}
  .chatProductPurchaseNote {margin:12px 0 0;color:#7e6c76;font:400 12px/17px Manrope,sans-serif}
  .chatProductQuantity {
    display:grid;grid-template-columns:44px 1fr 44px;align-items:center;text-align:center;
    min-height:54px;color:#2b1421;font:700 18px/24px Manrope,sans-serif;
  }
  .chatProductQuantity button {min-width:44px;min-height:44px;border:0;background:#fff;color:inherit;font:inherit}
  .chatProductStatus {color:#2b1421}
  .chatProductComposition {margin-top:16px;color:#7e6c76;font-size:13px}
  .chatProductView:is([data-qv-state="loading"],[data-qv-state="error"]) .chatProductBody h2,
  .chatProductView[data-qv-state="loading"] .chatProductStatus,.chatExpandedCount {
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;
  }
  .chatProductSkeletonPhoto,.chatProductSkeletonText span {display:block;background:#eeeceb;border-radius:5px}
  .chatProductSkeletonText {display:grid;gap:10px}
  .chatProductSkeletonText span {height:12px}
  .chatProductSkeletonText span:nth-child(1) {width:26%}
  .chatProductSkeletonText span:nth-child(2) {width:81%;height:28px;margin-top:10px}
  .chatProductSkeletonText span:nth-child(3) {width:64%;height:28px}
  .chatProductSkeletonText span:nth-child(4) {width:90%;margin-top:23px}
  .chatProductSkeletonText span:nth-child(5) {width:73%}
  .chatProductSkeletonText span:nth-child(6) {width:30%;height:34px;margin-top:24px}
  .chatProductSkeletonText span:nth-child(7) {width:30%}
  .chatProductSkeletonText span:nth-child(8) {height:54px;margin-top:47px}
  .chatProductView[data-qv-state="error"] .chatProductSkeletonText span:nth-child(n+6) {display:none}
  .chatProductView[data-qv-state="error"] .chatProductStatus {margin:24px 0;text-align:center;font:600 18px/24px Manrope,sans-serif}
  .chatProductView[data-expanded-photo] {
    width:min(540px,calc(100vw - 48px));height:calc(100dvh - 32px);
    border:0;border-radius:12px;box-shadow:none;
  }
  .chatExpandedPhoto {background:#fff}
  .chatExpandedSlide {display:grid;place-items:center}
  .chatExpandedTrack img {width:100%;height:100%;object-fit:cover}
  .chatExpandedClose {inset:16px auto auto 16px;border-radius:50%;background:#fff}
  .chatExpandedClose::before {display:none}
}
@media(min-width:761px) and (prefers-reduced-motion:no-preference) {
  .chatProductView[open] {animation:chatQuickViewEnter 160ms ease-out}
  .chatProductView[data-qv-state="loading"] :is(.chatProductSkeletonPhoto,.chatProductSkeletonText span) {
    animation:chatQuickViewPulse 1400ms ease-in-out infinite alternate;
  }
  .chatProductView[data-qv-state="loading"] .chatProductSkeletonText span:nth-child(2n) {animation-delay:100ms}
}
@keyframes chatQuickViewEnter {from {opacity:0} to {opacity:1}}
@keyframes chatQuickViewPulse {from {opacity:.55} to {opacity:1}}

/* D3 · Desktop mini-cart. Figma BONE / B01 / B03. */
#chat .chatCartPopover {
  position:absolute;
  z-index:5;
  top:44px;
  right:8px;
  width:50%;
  display:flex;
  flex-direction:column;
  margin:0;
  padding:12px;
  border:1px solid #dce4e8;
  border-radius:12px;
  background:#fff;
  color:#2b1421;
  box-shadow:0 8px 28px #2b14211f;
  font:600 14px/20px Manrope,sans-serif;
}
#chat .chatCartPopover[hidden],
#chat .chatCartPopover [hidden] { display:none; }
#chat .chatCartSummary {
  flex:none;
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:10px 12px;
  margin-bottom:10px;
  background:#f3f5f6;
  border-radius:2px;
}
#chat .chatCartSummary strong,
#chat .chatCartPrice { white-space:nowrap; }
#chat .chatCartItems {
  min-height:0;
  display:grid;
  grid-auto-rows:max-content;
  gap:8px;
  padding:0;
  margin:0;
  overflow:auto;
  overscroll-behavior:contain;
  list-style:none;
}
#chat .chatCartItem {
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:start;
  column-gap:10px;
  min-height:66px;
  padding:8px 8px 4px;
  background:#fff;
  border:1px solid #dce4e8;
  border-radius:12px;
}
#chat .chatCartItem img {
  grid-row:1 / 3;
  width:48px;
  height:48px;
  object-fit:cover;
  border-radius:9px;
  background:#f3f5f6;
}
#chat .chatCartIdentity { min-width:0; overflow-wrap:anywhere; }
#chat .chatCartItem .chatCartIdentity,
#chat .chatCartItem .chatCartPrice {padding-top:2px}
#chat .chatCartLineActions {
  grid-column:2 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
#chat .chatCartStepper {
  display:grid;
  grid-template-columns:44px minmax(22px,auto) 44px;
  align-items:center;
  text-align:center;
  min-height:44px;
  border-radius:4px;
  background:linear-gradient(transparent 10px,#f3f5f6 10px,#f3f5f6 34px,transparent 34px);
}
#chat .chatCartLineActions button {
  min-width:44px;
  min-height:44px;
  padding:0;
  border:0;
  border-radius:4px;
  background:transparent;
  color:#2b1421;
  font:500 12px/18px Manrope,sans-serif;
  cursor:pointer;
}
#chat .chatCartLineActions button:not(:disabled):hover {text-decoration:underline}
#chat .chatCartStepper button {color:#681cdb;font-size:14px}
#chat .chatCartStepper output {font:500 12px/18px Manrope,sans-serif}
#chat .chatCartLineActions button:disabled {cursor:not-allowed;opacity:.4}
#chat .chatCartLineActions .chatCartRemove {padding:0 4px}
#chat .chatCartEditError {margin:0 0 8px;font:500 12px/16px Manrope,sans-serif}
#chat .chatCartCheckout {
  flex:none;
  display:grid;
  place-items:center;
  min-height:48px;
  margin-top:10px;
  padding:8px;
  border-radius:2px;
  background:#2b1421;
  color:#fff;
  text-align:center;
  text-decoration:none;
}
#chat .chatCartStatus { margin:0; padding:9px 8px; font-weight:500; }
#chat .chatCartCheckout:focus-visible,
#chat .chatProductCart:focus-visible { outline:2px solid #2b1421; outline-offset:2px; }
