/* ============================================================
   产品模块样式 (product.css)
   合并自: product_detail.css + product_list.css
   ============================================================ */

@import url('prev-next-nav.css');

/* 面包屑导航 */
.breadcrumb-nav {
    background: transparent;
    border-bottom: none;
    padding: 15px 0;
}

.breadcrumb {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    line-height: 1;
}

.breadcrumb-item {
    font-size: 14px;
    color: #999;
    line-height: 1;
}

.breadcrumb-item a {
    color: #666;
    line-height: 1;
}

.breadcrumb-item a:hover {
    color: #1890ff;
}

.breadcrumb-item.active {
    color: #333;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    margin: 0 6px;
    color: #ccc;
    line-height: 1;
}

/* 页面头部 */
.page-header {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding-top: 70px;
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #555;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-desc {
    font-size: 16px;
    opacity: .85;
}

.channel-content {
    padding: 10px 0 40px;
}

.channel-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
}

.sub-channel-nav {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.sub-channel-list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 10px;
}

.sub-channel-item a {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    background: #f5f5f5;
    transition: all .3s;
}

.sub-channel-item a:hover,
.sub-channel-item.active a {
    background: #1890ff;
    color: #fff;
}

/* 侧边栏组件（列表页） */
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1890ff;
}

.widget-list {
    list-style: none;
}

.widget-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget-item:last-child {
    border-bottom: none;
}

.widget-item a {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .3s;
}

.widget-item a:hover {
    color: #1890ff;
}

.widget-item.active a {
    color: #1890ff;
    font-weight: 600;
}

/* 热门排行 */
.hot-list .widget-item a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hot-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f0f0f0;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.hot-rank-top {
    background: #ff4d4f;
    color: #fff;
}

.hot-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.hot-views {
    font-size: 12px;
    color: #ccc;
    flex-shrink: 0;
}

/* 分页 */
.pagination-wrapper {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.page-item a,
.page-item span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: all .3s;
}

.page-item a:hover {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.page-item.active a {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.page-item.disabled span {
    color: #ccc;
    cursor: not-allowed;
}

.pagination-info {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state p {
    font-size: 16px;
    margin-top: 10px;
}

/* 通用按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all .3s;
    border: none;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-outline {
    background: #fff;
    color: #1890ff;
    border: 1px solid #1890ff;
}

.btn-outline:hover {
    background: #1890ff;
    color: #fff;
}

/* 通用标题 */
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1890ff;
}

/* 产品卡片（列表页与详情页相关推荐共用） */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: all .3s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

.product-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform .3s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-info {
    padding: 15px;
}

.product-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-card-title a {
    color: #333;
}

.product-card-title a:hover {
    color: #1890ff;
}

.product-card-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff4d4f;
}

.product-original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
}

.product-brand {
    font-size: 13px;
    color: #999;
}

/* 上下篇导航 */
.detail-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.detail-nav .nav-item {
    flex: 1;
}

.detail-nav .nav-item:last-child {
    text-align: right;
}

.nav-label {
    font-size: 13px;
    color: #999;
    display: block;
    margin-bottom: 5px;
}

.nav-link {
    color: #1890ff;
    font-size: 14px;
}

.nav-link:hover {
    text-decoration: underline;
}

.nav-none {
    color: #ccc;
    font-size: 14px;
}

/* ---- 产品详情页 ---- */
.product-detail-section {
    padding: 30px 0;
}

/* 产品详情布局：左侧图片 + 右侧信息 */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* 产品图片画廊 */
.product-main-image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.product-thumb-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.product-thumb-item {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color .3s;
}

.product-thumb-item:hover,
.product-thumb-item.active {
    border-color: #1890ff;
}

.product-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* 产品信息区 */
.product-detail-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.product-price-box {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff8f0;
    border-radius: 8px;
}

.product-current-price {
    font-size: 28px;
    font-weight: 700;
    color: #ff4d4f;
}

.product-specs {
    margin-bottom: 20px;
}

.spec-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

.spec-label {
    color: #999;
    width: 80px;
    flex-shrink: 0;
}

.spec-value {
    color: #333;
}

.in-stock {
    color: #52c41a;
}

.out-stock {
    color: #ff4d4f;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* 产品详情内容区（标签页切换） */
.product-detail-content {
    margin-top: 30px;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.tab-link {
    padding: 12px 24px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .3s;
}

.tab-link:hover {
    color: #1890ff;
}

.tab-link.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.product-detail-body {
    line-height: 1.8;
    font-size: 15px;
}

.product-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* 产品参数表格 */
.params-table {
    width: 100%;
    border-collapse: collapse;
}

.params-table th,
.params-table td {
    padding: 10px 15px;
    border: 1px solid #e8e8e8;
    text-align: left;
    font-size: 14px;
}

.params-table th {
    background: #fafafa;
    color: #666;
    width: 120px;
}

/* 相关产品推荐 */
.related-products {
    margin-top: 30px;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* 详情页相关推荐的产品卡片覆盖样式 */
.related-products .product-list {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.related-products .product-card-image {
    height: 180px;
}

.related-products .product-card-info {
    padding: 12px;
}

.related-products .product-card-title {
    font-size: 14px;
}

.related-products .product-price {
    font-size: 16px;
}

.collections {
    padding: 50px 0;
}

.collections-intro {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    font-size: 14px;
    color: #c8a97e;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.collections-intro-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.collections-intro-text {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 16px;
    color: #666;
    line-height: 1.8;
}

.collection-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    gap: 10px;
}

.collection-tab {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .3s;
    color: #666;
    text-decoration: none;
}

.collection-tab:hover {
    color: #c8a97e;
}

.collection-tab.active {
    color: #c8a97e;
    border-bottom-color: #c8a97e;
    font-weight: 600;
}

.collection-content {
    display: none;
}

.collection-content.active {
    display: block;
}

.collection-header {
    text-align: center;
    margin-bottom: 50px;
}

.collection-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.collection-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    color: #666;
    line-height: 1.8;
}

.lookbook-carousel {
    position: relative;
    width: 100%;
    margin: 40px 0;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform .5s ease;
    will-change: transform;
}

.lookbook-item {
    flex: 0 0 calc(100% / 3);
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.lookbook-image {
    width: 100%;
    height: 400px;
    object-fit: fill;
    transition: transform .5s ease;
}

.lookbook-item:hover .lookbook-image {
    transform: scale(1.05);
}

.lookbook-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent);
    color: #fff;
    transform: translateY(100%);
    transition: transform .3s ease;
}

.lookbook-item:hover .lookbook-overlay {
    transform: translateY(0);
}

.lookbook-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.lookbook-subtitle {
    font-size: 14px;
    color: #c8a97e;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background .3s;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, .8);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background .3s;
}

.carousel-dot.active {
    background: #c8a97e;
}

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .8);
    border-radius: 8px;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 0;
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: opacity .3s ease;
}

.close-modal:hover {
    opacity: .8;
}

.modal-info {
    color: #fff;
    text-align: center;
    margin-top: 20px;
    max-width: 600px;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-subtitle {
    color: #c8a97e;
    margin-bottom: 15px;
    font-size: 14px;
}

.modal-description {
    font-size: 16px;
    line-height: 1.6;
    color: #ccc;
}

@media (max-width: 992px) {
    .lookbook-item {
        flex: 0 0 calc(100% / 2);
    }
}

@media (max-width: 768px) {
    .page-header {
        height: 200px;
        padding-top: 60px;
    }

    .page-title {
        font-size: 24px;
    }

    .product-detail-layout {
        grid-template-columns: 1fr;
    }

    .product-main-image {
        height: 280px;
    }

    .product-detail-title {
        font-size: 22px;
    }

    .related-products .product-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .channel-layout {
        grid-template-columns: 1fr;
    }

    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .channel-title {
        font-size: 28px;
    }

    .collections-intro-title {
        font-size: 28px;
    }

    .collection-title {
        font-size: 24px;
    }

    .collection-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        justify-content: flex-start;
        padding-bottom: 10px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .collection-tabs::-webkit-scrollbar {
        display: none;
    }

    .collection-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .collection-tabs.scrollable {
        justify-content: flex-start;
        gap: 10px;
    }
    
    .collection-tabs.scrollable .collection-tab {
        padding: 10px 15px;
    }

    .lookbook-item {
        flex: 0 0 80%;
        padding: 0 10px;
    }

    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .lookbook-image {
        height: 280px;
    }

    .modal-image {
        max-height: 50vh;
    }
}
