/* ================= 全局与通用样式 ================= */
body { 
    background-color: #f5f5f7; 
}

/* ================= 文章详情页 (art/detail.html) 样式 ================= */

/* 主要内容容器 */
.deal-wrapper {
    max-width: 820px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.deal-main-content { 
    padding: 25px; 
}

/* 头部信息 */
.deal-header .breadcrumb { 
    background-color: transparent; 
    padding: 0; 
    margin-bottom: 15px; 
}
.deal-title { 
    font-size: 28px; 
    font-weight: 600; 
    margin-bottom: 10px; 
}
.deal-meta { 
    color: #999; 
    font-size: 13px; 
    margin-bottom: 20px; 
}
.deal-meta span { 
    margin-right: 15px; 
}

/* 摘要/小编推荐区域 */
.alert-warning {
    background-color: #fff8e1;
    border-color: #ffe58f;
}
.alert-heading { 
    font-weight: bold; 
}

/* 文章正文 */
.deal-content { 
    font-size: 16px; 
    line-height: 1.8; 
}
.deal-content img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    margin: 15px 0; 
}

/* === 新增：突出正文中的超链接 === */
.deal-content a {
    color: #0d6efd; /* 使用Bootstrap的主题蓝色，使其非常醒目 */
    text-decoration: underline; /* 添加下划线，明确链接身份 */
    font-weight: 500; /* 轻微加粗 */
    transition: color 0.2s ease; /* 添加平滑的颜色过渡效果 */
}
.deal-content a:hover {
    color: #0a58ca; /* 鼠标悬停时颜色加深 */
    text-decoration: none; /* 鼠标悬停时可以移除下划线，提供交互感 */
}
/* === 新增结束 === */

/* 购买步骤指南 */
.purchase-guide { 
    margin-top: 30px; 
    border-top: 1px solid #eee; 
    padding-top: 25px; 
}
.purchase-guide h4 { 
    font-weight: bold; 
    margin-bottom: 20px; 
}
.step { 
    display: flex; 
    align-items: flex-start; 
    margin-bottom: 25px; 
}
.step-icon {
    flex-shrink: 0;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}
.step-body p { 
    margin-bottom: 5px; 
}

/* 优惠码/口令 */
.coupon-code {
    background-color: #e9ecef;
    border: 1px dashed #ced4da;
    padding: 8px 12px;
    font-family: monospace;
    font-weight: bold;
    color: #d63384;
    border-radius: 4px;
    display: inline-block;
    cursor: pointer;
}

/* 购买按钮 */
.btn-buy { 
    font-weight: bold; 
    padding: 12px 25px; 
    font-size: 18px; 
}

/* 相关推荐区域 */
.related-section { 
    padding: 25px; 
    background-color: #fafafa; 
    border-top: 1px solid #eee; 
}

/* ================= 文章列表页 (art/type.html) 样式 ================= */

/* 活动卡片 */
.deal-card {
    transition: all 0.2s ease-in-out;
}
.deal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}
.deal-card .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.deal-card .card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    height: 52px;
}
.deal-card .card-title:hover {
    color: #d63384;
}

/* 价格区域 */
.deal-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d63384;
    display: flex;
    align-items: baseline;
}
.deal-price .price-label {
    font-size: 0.9rem;
    font-weight: normal;
    margin-right: 4px;
}
.deal-price .original-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: normal;
}

/* 分页当前页码样式 */
.page-link.page_current {
    z-index: 2;
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}
/* --- 新增的侧边栏及布局样式 --- */

/* 主内容区域的白色背景和阴影，使其与侧边栏区分 */
.main-content-wrapper {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* 侧边栏通用样式 */
.sidebar .widget {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.sidebar .widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* 作者信息小部件 */
.author-widget .author-card {
    text-align: center;
}

.author-widget .author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #f0f0f0;
}

.author-widget .author-name {
    font-size: 1.2rem;
    margin: 0;
}

.author-widget .author-bio {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
}

/* 相关文章小部件中的标题截断 */
.related-widget .text-truncate {
    max-width: 200px; /* 根据需要调整宽度 */
}


/* 移动端适配 */
@media (max-width: 991.98px) {
    /* 在小屏幕上，为侧边栏添加顶部间距 */
    .sidebar {
        margin-top: 20px;
    }
}


/* --- 您原有的样式（为保持完整性，请保留） --- */

.deal-wrapper {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.deal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.deal-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.deal-meta {
    font-size: 0.9rem;
    color: #888;
}

.deal-meta span {
    margin-right: 15px;
}

.deal-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

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

.purchase-guide {
    margin-top: 30px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.purchase-guide h4 {
    font-weight: bold;
    margin-bottom: 20px;
}

.purchase-guide .step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.purchase-guide .step-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background-color: #0d6efd;
    color: #fff;
    font-weight: bold;
    margin-right: 15px;
}

.purchase-guide .step-body p {
    margin: 0;
}

.purchase-guide .step-body p:first-child {
    font-weight: bold;
    margin-bottom: 5px;
}

.coupon-code {
    background-color: #fffbe6;
    border: 1px dashed #ffe58f;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
    color: #d46b08;
    text-align: center;
}

.btn-buy {
    font-size: 1.1rem;
    font-weight: bold;
}

.related-section {
    margin-top: 20px;
}

.related-section h4 {
    margin-bottom: 15px;
    font-weight: bold;
}
/*商品卡片*/

/* 默认桌面端样式 */
.product-card {
    display: flex;
    align-items: center;
    width: 98%;
    min-height: 140px;
    margin: 15px auto;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

.product-card .product-image {
    flex: 0 0 120px;
    margin-right: 15px;
}

.product-card .product-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.product-card .product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch; /* 撑满父容器高度 */
}

.product-card .product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card .shop-name {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.product-card .product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.product-card .price {
    margin: 0;
    font-size: 20px;
    color: #e4393c;
    font-weight: bold;
    line-height: 1;
}

.product-card .price span {
    font-size: 14px;
}

.product-card .buy-button {
    background-color: #ff5722;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}


/* 手机端响应式样式 (屏幕宽度小于600px时生效) */
@media (max-width: 600px) {
    .product-card {
        flex-direction: column; /* 关键：将布局变为垂直 */
        padding: 0;
        border: none;
        box-shadow: none;
    }

    .product-card .product-image {
        flex-basis: auto; /* 宽度自适应 */
        width: 100%;
        margin-right: 0;
    }

    .product-card .product-image img {
        width: 100%;
        height: auto; /* 高度自适应 */
        max-height: 400px;
        border-radius: 8px 8px 0 0;
    }

    .product-card .product-details {
        padding: 15px;
        border: 1px solid #e0e0e0;
        border-top: none;
        border-radius: 0 0 8px 8px;
    }
}