/*
Theme Name: PhotoFrame
Theme URI: https://example.com/photoframe
Author: Your Name
Author URI: https://example.com
Description: Custom photo frame product theme
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: photoframe
*/

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    position: relative;
    min-height: 100vh;
    min-height: var(--vh, 100vh); /* 使用CSS变量避免闪烁 */
    overflow-x: hidden;
}

/* Premium Background - Applied to Body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.85) 50%, 
        rgba(255, 255, 255, 0.95) 100%
    );
    backdrop-filter: blur(100px);
    pointer-events: none;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Decoration Circles - Fixed position for full page */
.decoration-circle {
    position: fixed;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(60px);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

.decoration-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    top: 40%;
    right: -5%;
    animation-delay: 5s;
}

.circle-3 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    top: 70%;
    left: 30%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* 结账页面容器无宽度限制 */
.woocommerce-checkout .container,
.woocommerce-page .container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

/* 产品图片区域 */
.product-gallery {
    position: sticky;
    top: 20px;
}

/* 防止WordPress样式干扰 */
.product-gallery * {
    box-sizing: border-box;
}

.product-gallery .thumbnail-gallery .thumbnail {
    list-style: none !important;
}

.product-gallery .thumbnail-gallery .thumbnail::before,
.product-gallery .thumbnail-gallery .thumbnail::after {
    display: none !important;
}

.main-image-wrapper {
    position: relative;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.main-image {
    position: relative;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: visible;
    background: #f8f9fa;
}

/* 主图相框Canvas覆盖层 */
.main-image-frame-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    border-radius: 12px;
}

/* 移动端图片导航容器 */
.mobile-image-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

/* 移动端导航按钮 */
.mobile-nav-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #ffffff;
}

.mobile-nav-btn i {
    font-size: 18px;
    font-weight: 600;
}

.mobile-nav-btn:active {
    transform: scale(0.9);
    opacity: 0.6;
}

.mobile-nav-btn:disabled,
.mobile-nav-btn[style*="opacity: 0.5"] {
    opacity: 0.3;
    pointer-events: none;
}

/* 移动端页码计数器 */
.mobile-page-counter {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.mobile-page-counter span {
    font-weight: 600;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.zoom-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.main-image:hover .zoom-overlay {
    opacity: 1;
}

.zoom-overlay:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.thumbnail-gallery-container {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

.thumbnail-gallery {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    will-change: scroll-position;
    transform: translateZ(0);
    flex-wrap: nowrap !important;
}

.thumbnail-gallery::-webkit-scrollbar {
    display: none;
}

.thumbnail-gallery:active {
    cursor: grabbing;
}

.gallery-nav-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: none;
    background: #ffffff;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.gallery-prev {
    order: -1;
}

.gallery-next {
    order: 1;
}

.gallery-nav-btn:hover {
    background: #e67e22;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.gallery-nav-btn:hover i {
    color: #ffffff;
}

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

.gallery-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.gallery-nav-btn i {
    font-size: 16px;
    color: #2c3e50;
    transition: color 0.3s ease;
    pointer-events: none;
}

/* 缩略图样式 - 增强优先级 */
.thumbnail-gallery .thumbnail {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: #f8f9fa;
    flex-shrink: 0;
    width: 60px !important;
    height: 75px !important;
    min-width: 60px;
    transform: translateZ(0);
    backface-visibility: hidden;
    display: block !important;
    position: relative !important;
    float: none !important;
    margin: 0 !important;
}

.thumbnail-gallery .thumbnail.active {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.thumbnail-gallery .thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-gallery .thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block !important;
    max-width: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 产品信息区域 */
.product-info {
    padding: 0 20px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    box-sizing: border-box;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.product-info * {
    max-width: 100%;
    box-sizing: border-box;
}

/* ========================================
   产品标题区域 - Compact Design
   ======================================== */
.product-header {
    margin-bottom: 14px;
    animation: fadeInUp 0.6s ease-out;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #FFF5F0 0%, #FFE8DC 100%);
    border: 1px solid #FFD7C4;
    border-radius: 16px;
    margin-bottom: 8px;
    animation: badgeFloat 3s ease-in-out infinite;
}

@keyframes badgeFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.badge-icon {
    width: 13px;
    height: 13px;
    color: #E74C3C;
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
}

.product-badge span {
    font-size: 10px;
    font-weight: 600;
    color: #8B4513;
    letter-spacing: 0.3px;
}

.product-title {
    font-size: 22px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 6px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-subtitle {
    font-size: 11px;
    color: #7F8C8D;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

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

/* ========================================
   评分系统 - Compact Design
   ======================================== */
.rating-wrapper {
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #FFC107;
    font-size: 15px;
    animation: starPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 1px 3px rgba(255, 193, 7, 0.3));
}

.stars i:nth-child(1) { animation-delay: 0s; }
.stars i:nth-child(2) { animation-delay: 0.1s; }
.stars i:nth-child(3) { animation-delay: 0.2s; }
.stars i:nth-child(4) { animation-delay: 0.3s; }
.stars i:nth-child(5) { animation-delay: 0.4s; }

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.stars:hover i {
    animation: starShine 0.6s ease-out forwards;
}

@keyframes starShine {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.15) rotate(8deg);
        filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.8));
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.rating-details {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-score {
    font-weight: 700;
    font-size: 14px;
    color: #2C3E50;
}

.rating-divider {
    color: #BDC3C7;
    font-weight: 300;
}

.rating-count {
    font-size: 12px;
    color: #7F8C8D;
    font-weight: 500;
}

.trust-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 14px;
    font-size: 10px;
    color: #2E7D32;
    font-weight: 600;
    transition: all 0.3s ease;
}

.trust-badge i {
    font-size: 11px;
}

.trust-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

/* ========================================
   价格展示 - Ultra Simple
   ======================================== */
.price-section {
    margin-bottom: 14px;
    width: 100%;
    overflow: visible;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
    background: none !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Size Guide Section - Collapsible */
.size-guide-section {
    margin-bottom: 20px;
    width: 100%;
}

.size-guide-toggle-btn {
    width: auto !important;
    min-width: fit-content;
    padding: 12px 16px !important;
    background: #667eea !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    white-space: nowrap !important;
}

.size-guide-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: #5568d3 !important;
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.size-guide-toggle-btn.expanded .toggle-icon {
    transform: rotate(180deg);
}

.size-guide-content {
    overflow: hidden !important;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease, padding 0.4s ease !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
}

.size-guide-content.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    border: none !important;
    padding: 0 !important;
    visibility: hidden !important;
}

.size-guide-content.expanded {
    max-height: 1000px !important;
    opacity: 1 !important;
    margin-top: 12px !important;
    padding: 12px !important;
    visibility: visible !important;
}

.size-image-wrapper {
    text-align: center;
    background: #ffffff;
    border-radius: 6px;
    padding: 8px;
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.size-guide-image-display {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    display: block !important;
    margin: 0 auto;
    object-fit: contain !important;
    box-sizing: border-box !important;
}

.price-from {
    font-size: 11px;
    font-weight: 500;
    color: #666;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #E67E22;
    line-height: 1.2;
    white-space: nowrap;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* 折扣价格 */
.price-sale {
    align-items: center;
}

.price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.price-save {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #E74C3C;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ========================================
   尺寸选择 - Ultra Simple
   ======================================== */
.size-section {
    margin-bottom: 14px;
}

.size-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.size-guide {
    font-size: 16px;
    color: #3498DB;
    text-decoration: none;
    font-weight: 500;
    margin-left: 6px;
}

.size-guide:hover {
    text-decoration: underline;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.size-btn {
    position: relative;
    padding: 10px 6px;
    border: 1.5px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    color: #333;
    text-align: center;
    transition: all 0.2s;
}

.size-btn:hover:not(.active) {
    border-color: #E67E22;
    background: #FFF8F0;
}

.size-btn.active {
    border-color: #E67E22;
    background: #E67E22;
    color: #fff;
}

.hot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 12px;
}

/* ========================================
   相框颜色选择
   ======================================== */
.frame-color-section {
    margin-bottom: 14px;
}

.frame-color-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.frame-color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.frame-color-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.frame-color-btn:hover:not(.active) {
    border-color: #E67E22;
    background: #FFF8F0;
    transform: translateY(-1px);
}

.frame-color-btn.active {
    border-color: #E67E22;
    background: #FFF8F0;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.2);
}

.color-preview {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.color-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.frame-color-btn.active .color-label {
    color: #E67E22;
}

/* Compact frame color grid */
.frame-color-grid.compact {
    gap: 6px;
}

.frame-color-grid.compact .frame-color-btn {
    padding: 8px 10px;
    gap: 6px;
}

.frame-color-grid.compact .color-preview {
    width: 24px;
    height: 24px;
}

.frame-color-grid.compact .color-label {
    font-size: 12px;
}

/* 个性化容器 */
.personalization-container {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.6s ease-out 0.8s backwards;
    position: relative;
    overflow: hidden;
}

.personalization-container::before {
    display: none;
}

/* 上传区域 - Ultra Simple */
.upload-section {
    margin-bottom: 12px;
}

.upload-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.required-badge {
    font-size: 8px;
    font-weight: 600;
    color: #fff;
    background: #E74C3C;
    padding: 2px 6px;
    border-radius: 4px;
}

.upload-box {
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #fafafa;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-box:hover {
    border-color: #E67E22;
    background: #fff;
}

.upload-placeholder {
    text-align: center;
    padding: 20px;
}

.upload-icon {
    font-size: 32px;
    color: #E67E22;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.upload-main {
    display: block;
    margin-bottom: 4px;
}

.upload-link {
    color: #E67E22;
    font-weight: 600;
    text-decoration: underline;
}

.upload-specs {
    display: block;
    font-size: 11px;
    color: #999;
}

/* 预览 */
.upload-preview {
    width: 100%;
    height: 100%;
    min-height: 120px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.upload-preview img {
    max-width: 100%;
    max-height: 100px;
    border-radius: 6px;
}

.change-photo-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #E67E22;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.change-photo-btn:hover {
    background: #D35400;
}

/* 上传提示 */
.upload-tips {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 11px;
    color: #666;
    line-height: 1.6;
}

.upload-tips li {
    padding-left: 12px;
    position: relative;
    margin-bottom: 4px;
}

.upload-tips li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #E67E22;
    font-weight: bold;
}

.upload-tips li:last-child {
    margin-bottom: 0;
}

/* ========================================
   名字输入 - Compact Design
   ======================================== */
.name-section {
    margin-bottom: 16px;
}

.name-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.name-header h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #2C3E50;
    margin: 0;
}

.name-header h3 i {
    color: #8B4513;
    font-size: 14px;
}

.optional-badge {
    padding: 2px 8px;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: #2E7D32;
    font-size: 9px;
    font-weight: 600;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.name-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

#nameInput {
    flex: 1;
    padding: 10px 12px;
    padding-right: 70px;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
    color: #2C3E50;
}

#nameInput:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.08);
}

#nameInput::placeholder {
    color: #BDC3C7;
    font-size: 14px;
    font-weight: 400;
}

.char-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #7F8C8D;
    pointer-events: none;
}

.char-current {
    color: #8B4513;
    font-size: 11px;
}

.char-separator {
    color: #BDC3C7;
}

.char-max {
    color: #95A5A6;
}

.name-tips {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: #7F8C8D;
}

.name-tips i {
    color: #FFC107;
    font-size: 11px;
}

/* ========================================
   预览按钮 - Compact Style
   ======================================== */
.preview-section {
    margin-bottom: 16px;
}

.preview-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 25%, #FDC830 50%, #FF8C42 75%, #FF6B35 100%);
    background-size: 300% 300%;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 
        0 8px 32px rgba(255, 107, 53, 0.4),
        0 4px 16px rgba(247, 147, 30, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: gradientShift 3s ease infinite;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-icon i {
    font-size: 13px;
}

.btn-text {
    position: relative;
    z-index: 2;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 25%, 
        rgba(255, 255, 255, 0.6) 50%, 
        rgba(255, 255, 255, 0.4) 75%, 
        transparent 100%);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* 添加发光效果 */
.preview-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #FF6B35, #F7931E, #FDC830, #FF8C42);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.preview-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(255, 107, 53, 0.5),
        0 8px 24px rgba(247, 147, 30, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background-position: 100% 100%;
}

.preview-btn:hover::before {
    opacity: 0.7;
}

.preview-btn:hover .btn-shine {
    left: 100%;
}

.preview-btn:hover .btn-icon {
    transform: scale(1.15) rotate(8deg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.preview-btn:hover .btn-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.preview-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

/* 添加脉冲动画 */
@keyframes previewPulse {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(255, 107, 53, 0.4),
            0 4px 16px rgba(247, 147, 30, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 12px 40px rgba(255, 107, 53, 0.6),
            0 8px 24px rgba(247, 147, 30, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.preview-btn:focus {
    outline: none;
    animation: previewPulse 2s ease-in-out infinite;
}

/* 渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.preview-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 10px;
    color: #7F8C8D;
}

.preview-hint i {
    color: #3498DB;
    font-size: 10px;
}

/* ========================================
   购买区域 - Compact Design
   ======================================== */
.purchase-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 1s backwards;
}

.quantity-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.quantity-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #2C3E50;
    cursor: pointer;
    white-space: nowrap;
}

.quantity-label i {
    color: #8B4513;
    font-size: 16px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    width: 140px;
    height: 56px;
    transition: all 0.3s ease;
}

.quantity-selector:hover {
    border-color: #8B4513;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.1);
}

.qty-btn {
    width: 42px;
    height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #2C3E50;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.qty-btn:hover {
    background: #F8F9FA;
    color: #8B4513;
}

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

.qty-btn i {
    font-size: 12px;
}

#quantity {
    width: 50px;
    border: none;
    border-left: 1px solid #E0E0E0;
    border-right: 1px solid #E0E0E0;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    background: transparent;
    padding: 0;
    color: #2C3E50;
    height: 48px;
}

.add-to-cart-btn {
    flex: 1;
    padding: 0 40px;
    height: 56px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FDC830 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 8px 28px rgba(255, 107, 53, 0.45);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-icon-left {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-text-main {
    position: relative;
    z-index: 1;
}

.btn-icon-right {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn-ripple {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.6);
}

.add-to-cart-btn:hover .btn-ripple {
    left: 100%;
}

.add-to-cart-btn:hover .btn-icon-left {
    transform: scale(1.2) rotate(-10deg);
}

.add-to-cart-btn:hover .btn-icon-right {
    transform: translateX(5px);
}

.add-to-cart-btn:active {
    transform: translateY(-1px);
}

.config-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FFF3CD 0%, #FFE5B4 100%);
    border: 1px solid #FFC107;
    border-radius: 10px;
    color: #856404;
    font-size: 12px;
    font-weight: 600;
}

.config-warning i {
    font-size: 16px;
    color: #FFC107;
}

/* ========================================
   重构后的购买区域样式 - Premium Design
   ======================================== */

.purchase-section-redesign {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 1s backwards;
}

/* 现代化数量选择器 */
.modern-quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.qty-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #6B7280;
    text-transform: uppercase;
}

.qty-controls {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 4px;
    gap: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.qty-controls:hover {
    border-color: #FF6B35;
    box-shadow: 
        0 4px 12px rgba(255, 107, 53, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.qty-control-btn {
    width: 36px;
    height: 48px;
    border: none;
    background: linear-gradient(145deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.qty-control-btn svg {
    width: 18px;
    height: 18px;
    color: #374151;
    transition: all 0.3s ease;
}

.qty-control-btn:hover {
    background: linear-gradient(145deg, #FF6B35 0%, #F7931E 100%);
    box-shadow: 
        0 4px 12px rgba(255, 107, 53, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.qty-control-btn:hover svg {
    color: #ffffff;
    transform: scale(1.1);
}

.qty-control-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qty-decrease:hover {
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%);
}

.qty-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0 8px;
}

.qty-display input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 高级购物车按钮 */
.premium-cart-btn {
    flex: 1;
    height: 62px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FDC830 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 30px rgba(255, 107, 53, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
}

.cart-btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-icon {
    width: 22px;
    height: 22px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-btn-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.cart-arrow {
    width: 20px;
    height: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E55A2B 0%, #D4841A 50%, #E6B422 100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.cart-btn-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 20px 50px rgba(255, 107, 53, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.premium-cart-btn:hover .cart-btn-bg {
    opacity: 1;
}

.premium-cart-btn:hover .cart-btn-bg::before {
    width: 300px;
    height: 300px;
}

.premium-cart-btn:hover .cart-icon {
    transform: scale(1.1) rotate(-10deg);
}

.premium-cart-btn:hover .cart-arrow {
    opacity: 1;
    transform: translateX(0);
}

.premium-cart-btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 10px 30px rgba(255, 107, 53, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 移除旧的数量输入框箭头 */
.modern-quantity-selector input[type="number"]::-webkit-inner-spin-button,
.modern-quantity-selector input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modern-quantity-selector input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}




/* 支付方式 */
.payment-methods {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 0;
    animation: fadeInUp 0.6s ease-out 1.2s backwards;
}

.payment-methods img {
    height: 28px;
    width: auto;
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0%);
}

.payment-methods img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-3px) scale(1.1);
}

/* 产品链接 */
.product-links {
    margin-bottom: 25px;
}

.info-link {
    color: #6c757d;
    text-decoration: underline;
    font-size: 14px;
    transition: color 0.3s ease;
}

.info-link:hover {
    color: #ff6b35;
}

/* 折叠区域 */
.collapsible-sections {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.section-header:hover {
    background: #f8f9fa;
    margin: 0 -15px;
    padding: 15px;
    border-radius: 8px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.section-header i {
    transition: transform 0.3s ease;
    color: #6c757d;
}

.section-header.active i {
    transform: rotate(180deg);
}

.section-content {
    padding: 15px 0;
    color: #6c757d;
    line-height: 1.6;
    display: none;
}

.section-content.active {
    display: block;
}

.description-content h4,
.delivery-content h4 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.description-content h5,
.delivery-content h5 {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    margin: 20px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description-content ul,
.delivery-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.description-content li,
.delivery-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.description-content strong,
.delivery-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.description-content em {
    color: #ff6b35;
    font-style: normal;
    font-weight: 500;
    background: linear-gradient(135deg, #ff6b35, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 模态框 - 高端重构 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(18, 18, 46, 0.9) 25%, 
        rgba(26, 26, 62, 0.85) 50%, 
        rgba(15, 52, 96, 0.9) 75%, 
        rgba(83, 52, 131, 0.8) 100%);
    backdrop-filter: blur(20px) saturate(1.5);
    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.98) 50%, 
        rgba(255, 255, 255, 0.95) 100%);
    margin: 3% auto;
    padding: 0;
    border-radius: 24px;
    width: 92%;
    max-width: 800px;
    position: relative;
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.4),
        0 16px 40px rgba(18, 18, 46, 0.3),
        0 8px 20px rgba(83, 52, 131, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 24px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 250, 252, 0.8) 100%);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.close:hover {
    color: #ef4444;
    transform: scale(1.1) rotate(90deg);
    background: linear-gradient(145deg, 
        rgba(239, 68, 68, 0.1) 0%, 
        rgba(248, 250, 252, 0.9) 100%);
    box-shadow: 
        0 6px 20px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.modal-content h2 {
    margin: 0;
    padding: 32px 24px 24px;
    color: #1f2937;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, 
        #1f2937 0%, 
        #374151 50%, 
        #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-content h2::after {
    content: '';
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #7209b7, #533483, #0f3460);
    border-radius: 2px;
}

.preview-image {
    text-align: center;
    margin: 0 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
    min-height: 500px;
    background: linear-gradient(145deg, 
        rgba(248, 250, 252, 0.8) 0%, 
        rgba(241, 245, 249, 0.9) 100%);
    border-radius: 20px;
    padding: 16px;
    position: relative;
}


#previewCanvas {
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    max-width: calc(100% - 5px);
    max-height: 60vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(18, 18, 46, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    object-fit: contain;
    margin: 0 auto 16px;
}

#previewCanvas:hover {
    transform: scale(1.02);
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.2),
        0 12px 24px rgba(18, 18, 46, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ========================================
   PREVIEW YOUR DESIGN MODAL - Clean & Responsive
   ======================================== */

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Content */
.preview-modal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .preview-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.preview-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.025em;
}

.close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.05);
}

/* Modal Body */
.preview-modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
    padding: 32px;
    gap: 32px;
    align-items: center;
}

/* Canvas Container */
.preview-canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
}

#previewCanvas {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

#previewCanvas:hover {
    transform: scale(1.01);
}

/* Control Panel */
.preview-control-panel {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.control-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.position-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 8px;
    align-items: center;
    justify-items: center;
}

.horizontal-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #ffffff;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.control-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Modal Footer */
.preview-modal-footer {
    display: flex;
    gap: 16px;
    padding: 24px 32px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
    justify-content: flex-end;
}

.preview-modal-footer .btn-secondary,
.preview-modal-footer .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.preview-modal-footer .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.preview-modal-footer .btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.preview-modal-footer .btn-primary {
    background: #3b82f6;
    color: white;
}

.preview-modal-footer .btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .preview-modal-content {
        max-width: 95%;
        width: 95%;
    }
    
    .preview-modal-body {
        padding: 24px;
        gap: 24px;
    }
    
    .preview-control-panel {
        width: 240px;
    }
}

@media (max-width: 900px) {
    .preview-modal-body {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .preview-canvas-container {
        min-height: 300px;
        order: 1;
    }
    
    .preview-control-panel {
        width: 100%;
        order: 2;
        padding: 20px;
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .control-section {
        gap: 6px;
    }
    
    /* Start scaling down buttons */
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}

@media (max-width: 800px) {
    .control-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .preview-control-panel {
        gap: 12px;
    }
    
    .control-section {
        gap: 5px;
    }
}

@media (max-width: 700px) {
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .preview-control-panel {
        gap: 10px;
    }
    
    .control-section {
        gap: 4px;
    }
}

@media (max-width: 650px) {
    .control-btn {
        width: 33px;
        height: 33px;
        font-size: 12px;
    }
    
    .preview-control-panel {
        gap: 8px;
    }
    
    .control-section {
        gap: 3px;
    }
}

@media (max-width: 600px) {
    .control-btn {
        width: 31px;
        height: 31px;
        font-size: 12px;
    }
    
    .preview-control-panel {
        gap: 6px;
    }
    
    .control-section {
        gap: 3px;
    }
}

@media (max-width: 768px) {
    /* Hide header on mobile */
    .preview-modal-header {
        display: none;
    }
    
    .preview-modal-content {
        width: 98%;
        max-height: 95vh;
        margin: 1% auto;
        border-radius: 12px;
    }
    
    .preview-modal-body {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .preview-canvas-container {
        min-height: 300px;
        order: 1;
    }
    
    #previewCanvas {
        max-height: 50vh;
    }
    
    .preview-control-panel {
        width: 100%;
        order: 2;
        padding: 20px;
        gap: 20px;
    }
    
    /* Mobile Control Layout - Responsive button layout */
    .preview-control-panel {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .control-section {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .control-label {
        display: none;
    }
    
    .control-buttons {
        display: flex;
        flex-direction: row;
        gap: 6px;
    }
    
    .position-grid {
        display: flex;
        flex-direction: row;
        gap: 6px;
    }
    
    .horizontal-controls {
        display: flex;
        gap: 6px;
    }
    
    .control-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
        min-width: 34px;
        flex-shrink: 0;
    }
    
    .preview-modal-footer {
        flex-direction: row;
        gap: 12px;
        padding: 20px 24px;
    }
    
    .preview-modal-footer .btn-secondary,
    .preview-modal-footer .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
}


@media (max-width: 480px) {
    /* Hide header on small mobile */
    .preview-modal-header {
        display: none;
    }
    
    .preview-modal-content {
        width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .preview-modal-body {
        padding: 16px;
        gap: 16px;
    }
    
    .preview-canvas-container {
        min-height: 250px;
        padding: 16px;
    }
    
    #previewCanvas {
        max-height: 45vh;
    }
    
    .preview-control-panel {
        padding: 16px;
        gap: 8px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .control-section {
        gap: 4px;
    }
    
    .control-buttons {
        gap: 4px;
    }
    
    .position-grid {
        gap: 4px;
    }
    
    .horizontal-controls {
        gap: 4px;
    }
    
    .control-btn {
        width: 30px;
        height: 30px;
        font-size: 11px;
        min-width: 30px;
    }
    
    .preview-modal-footer {
        padding: 16px 20px;
        gap: 8px;
    }
    
    .preview-modal-footer .btn-secondary,
    .preview-modal-footer .btn-primary {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .control-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
        min-width: 28px;
    }
    
    .preview-control-panel {
        gap: 4px;
    }
    
    .control-section {
        gap: 2px;
    }
    
    .control-buttons {
        gap: 2px;
    }
    
    .position-grid {
        gap: 2px;
    }
    
    .horizontal-controls {
        gap: 2px;
    }
}

@media (max-width: 360px) {
    .control-btn {
        width: 26px;
        height: 26px;
        font-size: 9px;
        min-width: 26px;
    }
    
    .preview-control-panel {
        gap: 3px;
    }
    
    .control-section {
        gap: 2px;
    }
    
    .control-buttons {
        gap: 2px;
    }
    
    .position-grid {
        gap: 2px;
    }
    
    .horizontal-controls {
        gap: 2px;
    }
}

@media (max-width: 320px) {
    .control-btn {
        width: 24px;
        height: 24px;
        font-size: 9px;
        min-width: 24px;
    }
    
    .preview-control-panel {
        gap: 2px;
    }
    
    .control-section {
        gap: 1px;
    }
    
    .control-buttons {
        gap: 1px;
    }
    
    .position-grid {
        gap: 1px;
    }
    
    .horizontal-controls {
        gap: 1px;
    }
}

/* 预览图片控制按钮 - 高端重构 */
.preview-image-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    padding: 10px 16px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 250, 252, 0.8) 100%);
    border-radius: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: fit-content;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.preview-image-controls .control-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border: none;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.9) 100%);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 3px 8px rgba(18, 18, 46, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: #374151;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-image-controls .control-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #7209b7 0%, #533483 50%, #0f3460 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
}

.preview-image-controls .control-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 24px rgba(114, 9, 183, 0.25),
        0 4px 12px rgba(83, 52, 131, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.preview-image-controls .control-btn:hover::before {
    opacity: 1;
}

.preview-image-controls .control-btn:hover i {
    color: white;
    transform: scale(1.15) rotate(5deg);
}

.preview-image-controls .control-btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 
        0 4px 16px rgba(114, 9, 183, 0.3),
        0 2px 6px rgba(83, 52, 131, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 移动端修复：确保active状态能够正确重置 */
@media (max-width: 768px) {
    .preview-image-controls .control-btn {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }
    
    .preview-image-controls .control-btn:active {
        transform: translateY(0) scale(0.95) !important;
        box-shadow: 
            0 4px 16px rgba(114, 9, 183, 0.3),
            0 2px 6px rgba(83, 52, 131, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
        transition: all 0.1s ease !important;
    }
    
    /* 确保点击后状态能够重置 */
    .preview-image-controls .control-btn:not(:active) {
        transform: translateY(0) scale(1) !important;
        box-shadow: 
            0 6px 20px rgba(0, 0, 0, 0.12),
            0 3px 8px rgba(18, 18, 46, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
        transition: all 0.3s ease !important;
    }
}

.preview-image-controls .control-btn i {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-shrink: 0;
    margin: 16px 24px 24px;
    padding: 0;
    position: relative;
    z-index: 10;
}

.btn-secondary {
    padding: 12px 24px;
    background: linear-gradient(145deg, 
        rgba(107, 114, 128, 0.9) 0%, 
        rgba(75, 85, 99, 0.95) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 18px rgba(107, 114, 128, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-secondary:hover {
    background: linear-gradient(145deg, 
        rgba(75, 85, 99, 0.95) 0%, 
        rgba(55, 65, 81, 1) 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 24px rgba(75, 85, 99, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, 
        #7209b7 0%, 
        #533483 50%, 
        #0f3460 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 18px rgba(114, 9, 183, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, 
        #8b1bb7 0%, 
        #6b4083 50%, 
        #1f4a80 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 24px rgba(114, 9, 183, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover::before {
    left: 100%;
}

/* 模态框动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px) saturate(1);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(20px) saturate(1.5);
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* 图片指示点 */
.image-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.image-dots.active {
    display: flex;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #E67E22;
    width: 24px;
    border-radius: 4px;
}

.dot:hover {
    background: #ff6b35;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* Decoration Circles - Mobile */
    .decoration-circle {
        filter: blur(40px);
    }
    
    .circle-1 {
        width: 300px;
        height: 300px;
        top: 5%;
        left: -15%;
    }
    
    .circle-2 {
        width: 250px;
        height: 250px;
        top: 35%;
        right: -10%;
    }
    
    .circle-3 {
        width: 350px;
        height: 350px;
        top: 65%;
        left: -5%;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
        max-width: 100%;
    }
    
    .product-gallery {
        position: static;
        padding: 0;
        margin: 0;
    }
    
    .main-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 12px;
    }
    
    .main-image {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 0 8px 0 !important;
        border-radius: 12px !important;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        touch-action: pan-y !important;
    }
    
    .main-image img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        border-radius: 10px !important;
        pointer-events: none !important;
        -webkit-user-drag: none !important;
        user-select: none !important;
    }
    
    /* 移动端主图片覆盖层也禁用拖动 */
    .name-overlay {
        pointer-events: none !important;
        touch-action: none !important;
    }
    
    /* 移动端显示导航 */
    .mobile-image-nav {
        display: flex !important;
        padding: 5px 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 18px;
        bottom: 8px;
        gap: 10px;
    }
    
    /* 移动端隐藏主图控制按钮 */
    .image-controls {
        display: none !important;
    }
    
    /* 移动端隐藏名字覆盖层 */
    .name-overlay {
        display: none !important;
    }
    
    .mobile-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .mobile-nav-btn i {
        font-size: 14px;
    }
    
    .mobile-page-counter {
        font-size: 13px;
        padding: 5px 12px;
        min-width: 50px;
    }
    
    /* 隐藏桌面端元素 */
    .thumbnail-gallery-container {
        display: none !important;
    }
    
    .zoom-overlay {
        display: none !important;
    }
    
    /* 移动端隐藏主图区域的控制按钮 */
    .image-controls {
        display: none !important;
    }
    
    .control-btn {
        width: 42px !important;
        height: 42px !important;
        font-size: 16px !important;
        border-radius: 11px !important;
    }
    
    .control-btn::before {
        border-radius: 11px !important;
    }
    
    .control-btn:active {
        transform: translateY(0) !important;
    }
    
    .product-info {
        padding: 12px 12px 16px 12px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 16px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        margin: 0 8px;
    }
    
    /* 产品标题区域 */
    .product-header {
        margin-bottom: 8px;
    }
    
    .product-badge {
        padding: 3px 8px;
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    .product-badge .badge-icon {
        width: 10px;
        height: 10px;
    }
    
    .product-title {
        font-size: 16px !important;
        line-height: 1.2;
        margin-bottom: 4px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    .product-subtitle {
        font-size: 9px;
    }
    
    /* 评分区域 */
    .rating-wrapper {
        margin-bottom: 10px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .trust-badges {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
    
    .trust-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    .trust-badge i {
        font-size: 10px;
    }
    
    .rating {
        margin-bottom: 8px;
        gap: 6px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* 价格区域 */
    .price-section {
        margin-bottom: 10px;
    }
    
    .price-amount {
        font-size: 22px;
    }
    
    .price-from {
        font-size: 10px;
    }
    
    .price-old {
        font-size: 12px;
    }
    
    .price-save {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .price {
        margin-bottom: 16px;
    }
    
    /* 移动端评分星星尺寸 */
    .stars i {
        font-size: 16px;
    }
    
    .rating-score {
        font-size: 15px;
    }
    
    .rating-count {
        font-size: 14px;
    }
    
    .rating-details {
        font-size: 14px;
    }
    
    /* 尺寸选择区域 */
    .size-section {
        margin-bottom: 10px;
    }
    
    .size-section h3 {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .size-guide {
        font-size: 14px;
    }
    
    .size-grid {
        gap: 5px;
    }
    
    .size-btn {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .hot-badge {
        font-size: 11px;
    }
    
    /* 预览区域 - 移动端隐藏 */
    .preview-section {
        display: none !important;
    }
    
    /* 购买区域 - 768px保持水平布局 */
    .purchase-section {
        margin-bottom: 24px;
        gap: 12px;
        flex-direction: row;
        align-items: center;
    }
    
    .quantity-wrapper {
        gap: 6px;
        flex-shrink: 0;
    }
    
    .quantity-label {
        font-size: 12px;
        gap: 5px;
    }
    
    .quantity-label i {
        font-size: 13px;
    }
    
    .quantity-selector {
        width: 130px;
        height: 46px;
        border-radius: 10px;
    }
    
    .qty-btn {
        width: 40px;
        height: 44px;
        font-size: 15px;
    }
    
    #quantity {
        flex: 1;
        font-size: 15px;
    }
    
    .add-to-cart-btn {
        flex: 1;
        padding: 14px 20px;
        font-size: 14px;
        height: 46px;
        border-radius: 10px;
        min-width: 180px;
    }
    
    .btn-icon-left,
    .btn-icon-right {
        font-size: 16px;
    }
    
    .btn-text-main {
        font-size: 15px;
    }
    
    .config-warning {
        font-size: 12px;
        padding: 10px 14px;
        margin-top: 12px;
    }
    
    .config-warning i {
        font-size: 14px;
    }
    
    /* 重构后的购买区域 - 平板响应式 */
    .purchase-section-redesign {
        gap: 16px;
    }
    
    .modern-quantity-selector {
        gap: 8px;
    }
    
    .qty-controls {
        border-radius: 14px;
        padding: 3px;
    }
    
    .qty-control-btn {
        width: 34px;
        height: 46px;
        border-radius: 11px;
    }
    
    .qty-control-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .qty-display {
        min-width: 55px;
    }
    
    .qty-display input {
        font-size: 18px;
    }
    
    .premium-cart-btn {
        height: 58px;
        border-radius: 14px;
    }
    
    .cart-icon {
        width: 20px;
        height: 20px;
    }
    
    .cart-btn-text {
        font-size: 14px;
    }
    
    .cart-arrow {
        width: 18px;
        height: 18px;
    }
    
    /* 个性化容器 */
    .personalization-container {
        padding: 10px 10px;
        margin-bottom: 10px;
        border-radius: 8px;
    }
    
    /* 上传区域 */
    .upload-section {
        margin-bottom: 10px;
    }
    
    .upload-section h3 {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .required-badge {
        font-size: 7px;
        padding: 1px 5px;
    }
    
    .upload-box {
        min-height: 100px;
        border-radius: 6px;
    }
    
    .upload-placeholder {
        padding: 15px;
    }
    
    .upload-icon {
        font-size: 28px;
        margin-bottom: 6px;
    }
    
    .upload-text {
        font-size: 11px;
    }
    
    .upload-main {
        margin-bottom: 3px;
    }
    
    .upload-specs {
        font-size: 10px;
    }
    
    .upload-tips {
        font-size: 10px;
        margin-top: 6px;
    }
    
    .upload-tips li {
        margin-bottom: 3px;
        padding-left: 10px;
    }
    
    .upload-preview img {
        max-height: 160px;
    }
    
    .change-photo-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .upload-status {
        padding: 12px 16px;
        border-radius: 10px;
    }
    
    .status-icon {
        font-size: 18px;
    }
    
    .status-text {
        font-size: 14px;
    }
    
    /* 上传指引 */
    .upload-guidelines {
        padding: 10px 12px;
        border-radius: 8px;
    }
    
    .guideline-header {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    
    .guideline-header i {
        font-size: 12px;
    }
    
    .guideline-header span {
        font-size: 10px;
    }
    
    .guidelines-list {
        gap: 6px;
    }
    
    .guidelines-list li {
        font-size: 9px;
        gap: 6px;
        line-height: 1.4;
    }
    
    .guidelines-list li i {
        font-size: 9px;
        flex-shrink: 0;
    }
    
    /* 名字输入区域 */
    .name-section {
        margin-bottom: 10px;
    }
    
    .name-header {
        margin-bottom: 6px;
    }
    
    .name-header h3 {
        font-size: 12px;
        gap: 5px;
    }
    
    .name-header h3 i {
        font-size: 12px;
    }
    
    .optional-badge {
        font-size: 7px;
        padding: 2px 5px;
    }
    
    .name-input-wrapper {
        margin-bottom: 6px;
    }
    
    #nameInput {
        padding: 8px 10px;
        font-size: 16px;
        border-radius: 6px;
        padding-right: 60px;
    }
    
    .char-counter {
        font-size: 9px;
    }
    
    .name-tips {
        font-size: 9px;
        gap: 4px;
    }
    
    .name-tips i {
        font-size: 9px;
    }
    
    /* 预览按钮 - 移动端显示 */
    .preview-section {
        display: block !important;
        margin-bottom: 12px;
    }
    
    .preview-btn {
        padding: 14px 24px;
        font-size: 13px;
        border-radius: 14px;
        gap: 10px;
    }
    
    .btn-icon {
        width: 22px;
        height: 22px;
    }
    
    .btn-icon i {
        font-size: 12px;
    }
    
    .preview-hint {
        font-size: 10px;
        margin-top: 6px;
    }
    
    /* 移动端禁用某些悬停动效（触屏优化） */
    .stars:hover i,
    .size-btn:hover:not(.active),
    .qty-btn:hover,
    .preview-btn:hover,
    .add-to-cart-btn:hover,
    .qty-control-btn:hover,
    .premium-cart-btn:hover {
        animation: none;
        transform: none;
    }
    
    .payment-methods img:hover {
        animation: none;
        transform: none;
        filter: grayscale(0%);
    }
    
    /* 移动端保留点击反馈 */
    .size-btn:active {
        transform: scale(0.95);
    }
    
    .qty-btn:active {
        transform: scale(0.95);
    }
    
    .preview-btn:active {
        transform: scale(0.97);
    }
    
    .add-to-cart-btn:active {
        transform: scale(0.96);
    }
    
    .qty-control-btn:active {
        transform: scale(0.95);
    }
    
    .premium-cart-btn:active {
        transform: scale(0.98);
    }
    
    /* 尺寸按钮 - 移动端也保持一行三个，支持换行 */
    .size-options {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .size-btn {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 90px;
        white-space: nowrap;
    }
    
    /* 购买区域 - 确保小屏保持水平 */
    .purchase-section {
        flex-direction: row !important;
        gap: 8px !important;
        margin-bottom: 16px;
    }
    
    .quantity-selector {
        width: 100px !important;
        flex-shrink: 0 !important;
    }
    
    .add-to-cart-btn {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    /* 重构后的购买区域 - 移动端响应式 */
    .purchase-section-redesign {
        gap: 12px;
    }
    
    .modern-quantity-selector {
        flex-shrink: 0;
    }
    
    .qty-label {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .qty-controls {
        border-radius: 12px;
        padding: 3px;
        border-width: 1.5px;
    }
    
    .qty-control-btn {
        width: 32px;
        height: 44px;
        border-radius: 10px;
    }
    
    .qty-control-btn svg {
        width: 15px;
        height: 15px;
    }
    
    .qty-display {
        min-width: 50px;
        padding: 0 6px;
    }
    
    .qty-display input {
        font-size: 17px;
    }
    
    .premium-cart-btn {
        height: 56px;
        border-radius: 12px;
        font-size: 14px;
    }
    
    .cart-btn-content {
        gap: 10px;
    }
    
    .cart-icon {
        width: 18px;
        height: 18px;
    }
    
    .cart-btn-text {
        font-size: 13px;
        letter-spacing: 0.5px;
    }
    
    .cart-arrow {
        width: 16px;
        height: 16px;
    }
    
    /* 移动端隐藏缩略图，显示指示点 */
    .thumbnail-gallery-container {
        display: none !important;
    }
    
    .image-dots {
        display: flex !important;
    }
    
    .main-image {
        max-width: 100%;
        touch-action: pan-y;
        user-select: none;
    }
    
    /* 支付方式 */
    .payment-methods {
        padding: 16px 0;
        gap: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .payment-methods img {
        height: 26px;
        width: auto;
    }
    
    /* 产品链接 */
    .product-links {
        margin-bottom: 20px;
        padding: 14px 0;
        text-align: center;
    }
    
    .info-link {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .info-link i {
        font-size: 14px;
    }
    
    /* 折叠区域 */
    .collapsible-sections {
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        margin-top: 20px;
    }
    
    .section-header {
        padding: 16px 0;
        margin: 0;
    }
    
    .section-header h3 {
        font-size: 16px;
    }
    
    .section-header i {
        font-size: 16px;
    }
    
    .section-content {
        padding: 0 0 16px 0;
        font-size: 14px;
        line-height: 1.6;
    }
    
    .description-content,
    .delivery-content {
        padding: 0;
    }
    
    .description-content h4,
    .delivery-content h4 {
        font-size: 17px;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    .description-content h5,
    .delivery-content h5 {
        font-size: 15px;
        margin: 18px 0 10px 0;
    }
    
    .description-content p,
    .delivery-content p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    .description-content ul,
    .delivery-content ul {
        padding-left: 20px;
        margin: 12px 0;
    }
    
    .description-content li,
    .delivery-content li {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 8px;
    }
    
    /* 模态框 */
    .modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 94%;
        max-width: 500px;
        border-radius: 16px;
    }
    
    .modal-content h2 {
        font-size: 19px;
        margin-bottom: 16px;
        line-height: 1.3;
    }
    
    .close {
        font-size: 32px;
        right: 16px;
        top: 16px;
    }
    
    /* 预览图片容器 */
    .preview-image-wrapper {
        margin-bottom: 16px;
    }
    
    .preview-image {
        border-radius: 12px;
        overflow: hidden;
    }
    
    #previewCanvas {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
        padding: 13px 24px;
        font-size: 15px;
        border-radius: 10px;
        height: 48px;
    }
    
    /* 购物车模态框 */
    .cart-modal-content {
        padding: 24px 20px;
    }
    
    .cart-success-icon {
        margin-bottom: 16px;
    }
    
    .cart-success-icon i {
        font-size: 48px;
    }
    
    .cart-item-preview {
        padding: 16px;
        margin: 16px 0;
        border-radius: 10px;
    }
    
    .cart-total {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 10px;
    }
    
    .cart-modal-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .cart-modal-actions .btn-secondary,
    .cart-modal-actions .btn-primary {
        width: 100%;
        padding: 13px 24px;
        font-size: 15px;
    }
    
    /* 移动端预览控制按钮 */
    .preview-image-controls {
        gap: 8px;
        padding: 12px 16px;
        margin: 0 auto;
    }
    
    .preview-image-controls .control-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    /* Decoration Circles - Small Mobile */
    .circle-1 {
        width: 200px;
        height: 200px;
    }
    
    .circle-2 {
        width: 180px;
        height: 180px;
    }
    
    .circle-3 {
        width: 220px;
        height: 220px;
    }
    
    .container {
        padding: 0;
        gap: 8px;
        max-width: 100%;
    }
    
    .main-image-wrapper {
        padding: 0 10px;
    }
    
    .main-image {
        margin: 0 0 6px 0 !important;
        border-radius: 10px !important;
    }
    
    /* 移动端隐藏主图区域的控制按钮 */
    .image-controls {
        display: none !important;
    }
    
    .product-info {
        padding: 10px 10px 14px 10px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
        margin: 0 6px;
    }
    
    .product-header {
        margin-bottom: 8px;
    }
    
    .product-badge {
        padding: 3px 8px;
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    .product-badge .badge-icon {
        width: 10px;
        height: 10px;
    }
    
    .product-title {
        font-size: 15px !important;
        line-height: 1.2;
        margin-bottom: 4px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    .product-subtitle {
        font-size: 9px;
    }
    
    .rating-wrapper {
        margin-bottom: 10px;
        flex-direction: column;
        gap: 8px;
    }
    
    .trust-badges {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
    
    .trust-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    .trust-badge i {
        font-size: 10px;
    }
    
    .rating {
        margin-bottom: 6px;
        gap: 5px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* 价格区域 */
    .price-section {
        margin-bottom: 8px;
    }
    
    .price-amount {
        font-size: 20px;
    }
    
    .price-from {
        font-size: 9px;
    }
    
    .price-old {
        font-size: 11px;
    }
    
    .price-save {
        font-size: 8px;
        padding: 2px 4px;
    }
    
    .price {
        margin-bottom: 12px;
    }
    
    .rating-score {
        font-size: 14px;
    }
    
    .rating-count {
        font-size: 13px;
    }
    
    .rating-details {
        font-size: 13px;
    }
    
    /* 超小屏星星 */
    .stars i {
        font-size: 15px;
    }
    
    /* 尺寸选择区域 */
    .size-section {
        margin-bottom: 8px;
    }
    
    .size-section h3 {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .size-guide {
        font-size: 14px;
    }
    
    .size-grid {
        gap: 5px;
    }
    
    .size-btn {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .hot-badge {
        font-size: 10px;
    }
    
    /* 预览按钮 - 移动端显示 */
    .preview-section {
        display: block !important;
        margin-bottom: 10px;
    }
    
    .preview-btn {
        padding: 12px 20px;
        font-size: 12px;
        border-radius: 12px;
        gap: 8px;
    }
    
    .btn-icon {
        width: 20px;
        height: 20px;
    }
    
    .btn-icon i {
        font-size: 11px;
    }
    
    .preview-hint {
        font-size: 9px;
        margin-top: 5px;
    }
    
    /* 购买区域 - 480px保持水平布局 */
    .purchase-section {
        margin-bottom: 12px;
        gap: 10px;
        flex-direction: row;
        align-items: center;
    }
    
    .quantity-wrapper {
        gap: 5px;
        flex-shrink: 0;
    }
    
    .quantity-label {
        font-size: 11px;
    }
    
    .quantity-label i {
        font-size: 11px;
    }
    
    .quantity-selector {
        width: 115px;
        height: 42px;
        border-radius: 8px;
    }
    
    .qty-btn {
        width: 36px;
        height: 40px;
        font-size: 14px;
    }
    
    #quantity {
        flex: 1;
        font-size: 14px;
    }
    
    .add-to-cart-btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 13px;
        height: 42px;
        border-radius: 8px;
        min-width: 140px;
    }
    
    .btn-icon-left,
    .btn-icon-right {
        font-size: 14px;
    }
    
    .btn-text-main {
        font-size: 14px;
    }
    
    .config-warning {
        font-size: 11px;
        padding: 8px 12px;
    }
    
    .config-warning i {
        font-size: 13px;
    }
    
    /* 个性化容器 */
    .personalization-container {
        padding: 10px 10px;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    /* 上传区域 */
    .upload-section {
        margin-bottom: 10px;
    }
    
    .upload-section h3 {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .required-badge {
        font-size: 7px;
        padding: 1px 4px;
    }
    
    .upload-box {
        min-height: 90px;
        border-radius: 6px;
    }
    
    .upload-placeholder {
        padding: 12px;
    }
    
    .upload-icon {
        font-size: 26px;
        margin-bottom: 5px;
    }
    
    .upload-text {
        font-size: 10px;
    }
    
    .upload-specs {
        font-size: 9px;
    }
    
    .upload-tips {
        font-size: 9px;
        margin-top: 5px;
    }
    
    .upload-tips li {
        margin-bottom: 2px;
        padding-left: 9px;
    }
    
    .upload-preview img {
        max-height: 140px;
    }
    
    .change-photo-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .upload-status {
        padding: 10px 14px;
        border-radius: 8px;
    }
    
    .status-icon {
        font-size: 16px;
    }
    
    .status-text {
        font-size: 13px;
    }
    
    /* 上传指引 */
    .upload-guidelines {
        padding: 14px;
        border-radius: 8px;
    }
    
    .guideline-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .guideline-header i {
        font-size: 18px;
    }
    
    .guideline-header span {
        font-size: 14px;
    }
    
    .guidelines-list {
        gap: 10px;
    }
    
    .guidelines-list li {
        font-size: 12px;
        gap: 10px;
        line-height: 1.5;
    }
    
    .guidelines-list li i {
        font-size: 13px;
    }
    
    /* 名字输入区域 */
    .name-section {
        margin-bottom: 10px;
    }
    
    .name-header {
        margin-bottom: 6px;
    }
    
    .name-header h3 {
        font-size: 12px;
        gap: 5px;
    }
    
    .name-header h3 i {
        font-size: 12px;
    }
    
    .optional-badge {
        font-size: 7px;
        padding: 2px 5px;
    }
    
    .name-input-wrapper {
        margin-bottom: 6px;
    }
    
    #nameInput {
        padding: 8px 10px;
        font-size: 16px;
        border-radius: 6px;
        padding-right: 55px;
    }
    
    .char-counter {
        font-size: 9px;
    }
    
    .name-tips {
        font-size: 9px;
        gap: 4px;
    }
    
    .name-tips i {
        font-size: 9px;
    }
    
    /* 支付方式 */
    .payment-methods {
        padding: 14px 0;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .payment-methods img {
        height: 24px;
        width: auto;
    }
    
    /* 产品链接 */
    .product-links {
        margin-bottom: 18px;
        padding: 12px 0;
        text-align: center;
    }
    
    .info-link {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .info-link i {
        font-size: 13px;
    }
    
    /* 折叠区域 */
    .collapsible-sections {
        padding-top: 18px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        margin-top: 18px;
    }
    
    .section-header {
        padding: 14px 0;
        margin: 0;
    }
    
    .section-header h3 {
        font-size: 15px;
    }
    
    .section-header i {
        font-size: 15px;
    }
    
    .section-content {
        padding: 0 0 14px 0;
        font-size: 13px;
        line-height: 1.6;
    }
    
    .description-content,
    .delivery-content {
        padding: 0;
    }
    
    .description-content h4,
    .delivery-content h4 {
        font-size: 16px;
        margin-bottom: 10px;
        line-height: 1.4;
    }
    
    .description-content h5,
    .delivery-content h5 {
        font-size: 14px;
        margin: 16px 0 8px 0;
    }
    
    .description-content p,
    .delivery-content p {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 10px;
    }
    
    .description-content ul,
    .delivery-content ul {
        padding-left: 18px;
        margin: 10px 0;
    }
    
    .description-content li,
    .delivery-content li {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 7px;
    }
    
    /* 超小屏移动端导航 */
    .mobile-image-nav {
        padding: 4px 8px;
        border-radius: 16px;
        bottom: 6px;
        gap: 8px;
    }
    
    .mobile-nav-btn {
        width: 28px;
        height: 28px;
    }
    
    .mobile-nav-btn i {
        font-size: 14px;
    }
    
    .mobile-page-counter {
        font-size: 12px;
    }
    
    /* 超小屏控制按钮 - 隐藏主图区域按钮 */
    .image-controls {
        display: none !important;
    }
    
    /* 模态框 - 超小屏优化 */
    .modal {
        padding: 8px;
    }
    
    .modal-content {
        width: calc(100% - 16px);
        max-width: 100%;
        padding: 12px;
        margin: 0 auto;
        border-radius: 12px;
        max-height: calc(100vh - 16px);
        max-height: calc(var(--vh, 1vh) * 100 - 16px);
    }
    
    .modal-content h2 {
        font-size: 16px;
        margin-bottom: 10px;
        line-height: 1.3;
        padding-right: 35px;
    }
    
    .close {
        font-size: 24px;
        right: 10px;
        top: 10px;
        width: 30px;
        height: 30px;
    }
    
    /* 预览图片容器 */
    .preview-image-wrapper {
        margin: 8px 0;
        flex: 1;
        min-height: 0;
    }
    
    .preview-image {
        flex: 1;
        min-height: 0;
        margin-bottom: 8px;
    }
    
    #previewCanvas {
        max-width: 100%;
        max-height: 45vh;
        max-height: calc(var(--vh, 1vh) * 45);
        height: auto;
        width: auto;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 8px;
        min-height: 44px;
    }
    
    /* 购物车模态框 */
    .cart-modal-content {
        padding: 20px 16px;
    }
    
    .cart-success-icon {
        margin-bottom: 14px;
    }
    
    .cart-success-icon i {
        font-size: 42px;
    }
    
    .cart-item-preview {
        padding: 14px;
        margin: 14px 0;
        border-radius: 8px;
    }
    
    .cart-total {
        padding: 14px;
        margin-bottom: 14px;
        border-radius: 8px;
    }
    
    .cart-modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .cart-modal-actions .btn-secondary,
    .cart-modal-actions .btn-primary {
        width: 100%;
        padding: 11px 20px;
        font-size: 14px;
    }
    
    .preview-image-controls {
        gap: 4px !important;
        padding: 6px 8px !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        max-width: 100% !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.9) 0%, 
            rgba(248, 250, 252, 0.8) 100%) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        backdrop-filter: blur(10px) !important;
        position: relative !important;
        z-index: 10 !important;
        flex-shrink: 0 !important;
    }
    
    .preview-image-controls .control-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
        background: linear-gradient(145deg, 
            rgba(255, 255, 255, 0.95) 0%, 
            rgba(248, 250, 252, 0.9) 100%) !important;
        box-shadow: 
            0 3px 8px rgba(0, 0, 0, 0.1),
            0 1px 4px rgba(18, 18, 46, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    .preview-image-controls .control-btn::before {
        border-radius: 10px !important;
    }
    
    .preview-image-controls .control-btn i {
        font-size: 12px !important;
    }
    
    /* 超小屏禁用所有动画（性能优化） */
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        transition-duration: 0.2s !important;
    }
    
    /* 保留基本的点击反馈 */
    .size-btn:active,
    .qty-btn:active,
    .preview-btn:active,
    .add-to-cart-btn:active {
        opacity: 0.8;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-info > * {
    animation: fadeIn 0.6s ease forwards;
}

.product-info > *:nth-child(1) { animation-delay: 0.1s; }
.product-info > *:nth-child(2) { animation-delay: 0.2s; }
.product-info > *:nth-child(3) { animation-delay: 0.3s; }
.product-info > *:nth-child(4) { animation-delay: 0.4s; }
.product-info > *:nth-child(5) { animation-delay: 0.5s; }

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ff6b35;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* 客户评论板块 */
/* 独立评论板块容器 */
.reviews-section-wrapper {
    width: 100%;
    background: transparent;
    padding: 30px 20px 60px 20px;
    margin-top: 20px;
}

.customer-reviews {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.6);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(66, 153, 225, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(66, 153, 225, 0.15);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 20px;
}

.reviews-header .reviews-title-section {
    display: flex !important;
    align-items: center !important;
    gap: 20px;
    flex: 1;
}

.reviews-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #5d4037;
    margin: 0;
    position: relative;
    padding-bottom: 12px;
    flex-shrink: 0;
}

.reviews-header h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #8B4513, #A0522D);
    border-radius: 3px;
}

/* Privacy Notice - Inline version */
.reviews-header .privacy-notice-inline {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52) !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3) !important;
    animation: subtle-pulse 3s ease-in-out infinite;
    display: block !important;
}

.reviews-header .privacy-notice-inline p {
    margin: 0 !important;
    font-size: 13px !important;
    color: white !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    white-space: nowrap !important;
}

@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Mobile responsive styles for privacy notice */
@media (max-width: 768px) {
    .reviews-header .reviews-title-section {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .reviews-header .privacy-notice-inline {
        white-space: normal !important;
        align-self: flex-start !important;
    }
    
    .reviews-header .privacy-notice-inline p {
        font-size: 12px !important;
        white-space: normal !important;
    }
    
    .customer-reviews h3 {
        margin-bottom: 0 !important;
    }
}

/* Keep old privacy notice style for backward compatibility */
.privacy-notice {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    text-align: center;
}

.privacy-notice p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    font-style: italic;
}

.overall-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.overall-rating .stars {
    display: flex;
    gap: 2px;
}

.overall-rating .stars i {
    color: #FFD700;
    font-size: 16px;
}

.rating-text {
    font-size: 15px;
    color: #6d4c41;
    font-weight: 600;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 隐藏的评论 */
.review-item.hidden-review {
    display: none;
}

/* 加载更多容器 */
.load-more-container {
    margin-top: 35px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.load-more-btn {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.4);
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn i {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.load-more-btn:hover i {
    transform: translateY(3px);
}

.load-more-btn.hidden {
    display: none;
}

.reviews-count {
    color: #8d6e63;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.reviews-count span {
    font-weight: 700;
    color: #5d4037;
}

.review-item {
    padding: 25px;
    border: 1px solid rgba(66, 153, 225, 0.1);
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.08);
}

.review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(66, 153, 225, 0.15);
    border-color: rgba(66, 153, 225, 0.2);
}

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

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.25);
    border: 2px solid #ffffff;
}

.reviewer-details h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #5d4037;
}

.review-stars {
    display: flex;
    gap: 1px;
}

.review-stars i {
    color: #FFD700;
    font-size: 12px;
}

.review-date {
    font-size: 12px;
    color: #8d6e63;
    font-weight: 500;
}

.review-text {
    font-size: 14px;
    line-height: 1.7;
    color: #6d4c41;
    margin: 0;
}

.review-images {
    display: flex;
    gap: 8px;
}

.review-image-placeholder {
    width: 60px;
    height: 60px;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    font-size: 20px;
    color: #999;
}



/* 响应式设计 */
@media (max-width: 768px) {
    .reviews-section-wrapper {
        padding: 20px 0 40px 0;
        margin-top: 12px;
    }
    
    .customer-reviews {
        padding: 20px 15px;
        border-radius: 16px;
        margin: 0 8px;
        max-width: calc(100% - 16px);
    }
    
    .reviews-header {
        margin-bottom: 18px;
    }
    
    .reviews-header h3 {
        font-size: 22px;
        padding-bottom: 8px;
    }
    
    .reviews-header h3::after {
        width: 50px;
        height: 2px;
    }
    
    .overall-rating .stars i {
        font-size: 14px;
    }
    
    .rating-text {
        font-size: 14px;
    }
    
    .reviews-list {
        gap: 14px;
    }
    
    .review-item {
        padding: 14px;
        border-radius: 10px;
    }
    
    .reviewer-avatar {
        width: 38px;
        height: 38px;
        font-size: 15px;
        border-width: 1.5px;
    }
    
    .reviewer-details h4 {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .review-stars i {
        font-size: 11px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .review-date {
        font-size: 11px;
    }
    
    .review-text {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .load-more-container {
        margin-top: 25px;
        gap: 12px;
    }
    
    .load-more-btn {
        padding: 12px 32px;
        font-size: 14px;
    }
    
    .reviews-count {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .reviews-section-wrapper {
        padding: 16px 0 30px 0;
        margin-top: 10px;
    }
    
    .customer-reviews {
        padding: 16px 12px;
        border-radius: 14px;
        margin: 0 6px;
        max-width: calc(100% - 12px);
    }
    
    .reviews-header {
        gap: 10px;
        margin-bottom: 14px;
    }
    
    .reviews-header h3 {
        font-size: 18px;
        padding-bottom: 6px;
    }
    
    .reviews-header h3::after {
        width: 40px;
    }
    
    .overall-rating {
        gap: 6px;
    }
    
    .overall-rating .stars i {
        font-size: 13px;
    }
    
    .rating-text {
        font-size: 13px;
    }
    
    .reviews-list {
        gap: 12px;
    }
    
    .review-item {
        padding: 12px;
        border-radius: 8px;
    }
    
    .reviewer-avatar {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    
    .reviewer-details h4 {
        font-size: 13px;
    }
    
    .review-stars i {
        font-size: 10px;
    }
    
    .review-date {
        font-size: 10px;
    }
    
    .review-text {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .load-more-container {
        margin-top: 20px;
        gap: 10px;
    }
    
    .load-more-btn {
        padding: 10px 28px;
        font-size: 13px;
    }
    
    .load-more-btn i {
        font-size: 12px;
    }
    
    .reviews-count {
        font-size: 12px;
    }
}

/* ===== 上传图片覆盖层和拖动功能 ===== */
.uploaded-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

@media (max-width: 768px) {
    .uploaded-image-overlay {
        position: absolute !important;
    }
    
    /* 移动端禁用图片拖动 */
    .draggable-uploaded-image {
        cursor: default !important;
        pointer-events: none !important;
        touch-action: none !important;
    }
    
    .draggable-uploaded-image:active {
        cursor: default !important;
    }
    
    /* 移动端隐藏主图区域的控制按钮 */
    .image-controls {
        display: none !important;
    }
}

.draggable-uploaded-image {
    position: absolute;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: move;
    pointer-events: all;
    z-index: 10;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    -webkit-user-drag: none;
    /* 保持图片宽高比，防止拉伸 */
}

/* 对所有图片应用底部边缘透明效果（让抠图底部变透明） */
.draggable-uploaded-image.tall-image-fade {
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 60%,
        rgba(0, 0, 0, 0.9) 75%,
        rgba(0, 0, 0, 0.7) 85%,
        rgba(0, 0, 0, 0.4) 92%,
        rgba(0, 0, 0, 0.1) 97%,
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 60%,
        rgba(0, 0, 0, 0.9) 75%,
        rgba(0, 0, 0, 0.7) 85%,
        rgba(0, 0, 0, 0.4) 92%,
        rgba(0, 0, 0, 0.1) 97%,
        rgba(0, 0, 0, 0) 100%
    );
}

.draggable-uploaded-image:active {
    cursor: grabbing;
}

/* 图片调整控制按钮 */
.image-controls {
    display: none;  /* 默认隐藏，上传图片后显示 */
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px auto 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    flex-wrap: wrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: fit-content;
}

.control-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    color: #2C3E50;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #8B4513 0%, #6B3410 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 69, 19, 0.25), 0 2px 4px rgba(0, 0, 0, 0.08);
}

.control-btn:hover::before {
    opacity: 1;
}

.control-btn:hover i {
    color: white;
    transform: scale(1.1);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.control-btn i {
    pointer-events: none;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

/* 名字实时显示覆盖层 - 鲜红色粗手写涂鸦风格 */
.name-overlay {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 42px;
    font-weight: 300;
    color: #1a1a1a;
    text-align: center;
    z-index: 8;
    pointer-events: none;
    font-family: 'Permanent Marker', 'Caveat Brush', cursive;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-style: normal;
    line-height: 1;
}

.name-overlay:empty {
    display: none;
}

/* 响应式调整 - 移动端名字覆盖层 */
@media (max-width: 768px) {
    .name-overlay {
        font-size: 32px !important;
        top: 15% !important;
    }
}

@media (max-width: 480px) {
    .name-overlay {
        font-size: 30px;
        top: 14%;
    }
}

/* 加载遮罩层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
    font-size: 18px;
}

.loading-overlay .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== 顶部导航栏样式 ===== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 6px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.site-header.header-shadow {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 42px;
}

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.header-logo a:hover {
    opacity: 0.85;
}

.header-logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

/* 为 fixed header 添加 body padding */
body {
    padding-top: 55px;
}

.header-logo img {
    max-height: 28px;
    width: auto;
    display: block;
    object-fit: contain;
}

.site-logo {
    transition: opacity 0.3s ease;
}

.site-logo:hover {
    opacity: 0.85;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.logo-text:hover {
    color: #e67e22;
}

.header-notice {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    height: 38px;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: headerNoticePulse 3s ease-in-out infinite;
}

/* 闪光动效 */
.header-notice::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: headerNoticeShine 3s linear infinite;
}

.header-notice:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px) scale(1.05);
}

.header-notice i {
    font-size: 13px;
    animation: headerNoticeBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

/* 脉冲动画 */
@keyframes headerNoticePulse {
    0%, 100% {
        box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 2px 16px rgba(16, 185, 129, 0.5), 0 0 0 3px rgba(16, 185, 129, 0.1);
    }
}

/* 闪光动画 */
@keyframes headerNoticeShine {
    0% {
        left: -200%;
    }
    100% {
        left: 200%;
    }
}

/* 图标弹跳动画 */
@keyframes headerNoticeBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(-5deg);
    }
    75% {
        transform: translateY(2px) rotate(5deg);
    }
}

/* === 触摸设备优化（移除悬停动效） === */
@media (hover: none) and (pointer: coarse) {
    /* 简化顶部通知动画 */
    .header-notice {
        animation: none !important;
    }
    
    .header-notice::before {
        animation: none !important;
    }
    
    .header-notice i {
        animation: none !important;
    }
    
    .header-notice:hover {
        transform: none !important;
    }
    
    /* 禁用星星动画 */
    .stars i {
        animation: none !important;
    }
    
    .stars:hover i {
        animation: none !important;
        transform: none !important;
    }
    
    /* 禁用价格发光动画 */
    .current-price {
        animation: none !important;
    }
    
    /* 简化按钮动效 */
    .size-btn:hover:not(.active) {
        transform: none !important;
        background: linear-gradient(to bottom, #ffffff, #fafafa) !important;
    }
    
    .preview-btn:hover {
        transform: none !important;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #7209b7 100%) !important;
        color: white !important;
        box-shadow: 
            0 8px 32px rgba(18, 18, 46, 0.4),
            0 4px 16px rgba(114, 9, 183, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    }
    
    .add-to-cart-btn:hover {
        transform: none !important;
    }
    
    .qty-btn:hover {
        color: #666 !important;
    }
    
    .upload-placeholder span:hover {
        transform: none !important;
    }
    
    .delete-upload-btn:hover {
        transform: none !important;
        background: #ff4444 !important;
    }
    
    .payment-methods img:hover {
        transform: none !important;
        filter: grayscale(0%) !important;
    }
    
    /* 保留点击反馈 */
    .size-btn:active {
        transform: scale(0.95) !important;
    }
    
    .preview-btn:active {
        transform: scale(0.97) !important;
        background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%) !important;
        color: #ffffff !important;
        box-shadow: 
            0 4px 16px rgba(18, 18, 46, 0.6),
            0 2px 8px rgba(114, 9, 183, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    }
    
    .add-to-cart-btn:active {
        transform: scale(0.96) !important;
    }
    
    .qty-btn:active {
        transform: scale(0.95) !important;
    }
}

/* === 减弱动画偏好（辅助功能） === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01s !important;
    }
    
    .header-notice,
    .header-notice::before,
    .header-notice i,
    .stars i,
    .current-price,
    .size-btn,
    .preview-btn,
    .add-to-cart-btn,
    .cart-count {
        animation: none !important;
    }
}

/* ===== 底部栏样式 ===== */
.site-footer {
    background: linear-gradient(to bottom, #1a365d 0%, #2c3e50 100%);
    color: #ffffff;
    padding: 50px 0 20px;
    margin-top: 0;
    border-top: 3px solid rgba(139, 69, 19, 0.3);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, #8B4513, #A0522D);
    border-radius: 2px;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, #8B4513, #A0522D);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.footer-social a:hover {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
    border-color: rgba(139, 69, 19, 0.5);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
    margin-top: 20px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .site-header {
        padding: 12px 0;
    }
    
    .header-container {
        padding: 0 15px;
        min-height: 46px;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    .header-logo img {
        max-height: 26px;
    }
    
    .header-notice {
        font-size: 11px;
        padding: 6px 12px;
        border-radius: 16px;
        height: 36px;
    }
    
    .header-notice span {
        display: none;
    }
    
    .header-notice::after {
        content: 'Free Shipping';
    }
    
    .header-notice i {
        font-size: 12px;
    }
    
    .cart-toggle-btn {
        height: 38px;
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .cart-toggle-btn i {
        font-size: 18px;
    }
    
    .cart-count {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        top: -2px;
        right: -2px;
    }
    
    .logo-text {
        font-size: 15px;
    }
    
    /* 移动端底部 - 完整显示 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-section h4 {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .footer-section h4::after {
        width: 30px;
        height: 1.5px;
    }
    
    .footer-section p {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .footer-links li {
        margin-bottom: 6px;
    }
    
    .footer-links a {
        font-size: 13px;
    }
    
    .footer-social {
        gap: 10px;
        margin-top: 10px;
    }
    
    .footer-social a {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .footer-bottom {
        padding-top: 15px;
        margin-top: 12px;
    }
    
    .footer-bottom p {
        font-size: 12px;
    }
    
    .site-footer {
        padding: 25px 0 15px;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 64px;
    }
    
    .site-header {
        padding: 10px 0;
    }
    
    .header-container {
        padding: 0 12px;
        min-height: 44px;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .header-logo img {
        max-height: 24px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .header-notice {
        font-size: 10px;
        padding: 5px 11px;
        border-radius: 14px;
        height: 34px;
    }
    
    .header-notice i {
        font-size: 11px;
    }
    
    .cart-toggle-btn {
        height: 36px;
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .cart-toggle-btn i {
        font-size: 16px;
    }
    
    .cart-count {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        top: -2px;
        right: -2px;
    }
    
    /* 小屏购物车优化 */
    .cart-sidebar-footer {
        padding: 12px 14px;
        padding-bottom: max(12px, calc(12px + env(safe-area-inset-bottom)));
    }
    
    .cart-sidebar-body {
        padding: 10px 12px;
    }
    
    .cart-sidebar-item {
        padding: 8px;
        gap: 8px;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-total {
        font-size: 13px;
        margin-bottom: 8px;
        padding: 6px 0;
    }
    
    .cart-total strong {
        font-size: 16px;
    }
    
    .cart-items {
        gap: 8px;
    }
    
    .btn-view-cart,
    .btn-checkout {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    /* 超小屏底部极简化 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .footer-section h4 {
        font-size: 13px;
        margin-bottom: 8px;
        padding-bottom: 4px;
    }
    
    .footer-section h4::after {
        width: 25px;
    }
    
    .footer-section p {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .footer-links li {
        margin-bottom: 5px;
    }
    
    .footer-links a {
        font-size: 12px;
    }
    
    .footer-social {
        gap: 8px;
        margin-top: 8px;
    }
    
    .footer-social a {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .footer-bottom {
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .footer-bottom p {
        font-size: 11px;
        opacity: 0.8;
    }
    
    .site-footer {
        padding: 20px 0 12px;
    }
    
    .footer-container {
        padding: 0 15px;
    }
}

/* ===== 购物车弹窗样式 ===== */
.cart-modal-content {
    max-width: 600px;
    width: 90%;
    text-align: center;
    padding: 40px 30px;
}

.cart-success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cart-modal-content h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 600;
}

.cart-item-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: left;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cart-item-details h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

.cart-item-details p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

.cart-item-details strong {
    color: #333;
    font-weight: 600;
}

.cart-item-price {
    text-align: right;
    min-width: 120px;
}

.item-unit-price {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.item-total-price {
    font-size: 24px;
    color: #007bff;
    font-weight: 700;
    margin: 0;
}

.cart-total {
    border-top: 2px solid #e9ecef;
    padding-top: 20px;
    margin-bottom: 30px;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 18px;
}

.cart-subtotal span:first-child {
    color: #666;
    font-weight: 500;
}

.subtotal-amount {
    color: #007bff;
    font-size: 28px;
    font-weight: 700;
}

.cart-note {
    font-size: 13px;
    color: #999;
    margin: 0;
    font-style: italic;
}

.cart-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cart-modal-actions .btn-secondary,
.cart-modal-actions .btn-primary {
    flex: 1;
    min-width: 200px;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cart-modal-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.cart-modal-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.cart-modal-actions .btn-primary {
    background: #007bff;
    color: white;
}

.cart-modal-actions .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .cart-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .cart-modal-content h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .cart-success-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .cart-item-price {
        text-align: left;
        width: 100%;
    }
    
    .item-total-price {
        font-size: 20px;
    }
    
    .subtotal-amount {
        font-size: 24px;
    }
    
    .cart-modal-actions {
        flex-direction: column;
    }
    
    .cart-modal-actions .btn-secondary,
    .cart-modal-actions .btn-primary {
        width: 100%;
        min-width: auto;
    }
}

/* ===== 购物车按钮和侧边栏 ===== */
.header-cart {
    display: flex;
    align-items: center;
}

.cart-toggle-btn {
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    height: 38px;
    position: relative;
}

.cart-toggle-btn:hover {
    border-color: #8B4513;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.15);
    transform: translateY(-1px);
}

.cart-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-toggle-btn i {
    font-size: 18px;
    color: #8B4513;
}

.cart-count {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    position: absolute;
    top: -4px;
    right: -4px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    animation: cartBadgePulse 2s ease-in-out infinite;
}

@keyframes cartBadgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.cart-count-update {
    animation: cartCountUpdate 0.3s ease !important;
}

@keyframes cartCountUpdate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* 购物车侧边栏 */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    pointer-events: none;
}

.cart-sidebar.active {
    pointer-events: auto;
}

.cart-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar.active .cart-sidebar-overlay {
    opacity: 1;
}

.cart-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: white;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    /* 确保高度正确计算 - 使用CSS变量避免闪烁 */
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100); /* 动态视口高度，适配移动端 */
}

.cart-sidebar.active .cart-sidebar-content {
    transform: translateX(0);
}

/* 侧边栏头部 */
.cart-sidebar-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f4f0 0%, #faf8f5 100%);
}

.cart-sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #8B4513;
    margin: 0;
}

.cart-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cart-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* 侧边栏主体 */
.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    /* iOS 平滑滚动 */
    -webkit-overflow-scrolling: touch;
    /* 确保可以滚动 */
    min-height: 0;
    /* 移动端滚动优化 */
    overscroll-behavior: contain;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-sidebar-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #fafafa;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.cart-sidebar-item:hover {
    background: #f5f5f5;
}

.cart-item-image {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    border: 1px solid #e0e0e0;
    cursor: pointer; /* 添加点击光标 */
    position: relative;
}

.cart-item-image::after {
    content: '\f002'; /* Font Awesome 搜索图标 */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0, 0, 0, 0.6);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cart-item-image:hover::after {
    opacity: 1;
}

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

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

.cart-item-image img[loading="lazy"] {
    opacity: 0;
}

.cart-item-image img.loaded,
.cart-item-image img[loading="lazy"]:not([src=""]) {
    opacity: 1;
}

/* 购物车图片放大查看模态框 */
.cart-image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.cart-image-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-image-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.cart-image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100000;
}

.cart-image-lightbox-close:hover {
    background: white;
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.cart-item-meta {
    font-size: 11px;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

.cart-item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 12px;
}

.cart-item-price .quantity {
    color: #666;
}

.cart-item-price .price {
    font-weight: 700;
    color: #8B4513;
}

.cart-item-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    font-size: 11px;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #fee;
    color: #e74c3c;
    border-color: #e74c3c;
}

/* 空购物车 */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.cart-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    color: #ddd;
}

.cart-empty p {
    font-size: 16px;
    margin: 0;
}

/* 购物车加载状态 */
.cart-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    animation: fadeIn 0.2s ease;
}

.cart-loading i {
    font-size: 28px;
    margin-bottom: 8px;
    color: #E67E22;
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 购物车错误状态 */
.cart-error {
    text-align: center;
    padding: 60px 20px;
    color: #e74c3c;
}

/* 侧边栏底部 */
.cart-sidebar-footer {
    padding: 14px 18px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    border-top: 2px solid #e0e0e0;
    background: #fafafa;
    /* 确保底部固定 */
    flex-shrink: 0;
}

/* 空的footer不显示 */
.cart-sidebar-footer:empty {
    display: none;
    padding: 0;
    border: none;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    padding: 8px 0;
}

.cart-total strong {
    font-size: 18px;
    color: #8B4513;
}

.btn-view-cart,
.btn-checkout {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view-cart {
    background: white;
    color: #8B4513;
    border: 2px solid #8B4513;
    margin-bottom: 10px;
    font-family: inherit;
}

.btn-view-cart:hover {
    background: #8B4513;
    color: white;
}

.btn-checkout {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 69, 19, 0.4);
}

/* 购物车按钮组 */
.cart-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-close-cart {
    flex: 1;
    padding: 12px 16px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-close-cart:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.btn-checkout-primary {
    flex: 2;
    padding: 14px 20px;
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-checkout-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5);
    background: linear-gradient(135deg, #D35400 0%, #CA6F1E 100%);
}

.btn-checkout-primary i {
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .header-actions {
        gap: 6px;
    }
    
    .header-notice {
        padding: 6px 12px;
        font-size: 13px;
        height: 34px;
    }
    
    .cart-toggle-btn {
        padding: 5px 12px;
        font-size: 13px;
        height: 34px;
    }
    
    .cart-toggle-btn i {
        font-size: 16px;
    }
    
    .cart-count {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        right: -3px;
    }
}

@media (max-width: 640px) {
    .header-actions {
        gap: 5px;
    }
    
    .header-notice {
        padding: 6px 10px;
        font-size: 12px;
        height: 32px;
    }
    
    .header-notice span {
        display: none;
    }
    
    .header-notice i {
        margin-right: 0;
    }
    
    .cart-sidebar-content {
        width: 100%;
        max-width: 100%;
        /* 移动端高度优化 - 使用CSS变量避免闪烁 */
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
    }
    
    /* 移动端购物车优化 */
    .cart-sidebar-header {
        padding: 12px 16px;
    }
    
    .cart-sidebar-header h3 {
        font-size: 16px;
    }
    
    .cart-sidebar-footer {
        padding: 12px 16px;
        padding-bottom: max(12px, calc(12px + env(safe-area-inset-bottom)));
    }
    
    .cart-sidebar-body {
        padding: 10px 12px;
    }
    
    .cart-items {
        gap: 8px;
    }
    
    .cart-sidebar-item {
        padding: 8px;
        gap: 8px;
    }
    
    .cart-item-image {
        width: 55px;
        height: 55px;
    }
    
    .cart-total {
        font-size: 14px;
        margin-bottom: 10px;
        padding: 6px 0;
    }
    
    .cart-total strong {
        font-size: 16px;
    }
    
    .btn-view-cart,
    .btn-checkout {
        padding: 11px 14px;
        font-size: 13px;
    }
    
    .cart-toggle-btn {
        padding: 5px 10px;
        gap: 6px;
        height: 32px;
    }
    
    .cart-toggle-btn i {
        font-size: 16px;
    }
    
    .cart-count {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        right: -3px;
    }
    
    /* 购物车按钮组 - 移动端 */
    .cart-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-close-cart,
    .btn-checkout-primary {
        width: 100%;
        flex: none;
    }
    
    .btn-checkout-primary {
        font-size: 14px;
        padding: 12px 16px;
    }
}

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

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px 15px;
        max-width: 100%;
    }
    
    .product-gallery {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .product-info {
        max-width: 600px;
        margin: 0 auto;
        border-radius: 18px;
    }
    
    .decoration-circle {
        display: none;
    }
}

/* 手机设备 (最大宽度 768px) */
@media (max-width: 768px) {
    /* 主图区域 */
    .main-image-wrapper {
        max-width: 100%;
    }
    
    .main-image img {
        border-radius: 12px;
    }
    
    /* 名字覆盖层 - 移动端调整 */
    .name-overlay {
        top: 15%;
        font-size: 32px;
        padding: 0 20px;
    }
    
    /* 缩略图画廊 */
    .thumbnail-gallery-container {
        margin-top: 15px;
        padding: 0 10px;
    }
    
    .thumbnail {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }
    
    .gallery-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* 产品信息区 */
    /* 产品头部 */
    .product-header {
        margin-bottom: 18px;
    }
    
    .product-badge {
        padding: 5px 12px;
        margin-bottom: 12px;
    }
    
    .badge-icon {
        width: 14px;
        height: 14px;
    }
    
    .product-badge span {
        font-size: 11px;
    }
    
    .product-title {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .product-subtitle {
        font-size: 12px;
        gap: 10px;
    }
    
    /* 评分系统 */
    .rating-wrapper {
        margin-bottom: 20px;
    }
    
    .rating {
        margin-bottom: 12px;
        gap: 10px;
    }
    
    .stars i {
        font-size: 16px;
    }
    
    .rating-score {
        font-size: 15px;
    }
    
    .rating-count {
        font-size: 13px;
    }
    
    .trust-badges {
        gap: 12px;
    }
    
    .trust-badge {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .trust-badge i {
        font-size: 12px;
    }
    
    /* 价格区域 */
    .price-section {
        margin-bottom: 10px;
    }
    
    .price-amount {
        font-size: 24px;
    }
    
    .price-from {
        font-size: 10px;
    }
    
    .price-old {
        font-size: 12px;
    }
    
    .price-save {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    /* 尺寸选择 */
    .size-section {
        margin-bottom: 20px;
    }
    
    .size-section h3 {
        font-size: 12px;
        margin-bottom: 7px;
    }
    
    .size-guide {
        font-size: 15px;
    }
    
    .size-grid {
        gap: 6px;
    }
    
    .size-btn {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    /* 个性化容器 */
    .personalization-container {
        gap: 20px;
    }
    
    .section-title-wrapper h3 {
        font-size: 17px;
    }
    
    .upload-box {
        min-height: 110px;
    }
    
    .upload-placeholder {
        padding: 16px;
    }
    
    .upload-icon {
        font-size: 30px;
    }
    
    .upload-title,
    .upload-browse {
        font-size: 15px;
    }
    
    .upload-specs {
        font-size: 12px;
    }
    
    .upload-tips {
        font-size: 10px;
        margin-top: 7px;
    }
    
    .upload-preview img {
        max-height: 160px;
    }
    
    .change-photo-btn {
        padding: 11px 22px;
        font-size: 13px;
    }
    
    .upload-guidelines {
        padding: 18px;
    }
    
    .guideline-header span {
        font-size: 14px;
    }
    
    .guidelines-list li {
        font-size: 12px;
    }
    
    .name-section h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .upload-tips p {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    #nameInput {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .char-counter {
        font-size: 12px;
    }
    
    /* 预览按钮 */
    .preview-btn {
        padding: 14px 24px;
        font-size: 14px;
        margin: 20px 0;
    }
    
    /* 购买区域 - 移动端隐藏原购买区域 */
    .product-info > .purchase-section {
        display: none;
    }
    
    
    /* 预览section底部留白 */
    .preview-section {
        margin-bottom: 20px;
    }
    
    /* 支付方式 */
    .payment-methods {
        gap: 10px;
        padding: 15px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .payment-methods img {
        height: 24px;
    }
    
    /* 折叠区域 */
    .section-header {
        padding: 14px 0;
    }
    
    .section-header h3 {
        font-size: 16px;
    }
    
    .section-content {
        padding: 14px 0;
    }
    
    .description-content h4 {
        font-size: 18px;
    }
    
    .description-content h5 {
        font-size: 15px;
    }
    
    .description-content p,
    .description-content li {
        font-size: 14px;
    }
    
    /* 评论区 */
    .reviews-section-wrapper {
        padding: 20px 0;
        margin-top: 12px;
    }
    
    .customer-reviews {
        padding: 20px 15px;
        margin: 0 auto;
        max-width: 600px;
    }
    
    .reviews-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .reviews-header h3 {
        font-size: 22px;
    }
    
    .overall-rating {
        justify-content: center;
    }
    
    .review-item {
        padding: 16px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .reviewer-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .reviewer-details h4 {
        font-size: 15px;
    }
    
    .review-stars i {
        font-size: 12px;
    }
    
    .review-date {
        font-size: 12px;
        align-self: flex-start;
        margin-left: 50px;
    }
    
    .review-text {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .load-more-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .reviews-count {
        font-size: 13px;
    }
    
    /* 图片控制按钮 - 移动端 */
    .image-controls {
        bottom: 60px;
        right: 10px;
        gap: 6px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 15px;
        border-radius: 10px;
    }
    
    .control-btn::before {
        border-radius: 10px;
    }
    
    /* 移动端图片导航 */
    .mobile-image-nav {
        display: flex;
    }
    
    .mobile-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .mobile-page-counter {
        font-size: 14px;
    }
}

/* 小屏手机 (最大宽度 480px) */
@media (max-width: 480px) {
    .container {
        padding: 15px 10px;
        gap: 20px;
    }
    
    /* 产品头部 */
    .product-header {
        margin-bottom: 16px;
    }
    
    .product-badge {
        padding: 4px 10px;
        margin-bottom: 10px;
    }
    
    .badge-icon {
        width: 13px;
        height: 13px;
    }
    
    .product-badge span {
        font-size: 10px;
    }
    
    .product-title {
        font-size: 19px;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    
    .product-subtitle {
        font-size: 11px;
        gap: 8px;
    }
    
    /* 评分系统 */
    .rating-wrapper {
        margin-bottom: 16px;
    }
    
    .rating {
        margin-bottom: 10px;
        gap: 8px;
    }
    
    .stars i {
        font-size: 15px;
    }
    
    .rating-score {
        font-size: 14px;
    }
    
    .rating-count {
        font-size: 12px;
    }
    
    .trust-badges {
        gap: 10px;
    }
    
    .trust-badge {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .trust-badge i {
        font-size: 11px;
    }
    
    /* 价格区域 */
    .price-section {
        margin-bottom: 8px;
    }
    
    .price-amount {
        font-size: 20px;
    }
    
    .price-from {
        font-size: 9px;
    }
    
    .price-old {
        font-size: 11px;
    }
    
    .price-save {
        font-size: 8px;
        padding: 2px 4px;
    }
    
    /* 尺寸选择 */
    .size-section {
        margin-bottom: 18px;
    }
    
    .size-section h3 {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .size-guide {
        font-size: 15px;
    }
    
    .size-grid {
        gap: 5px;
    }
    
    .size-btn {
        padding: 9px 5px;
        font-size: 11px;
    }
    
    /* 名字覆盖层 - 小屏调整 */
    .name-overlay {
        font-size: 26px;
        padding: 0 15px;
    }
    
    /* 上传区域 */
    .upload-box {
        min-height: 100px;
    }
    
    .upload-placeholder {
        padding: 14px;
    }
    
    .upload-icon {
        font-size: 28px;
    }
    
    .upload-title,
    .upload-browse {
        font-size: 13px;
    }
    
    .upload-specs {
        font-size: 10px;
    }
    
    .upload-tips {
        font-size: 9px;
        margin-top: 6px;
    }
    
    .upload-tips li {
        margin-bottom: 2px;
        padding-left: 9px;
    }
    
    .upload-preview img {
        max-height: 120px;
    }
    
    .change-photo-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .upload-guidelines {
        padding: 14px;
    }
    
    .guideline-header span {
        font-size: 13px;
    }
    
    .guidelines-list li {
        font-size: 11px;
    }
    
    /* 评论区 */
    .reviews-header h3 {
        font-size: 20px;
    }
    
    .review-item {
        padding: 14px;
    }
    
    .reviewer-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .reviewer-details h4 {
        font-size: 14px;
    }
    
    .review-date {
        margin-left: 46px;
        font-size: 11px;
    }
    
    .review-text {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* 弹窗响应式 - 优化移动端显示 */
@media (max-width: 768px) {
    .modal {
        align-items: center;
        justify-content: center;
        padding: 10px;
    }
    
    .modal-content {
        width: calc(100% - 20px);
        max-width: 500px;
        padding: 15px;
        margin: 0 auto;
        max-height: calc(100vh - 20px);
        max-height: calc(var(--vh, 1vh) * 100 - 20px);
        overflow-y: auto;
    }
    
    .modal-content h2 {
        font-size: 18px;
        margin-bottom: 12px;
        padding-right: 30px;
    }
    
    .close {
        font-size: 26px;
        right: 12px;
        top: 12px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }
    
    .preview-image-wrapper {
        margin: 10px 0;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    
    .preview-image {
        flex: 1;
        min-height: 0;
        margin-bottom: 10px;
    }
    
    #previewCanvas {
        max-width: 100%;
        max-height: 50vh;
        max-height: calc(var(--vh, 1vh) * 50);
        height: auto;
        width: auto;
    }
    
    .preview-image-controls {
        gap: 6px;
        padding: 8px;
        margin: 10px auto 0;
        flex-wrap: nowrap;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .preview-image-controls .control-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .preview-image-controls .control-btn::before {
        border-radius: 10px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 13px 20px;
        font-size: 15px;
    }
    
    /* 购物车弹窗 */
    .cart-modal-content {
        padding: 24px 16px;
    }
    
    .cart-success-icon i {
        font-size: 48px;
    }
    
    .cart-item-preview {
        padding: 16px 0;
    }
    
    .cart-item-details h3 {
        font-size: 16px;
    }
    
    .cart-item-custom,
    .cart-item-size,
    .cart-item-qty {
        font-size: 13px;
    }
    
    .cart-item-price {
        font-size: 14px;
    }
    
    .item-total-price {
        font-size: 20px;
    }
    
    .cart-modal-actions {
        flex-direction: column;
    }
}

/* 超小屏幕 (最大宽度 360px) */
@media (max-width: 360px) {
    .product-title {
        font-size: 17px;
    }
    
    .price-amount {
        font-size: 18px;
    }
    
    .price-from {
        font-size: 8px;
    }
    
    .price-old {
        font-size: 10px;
    }
    
    .price-save {
        font-size: 7px;
        padding: 1px 3px;
    }
    
    .name-overlay {
        font-size: 22px;
    }
    
    /* 尺寸按钮 */
    .size-btn {
        font-size: 9px;
        padding: 7px 4px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
    
    .upload-box {
        min-height: 90px;
    }
    
    .upload-icon {
        font-size: 24px;
    }
    
    .upload-text {
        font-size: 10px;
    }
    
    .preview-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .add-to-cart-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    
    
}

/* 横屏模式优化 - 全屏显示 */
@media (max-height: 600px) and (orientation: landscape) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        max-height: calc(100vh - 10px);
        max-height: calc(var(--vh, 1vh) * 100 - 10px);
        overflow-y: auto;
        padding: 10px;
        margin: 0 auto;
        width: calc(100% - 10px);
        max-width: 90%;
    }
    
    .modal-content h2 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .close {
        width: 28px;
        height: 28px;
        font-size: 22px;
        right: 8px;
        top: 8px;
    }
    
    .preview-image-wrapper {
        margin: 8px 0;
        flex: 1;
        min-height: 0;
    }
    
    .preview-image {
        flex: 1;
        min-height: 0;
        margin-bottom: 6px;
    }
    
    #previewCanvas {
        max-height: 55vh;
        max-height: calc(var(--vh, 1vh) * 55);
        max-width: 100%;
    }
    
    .preview-image-controls {
        padding: 6px;
        gap: 3px;
        margin: 6px auto 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .preview-image-controls .control-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 11px;
    }
    
    .modal-actions {
        flex-direction: row;
        gap: 8px;
        margin-top: 8px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 40px;
    }
}

/* 大屏幕优化 (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
        gap: 60px;
        padding: 40px 30px;
    }
    
    .product-gallery {
        max-width: 700px;
    }
    
    .product-info {
        max-width: 640px;
        border-radius: 20px;
    }
    
    .customer-reviews {
        max-width: 1200px;
        padding: 40px 30px;
        margin: 0 auto;
    }
}

/* Size Guide Section - Responsive */
@media (max-width: 768px) {
    .size-guide-section {
        margin-bottom: 16px;
    }
    
    .size-guide-toggle-btn {
        width: auto !important;
        min-width: fit-content;
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap !important;
    }
    
    .size-guide-content.expanded {
        padding: 10px;
    }
    
    .size-image-wrapper {
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .size-guide-section {
        margin-bottom: 12px;
    }
    
    .size-guide-toggle-btn {
        width: auto !important;
        min-width: fit-content;
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap !important;
    }
    
    .toggle-icon {
        font-size: 10px;
    }
    
    .size-guide-content.expanded {
        padding: 8px;
    }
    
    .size-image-wrapper {
        padding: 4px;
    }
}

/* ===== 上传转圈提示样式 ===== */
.upload-spinner-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 2px solid rgba(139, 69, 19, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.upload-spinner-content {
    text-align: center;
    padding: 20px;
    max-width: 280px;
    width: 100%;
}

.upload-spinner-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(139, 69, 19, 0.2);
    border-top: 4px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-spinner-text {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

/* 移动端上传转圈提示样式 */
@media (max-width: 768px) {
    .upload-spinner-content {
        padding: 16px;
        max-width: 240px;
    }
    
    .upload-spinner-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .upload-spinner-text {
        font-size: 14px;
    }
}

/* ===== 灵动岛提示样式 ===== */
.floating-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.floating-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 69, 19, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 90vw;
    position: relative;
    overflow: hidden;
}

.toast-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    background-size: 200% 100%;
    animation: toastShimmer 2s ease-in-out infinite;
}

@keyframes toastShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.toast-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    animation: toastPulse 2s ease-in-out infinite;
}

@keyframes toastPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.toast-icon i {
    color: white;
    font-size: 16px;
}

.toast-message {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.toast-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.toast-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 50%;
    color: #8B4513;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(139, 69, 19, 0.2);
    transform: scale(1.1);
}

.toast-close i {
    font-size: 10px;
}

/* 移动端灵动岛样式 */
@media (max-width: 768px) {
    .floating-toast {
        top: 15px;
        left: 15px;
        right: 15px;
        transform: translateY(-100px);
    }
    
    .floating-toast.show {
        transform: translateY(0);
    }
    
    .toast-content {
        min-width: unset;
        padding: 14px 16px;
        border-radius: 12px;
    }
    
    .toast-icon {
        width: 36px;
        height: 36px;
    }
    
    .toast-icon i {
        font-size: 14px;
    }
    
    .toast-title {
        font-size: 13px;
    }
    
    .toast-description {
        font-size: 11px;
    }
    
    .toast-close {
        width: 24px;
        height: 24px;
    }
    
    .toast-close i {
        font-size: 9px;
    }
}

/* ========================================
   预览弹窗操作按钮样式
   ======================================== */
.preview-modal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-add-to-cart-btn {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* 移动端预览弹窗操作按钮 */
@media (max-width: 768px) {
    .preview-modal-actions {
        padding: 16px;
        margin-top: 12px;
    }
    
    .preview-add-to-cart-btn {
        width: 100%;
        font-size: 14px;
    }
    
    .preview-add-to-cart-btn .cart-text {
        font-size: 14px;
    }
}