/* 全局样式 */
:root {
    --primary-color: #4285f4;
    --secondary-color: #fafafa;
    --text-color: #333;
    --border-color: #e0e0e0;
    --button-color: #4285f4;
    --button-hover: #3367d6;
    --light-gray: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative; /* 添加相对定位 */
}

/* 语言切换器 */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
}

.language-btn {
    display: flex;
    align-items: center;
    background-color: #FFD140; /* 改为与PayPal支付按钮一样的颜色 */
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.language-btn i {
    margin-right: 5px;
    color: #000000; /* 改为黑色，与PayPal按钮文字颜色一致 */
}

.language-btn:hover {
    background-color: #f0c232; /* 深一点的黄色作为悬停效果 */
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 180px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.language-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-option:hover {
    background-color: #f5f5f5;
}

.language-option.active {
    background-color: #f0f0f0;
    font-weight: 500;
}

.language-flag {
    margin-right: 10px;
    border-radius: 2px;
    width: 20px;
    height: auto;
}

.language-option span {
    font-size: 14px;
    color: #333;
}

/* RTL语言支持 (例如波斯语) */
[lang="fa"] {
    direction: rtl;
    text-align: right;
}

[lang="fa"] .language-switcher {
    left: 20px;
    right: auto;
}

/* 左侧容器 - 设置为1.2比例 */
.left-container {
    flex: 1.2;
    padding-right: 30px;
}

/* 产品图库 - 改为竖向滚动，高度增加四分之一 */
.product-gallery {
    height: 1166px; /* 933px 增加四分之一 */
    overflow-y: auto; /* 竖向滚动 */
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background-color: var(--secondary-color);
    -webkit-overflow-scrolling: touch; /* 使滚动在iOS上更平滑 */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--secondary-color);
    width: 100%; /* 确保容器占满左侧区域宽度 */
}

.product-gallery::-webkit-scrollbar {
    width: 8px;
}

.product-gallery::-webkit-scrollbar-track {
    background: var(--secondary-color);
    border-radius: 4px;
}

.product-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.gallery-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0; /* 移除内边距 */
    width: 100%; /* 确保内容占满容器宽度 */
}

.gallery-image-item {
    width: 100%; /* 设置为100%宽度 */
    margin-bottom: 0; /* 移除间距，图片首尾相连 */
    display: flex;
    justify-content: center;
    padding: 0; /* 移除内边距 */
}

.gallery-image-item img {
    width: 100%; /* 图片宽度设为100% */
    max-height: none; /* 移除最大高度限制 */
    height: auto; /* 高度自动，保持宽高比 */
    object-fit: contain; /* 保持图片比例 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    display: block; /* 确保图片以块级元素显示 */
}

/* 选项卡样式 */
.tab-buttons {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}

.bottom-tabs {
    margin-top: 20px;
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.tab-button {
    background-color: #f4f4f4;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    flex: 1;
    text-align: center;
    font-weight: 600;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: var(--primary-color);
    color: white;
}

/* 技术规格 */
.specs-container {
    background-color: var(--light-gray);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: none; /* 初始隐藏 */
    height: 1166px; /* 与图片容器高度一致 */
    overflow-y: auto; /* 如果内容过多可滚动 */
}

.specs-container.active {
    display: block;
}

.specs-container h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
    text-align: center;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.spec-item {
    padding: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.spec-label {
    font-weight: 600;
    margin-right: 5px;
    color: var(--primary-color);
}

/* 右侧部分 - 设置为1比例 */
.right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    background-color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
    font-weight: 300;
}

.product-description {
    margin: 20px 0 25px 0; /* 上下都有边距 */
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.product-price {
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.price-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 5px;
}

.price {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.price-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 5px;
}

.tax-info {
    width: 100%;
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

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

h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.options-container {
    display: flex;
    justify-content: space-between; /* 使选项两端对齐 */
    width: 100%;
}

.option {
    display: flex;
    align-items: center;
}

.option input[type="radio"] {
    margin-right: 8px;
}

.buy-button-container {
    margin: 25px 0;
    width: 100%;
    display: flex;
    flex-direction: column; /* 垂直排列，确保表单占满宽度 */
    align-items: center; /* 水平居中 */
}

.payment-form {
    width: 100%;
    max-width: 300px; /* 限制最大宽度 */
    margin: 0 auto !important; /* 强制居中显示 */
    text-align: center !important; /* 强制文本居中 */
}

.payment-form form {
    width: 100%; /* 确保表单占满父容器宽度 */
    margin: 0 auto !important; /* 强制居中 */
    text-align: center !important; /* 强制文本居中 */
}

/* 针对PayPal按钮的额外样式 */
[id^="paypal-form-"] {
    margin: 0 auto !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 300px !important;
}

.payment-form input[type="submit"] {
    width: 100%;
    font-size: 1.1rem;
}

/* 移动端样式调整 */
@media (max-width: 768px) {
    .buy-button-container {
        margin: 15px 0;
    }
}

/* 原有的按钮样式（保留做参考） */
.buy-button {
    background-color: var(--button-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 25px 0;
    width: 100%;
    max-width: 300px;
}

.buy-button:hover {
    background-color: var(--button-hover);
}

.delivery-info {
    margin-bottom: 25px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.delivery-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.delivery-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

.help-section, .inquiry-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.faq-button {
    width: 100%;
    padding: 12px;
    background-color: var(--light-gray);
    border: none;
    border-radius: 5px;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-button:after {
    content: '+';
    font-size: 1.2rem;
}

.faq-button.active:after {
    content: '-';
}

.faq-content {
    display: none;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.faq-item {
    margin-bottom: 15px;
}

.faq-item h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* 添加FAQ分隔线样式 */
.faq-separator {
    height: 1px;
    background-color: #ddd;
    margin: 15px 0;
    width: 100%;
}

/* FAQ列表样式 */
.faq-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 5px;
}

.faq-list li {
    margin-bottom: 5px;
}

.inquiry-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.inquiry-section a:hover {
    text-decoration: underline;
}

.inquiry-section p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.inquiry-section i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        display: flex;
        flex-direction: column-reverse; /* 反转显示顺序，先显示右侧再显示左侧 */
    }
    
    .left-container, .right-section {
        flex: none;
        width: 100%;
        max-width: 100%;
        padding-right: 0;
    }
    
    .left-container {
        margin-top: 30px; /* 改为顶部外边距，因为现在显示在下方 */
        margin-bottom: 0; /* 移除底部外边距 */
    }
    
    .product-gallery, .specs-container {
        height: 1000px;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        /* 保持column-reverse不变，继承自较大断点 */
    }
    
    .product-gallery, .specs-container {
        height: 875px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .options-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .language-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .language-dropdown {
        width: 130px;
    }
}

@media (max-width: 480px) {
    .product-gallery, .specs-container {
        height: 750px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .price, .price-label, .price-currency {
        font-size: 1.5rem;
    }
    
    .language-switcher {
        top: 5px;
        right: 5px;
    }
}

/* 新的产品头部区域样式 */
.product-header-section {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    overflow: hidden;
}

/* 修改头部图片样式 */
.product-header-image {
    width: 50%; /* 调整宽度为50% */
    margin-bottom: 0; /* 移除底部边距，由product-header-section控制 */
    border-radius: 8px;
    overflow: hidden;
    margin-right: 20px;
}

.product-header-title {
    flex: 1; /* 占据剩余空间 */
    display: flex;
    align-items: center;
    height: 100%;
}

.header-image {
    width: 100%;
    display: block;
    height: auto;
    border-radius: 8px;
}

/* 调整产品名称样式 */
.product-info h2 {
    margin-top: 0;
    margin-bottom: 0; /* 移除底部边距 */
    font-size: 1.6rem;
    color: var(--primary-color);
    line-height: 1.3; /* 增加行距 */
    width: 100%;
}

/* 副标题样式 - 不再需要但保留样式备用 */
.subtitle {
    font-size: 0.7em;
    font-weight: 500;
    opacity: 0.85;
    color: #666;
    display: block;
    margin-top: 2px;
}

/* 让第二行字体稍小一些 - 不再需要但保留样式备用 */
.product-info h2 br + * {
    font-size: 0.85em;
    opacity: 0.9;
}

/* 调整产品描述样式 */
.product-description {
    margin: 20px 0 25px 0; /* 上下都有边距 */
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.product-description p {
    margin: 0;
    line-height: 1.5;
}

/* 移动端样式优化 */
@media (max-width: 768px) {
    .product-header-section {
        align-items: flex-start; /* 小屏幕上顶部对齐 */
    }
    
    .product-header-image {
        width: 40%; /* 移动端稍微缩小图片 */
        margin-right: 15px;
    }
    
    .product-info h2 {
        font-size: 1.4rem;
    }
    
    .product-description p {
        font-size: 0.9rem;
    }
    
    /* 移动端选项垂直排列 */
    .options-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .with-ring-option {
        margin-left: 0; /* 在垂直排列时不需要左边距 */
    }
}

@media (max-width: 480px) {
    .product-header-section {
        flex-direction: column; /* 超小屏幕上改为垂直排列 */
    }
    
    .product-header-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .product-header-title {
        width: 100%;
        text-align: center;
    }
}

/* 调整产品选项样式 */
.options-container {
    display: flex;
    justify-content: space-between; /* 使选项两端对齐 */
    width: 100%;
}

/* with-ring选项靠右 */
.with-ring-option {
    margin-left: auto; /* 将此选项推到右侧 */
    margin-right: 10%; /* 向左移动一点点 */
}

/* 调整产品描述样式 */
.product-description {
    margin: 20px 0 25px 0; /* 上下都有边距 */
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.product-description p {
    margin: 0;
    line-height: 1.5;
}

/* 移动端样式优化 */
@media (max-width: 768px) {
    .product-header-section {
        align-items: flex-start; /* 小屏幕上顶部对齐 */
    }
    
    .product-header-image {
        width: 40%; /* 移动端稍微缩小图片 */
        margin-right: 15px;
    }
    
    .product-info h2 {
        font-size: 1.4rem;
    }
    
    .product-description p {
        font-size: 0.9rem;
    }
    
    /* 移动端选项垂直排列 */
    .options-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .with-ring-option {
        margin-left: 0; /* 在垂直排列时不需要左边距 */
    }
    
    /* 其他移动端样式在前面已定义 */
    .buy-button-container {
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .product-header-section {
        flex-direction: column; /* 超小屏幕上改为垂直排列 */
    }
    
    .product-header-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .product-header-title {
        width: 100%;
        text-align: center;
    }
} 