.search-product-actions {
    display: contents;
}

.search-product-actions--promotion,
.detail-product-promotions,
.product-promotion-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.search-product-actions--promotion {
    flex: 0 0 100%;
    min-width: 0;
    margin-bottom: 10px;
    gap: 4px 10px;
}

.search-product-actions--promotion .copy-sousuo-b {
    width: 150px;
    max-width: 100%;
    margin-bottom: 0;
}

.detail-product-promotions {
    gap: 4px 14px;
}

.product-promotion-badges {
    min-width: 0;
    max-width: 100%;
    gap: 4px 10px;
}

.search-product-actions--promotion .product-promotion-badges {
    flex: 1 1 auto;
}

.search-promotion-tip {
    position: relative;
    min-width: 0;
    max-width: min(100%, 220px);
}

.product-promotion-badges .search-promotion-badge {
    display: block;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.product-promotion-badges .search-promotion-badge--text {
    padding: 3px 8px;
    border-radius: 4px;
    background: #aa1f24;
}

.search-promotion-badge img {
    display: block;
    width: auto;
    height: 38px;
    max-width: 100%;
    object-fit: contain;
}

.product-promotion-badges a.search-promotion-badge:hover,
.product-promotion-badges a.search-promotion-badge:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.product-promotion-badges .search-promotion-badge:focus-visible {
    outline: 2px solid #86181c;
    outline-offset: 2px;
}

.search-promotion-tooltip {
    position: absolute;
    z-index: 1000;
    left: -6px;
    bottom: calc(100% + 10px);
    width: max-content;
    max-width: 380px;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 10px rgb(0 0 0 / 12%);
    color: #333;
    font-size: 14px;
    line-height: 1.8;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .18s, transform .18s, visibility .18s;
}

.search-promotion-tip:hover .search-promotion-tooltip,
.search-promotion-tip:focus-within .search-promotion-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-promotion-tooltip::before,
.search-promotion-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
}

.search-promotion-tooltip::before {
    left: 0;
    right: 0;
    height: 12px;
}

.search-promotion-tooltip::after {
    left: 10px;
    border: 6px solid transparent;
    border-top-color: #fff;
}

@media (max-width: 680px) {
    .search-product-actions--promotion,
    .detail-product-promotions {
        position: relative;
    }

    .search-promotion-tip {
        position: static;
    }

    .search-promotion-tooltip {
        top: calc(100% + 10px);
        bottom: auto;
        left: 0;
        max-width: 100%;
    }

    .search-promotion-tooltip::before {
        top: auto;
        bottom: 100%;
    }

    .search-promotion-tooltip::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .search-promotion-tooltip {
        transition: none;
    }
}
