.chat-shopping { margin-top: 16px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-window:has(.chat-shopping) { width: min(680px, calc(100vw - 32px)); height: min(760px, calc(100dvh - 115px)); }
.message-container.bot:has(.chat-shopping) { max-width: 100%; width: 100%; }
.message.bot:has(.chat-shopping) { min-width: 0; flex: 1; }
.chat-shopping p { margin: 7px 0; }
.chat-shopping-disclosure { color: #59616c; font-size: 11px; }
.chat-shopping-status { font-weight: 600; color: #246541; }
.chat-shopping-note { color: #755519; font-size: 12px; }
.chat-shopping-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 16px 0; }
.chat-product { min-width: 0; padding: 18px; border: 1px solid #dfe9e3; background: #fff; border-radius: 18px; color: #27342e; box-shadow: 0 3px 12px #163f2410; }
.chat-product h4 { margin: 0; padding-right: 25px; font-size: 15px; line-height: 1.45; font-weight: 650; }
.chat-product-header { display: flex; align-items: center; gap: 14px; }
.chat-product-heading { position: relative; flex: 1; min-width: 0; }
.chat-product-number { position: absolute; top: 0; right: 0; color: #718078; font-size: 11px; background: #f0f5f2; border-radius: 50%; width: 21px; height: 21px; display: grid; place-items: center; }
.chat-product-image { flex: 0 0 88px; padding: 6px; background: #f8faf9; border-radius: 12px; }
.chat-product .chat-product-image img { display: block; width: 76px; height: 76px; object-fit: contain; mix-blend-mode: multiply; margin: 0; float: none; }
.chat-product-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 11px; color: #69766e; }
.chat-product-condition { padding: 2px 8px; border-radius: 20px; background: #eaf5ee; color: #28603b; }
.chat-product .chat-product-description { margin: 12px 0 14px; color: #637168; font-size: 12px; line-height: 1.55; }
.chat-offers { display: grid; border: 1px solid #e1e9e4; border-radius: 12px; overflow: hidden; margin-top: 12px; }
.chat-product .chat-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px; color: #27342e; text-decoration: none; background: #fff; transition: background .15s ease; }
.chat-product .chat-offer + .chat-offer { border-top: 1px solid #e6ece8; }
.chat-product .chat-offer-primary { background: #f2f8f4; }
.chat-product .chat-offer:hover { background: #e8f3ec; color: #174f34; }
.chat-offer-merchant { display: flex; align-items: center; min-width: 0; gap: 9px; }
.chat-merchant-icon { position: relative; width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border: 1px solid #e2e8e4; border-radius: 9px; background: #fff; color: #4c6656; font-size: 13px; font-weight: 700; }
.chat-merchant-icon:has(img) > span { visibility: hidden; }
.chat-product img.chat-merchant-favicon { display: block; position: absolute; width: 20px; height: 20px; top: 5px; left: 5px; object-fit: contain; float: none; margin: 0; }
.chat-offer-store { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.chat-offer-store strong { font-size: 12px; font-weight: 650; }
.chat-offer-store > span { font-size: 10px; color: #748077; }
.chat-offer-amount { display: flex; flex-direction: column; align-items: flex-end; text-align: right; max-width: 145px; }
.chat-offer-amount strong { font-size: 16px; line-height: 1.25; color: #175537; font-weight: 750; font-variant-numeric: tabular-nums; }
.chat-offer-amount small { margin-top: 3px; font-size: 10px; }
.chat-offer-action { padding: 6px 9px; border-radius: 7px; background: #17633d; color: #fff; white-space: nowrap; font-size: 11px; font-weight: 600; }
.chat-product-price { font-size: 18px; font-weight: 700; color: #174f34; }
.chat-product .chat-product-buy { display: block; clear: both; padding: 10px 12px; background: #17633d; border-radius: 8px; color: white; text-align: center; text-decoration: none; font-weight: 600; margin-top: 12px; }
.chat-product-other { display: block; margin-top: 8px; }
/* Older saved conversations may still contain these retired controls. */
.chat-shopping .chat-product-compare, .chat-shopping [data-chat-compare] { display: none; }
.chat-product details { border-top: 1px solid #e6ece8; padding-top: 10px; margin-top: 12px; font-size: 12px; }
.chat-product summary { cursor: pointer; font-weight: 600; }
.chat-product ul { padding-left: 18px; }
.chat-product small { display: block; color: #666; }
.chat-shopping-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chat-shopping-actions button, .chat-shopping-actions a { font: inherit; padding: 8px 10px; border: 1px solid #bdd6c8; border-radius: 8px; background: #f3f8f5; color: #175537; text-decoration: none; cursor: pointer; }
.chat-shopping button:focus-visible, .chat-shopping a:focus-visible { outline: 3px solid #59a880; outline-offset: 2px; }
.chat-shopping-comparison { overflow-x: auto; margin: 12px 0; }
.chat-shopping-comparison table { border-collapse: collapse; min-width: 100%; }
.chat-shopping-comparison th, .chat-shopping-comparison td { padding: 8px; border: 1px solid #dce4df; text-align: left; vertical-align: top; min-width: 115px; }
@media (max-width: 480px) {
    .chat-product { padding: 12px; border-radius: 14px; }
    .chat-product-header { gap: 10px; }
    .chat-product-image { flex-basis: 64px; }
    .chat-product .chat-product-image img { width: 52px; height: 60px; }
    .chat-product h4 { font-size: 13px; }
    .chat-product .chat-offer { padding: 10px 8px; gap: 7px; }
    .chat-offer-amount { max-width: 106px; }
    .chat-offer-amount strong { font-size: 14px; }
    .chat-offer-action { font-size: 0; padding: 5px 7px; }
    .chat-offer-action span { font-size: 15px; }
}
