/*
 * Single Product Page - Yamazaki Style
 * 参考: 效果图 - 缩略图、主图、面包屑顶部严格对齐
 */

/* 顶部对齐：确保左栏与右栏、缩略图与主图同一水平线 */
.single-product .product-main-content {
    align-items: start !important;
}

.single-product .product-images-section,
.single-product .product-info-section {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.single-product .product-gallery {
    align-items: flex-start !important;
}

.single-product .product-thumbnails .thumbnail-item:first-child {
    margin-top: 0 !important;
}

/* ========================================
   面包屑导航
   ======================================== */

.product-breadcrumb {
    padding: 0;
    margin: 0 0 16px 0;
    border-bottom: none;
}
.product-breadcrumb .breadcrumb-container {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}
.product-breadcrumb a {
    color: #999;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.breadcrumb-container a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-container a:hover {
    color: #000;
}

.breadcrumb-separator {
    color: #999;
}

/* ========================================
   产品主要内容区域
   ======================================== */

.product-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 32px !important;
    margin-bottom: 80px;
    align-items: start;  /* 顶部严格对齐：缩略图、主图、面包屑同一水平线 */
}

@media (min-width: 1920px) {
    .single-product .ast-container {
        max-width: 100%;
    }
    .product-info-section {
        margin-left: -18px;
    }
}
/* ========================================
   产品图片区域
   ======================================== */

.product-images-section {
    position: relative;
    padding-top: 0;
    margin-top: 0;
    min-width: 0; /* 允许随浏览器缩小而缩小 */
    max-width: 1448px;
}

.product-gallery {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
    padding-top: 0;
    margin-top: 0;
    min-width: 0; /* 允许随浏览器缩小而缩小 */
}

/* 缩略图容器 - 随主图区域等比缩放：主图变小缩略图也变小，主图变大也变大 */
.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.2vw, 16px);
    flex: 0 1 auto;
    width: min(192px, 13%);
    /* overflow-y: auto; */
    padding: 0 !important;
    margin: 0 !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-radius: 4px;
}
.product-thumbnails::-webkit-scrollbar {
    display: none;
}



/* 主图片容器 - 图一风格：白卡片、圆角、产品居中，随浏览器等比缩小 */
.main-product-image {
    flex: 1;
    min-width: 0; /* 允许随浏览器缩小 */
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
    position: relative;
    min-height: clamp(280px, 40vw, 500px);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-radius: 4px;
    padding-right: 32px;
}

.main-product-image.is-zoomed {
    cursor: zoom-out; /* 放大后显示缩小图标 */
}

/* 主图片样式 - 图一：产品完整居中，浅灰背景 */
.product-main-img {
    width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    background: #f5f5f5 !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important; /* 增加 transform 过渡 */
    /* 覆盖任何WooCommerce样式 */
    position: relative !important;
    z-index: 1 !important;
    transform-origin: center center;
}

/* 移动端调整 */
@media (max-width: 768px) {
    .main-product-image {
        cursor: pointer;
    }
}

/* 缩略图项目 - 正方形，随容器等比缩放 */
.thumbnail-item {
    flex-shrink: 0;
    margin: 0;
    width: 102.5%;
    aspect-ratio: 1;
    background: #fff;

    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.thumbnail-item:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.thumbnail-item.active {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* 默认隐藏超出5个的缩略图，点击 More 打开弹出层查看全部 */
.thumbnail-item-hidden {
    display: none !important;
}

/* "+ N More" 按钮 - 随缩略图区域等比缩放 */
.gallery-more-btn {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1;
    margin: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.gallery-more-btn:hover {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 图片弹出层 - 参考效果图：大图+左右箭头+底部缩略图 */
.gallery-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.gallery-popup-overlay.is-open {
    display: flex;
}
.gallery-popup-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    width: 85vw;
    max-width: 1200px;
    height: 85vh;
    max-height: 800px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
/* 主图区域 + 左右箭头 */
.gallery-popup-main-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 24px 56px;
}
.gallery-popup-main {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.gallery-popup-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
/* 左右箭头 - 效果图样式：细长条贴边、半透明灰 */
.gallery-popup-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(150,150,150,0.25);
    font-size: 22px;
    font-weight: 300;
    color: #333;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.gallery-popup-arrow:hover {
    background: rgba(100,100,100,0.4);
}
.gallery-popup-prev { left: 12px; }
.gallery-popup-next { right: 12px; }
/* 图片计数 */
.gallery-popup-counter {
    padding: 8px 24px;
    font-size: 14px;
    color: #666;
    text-align: center;
}
/* 底部缩略图条 */
.gallery-popup-thumbs {
    display: flex;
    gap: 10px;
    padding: 16px 24px 24px;
    overflow-x: auto;
    justify-content: center;
    flex-wrap: wrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.gallery-popup-thumbs::-webkit-scrollbar {
    display: none;
}
.gallery-popup-thumb-item {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.gallery-popup-thumb-item:hover,
.gallery-popup-thumb-item.active {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.gallery-popup-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 缩略图图片 - 居中显示，避免模糊 */
.thumbnail-img {
    width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease !important;
    background: #fafafa;
}

.thumbnail-item:hover .thumbnail-img {
    opacity: 0.9;
}

/* 覆盖WooCommerce默认样式 */
.woocommerce-product-gallery {
    display: none !important;
}

.woocommerce-product-gallery__wrapper {
    display: none !important;
}

/* 确保我们的画廊显示 */
.product-gallery {
    display: flex !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* 移动端改为上下布局 */
    .product-gallery {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 移动端缩略图水平排列 */
    .product-thumbnails {
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        order: 2; /* 缩略图在下方 */
    }
    
    .main-product-image {
        min-height: 300px;
        max-width: 100%;
        order: 1; /* 主图片在上方 */
    }
    
    .thumbnail-item {
        width: 88px;
        height: 88px;
        flex-shrink: 0;
    }

    .gallery-more-btn {
        width: 88px;
        height: 88px;
        min-width: 88px;
        max-width: 88px;
        aspect-ratio: auto;
    }
    
    /* 手机端移除产品信息区域的左边距 */
    .product-info-section {
        padding-left: 0 !important;
    }
}

@media (min-width: 769px) {
    /* 桌面端确保左右布局 */
    .product-gallery {
        flex-direction: row !important;
    }
    
    .product-thumbnails {
        flex-direction: column !important;
        order: 1; /* 缩略图在左侧 */
    }
    
    .main-product-image {
        order: 2; /* 主图片在右侧 */
    }
}

.product-images-section {
    position: sticky;
    top: 20px;
    height: fit-content;
    align-self: start;
}

.product-main-img:hover {
    transform: scale(1.05);
}

/* ========================================
   产品信息区域
   ======================================== */

.product-info-section {
    padding: 0 80px 0 80px;
    align-self: start;
    box-sizing: border-box;
    margin-right: -32px;
}

.product-brand {
    font-size: 13px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* 布局：标题+价格同一行 - 纯 CSS 实现 */
.product-info-section {
    display: grid;
    grid-template-columns: 1fr auto;
}
.product-info-section > * {
    grid-column: 1 / -1;
}
.product-info-section > .product-title {
    grid-column: 1;
    margin: 0 24px 16px 0;
}
.product-info-section > .product-price {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    margin: 0 0 16px 0;
}

.product-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
    color: #000;
}
.product-price {
    font-size: 24px;
    font-weight: 600;
    color: #000;
}
.product-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
}

.product-short-description {
    font-size: 15px;
    line-height: 1.65;
    color: #555;
    margin-bottom: 0; 
}

.get-a-quote-wrap form {
    display: inline;
}
.get-a-quote-btn {
    display: inline-block;
    background: #2d7a6e;
    color: #fff !important;
    padding: 16px 28px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
}
.get-a-quote-btn:hover {
    opacity: 0.92;
    background: #256b61;
    color: #fff !important;
}

/* ========================================
   产品选项
   ======================================== */

.product-options {
    margin-bottom: 24px;
}

.product-option {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.option-label {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 48px;
}

.option-values {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.option-button {
    padding: 12px 20px;
    border: 2px solid #e5e5e5;
    background: #fff;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.option-button:hover,
.option-button.selected {
    border-color: #000;
    background: #000;
    color: #fff;
}

/* ========================================
   购买区域 - 左右距离与效果图一致
   ======================================== */

.product-purchase {
    margin-bottom: 20px;
    margin-top: 8px;
    max-width: 100%;
}
/* Add To Cart 按钮及选项区：与内容区左右边距一致 */
.product-info-section .single_add_to_cart_button,
.product-info-section .variations_button .single_add_to_cart_button {
    width: 100%;
    max-width: 100%;
    padding: 14px 24px;
    background: #333;
    color: #fff !important;
    border: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 8px;
}
.product-info-section .single_add_to_cart_button:hover {
    background: #000;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector label {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f8f8;
    color: #000;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.qty-btn:hover {
    background: #e5e5e5;
}

.quantity-controls input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    background: #fff;
}

.add-to-cart-btn {
    flex: 1;
    max-width: 300px;
    height: 50px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.add-to-cart-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================
   支付选项
   ======================================== */

.payment-options {
    margin-bottom: 30px;
}

.afterpay-info {
    font-size: 14px;
    color: #666;
    text-align: center;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 4px;
}

/* Guaranteed Safe Checkout 区域 - 参考图一效果（横向排列，白色盒子，居中） */
fieldset.ast-single-product-payments,
.ast-single-product-payments,
.single-product .ast-single-product-payments {
    margin: 30px 0 !important;
    padding: 0 !important;
    border: 1px solid #d0d0d0 !important;
    max-width: 460px !important;
}

fieldset.ast-single-product-payments legend,
.ast-single-product-payments legend,
.single-product .ast-single-product-payments legend {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0 auto 15px auto !important;
    padding: 0 !important;
    width: auto !important;
    border: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    float: none !important;
    display: block !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

fieldset.ast-single-product-payments ul,
.ast-single-product-payments ul,
.single-product .ast-single-product-payments ul {
    list-style: none !important;
    padding: 20px 25px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    background: #fff !important;
    border-radius: 6px !important;
    max-width: 460px !important;
    width: auto !important;
}

fieldset.ast-single-product-payments li,
.ast-single-product-payments li,
fieldset.ast-single-product-payments li.ast-custom-payment,
.ast-single-product-payments li.ast-custom-payment,
.single-product .ast-single-product-payments .ast-custom-payment {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    line-height: 1 !important;
}

fieldset.ast-single-product-payments .ahfb-svg-iconset,
.ast-single-product-payments .ahfb-svg-iconset,
fieldset.ast-single-product-payments span.ahfb-svg-iconset,
.ast-single-product-payments span.ahfb-svg-iconset,
.single-product .ast-single-product-payments .ahfb-svg-iconset {
    display: inline-block !important;
    width: 90px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}

fieldset.ast-single-product-payments .ahfb-svg-iconset.ast-inline-flex,
.ast-single-product-payments .ahfb-svg-iconset.ast-inline-flex,
.single-product .ast-single-product-payments .ahfb-svg-iconset.ast-inline-flex {
    display: inline-block !important;
    width: 48px !important;
}

fieldset.ast-single-product-payments .ahfb-svg-iconset svg,
.ast-single-product-payments .ahfb-svg-iconset svg,
.single-product .ast-single-product-payments .ahfb-svg-iconset svg {
    width: 48px !important;
    height: auto !important;
    max-width: 48px !important;
    display: block !important;
}

@media (max-width: 768px) {
    fieldset.ast-single-product-payments ul,
    .ast-single-product-payments ul,
    .single-product .ast-single-product-payments ul {
        flex-wrap: wrap !important;
        gap: 15px !important;
        padding: 18px 20px !important;
        max-width: 100% !important;
    }

    fieldset.ast-single-product-payments .ahfb-svg-iconset,
    .ast-single-product-payments .ahfb-svg-iconset,
    .single-product .ast-single-product-payments .ahfb-svg-iconset,
    fieldset.ast-single-product-payments .ahfb-svg-iconset svg,
    .ast-single-product-payments .ahfb-svg-iconset svg,
    .single-product .ast-single-product-payments .ahfb-svg-iconset svg {
        width: 75px !important;
        max-width: 75px !important;
    }
}

/* ========================================
   产品标签
   ======================================== */

.product-badges {
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

.badge.best-seller {
    background: #ff6b6b;
    color: #fff;
}

/* ========================================
   产品详细信息区域
   ======================================== */

.product-details-section {
    max-width: 1200px;
    margin: 0 auto;
}

.product-description,
.design-details {
    margin-top: 20px;
    margin-bottom: 40px;
}

.product-description h2,
.design-details h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
}

.product-description .details-content,
.details-content {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

.product-description .details-content p,
.details-content p {
    margin-bottom: 16px;
}

/* ========================================
   产品特性
   ======================================== */

.product-features {
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feature-icon svg {
    color: #000;
}

.feature-item p {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    line-height: 1.4;
}

/* ========================================
   产品规格
   ======================================== */

.product-specs {
    margin-bottom: 60px;
}

.product-specs h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #000;
}

.specs-tabs {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn.active,
.tab-btn:hover {
    background: #fff;
    color: #000;
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    padding: 30px;
    font-size: 16px;
    line-height: 1.7;
    color: #666;
}

.tab-panel.active {
    display: block;
}

.product-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.product-specs-table tr {
    border-bottom: 1px solid #e5e5e5;
}

.product-specs-table td {
    padding: 15px 0;
    vertical-align: top;
}

.spec-label {
    font-weight: 600;
    color: #000;
    width: 30%;
}

.spec-value {
    color: #666;
}

/* ========================================
   运输和退货
   ======================================== */

.shipping-returns {
    margin-bottom: 60px;
}

.shipping-returns h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #000;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.info-item {
    padding: 30px;
    background: #f8f8f8;
    border-radius: 8px;
}

.info-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #000;
}

.info-item p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.learn-more {
    color: #000;
    text-decoration: underline;
    font-weight: 500;
    font-size: 14px;
}

.learn-more:hover {
    text-decoration: none;
}

/* ========================================
   FAQ 部分
   ======================================== */

.product-faq {
    margin-bottom: 60px;
}

.product-faq h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #000;
}

.faq-items {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid #e5e5e5;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    padding: 20px;
    border: none;
    background: #fff;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: #f8f8f8;
}

.faq-toggle {
    font-size: 20px;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ========================================
   相关产品
   ======================================== */

.related-products-section {
    margin-bottom: 60px;
    padding: 60px 0;
    border-radius: 12px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #000;
}

.section-header p {
    font-size: 16px;
    color: #666;
}

.related-products-grid {
    display: grid;
    /* 每个卡片宽度在 250–320 之间，多列时自动换行，整体居中 */
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
    gap: 30px;
    padding: 0 30px;
}

.related-product-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.related-product-item .product-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.related-product-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-item:hover .product-image img {
    transform: scale(1.05);
}

.related-product-item .product-info {
    padding: 20px;
}

.related-product-item .product-brand {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.related-product-item h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.3;
}

.related-product-item h3 a {
    color: #000;
    text-decoration: none;
}

.related-product-item h3 a:hover {
    color: #666;
}

.related-product-item .product-price {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1024px) {
    .product-main-content {
        gap: 40px;
    }
    
    .product-title {
        font-size: 28px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .product-main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-images-section {
        position: static;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .product-price {
        font-size: 20px;
    }
    
    .product-purchase {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .add-to-cart-btn {
        max-width: none;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 20px;
    }
}
