/* 页面加载样式 */
.sd_page-loading {
    max-width: 1360px;
    margin: 100px auto;
    padding: 60px 20px;
}

.sd_page-loading .sd_loading-box {
    background: white;
    border-radius: 12px;
    padding: 80px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 公告模块样式 */
.sd_notice-section {
    max-width: 1360px;
    margin: 20px auto;
    /* padding: 0 20px; */
}

.sd_notice-container {
    border-radius: 8px;
    overflow: hidden;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); */
    position: relative;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
}

@keyframes sd_float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-20px, -20px) scale(1.1);
    }
}

.sd_notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.sd_notice-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff8c42;
    font-size: 18px;
    position: relative;
    background: #fff7f0;
}

@keyframes sd_pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes sd_ripple {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.sd_notice-label {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sd_notice-body {
}

.sd_notice-content-box {
    background: white;
    padding: 15px 0 0 0;
    min-height: 60px;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    position: relative;
    overflow: auto;
    /* max-height: 300px; */
}

.sd_notice-content-box p {
    margin: 0 0 10px 0;
    padding-left: 0;
}

.sd_notice-content-box p:last-child {
    margin-bottom: 0;
}

.sd_notice-content-box img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
}

.sd_notice-content-box a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid #667eea;
    transition: all 0.3s;
}

.sd_notice-content-box a:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

.sd_notice-content-box ul,
.sd_notice-content-box ol {
    padding-left: 35px;
    margin: 10px 0;
}

.sd_notice-content-box li {
    margin: 5px 0;
}

.sd_notice-content-box strong {
    color: #667eea;
    font-weight: 600;
}

/* 商品列表样式 */
.sd_product-list-section {
    max-width: 1360px;
    margin: 10px auto;
    /* padding: 0 20px; */
    margin-bottom: 17px;
}

.sd_product-list-header {
    display: flex;
    padding: 13px 25px;
    background-color: #f5f9ff;
    border-radius: 8px 8px 0 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    border: 1px solid #e8e8e8;
    border-bottom: none;
    position: relative;
    z-index: 10;
}

.sd_product-list-header:hover {
    background-color: #fafafa;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.08);
    z-index: 11;
}

.sd_toggle-icon {
    font-size: 16px;
    color: #666;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sd_collapsed .sd_toggle-icon {
    transform: rotate(-90deg);
}

.sd_product-list-header:hover .sd_toggle-icon {
    color: #1890ff;
    transform: scale(1.2);
}

.sd_collapsed .sd_product-list-header:hover .sd_toggle-icon {
    transform: rotate(-90deg) scale(1.2);
}

.sd_collapsed .sd_product-list-header {
    border-radius: 8px;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sd_collapsible-content {
    overflow: hidden;
}

.sd_collapsed .sd_collapsible-content {
    display: none;
}

.sd_section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.sd_product-list-header:hover .sd_section-title {
    color: #1890ff;
}

.sd_section-title i {
    color: #ff7318;
    font-size: 18px;
    transition: all 0.3s ease;
}

.sd_product-list-header:hover .sd_section-title i {
    transform: rotate(5deg) scale(1.1);
}

/* 表格样式 - 改为卡片式布局 */
.sd_product-table {
    overflow: visible;
    padding: 17px 22px;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e8e8e8;
    border-top: none;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); */
    position: relative;
    background-color: #ffffff;
    z-index: 1;
}

.sd_table-header {
    display: none;
}

.sd_table-body {
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sd_product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 80px;
    /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); */
    gap: 15px;
    position: relative;
    overflow: hidden;
}

/* 悬停时的光晕效果 */
.sd_product-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
    transparent,
    rgba(24, 144, 255, 0.1),
    transparent
    );
    transition: left 0.6s ease;
}





@keyframes sd_gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}



.sd_product-row:hover {
    border: 1px solid #1890ff;
    /* border-left: 3px solid #1890ff; */
    box-shadow: 0 8px 24px rgb(144 144 144 / 15%), 0 0 0 1px rgba(24, 144, 255, 0.2);
}

/* 产品图片列 */
.sd_col-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    position: relative;
}

.sd_product-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sd_product-row:hover .sd_product-image-wrapper {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.sd_product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.sd_product-image.sd_loaded {
    animation: sd_fadeIn 0.4s ease-in;
}

@keyframes sd_fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


.sd_image-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.sd_product-image-wrapper.sd_loading .sd_image-loading {
    display: flex;
}

.sd_image-loading i {
    font-size: 20px;
    color: #1890ff;
}

/* 产品信息列（包含名称和价格） */
.sd_col-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

/* 产品名称列 */
.sd_col-name {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}



.sd_product-label {
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}



.sd_goods-type-badge {
    color: white;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: center;
    transition: all 0.3s ease;
}


/* 卡券 - 蓝色 */
.sd_goods-type-card {
    background: #5b8ff9;
}

/* 订单 - 蓝色 */
.sd_goods-type-order {
    background: #5b8ff9;
}

/* 实物 - 蓝色 */
.sd_goods-type-physical {
    background: #5b8ff9;
}

.sd_product-name {
    color: #2e2c8b;
    font-size: 15px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;
    font-weight: 600;
}

.sd_product-row:hover .sd_product-name {
    color: #1890ff;
    font-weight: 500;
}

/* 价格信息区域 */
.sd_col-price-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 价格行 */
.sd_price-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 价格 */
.sd_price {
    color: #ff4d4f;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}



/* 原价 */
.sd_original-price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
    font-weight: 400;
    transition: all 0.3s ease;
}



/* 标签容器 */
.sd_col-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 信息标签样式 */
.sd_info-tag {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    background: #f5f5f5;
    color: #666;
    font-weight: 400;
    transition: all 0.3s ease;
}


.sd_tag-stock {
    background: #efefef;
    color: #8e8e8e;
}



.sd_tag-sales {
    background: #f5f5f5;
    color: #4d4d4d;
}


/* 批发价列 */
.sd_col-wholesale {
    display: none;
}

/* 购买按钮列 */
.sd_col-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0 0 0 15px;
}

.sd_buy-btn {
    background: #1890ff;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    gap: 6px;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.sd_buy-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.sd_buy-btn:hover::before {
    width: 300px;
    height: 300px;
}

.sd_buy-btn:hover {
    background: #40a9ff;
    box-shadow: 0 6px 20px rgba(24, 144, 255, 0.5);
    color: white;
    transform: translateY(-2px) scale(1.05);
}

.sd_buy-btn:active {
    transform: translateY(0) scale(0.98);
}

.sd_buy-btn i {
    font-size: 14px;
    transition: all 0.3s ease;
}

.sd_buy-btn:hover i {
    transform: rotate(15deg) scale(1.2);
}

/* 加载和空状态样式 */
.sd_loading-box,
.sd_empty-box {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.sd_loading-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sd_loading-box i {
    font-size: 20px;
    color: #1890ff;
}

.sd_empty-box {
    color: #ccc;
    font-size: 14px;
    background: white;
    border-radius: 12px;
    padding: 60px 20px;
    border: 1px solid #e8e8e8;
}

/* ==================== 性能优化CSS - 减少重排重绘 ==================== */

/* 使用 GPU 加速 */
.sd_product-row {
    will-change: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 优化动画性能 */
.sd_collapsible-content {
    overflow: hidden;
}

/* 减少重绘 */
.sd_product-name,
.sd_price,
.sd_original-price,
.sd_info-tag {
    contain: layout style;
}

/* 虚拟滚动容器优化 */
.sd_table-body {
    contain: layout style paint;
    content-visibility: auto;
    transform: translateZ(0);
}

/* 图片懒加载优化 */
.sd_product-image {
    content-visibility: auto;
}

/* 减少动画卡顿 */
.sd_toggle-icon {
    will-change: transform;
}

/* 优化滚动性能 */
.sd_product-list-section {
    contain: layout style;
    isolation: isolate;
}

/* 优化表格渲染 */
.sd_product-table {
    contain: layout style;
}

/* 减少重绘区域 */
.sd_col-image,
.sd_col-info,
.sd_col-action {
    contain: layout;
}

/* 优化文本渲染 */
.sd_product-name {
    text-rendering: optimizeSpeed;
}

/* 防止字体闪烁 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 优化滚动条性能 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 使用硬件加速优化滚动 */
#main-content {
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
}

/* 优化hover性能 - 减少will-change使用 */
.sd_buy-btn:hover {
    transform: translateZ(0);
}

.sd_product-row:hover {
    transform: translateZ(0);
}

/* 优化图片容器 */
.sd_product-image-wrapper {
    contain: layout style paint;
}
