/* Version: 1.8.1 - Updated: 2026-01-27 */
.pde-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 0 20px 0;
}

.pde-product-card {
    border-radius: var(--dc-border-radius-default, 4px);
    border: 1px solid var(--dc-color-border-disabled, #EEE);
    background: var(--dc-color-foreground-white, #FFF);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pde-product-card:hover {
    border-color: #170057 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.pde-product-image-wrapper {
    position: relative;
    padding: 20px 24px;
    background: #F9F9F9;
    height: 152px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pde-product-image-link {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.pde-product-card:hover .pde-product-image-link {
    transform: scale(1.05);
}

.pde-product-image {
    display: none;
}

.pde-product-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
}

.pde-new-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 2px 6px;
    background: #FF0000;
    border-radius: 4px 0 4px 0;
    color: var(--dc-color-text-white, #FFF);
    font-family: var(--font-style-italic, "HarmonyOS Sans SC");
    font-size: var(--typography-base-sizes-extra-small-font-size, 12px);
    font-style: normal;
    font-weight: 500;
    line-height: var(--typography-base-sizes-extra-small-line-height, 16px);
    z-index: 2;
}

.pde-product-tags {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
}

.pde-product-tags .pde-tag {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 2px;
    background: #ECEBF2;
    color: #170057;
    font-size: 12px;
    font-weight: 400 !important;
    line-height: 16px;
    white-space: nowrap;
}

.pde-tag {
    font-weight: 400 !important;
}

.pde-product-card .pde-compare-btn {
    position: absolute;
    top: 4px;
    right: 6px;
    display: none;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400 !important;
    color: #170057 !important;
    white-space: nowrap;
}

.pde-product-card .pde-compare-btn span {
    color: #170057 !important;
}

.pde-compare-btn,
.pde-compare-btn span {
    font-weight: 400 !important;
}

.pde-compare-btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}

.pde-product-card:hover .pde-compare-btn {
    display: flex;
}

.pde-product-info {
    padding: 8px 8px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pde-product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 24px;
    color: #333;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pde-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pde-product-title a:hover {
    color: #170057;
}

.pde-product-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 120px;
    margin-bottom: 8px;
}

.pde-view-details-btn {
    display: block;
    width: 100%;
    margin-top: auto !important;
    padding: 4px 12px;
    background: #FFF !important;
    border: 1px solid #D6D6D6 !important;
    border-radius: 4px;
    color: #333 !important;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pde-view-details-btn:hover {
    background: #170057 !important;
    border-color: #170057 !important;
    color: #FFF !important;
}

.pde-product-card:hover .pde-view-details-btn {
    background: #170057 !important;
    border-color: #170057 !important;
    color: #FFF !important;
}

.pde-spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pde-spec-label {
    color: var(--dc-color-text-secondary, #707070);
    font-family: var(--font-style-italic, "HarmonyOS Sans SC");
    font-size: var(--typography-base-sizes-small-font-size, 14px);
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pde-spec-value {
    color: var(--dc-color-text-primary, #333);
    font-family: var(--font-style-italic, "HarmonyOS Sans SC");
    font-size: var(--typography-base-sizes-small-font-size, 14px);
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pde-compare-page {
    margin: 40px 0;
}

#pde-compare-container {
    min-height: 400px;
}

@media (max-width: 1024px) {
    .pde-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pde-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .pde-product-image-wrapper {
        padding: 12px 20px;
        height: 131px;
    }
    
    .pde-product-title {
        font-size: 14px;
        line-height: 20px;
    }
    
    .pde-spec-label,
    .pde-spec-value {
        font-size: 12px;
    }
}

.pde-compare-empty {
    padding: 40px 20px;
    text-align: center;
    background: #F9F9F9;
    border-radius: 8px;
    border: 1px dashed #DDD;
}

.pde-compare-empty p {
    margin: 8px 0;
    color: #666;
    font-size: 16px;
}

.pde-usage-hint {
    margin-top: 16px !important;
    font-size: 14px !important;
    color: #999 !important;
}

.pde-usage-hint code {
    background: #F0F0F0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #D63384;
}

body .pde-product-card .pde-product-tags .pde-tag,
body .pde-product-card .pde-tag,
body .pde-tag {
    font-weight: 400 !important;
}

body .pde-product-card .pde-product-image-wrapper .pde-compare-btn,
body .pde-product-card .pde-compare-btn,
body .pde-compare-btn,
body .pde-compare-btn span,
body .pde-compare-btn * {
    font-weight: 400 !important;
}

.pde-related-products {
    width: 1200px;
    max-width: 100%;
    overflow: hidden;
    display: block !important;
    position: relative;
    padding-bottom: 10px;
}

.pde-related-products-scroll {
    display: flex !important;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x pan-y;
    cursor: grab;
    user-select: none;
}

.pde-related-products-scroll.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.pde-related-products-scroll::-webkit-scrollbar {
    display: none;
}

.pde-related-products .pde-product-card {
    min-width: 204px;
    max-width: 204px;
    flex-shrink: 0;
}

.pde-related-card .pde-compare-btn {
    display: none !important;
}

/* 滚动进度条 */
.pde-scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #E0E0E0;
    border-radius: 2px;
    overflow: hidden;
}

.pde-scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #170057 0%, #5C4DA8 100%);
    border-radius: 2px;
    transition: width 0.1s ease-out;
    width: 0%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .pde-related-products {
        padding-bottom: 8px;
    }
    
    .pde-scroll-progress {
        height: 2px;
    }
}

