/* 浏览历史页面样式 */
.history-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    z-index: 100;
    height: 50px;
}

.header-left {
    display: flex;
    align-items: center;
}

.back-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #333;
    margin-right: 15px;
}

.history-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.clear-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #ff4757;
    cursor: pointer;
}

.history-content {
    margin-top: 50px;
    padding-bottom: 70px;
}

/* 统计信息 */
.history-stats {
    background: #fff;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.stats-text {
    font-size: 14px;
    color: #666;
}

.stats-count {
    color: #ff4757;
    font-weight: 600;
}

/* 日期分组 */
.date-group {
    margin-bottom: 20px;
}

.date-header {
    background: #f8f9fa;
    padding: 10px 15px;
    font-size: 14px;
    color: #666;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.history-list {
    padding: 0 15px;
}

.history-item {
    background: #fff;
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.history-item.unavailable {
    opacity: 0.6;
}

.history-item.unavailable::after {
    content: '商品已下架';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
}

.product-main {
    padding: 15px;
    display: flex;
    cursor: pointer;
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-specs {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-stars {
    display: flex;
    margin-right: 5px;
}

.star {
    color: #ffa502;
    font-size: 12px;
    margin-right: 1px;
}

.rating-text {
    font-size: 12px;
    color: #666;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.current-price {
    font-size: 16px;
    color: #ff4757;
    font-weight: 600;
    margin-right: 8px;
}

.original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
}

.discount-badge {
    background: #ff4757;
    color: #fff;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 2px;
}

.product-sales {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.view-time {
    font-size: 12px;
    color: #999;
}

.history-actions {
    display: flex;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid #f0f0f0;
}

.action-btn:last-child {
    border-right: none;
}

.action-btn:hover {
    background: #f8f9fa;
}

.action-btn.favorite-btn {
    color: #ff4757;
}

.action-btn.cart-btn {
    color: #ff4757;
    font-weight: 600;
}

.action-btn.buy-btn {
    background: #ff4757;
    color: #fff;
    font-weight: 600;
}

.action-btn.buy-btn:hover {
    background: #ff3742;
}

.action-btn.remove-btn {
    color: #999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-text {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.empty-btn {
    padding: 12px 30px;
    background: #ff4757;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.empty-btn:hover {
    background: #ff3742;
}

/* 确认对话框 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirm-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin: 0 20px;
    max-width: 300px;
    width: 100%;
    text-align: center;
}

.confirm-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.confirm-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 15px;
}

.confirm-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-btn.primary {
    background: #ff4757;
    color: #fff;
    border-color: #ff4757;
}

.confirm-btn:hover {
    opacity: 0.8;
}