.taobao-admin-wrap .taobao-help-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px 24px;
    max-width: 800px;
}

.taobao-admin-wrap .taobao-help-box h3 {
    margin-top: 0;
}

.taobao-admin-wrap .taobao-help-box ol,
.taobao-admin-wrap .taobao-help-box ul {
    margin-left: 16px;
}

.taobao-admin-wrap .taobao-help-box li {
    margin-bottom: 6px;
}

.taobao-search-container {
    max-width: 100%;
}

.taobao-media-button-icon {
    vertical-align: middle;
    margin-top: -2px;
}

.taobao-search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.taobao-search-bar input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.taobao-search-results {
    min-height: 200px;
}

.taobao-placeholder {
    color: #999;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

.taobao-search-results .taobao-product-item {
    display: flex;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.taobao-search-results .taobao-product-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.taobao-search-results .taobao-product-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.taobao-search-results .taobao-product-img {
    width: 120px;
    min-height: 120px;
    flex-shrink: 0;
    position: relative;
    background: #f5f5f5;
}

.taobao-search-results .taobao-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.taobao-search-results .taobao-product-info {
    flex: 1;
    padding: 12px 16px;
}

.taobao-search-results .taobao-product-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.taobao-search-results .taobao-product-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.taobao-search-results .taobao-product-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.taobao-search-results .taobao-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #f40;
}

.taobao-search-results .taobao-commission {
    font-size: 12px;
    color: #ff6a00;
    background: #fff0e6;
    padding: 2px 8px;
    border-radius: 3px;
}

.taobao-coupon-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #f40;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
}

.taobao-search-results .taobao-product-actions {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    border-left: 1px solid #e5e5e5;
}

.taobao-search-results .taobao-product-actions .button {
    white-space: nowrap;
}

.taobao-pagination {
    text-align: center;
    padding: 16px 0;
}

.taobao-pagination .button {
    margin: 0 4px;
}

.taobao-pagination .button.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.taobao-modal-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.taobao-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.taobao-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 780px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.taobao-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.taobao-modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.taobao-modal-close {
    cursor: pointer;
    font-size: 24px;
    color: #999;
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
}

.taobao-modal-body {
    padding: 20px 24px;
}

.taobao-modal-footer {
    padding: 12px 24px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

.taobao-insert-shortcode {
    background: #f0f8ff;
    border: 1px solid #cce5ff;
    border-radius: 4px;
    padding: 10px 16px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.taobao-insert-shortcode code {
    font-size: 13px;
    background: #fff;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    flex: 1;
}

.taobao-metabox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.taobao-metabox-item:last-child {
    border-bottom: none;
}

.taobao-metabox-item-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.taobao-metabox-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.taobao-metabox-item-info {
    flex: 1;
    min-width: 0;
}

.taobao-metabox-item-title {
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.taobao-metabox-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #f40;
    margin-top: 2px;
}

.taobao-metabox-item-commission {
    font-size: 10px;
    color: #ff6a00;
    background: #fff0e6;
    padding: 0 4px;
    border-radius: 2px;
    display: inline-block;
    margin-top: 2px;
}

.taobao-metabox-item-action {
    flex-shrink: 0;
}

.taobao-metabox-results {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 8px;
}

@media (min-width: 768px) {
    .taobao-search-results .taobao-product-item {
        position: relative;
    }

    .taobao-search-results .taobao-product-actions {
        position: static;
    }
}

.taobao-product-grid {
    display: grid;
    gap: 16px;
}

.taobao-product-grid.taobao-cols-1 {
    grid-template-columns: 1fr;
}

.taobao-product-grid.taobao-cols-2 {
    grid-template-columns: 1fr 1fr;
}

.taobao-product-grid.taobao-cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.taobao-product-grid.taobao-cols-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.taobao-product-section {
    margin: 20px 0;
}

.taobao-section-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
}

.taobao-product-grid .taobao-product-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
}

.taobao-product-grid .taobao-product-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.taobao-product-grid .taobao-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.taobao-product-grid .taobao-product-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.taobao-product-grid .taobao-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.taobao-product-grid .taobao-product-info {
    padding: 10px 12px 14px;
}

.taobao-product-grid .taobao-product-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

.taobao-product-grid .taobao-product-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.taobao-product-grid .taobao-product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.taobao-product-grid .taobao-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #f40;
}

.taobao-product-grid .taobao-commission {
    font-size: 11px;
    color: #ff6a00;
    background: #fff0e6;
    padding: 1px 6px;
    border-radius: 3px;
}

@media (max-width: 767px) {

    .taobao-product-grid.taobao-cols-2,
    .taobao-product-grid.taobao-cols-3,
    .taobao-product-grid.taobao-cols-4 {
        grid-template-columns: 1fr 1fr;
    }

    .taobao-search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .taobao-search-results .taobao-product-img {
        width: 100px;
        min-height: 100px;
    }
}

@media (max-width: 480px) {

    .taobao-product-grid.taobao-cols-2,
    .taobao-product-grid.taobao-cols-3,
    .taobao-product-grid.taobao-cols-4 {
        grid-template-columns: 1fr;
    }
}

.taobao-product-tpwd {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 12px;
    border-top: 1px solid #f0f0f0;
}

.taobao-tpwd-text {
    flex: 1;
    font-size: 12px;
    color: #999;
    user-select: all;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.taobao-tpwd-copy-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 3px 10px;
    border: 1px solid #f40;
    background: #fff;
    color: #f40;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.taobao-tpwd-copy-btn:hover {
    background: #f40;
    color: #fff;
}

.taobao-tpwd-copy-btn.copied {
    background: #52c41a;
    border-color: #52c41a;
    color: #fff;
}