/* ===================================
   MicoYang 产品展示页面样式
   响应式设计 | 现代化交互体验
   =================================== */

/* CSS 变量定义 */
:root {
    --color-bg: #f9fafb;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-primary: #d97757;
    --color-primary-hover: #c0563d;
    --color-secondary: #6a9bcc;
    --color-success: #059669;
    --color-warning: #f59e0b;
    --color-star: #f59e0b;
    --color-star-empty: #d1d5db;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===========================
   导航栏
   =========================== */
.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
    text-decoration: none;
}

.nav-logo svg {
    color: var(--color-primary);
}

.nav-search {
    flex: 1;
    max-width: 600px;
    display: flex;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 2px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition);
}

.search-input:focus {
    border-color: var(--color-primary);
}

.search-btn {
    padding: 0.625rem 1rem;
    background: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color var(--transition);
    position: relative;
}

.nav-btn:hover {
    color: var(--color-text);
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-primary);
    color: white;
    font-size: 0.625rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===========================
   面包屑导航
   =========================== */
.breadcrumb-container {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    padding: 0.75rem 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumb-item:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--color-text-muted);
}

.breadcrumb-current {
    color: var(--color-text-secondary);
}

/* ===========================
   主产品布局
   =========================== */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

/* ===========================
   产品图片区
   =========================== */
.product-images {
    position: sticky;
    top: 100px;
    align-self: start;
}

.main-image-wrapper {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.main-image-wrapper:hover .main-image {
    transform: scale(1.05);
}

.image-zoom-lens {
    position: absolute;
    border: 2px solid var(--color-primary);
    background: rgba(217, 119, 87, 0.1);
    cursor: crosshair;
    display: none;
    pointer-events: none;
    z-index: 10;
}

.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    z-index: 5;
    color: var(--color-text-secondary);
}

.image-nav-btn:hover {
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
}

.image-nav-btn.prev {
    left: 1rem;
}

.image-nav-btn.next {
    right: 1rem;
}

.thumbnail-list {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--color-surface);
    padding: 0;
    transition: all var(--transition);
}

.thumbnail:hover {
    border-color: var(--color-text-secondary);
}

.thumbnail.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.image-tabs {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    border-bottom: 2px solid var(--color-border-light);
}

.image-tab {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    font-family: inherit;
}

.image-tab:hover {
    color: var(--color-text);
}

.image-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

/* ===========================
   产品信息区
   =========================== */
.product-info {
    padding: 0;
}

.product-header {
    margin-bottom: 1.5rem;
}

.brand-link {
    display: inline-block;
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: color var(--transition);
}

.brand-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    color: var(--color-star-empty);
}

.star.filled {
    color: var(--color-star);
}

.star.half {
    color: var(--color-star);
    opacity: 0.5;
}

.rating-link {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.rating-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.separator {
    color: var(--color-text-muted);
}

.ask-question {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.ask-question:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ===========================
   核心卖点
   =========================== */
.product-highlights {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.highlights-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.highlights-list {
    list-style: none;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.check-icon {
    flex-shrink: 0;
    color: var(--color-success);
    margin-top: 0.125rem;
}

/* ===========================
   变体选择区
   =========================== */
.variant-section {
    margin-bottom: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.variant-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.current-selection {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

.current-selection strong {
    color: var(--color-text);
}

/* 尺寸变体 */
.size-variants {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.size-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    font-family: inherit;
}

.size-card:hover {
    border-color: var(--color-text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.size-card.active {
    border-color: var(--color-primary);
    background: rgba(217, 119, 87, 0.05);
}

.size-dimensions {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.size-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

/* 颜色变体 */
.color-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    position: relative;
    background: var(--swatch-color);
    transition: all var(--transition);
    padding: 0;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.color-swatch.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary);
}

.swatch-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: none;
}

.color-swatch.active .swatch-check {
    display: block;
}

/* ===========================
   价格和购买区
   =========================== */
.purchase-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.price-section {
    margin-bottom: 1.5rem;
}

.current-price {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.price-symbol {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.25rem;
    color: var(--color-primary);
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.price-note {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

/* 数量选择器 */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qty-btn {
    background: var(--color-bg);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    transition: all var(--transition);
    font-family: inherit;
}

.qty-btn:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem;
    color: var(--color-text);
    font-family: inherit;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 购买按钮 */
.purchase-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background: #5a8bbc;
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-text-secondary);
    background: var(--color-bg);
}

.btn-text {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-text:hover {
    color: var(--color-text);
}

.additional-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-light);
}

/* 配送信息 */
.shipping-info {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shipping-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--color-text-secondary);
}

.shipping-item svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.shipping-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.shipping-desc {
    font-size: 0.875rem;
}

/* ===========================
   产品详情区域
   =========================== */
.product-details {
    margin-top: 3rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.details-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border-light);
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 2rem;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.detail-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.detail-text p {
    margin-bottom: 1rem;
}

.detail-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.detail-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.detail-text li {
    margin-bottom: 0.5rem;
}

.brand-info {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.brand-info p {
    margin-bottom: 1rem;
}

/* ===========================
   规格参数表格
   =========================== */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--color-border-light);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.spec-label {
    width: 30%;
    padding: 1rem 1rem 1rem 0;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
    vertical-align: top;
}

.spec-value {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ===========================
   评论区
   =========================== */
.reviews-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border-light);
}

.rating-overview {
    text-align: center;
}

.rating-big {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.rating-stars-large {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.rating-count {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar-label {
    font-size: 0.875rem;
    color: var(--color-secondary);
    min-width: 2.5rem;
    cursor: pointer;
}

.bar-label:hover {
    text-decoration: underline;
}

.bar-track {
    flex: 1;
    height: 1.25rem;
    background: var(--color-border-light);
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--color-star);
    border-radius: 999px;
    transition: width 0.6s ease;
}

.bar-percent {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    min-width: 2.5rem;
}

/* 评论筛选 */
.reviews-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--color-text-secondary);
    font-family: inherit;
}

.filter-btn:hover {
    background: var(--color-border-light);
    border-color: var(--color-text-secondary);
}

.filter-btn.active {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

/* 评论卡片 */
.review-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow var(--transition);
}

.review-card:hover {
    box-shadow: var(--shadow-sm);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.reviewer-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.review-date {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.review-rating {
    display: flex;
    gap: 0.125rem;
}

.review-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.review-body {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.review-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.helpful-btn {
    background: none;
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    transition: all var(--transition);
    font-family: inherit;
}

.helpful-btn:hover {
    background: var(--color-bg);
    border-color: var(--color-text-secondary);
}

.btn-load-more {
    width: 100%;
    margin-top: 1rem;
}

/* ===========================
   问答区
   =========================== */
.qa-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qa-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qa-question {
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    color: var(--color-text);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background var(--transition);
}

.qa-question:hover {
    background: var(--color-bg);
}

.qa-question::-webkit-details-marker {
    display: none;
}

.qa-question::before {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    transition: transform var(--transition);
}

.qa-item[open] .qa-question::before {
    content: '−';
}

.qa-answer {
    padding: 0 1.5rem 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* ===========================
   相关产品
   =========================== */
.related-products {
    margin-top: 3rem;
    padding-bottom: 3rem;
}

.related-products .section-title {
    margin-bottom: 1.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card-image {
    aspect-ratio: 1;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.product-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-card-info {
    padding: 1rem;
}

.product-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    line-height: 1.4;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stars-small {
    color: var(--color-star);
    font-size: 0.875rem;
}

.product-card-rating .count {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.product-card-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ===========================
   页脚
   =========================== */
.footer {
    background: var(--color-text);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

.social-link:hover {
    color: white;
}

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===========================
   Toast 提示
   =========================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
}

/* ===========================
   响应式设计
   =========================== */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-images {
        position: static;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .price-amount {
        font-size: 2rem;
    }

    .size-variants {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .reviews-summary {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .details-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .product-layout {
        gap: 1rem;
    }

    .product-highlights,
    .variant-section,
    .purchase-section {
        padding: 1rem;
    }

    .tab-content {
        padding: 1.5rem 1rem;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .color-variants {
        gap: 0.5rem;
    }

    .color-swatch {
        width: 40px;
        height: 40px;
    }

    .purchase-actions {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
}

/* ===========================
   无障碍和动画优化
   =========================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: 999px;
}

/* ===========================
   三产品集合页面 - 新增样式
   =========================== */

.page-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background: linear-gradient(135deg, #d97757 0%, #c0563d 100%);
    color: white;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

.product-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    transition: box-shadow var(--transition);
}

.product-section:hover {
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    background: linear-gradient(135deg, #d97757, #e8956f);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 10;
}

.badge-new {
    background: linear-gradient(135deg, #059669, #34d399) !important;
}

.badge-value {
    background: linear-gradient(135deg, #6a9bcc, #93c5fd) !important;
}

.product-layout-three-col {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.product-images-compact {
    width: 100%;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image-compact {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 1rem;
}

/* Thumbnail strip for compact (mobile-friendly) layout */
.product-images-compact .thumbnail-list {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    overflow-x: auto;
    padding: 0.3rem 0.5rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.product-images-compact .thumbnail {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--color-surface);
    padding: 0;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.product-images-compact .thumbnail:hover {
    border-color: var(--color-text-secondary);
    opacity: 1;
}

.product-images-compact .thumbnail.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(217,119,87,0.3);
    opacity: 1;
}

.product-images-compact .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
}

.product-title-compact {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.bullet-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.bullet-points li {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--color-text-secondary);
    padding-left: 0.5rem;
    border-left: 3px solid rgba(217, 119, 87, 0.3);
}

.price-section-compact {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    margin-top: auto;
    padding-top: 1rem;
}

.currency {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

.price-section-compact .price-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.product-actions-compact {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 80px;
}

.variant-group-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.variant-label-compact {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.size-options-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.size-card-compact {
    padding: 0.45rem 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.size-card-compact:hover {
    border-color: var(--color-text-muted);
}

.size-card-compact.active {
    border-color: var(--color-primary);
    background: rgba(217, 119, 87, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

.color-options-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-swatch-compact {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
    outline: none;
}

.color-swatch-compact:hover {
    transform: scale(1.15);
}

.color-swatch-compact.active {
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-text);
}

.buy-now-btn-compact {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 14px rgba(217, 119, 87, 0.35);
}

.buy-now-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 87, 0.45);
}

.buy-now-btn-compact:active {
    transform: scale(0.98);
}

.asin-display-compact {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-align: center;
    font-family: monospace;
}

/* Variant Link Display — unique Amazon link per sub-product */
.variant-link-display {
    margin-top: 0.35rem;
    text-align: center;
    font-size: 0.68rem;
    word-break: break-all;
    min-height: 1em;
}

.variant-link-display a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px dotted var(--color-primary);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.variant-link-display a:hover {
    color: var(--color-primary-hover);
    border-bottom-style: solid;
}

/* Selection text transition */
.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
    margin: 1.5rem 0;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

/* 响应式：三列变单列 */
@media (max-width: 1024px) {
    .product-layout-three-col {
        grid-template-columns: 180px 1fr;
        gap: 1.5rem;
    }

    .product-actions-compact {
        grid-column: 1 / -1;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
    }
    
    .variant-group-compact {
        flex: 1;
        min-width: 200px;
    }

    .buy-now-btn-compact {
        flex: 1;
        min-width: 160px;
    }

    .asin-display-compact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .page-header h1 { font-size: 1.5rem; }
    .product-layout-three-col {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .product-images-compact {
        max-width: 300px;
        margin: 0 auto;
    }
    .product-actions-compact {
        flex-direction: column;
    }
    .buy-now-btn-compact {
        width: 100%;
    }
}

/* ===========================
   Fix Batch v2 — 12 Issues Resolved
   =========================== */

/* Fix #2: Color swatch wrapper + visible name label */
.color-swatch-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.color-name-label {
    font-size: 0.65rem;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.2;
    max-width: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

/* Active color label highlight — JS-driven class toggle instead of :has() for Safari */
.color-swatch-wrapper:hover .color-name-label,
.color-swatch-wrapper.active .color-name-label {
    color: var(--color-text);
    font-weight: 600;
}

/* Fix #8: Buy Now button loading state */
.buy-now-btn-compact:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Fix #3: Selection feedback text */
.selection-text {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    padding: 0.5rem 0.75rem;
    background: rgba(217, 119, 87, 0.06);
    border-radius: var(--radius-sm);
    border-left: 3px solid rgba(217, 119, 87, 0.4);
    line-height: 1.4;
    min-height: 28px;
    transition: all 0.2s;
}

/* Fix #11: ASIN font size bump */
.asin-display-compact {
    font-size: 0.82rem !important;  /* was 0.72rem */
    letter-spacing: 0.02em;
}

/* Fix #10: Ensure all color swatches have fallback */
.color-swatch-compact:not([style*="background"]) {
    background-color: #ccc !important;
}

/* Image loading transition */
.main-image-compact {
    transition: opacity 0.3s ease;
}

.main-image-compact.loading {
    opacity: 0.6;
}
