/**
 * 促销购物车PC端可折叠样式
 * Promotion Cart Desktop Collapsible Styles
 */

/* 促销组容器 */
.promotion-group-wrapper {
    margin-bottom: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 促销组头部行 - 可折叠 */
.promotion-group-header-row {
    background: linear-gradient(135deg, #FFF8E7, #F4E4C1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid #D4AF37;
}

.promotion-group-header-row:hover {
    background: linear-gradient(135deg, #F4E4C1, #E8D4A8);
}

.promotion-group-header-row td {
    padding: 18px 15px !important;
    font-weight: 600;
    vertical-align: middle;
}

/* 头部checkbox */
.promotion-group-header-row .promotion-group-checkbox {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer !important;
    accent-color: #D4AF37 !important;
}

/* 促销标题单元格 */
.promotion-title-header-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-tag-desktop {
    display: inline-block;
    background: linear-gradient(135deg, #E32C2B, #C41E1D);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.promotion-title-text {
    font-size: 16px;
    font-weight: 700;
    color: #2C2C2C;
}

/* 总数量和总价格 */
.promotion-total-quantity,
.promotion-total-price {
    font-size: 18px;
    font-weight: 700;
    color: #D4AF37;
    text-align: center;
}

/* 折叠图标 */
.promotion-toggle-icon {
    font-size: 20px;
    color: #D4AF37;
    transition: transform 0.3s ease;
    text-align: center;
    user-select: none;
}

.promotion-group-wrapper.collapsed .promotion-toggle-icon {
    transform: rotate(-90deg);
}

/* 促销商品表格容器 */
.promotion-products-table-wrapper {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.promotion-group-wrapper.collapsed .promotion-products-table-wrapper {
    max-height: 0;
}

/* 促销商品表格 */
.promotion-products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.promotion-products-table thead {
    background: #F5F5F5;
    border-top: 1px solid #E0E0E0;
}

.promotion-products-table thead th {
    padding: 12px 10px;
    text-align: center;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #E0E0E0;
}

.promotion-products-table thead th:first-child {
    width: 10%;
}

.promotion-products-table thead th:nth-child(2) {
    width: 15%;
}

.promotion-products-table thead th:nth-child(3) {
    width: 25%;
}

.promotion-products-table thead th:nth-child(4) {
    width: 10%;
}

.promotion-products-table thead th:nth-child(5) {
    width: 15%;
}

.promotion-products-table thead th:nth-child(6) {
    width: 15%;
}

.promotion-products-table tbody tr {
    border-bottom: 1px solid #F0F0F0;
    transition: background 0.3s ease;
}

.promotion-products-table tbody tr:hover {
    background: #FAFAFA;
}

.promotion-products-table tbody td {
    padding: 15px 10px;
    vertical-align: middle;
    text-align: center;
}

/* 商品图片 */
.product-image-cell {
    position: relative;
}

.product-image-cell img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #E0E0E0;
    transition: all 0.3s ease;
}

.product-image-cell img.clickable-cart-image:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    z-index: 10;
    border-color: #D4AF37;
}

/* 图片悬停提示 */
.product-image-cell::after {
    content: '🔍 Click';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 20;
}

.product-image-cell:hover::after {
    opacity: 1;
}

/* 商品编号 */
.product-no-cell {
    font-size: 14px;
    font-weight: 600;
    color: #2C2C2C;
}

/* 商品属性 */
.product-attribute-cell {
    font-size: 13px;
    color: #666;
    text-align: left;
    padding-left: 15px !important;
}

.product-attribute-cell .attr-row {
    margin-bottom: 4px;
}

.product-attribute-cell .attr-row:last-child {
    margin-bottom: 0;
}

.product-attribute-cell .attr-label {
    font-weight: 600;
    color: #999;
    margin-right: 8px;
}

/* 数量 */
.product-num-cell {
    font-size: 15px;
    font-weight: 700;
    color: #D4AF37;
}

/* 单价 */
.product-price-cell {
    font-size: 15px;
    font-weight: 600;
    color: #666;
}

/* 总价 */
.product-total-price-cell {
    font-size: 16px;
    font-weight: 700;
    color: #D4AF37;
}

/* 空状态 */
.promotion-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.promotion-empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.promotion-empty-state p {
    font-size: 16px;
    margin: 0;
}

/* 响应式 - 在移动端隐藏 */
@media (max-width: 768px) {
    .promotion-group-wrapper {
        display: none !important;
    }
}
