/* AI shopping assistant widget – Diwali theme (uses --night, --gold, --saffron, --maroon from site.css) */
.cp { position: fixed; right: 20px; bottom: 20px; z-index: 1080; font-family: var(--body-font, 'Poppins'), system-ui, sans-serif; }
.cp-fab { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 40px; padding: 12px 20px 12px 16px; color: #2b1600; font-weight: 600;
    background: linear-gradient(135deg, var(--gold, #ffb703), var(--saffron, #ff8800)); box-shadow: 0 8px 28px rgba(255, 136, 0, .45); animation: cp-glow 2.4s ease-in-out infinite; }
.cp-fab i { font-size: 1.35rem; }
.cp.open .cp-fab { animation: none; }
@keyframes cp-glow { 50% { box-shadow: 0 8px 36px rgba(255, 183, 3, .8); } }

.cp-panel { position: absolute; right: 0; bottom: 64px; width: 390px; height: min(640px, calc(100vh - 110px)); display: flex; flex-direction: column;
    background: #fffaf2; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 60px rgba(26, 11, 46, .35); border: 1px solid rgba(255, 183, 3, .35); }
.cp-panel[hidden] { display: none; }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #fff; background: linear-gradient(135deg, var(--night, #1a0b2e), var(--maroon, #7a0f2b)); }
.cp-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255, 255, 255, .12); }
.cp-title { font-weight: 600; font-size: .95rem; line-height: 1.2; }
.cp-sub { font-size: .72rem; opacity: .85; }
.cp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #aaa; }
.cp-dot.on { background: #51cf66; } .cp-dot.mid { background: #ffd43b; }
.cp-head-btn { position: relative; color: #fff; background: none; border: 0; font-size: 1.1rem; padding: 4px 6px; text-decoration: none; }
.cp-head-btn:hover { color: var(--gold, #ffb703); }
.cp-cart-n { position: absolute; top: -2px; right: -4px; font-size: .6rem; background: var(--gold, #ffb703); color: #2b1600; border-radius: 10px; padding: 0 4px; font-weight: 700; }
.cp-cart-n:empty { display: none; }

.cp-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background:
    radial-gradient(circle at 10% 0%, rgba(255, 183, 3, .10), transparent 40%), #fffaf2; }
.cp-msg { max-width: 92%; font-size: .87rem; line-height: 1.45; }
.cp-user { align-self: flex-end; background: linear-gradient(135deg, var(--maroon, #7a0f2b), var(--mid, #a4133c)); color: #fff; padding: 8px 12px; border-radius: 16px 16px 4px 16px; }
.cp-bot { align-self: flex-start; width: 92%; }
.cp-text { background: #fff; padding: 9px 12px; border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.cp-engine { font-size: .62rem; color: #a08b75; margin: 3px 0 0 6px; text-transform: uppercase; letter-spacing: .5px; }
.cp-src { font-size: .7rem; color: #8a7560; margin: 4px 6px 0; }
.cp-typing { display: flex; gap: 4px; background: #fff; padding: 12px 14px; border-radius: 16px; width: auto; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.cp-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--saffron, #ff8800); animation: cp-b 1s infinite; }
.cp-typing span:nth-child(2) { animation-delay: .15s; } .cp-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cp-b { 50% { transform: translateY(-5px); opacity: .5; } }

.cp-products { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cp-card { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 1px 5px rgba(0, 0, 0, .08); }
.cp-thumb { flex: 0 0 78px; height: 78px; border-radius: 10px; overflow: hidden; display: block; background: #1a0b2e; }
.cp-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-info { flex: 1; min-width: 0; }
.cp-pname { font-weight: 600; font-size: .83rem; color: var(--ink, #2b1a12); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-cat { font-size: .68rem; color: #9a8570; }
.cp-price { font-weight: 700; color: var(--maroon, #7a0f2b); font-size: .9rem; }
.cp-stock { font-size: .65rem; font-weight: 500; color: #2f9e44; margin-left: 4px; }
.cp-stock.low { color: #e67700; } .cp-stock.out { color: #e03131; }
.cp-buy { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.cp-qty { display: flex; border: 1px solid #e9d8c4; border-radius: 20px; overflow: hidden; }
.cp-qty button { border: 0; background: #fff4e3; width: 24px; font-weight: 700; }
.cp-qty input { width: 36px; border: 0; text-align: center; font-size: .8rem; -moz-appearance: textfield; }
.cp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cp-add { border: 0; border-radius: 20px; padding: 3px 12px; font-size: .78rem; font-weight: 600; color: #2b1600; background: linear-gradient(135deg, var(--gold, #ffb703), var(--saffron, #ff8800)); }

.cp-cart, .cp-checkout, .cp-order { background: #fff; border-radius: 12px; padding: 10px; margin-top: 8px; box-shadow: 0 1px 5px rgba(0, 0, 0, .08); font-size: .82rem; }
.cp-checkout .cp-cart { box-shadow: none; padding: 0; margin: 4px 0 8px; }
.cp-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #f0e2d0; }
.cp-mini { flex: 0 0 32px; height: 32px; border-radius: 6px; overflow: hidden; background: #1a0b2e; }
.cp-lname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-lt { font-weight: 600; }
.cp-x { border: 0; background: none; color: #c92a2a; font-size: 1rem; padding: 0 2px; }
.cp-tot { margin-top: 6px; } .cp-tot div { display: flex; justify-content: space-between; }
.cp-grand { font-weight: 700; font-size: .95rem; color: var(--maroon, #7a0f2b); border-top: 1px solid #f0e2d0; margin-top: 4px; padding-top: 4px; }
.cp-warn { color: #e67700; font-size: .72rem; margin-top: 4px; }
.cp-sec { font-weight: 600; color: var(--night, #1a0b2e); margin-bottom: 2px; }
.cp-addr { background: #fff8ec; border-radius: 8px; padding: 8px; }
.cp-pay { margin-top: 4px; color: #2f9e44; font-weight: 500; }
.cp-terms { font-size: .68rem; color: #8a7560; margin: 6px 0; }
.cp-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cp-btn { border: 1px solid #e9d8c4; background: #fff; border-radius: 20px; padding: 5px 14px; font-size: .78rem; font-weight: 600; color: var(--maroon, #7a0f2b); text-decoration: none; display: inline-block; }
.cp-btn:disabled { opacity: .5; }
.cp-btn.cp-primary { border: 0; color: #2b1600; background: linear-gradient(135deg, var(--gold, #ffb703), var(--saffron, #ff8800)); }
.cp-bot > .cp-link { margin-top: 8px; }
.cp-small { font-size: .7rem; padding: 2px 10px; margin-top: 6px; }

.cp-order { border-left: 4px solid var(--gold, #ffb703); }
.cp-order.compact { padding: 8px 10px; }
.cp-order.clickable { cursor: pointer; } .cp-order.clickable:hover { background: #fff8ec; }
.cp-ono span { font-size: .68rem; color: #8a7560; display: block; }
.cp-ono b { font-size: 1.02rem; letter-spacing: .5px; color: var(--night, #1a0b2e); }
.cp-ometa { font-size: .74rem; color: #6c5a48; }
.cp-ostatus { font-weight: 600; color: #e67700; }
.cp-ostatus.s4 { color: #2f9e44; } .cp-ostatus.s-1 { color: #e03131; }
.cp-track { display: flex; margin: 8px 0; }
.cp-track span { flex: 1; text-align: center; font-size: .6rem; color: #b6a48f; border-top: 3px solid #f0e2d0; padding-top: 3px; }
.cp-track span.on { color: #2f9e44; border-color: #51cf66; font-weight: 600; }
.cp-oitems { padding-left: 18px; margin: 4px 0 6px; font-size: .76rem; }

.cp-chips { display: flex; gap: 6px; padding: 0 12px 8px; flex-wrap: wrap; background: #fffaf2; }
.cp-chips:empty { display: none; }
.cp-chip { border: 1px solid rgba(122, 15, 43, .25); color: var(--maroon, #7a0f2b); background: #fff; border-radius: 20px; padding: 3px 11px; font-size: .74rem; }
.cp-chip:hover { background: var(--maroon, #7a0f2b); color: #fff; }
.cp-input { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid #f0e2d0; background: #fff; }
.cp-input input { flex: 1; border: 1px solid #e9d8c4; border-radius: 22px; padding: 8px 14px; font-size: .85rem; outline: none; }
.cp-input input:focus { border-color: var(--saffron, #ff8800); }
.cp-input button { border: 0; width: 40px; border-radius: 50%; color: #2b1600; background: linear-gradient(135deg, var(--gold, #ffb703), var(--saffron, #ff8800)); }

@media (max-width: 480px) {
    .cp { right: 12px; bottom: 12px; }
    .cp-fab-text { display: none; }
    .cp-fab { padding: 14px; }
    .cp-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; bottom: 0; }
}
