/* Đợt 6 (C4) — nút hộp quà đỏ + bảng gợi ý Bán thêm / Bán giảm / Bán chéo ở trang chi tiết sản phẩm */
.tld-upsell[hidden], .tld-upsell [hidden] { display: none !important; }

.tld-upsell__gift {
    position: fixed; right: 20px; bottom: 96px; z-index: 1040;
    width: 56px; height: 56px; border-radius: 50%; border: 0;
    background: #e02424; color: #fff; font-size: 28px; line-height: 56px; text-align: center;
    box-shadow: 0 6px 18px rgba(224, 36, 36, .45); cursor: pointer;
    animation: tld-upsell-shake 2.4s ease-in-out infinite;
}
.tld-upsell__gift:hover { background: #c81e1e; }

@keyframes tld-upsell-shake {
    0%, 80%, 100% { transform: rotate(0); }
    84% { transform: rotate(-12deg); }
    88% { transform: rotate(12deg); }
    92% { transform: rotate(-8deg); }
    96% { transform: rotate(8deg); }
}

.tld-upsell__backdrop { position: fixed; inset: 0; z-index: 1050; background: rgba(0, 0, 0, .45); }

.tld-upsell__panel {
    position: fixed; z-index: 1060; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 64px); overflow: auto;
    background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.tld-upsell__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #eee; }
.tld-upsell__title { margin: 0; font-size: 18px; font-weight: 600; }
.tld-upsell__close { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #666; }

.tld-upsell__list { padding: 8px 16px 16px; }
.tld-upsell__item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #eee; }
.tld-upsell__item:last-child { border-bottom: 0; }
.tld-upsell__thumb { flex: 0 0 88px; }
.tld-upsell__thumb img { width: 88px; height: 88px; object-fit: cover; border-radius: 6px; }
.tld-upsell__info { flex: 1; min-width: 0; }
.tld-upsell__tag { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #fde8e8; color: #c81e1e; font-size: 12px; font-weight: 600; }
.tld-upsell__name { display: block; margin: 4px 0; font-weight: 600; color: #222; word-break: break-word; }
.tld-upsell__price b { color: #e02424; }
.tld-upsell__price del { color: #999; margin-left: 4px; font-size: 13px; }
.tld-upsell__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tld-upsell__btn { padding: 6px 12px; border-radius: 6px; border: 1px solid #e02424; background: #e02424; color: #fff; font-size: 14px; cursor: pointer; text-decoration: none; }
.tld-upsell__btn:disabled { opacity: .6; cursor: not-allowed; }
.tld-upsell__btn--ghost { background: #fff; color: #e02424; }

@media (max-width: 576px) {
    .tld-upsell__gift { right: 16px; bottom: 80px; width: 48px; height: 48px; line-height: 48px; font-size: 24px; }
    .tld-upsell__panel { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-width: 100%; max-height: 80vh; border-radius: 12px 12px 0 0; }
    .tld-upsell__thumb { flex-basis: 64px; }
    .tld-upsell__thumb img { width: 64px; height: 64px; }
    .tld-upsell__btn { flex: 1; text-align: center; }
}
