/* Product Detail Page Styles */

.product-detail__inner {
    display: grid;
    grid-template-columns: 65fr 35fr;
    gap: 50px;
    align-items: end;
    padding-top: 20px;
    padding-bottom: calc(var(--spacing-unit) * 8);
}

/* Gallery */
.product-gallery__main {
    height: 550px;
    background: #ffffff;
    margin-bottom: calc(var(--spacing-unit) * 2);
    overflow: hidden;
    transform: translateY(-100px);
}

.product-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumb {
    aspect-ratio: 1/1;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb.active, .thumb:hover {
    border-color: var(--color-primary);
}

/* Info */
.product-info__title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-info__cat {
    color: var(--color-neutral-mid);
    margin-bottom: 16px;
}

.product-info__price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 24px;
    font-family: var(--font-family-numbers);
}

.product-info__desc {
    margin-bottom: 32px;
    line-height: 1.7;
    color: var(--color-neutral-dark);
}

/* Selectors */
.product-selector {
    background: var(--color-neutral-light);
    padding: 24px;
    border-radius: var(--border-radius);
    margin-bottom: 32px;
}

.selector-group {
    margin-bottom: 20px;
}

.selector-group:last-child {
    margin-bottom: 0;
}

.selector-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-btn {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-btn:hover {
    border-color: var(--color-primary);
}

.option-btn.active {
    border-color: var(--color-primary) !important;
    background-color: var(--color-primary) !important;
    color: white !important;
}

.color-options .option-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.color-options .option-btn.active {
    background-color: transparent !important;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-primary) !important;
}

.product-actions {
    display: flex;
    gap: 16px;
}

.btn--amazon {
    background: #ff9900;
    color: #fff;
}

.btn--amazon:hover {
    background: #e88b00;
}

/* Tabs */
.product-tabs {
    background: white;
    padding: calc(var(--spacing-unit) * 8) 0;
    padding-bottom: calc(var(--spacing-unit) * 20);
}

.tabs-header {
    background: #000;
    height: 100px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin-bottom: 100px;
    padding: 0 30px;
    position: sticky;
    top: var(--header-height);
    z-index: 100;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color var(--transition-base);
}

.tab-btn.active {
    color: white;
}

.tab-pane {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
}

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

#features.tab-pane.active {
    height: calc(100vh - var(--header-height) - 100px);
    overflow-y: auto;
    overscroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#features.tab-pane.active::-webkit-scrollbar {
    display: none;
}

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

.specs-table td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
}

.specs-table tr td:first-child {
    font-weight: 600;
    width: 150px;
}

.specs-table tr:nth-child(odd) td {
    background: #fff;
}

.specs-table tr:nth-child(even) td {
    background: var(--color-neutral-light);
}

/* New Tab Content Layouts */
.tab-content-section {
    margin-bottom: 60px;
}
.tab-content-section:last-child {
    margin-bottom: 0;
}
.tab-content-section > h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    border-left: 4px solid var(--color-accent);
    padding-left: 16px;
}

/* 产品概述 (Overview) */
.overview-layout {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}
.overview-media img {
    width: 100%;
    height: auto;
    display: block;
}
.overview-text {
    padding: 40px;
}
.overview-lead {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
}

.overview-centered {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.overview-centered .overview-lead {
    font-size: 1.125rem;
    line-height: 32px;
    color: var(--color-neutral-dark);
}


.overview-image-placeholder {
    width: 100vw;
    height: 600px;
    margin-left: calc(-50vw + 50%);
    background: linear-gradient(135deg, #e0e7ef 0%, #f8fafc 50%, #e0e7ef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-neutral-mid);
    font-size: 1.2rem;
    position: relative;
}

.overview-image-placeholder::before {
    content: '产品图片占位区域';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.overview-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.overview-video {
    width: 100%;
    height: 600px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #000;
}

.overview-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.overview-feature-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-neutral-light);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* 核心功能 (Features) */
.feature-display {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}
.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.feature-image {
    background: var(--color-neutral-light);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feature-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e7ef 25%, #f1f5f9 25%, #f1f5f9 50%, #e0e7ef 50%, #e0e7ef 75%, #f1f5f9 75%, #f1f5f9 100%);
    background-size: 40px 40px;
}
.feature-text {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 产品功能左图右文布局 */
.feature-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.feature-image-placeholder {
    width: 100%;
    min-height: 450px;
    background: linear-gradient(135deg, #e8ecef 25%, #f4f6f8 25%, #f4f6f8 50%, #e8ecef 50%, #e8ecef 75%, #f4f6f8 75%, #f4f6f8 100%);
    background-size: 40px 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-neutral-mid);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 2px;
}
.feature-text h4 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}
.feature-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-neutral-dark);
}

/* 功能标签页 - 杂志风格排版 */
.features-section {
    padding: 0;
    max-width: none;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}
.feat-hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: 80px;
}
.feat-hero-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
}
.feat-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: white;
}
.feat-hero-overlay h2 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.feat-hero-overlay p {
    font-size: 1.3rem;
    line-height: 1.6;
    max-width: 700px;
    opacity: 0.9;
}
.feat-rows {
    margin-bottom: 80px;
}
.feat-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 100px;
}
.feat-row:last-child {
    margin-bottom: 0;
}
.feat-row-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}
.feat-row-img {
    width: 100%;
    height: 600px;
    background: var(--ph-bg, linear-gradient(135deg, #e0e7ef 25%, #f1f5f9 25%, #f1f5f9 50%, #e0e7ef 50%, #e0e7ef 75%, #f1f5f9 75%, #f1f5f9 100%));
    background-size: 40px 40px;
}
.feat-row-num {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 16px;
    letter-spacing: 2px;
}
.feat-row-text h3 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--color-text);
}
.feat-row-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-neutral-dark);
}
.feat-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 60px 40px;
    background: var(--color-neutral-light);
    border-radius: var(--border-radius);
}
.feat-hl-item {
    text-align: center;
}
.feat-hl-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.8;
}
.feat-hl-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}
.feat-hl-item p {
    font-size: 0.95rem;
    color: var(--color-neutral-dark);
    line-height: 1.5;
}

/* 可折叠表格 (Specs & Geometry) */
.specs-collapsible, .geometry-table-wrapper {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}
.specs-summary, .geometry-summary {
    padding: 20px 30px;
    font-weight: 600;
    cursor: pointer;
    background: var(--color-neutral-light);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.specs-summary::-webkit-details-marker, .geometry-summary::-webkit-details-marker {
    display: none;
}
.specs-summary::after, .geometry-summary::after {
    content: '';
    border: solid var(--color-neutral-dark);
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.2s;
}
details[open] .specs-summary::after, details[open] .geometry-summary::after {
    transform: rotate(-135deg);
}
.specs-note, .sizes-note {
    margin-top: 12px;
    color: var(--color-neutral-mid);
    font-size: 0.9rem;
}

/* 用户评论 (Reviews) */
.review-summary {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 60px;
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
}
.review-avg {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.review-score {
    font-size: 5rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}
.review-label {
    margin-top: 12px;
    font-size: 1.2rem;
    color: var(--color-neutral-mid);
}
.review-bar-row {
    display: grid;
    grid-template-columns: 50px 1fr 60px;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}
.review-bar-row:last-child {
    margin-bottom: 0;
}
.review-bar-label {
    font-size: 1.1rem;
    color: var(--color-neutral-mid);
}
.review-bar {
    height: 10px;
    background: var(--color-neutral-light);
    border-radius: 5px;
    overflow: hidden;
}
.review-bar-fill {
    height: 100%;
    background: #E63946;
    border-radius: 5px;
}
.review-bar-pct {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
}

.review-form-section {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border: 2px solid var(--color-neutral-light);
}

.review-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-neutral-dark);
    margin-bottom: 25px;
}

.review-form .form-group {
    margin-bottom: 20px;
}

.review-form .form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-neutral-dark);
    margin-bottom: 8px;
}

.review-form .form-group input[type="text"],
.review-form .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.review-form .form-group input[type="text"]:focus,
.review-form .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.rating-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rating-star {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-star:hover,
.rating-star.active {
    color: #ffc107;
}

.review-submit-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.review-submit-btn:hover {
    background: #0056b3;
}

.review-list .review-item {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--color-neutral-light);
}
.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.review-avatar {
    width: 45px;
    height: 45px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
}
.review-meta {
    font-size: 0.9rem;
    color: var(--color-neutral-mid);
    margin-top: 4px;
}
.review-stars {
    color: #ffc107;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.review-stars-empty {
    color: #e0e0e0;
}
.review-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text);
}

@media (max-width: 1024px) {
    .product-gallery__main {
        transform: translateY(-50px);
    }

    .product-detail__inner {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    /* New Layouts Mobile Fixes */
    .feature-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .feature-img-wrapper {
        width: 100%;
        height: 400px;
        order: 1;
    }
    .feature-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .feature-image-placeholder {
        min-height: 300px;
        order: 1;
    }
    .feature-text {
        padding: 0 20px 20px 20px;
        order: 2;
        align-items: center;
    }
    .feature-text h4 {
        font-size: 1.8rem;
        text-align: center;
    }
    .feature-text p {
        text-align: center;
    }
    .feat-hero {
        height: 350px;
        margin-bottom: 50px;
    }
    .feat-hero-overlay {
        padding: 30px;
    }
    .feat-hero-overlay h2 {
        font-size: 2.2rem;
    }
    .feat-hero-overlay p {
        font-size: 1.1rem;
    }
    .feat-row {
        margin-bottom: 60px;
    }
    .feat-row-img {
        height: 300px;
    }
    .feat-row-text {
        margin-bottom: 40px;
    }
    .feat-row-text h3 {
        font-size: 1.8rem;
    }
    .feat-highlights {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 40px 20px;
    }
    .review-summary {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px 20px;
        text-align: center;
    }
    .review-avg {
        align-items: center;
    }
    .review-bar-row {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    .review-list .review-item {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .product-gallery__main {
        transform: translateY(0);
    }
}

/* Sizes Tab New Layout */
.sizes-matrix {
    margin-top: -40px;
    margin-bottom: 60px;
}

.size-guides-section {
    margin-bottom: 50px;
}

.size-guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.size-guide-img {
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    border-radius: 4px;
}

.size-guide-text h4 {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    color: #111;
}

.size-guide-text p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.sizes-matrix h3 {
    font-size: 1.5rem;
    margin: 40px 0 20px 0;
    color: #111;
}

.sizes-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.sizes-table thead th {
    text-align: center;
    padding: 12px;
    background: #f8f8f8;
    font-size: 0.95rem;
    color: #333;
}

.sizes-table tbody td {
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #555;
}

.sizes-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.size-diagram {
    width: 80px;
    height: auto;
    max-height: 60px;
    display: block;
    margin: 0 auto;
}

.sizes-note {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
    font-style: italic;
}

/* CMS Tab HTML rich body */
.tab-rich-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text, #333);
}
.tab-rich-body :is(h1, h2, h3, h4, h5, h6) {
    margin: 1.4em 0 0.6em;
    font-weight: 700;
    line-height: 1.35;
}
.tab-rich-body h3 {
    font-size: 1.5rem;
    border-left: 4px solid var(--color-accent, #E63946);
    padding-left: 16px;
}
.tab-rich-body p {
    margin: 0 0 1em;
}
.tab-rich-body ul,
.tab-rich-body ol {
    margin: 0 0 1em 1.4em;
}
.tab-rich-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em auto;
}
.tab-rich-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
.tab-rich-body th,
.tab-rich-body td {
    border: 1px solid #d8dee8;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}
.tab-rich-body blockquote {
    margin: 1em 0;
    padding: 0.75em 1em;
    border-left: 4px solid var(--color-accent, #E63946);
    background: #f8fafc;
}
.tab-rich-body pre,
.tab-rich-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tab-rich-body pre {
    overflow-x: auto;
    padding: 12px;
    background: #f4f6f8;
    border-radius: 8px;
}


/* CMS rich content (product intro / video) */
.tab-rich-body video,
.tab-rich-body audio {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 16px 0;
  border-radius: 8px;
  background: #000;
}
.tab-rich-body figure.cms-video {
  margin: 16px 0;
}
.tab-rich-body img {
  max-width: 100%;
  height: auto;
}
