/* ==================== 全局基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    position: relative;
    padding-bottom: 0 !important;
    font-family: Arial, sans-serif; /* 阿里风格字体 */
}

/* ==================== 核心布局容器 ==================== */
/* 黄金分割主布局容器 */
.product-single-wrapper {
    min-width: 1180px;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    padding: 80px 20px 80px;
    width: 100%;
}

/* 左侧主内容区 (61.8%) */
.product-left-content {
    flex: 0 0 calc(100% * 0.618);
    min-width: 720px; /* 最小宽度兜底 */
}

/* 右侧核心侧边栏 (38.2%) */
.product-right-sidebar {
    flex: 0 0 calc(100% * 0.382 - 20px);
    min-width: 420px;
    position: fixed;
    top: 220px;
    right: calc((100% - 1440px) / 2 + 20px);
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* ==================== 顶部面包屑&标题区域 ==================== */
.product-header-bar {
    width: 100%;
    margin: 0 0 20px 0;
    padding: 10px 0;
    display: block;
    visibility: visible;
    z-index: 10;
    position: relative;
}

/* 面包屑导航 */
.product-breadcrumb {
    font-size: 12px;
    color: #666;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.product-breadcrumb a {
    color: #007bff;
    text-decoration: none;
    margin: 0 5px;
}

.product-breadcrumb span {
    color: #999;
}

/* 产品主标题 */
.product-main-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
    padding: 5px 0;
}

/* 产品导航标签（选项卡） */
.product-nav-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.product-nav-tabs .tab-item {
    padding: 10px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.product-nav-tabs .tab-item.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
}

/* ==================== 产品图片展示区域 ==================== */
.product-des .box-container {
    display: block !important;
    margin: 0 !important;
}

.product-des .image {
    width: 100% !important;
    margin-bottom: 30px !important;
}

/* 图片容器（弹性布局） */
.image-container {
    display: flex;
    width: 100%;
    gap: 15px;
    align-items: flex-start;
}

/* 小图侧边栏（上下按钮+缩略图） */
.thumb-wrapper {
    flex: 0 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thumb-up-btn, .thumb-down-btn {
    width: 80px;
    height: 30px;
    border: 1px solid #eee;
    background-color: #fff;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.thumb-down-btn {
    margin-top: 8px;
    margin-bottom: 0;
}

.thumb-up-btn:hover, .thumb-down-btn:hover {
    background-color: #f5f5f5;
}

/* 小图列表容器 */
.change-btns {
    width: 80px !important;
    height: 340px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    padding: 0 !important;
}

.change-btns img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border: 2px solid transparent !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: border-color 0.2s !important;
}

.change-btns img.active {
    border-color: #007bff !important;
}

/* 主图展示区 */
.main {
    flex: 1 !important;
    position: relative !important;
    width: 100% !important;
    height: 400px !important;
    border: 1px solid #eee !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

.main img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* 媒体标签 (Photos/Video) */
.media-tabs {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    display: flex !important;
    gap: 8px !important;
}

.media-tabs button {
    padding: 4px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    font-size: 12px !important;
    cursor: pointer !important;
}

.media-tabs button.tab-active {
    background-color: #007bff !important;
    color: #fff !important;
    border-color: #007bff !important;
}

/* ==================== 图片区域增强样式（正方形+左右按钮） ==================== */
.product-image-section {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* 左侧小图栏（带上下按钮） */
.product-thumb-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 80px;
}

/* 上下翻页按钮 */
.thumb-nav-btn {
    width: 80px;
    height: 36px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.2s;
}

.thumb-nav-btn:hover {
    background: #f5f5f5;
}

/* 小图列表容器 */
.product-thumb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 小图样式 */
.product-thumb-item {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.product-thumb-item.active {
    border-color: #2188ff;
}

.product-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 主图区域（含左右切换按钮） */
.product-main-image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 主图左右切换按钮 */
.main-image-nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    flex-shrink: 0;
    transition: background 0.2s;
}

.main-image-nav-btn:hover {
    background: #f5f5f5;
}

/* 正方形主图容器 */
.product-main-image {
    flex: 1;
    position: relative;
    aspect-ratio: 1/1;
    min-width: 300px;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==================== 右侧侧边栏内容样式 ==================== */
/* 侧边栏标题 */
.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #222;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 核心卖点 */
.selling-points {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.point-list {
    list-style: none;
    padding: 0;
}

.point-list li {
    font-size: 14px;
    margin-bottom: 8px;
    padding-left: 18px;
    position: relative;
}

.point-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: 600;
}

/* 价格模块 */
.price-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.price-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.price-value {
    font-size: 24px;
    font-weight: 600;
    color: #f5222d;
    margin-bottom: 10px;
}

.sale-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f5222d;
    color: #fff;
    font-size: 12px;
    border-radius: 2px;
    margin-right: 8px;
}

.hot-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #ff7d00;
    color: #fff;
    font-size: 12px;
    border-radius: 2px;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-top: 5px;
    display: block;
}

/* 按钮样式 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-accent {
    background-color: #f5222d;
    color: #fff;
}

.btn-accent:hover {
    background-color: #d91818;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* ==================== 产品详情&相关产品 ==================== */
/* 隐藏原右侧产品信息 */
.product-des .content {
    display: none !important;
}

/* 产品详情标签页 */
.product-info.tab-info {
    margin-top: 30px !important;
}

/* 限制详情页图片大小 */
#description .description p img {
    width: 100% !important;    /* 强制占满容器宽度 */
    max-width: 100% !important;/* 防止超出容器 */
    height: auto !important;   /* 高度自适应，保持宽高比 */
    display: block !important; /* 消除图片默认行内间隙 */
    margin: 0 auto 20px auto !important; /* 居中+底部间距，可选 */
    object-fit: contain !important; /* 完整显示图片，不裁剪 */
}
/* .description容器内所有图片占满容器宽度（优先级最高） */
.description img {
    width: 100% !important;    /* 强制占满容器宽度 */
    max-width: 100% !important;/* 防止超出容器 */
    height: auto !important;   /* 高度自适应，保持宽高比 */
    display: block !important; /* 消除图片默认行内间隙 */
    margin: 0 auto 20px auto !important; /* 居中+底部间距，可选 */
    object-fit: contain !important; /* 完整显示图片，不裁剪 */
}

/* 可选：如果想给图片加轻微边框，提升美观度 */
.description img {
    border: 1px solid #f5f5f5 !important;
    border-radius: 4px !important;
    padding: 4px !important;
}
/* 相关产品区域 */
.related-items {
    margin-top: 40px !important;
}

.related-items .box-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.related-items .product-item {
    flex: 0 0 calc(25% - 11.25px);
    max-width: calc(25% - 11.25px);
}

.related-items .product-item .image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-items .product-item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 相关产品文字样式 */
.related-items .sidebar-heading h2 {
    font-size: 18px;
    font-weight: 600;
}

.related-items .product-item .content h3 {
    font-size: 14px;
    line-height: 1.4;
    margin: 8px 0 4px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-items .product-item .content .rating {
    font-size: 12px;
    color: #ffc107;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    /* 详情页图片移动端适配 */
    #description .description p img {
        max-height: 400px !important;
    }

    /* 重置宽度限制 */
    .product-header-bar, .product-single-wrapper {
        min-width: 320px;
        max-width: 100%;
    }

    /* 单列布局 */
    .product-single-wrapper {
        flex-direction: column;
        padding-bottom: 80px;
    }

    .product-left-content, .product-right-sidebar {
        flex: none;
        width: 100%;
        min-width: unset;
    }

    /* 隐藏PC侧边栏，显示移动端底部栏 */
    .product-right-sidebar {
        display: none;
    }

    .mobile-fixed-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        padding: 15px 20px;
        border-top: 1px solid #eee;
        z-index: 999;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    }

    /* 移动端图片区适配 */
    .image-container {
        flex-direction: column;
    }

    .thumb-wrapper {
        flex-direction: row;
        width: 100% !important;
        align-items: center;
        justify-content: space-between;
    }

    .thumb-up-btn, .thumb-down-btn {
        width: 30px !important;
        height: 80px !important;
        margin: 0 8px 0 0 !important;
    }

    .thumb-down-btn {
        margin: 0 0 0 8px !important;
        margin-top: 0 !important;
    }

    .change-btns {
        width: 100% !important;
        height: 80px !important;
        flex-direction: row !important;
        overflow: hidden !important;
    }

    .main {
        height: 300px !important;
    }

    /* 移动端按钮横向排列 */
    .mobile-fixed-bar .action-buttons {
        flex-direction: row;
    }

    .mobile-fixed-bar .sidebar-btn {
        padding: 10px 0 !important;
        font-size: 13px !important;
    }

    /* 移动端相关产品 */
    .related-items .product-item {
        flex: 0 0 calc(50% - 7.5px);
        max-width: calc(50% - 7.5px);
    }

    /* 移动端标题适配 */
    .product-main-title {
        font-size: 18px;
    }
}

/* ==================== 过渡屏适配 (769px - 1180px) ==================== */
@media (min-width: 769px) and (max-width: 1180px) {
    .product-header-bar, .product-single-wrapper {
        min-width: 100%;
        padding: 0 15px;
    }

    .product-right-sidebar {
        right: 20px;
        top: 120px;
        max-height: calc(100vh - 140px);
    }
}

/* ==================== Cookie弹窗样式 ==================== */
#cookieConsent {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #2c3e50 !important;
    color: white !important;
    padding: 15px 20px !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
    z-index: 99999 !important;
    transform: translateY(0) !important;
    display: block !important;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.cookie-text {
    flex: 1;
    min-width: 250px;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-text a {
    color: #3498db !important;
    text-decoration: underline !important;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-accept {
    background: #2ecc71;
    color: white;
}

.btn-decline {
    background: #e74c3c;
    color: white;
}