@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* CSS变量定义 - 优化后 */
:root {
  --primary-color: #20c997;
  --primary-hover: #008a45;
  --text-primary: #0f1111;
  --text-secondary: #333;
  --text-muted: #565959;
  --border-color: #ddd;
  --border-light: #eee;
  --background-white: #ffffff;
  --background-light: #f8f9fa;
  --background-blue: #e6f7ff;
  --background-dark: #002c55;
  --background-footer: #232f3e;
  --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 2px 20px rgba(0, 0, 0, 0.08);
  --shadow-heavy: 0 6px 20px rgba(0, 0, 0, 0.3);
  --transition-fast: all 0.3s ease;
  --border-radius: 8px;
  --border-radius-large: 15px;
  --font-size-small: 0.85rem;
  --font-size-base: 1rem;
  --font-size-large: 1.5rem;
  --font-size-xlarge: 1.8rem;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.7;
  color: var(--text-secondary);
  background-color: var(--background-light);
  font-size: 16px;
}

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

/* 头部导航 */
header {
  background-color: var(--background-dark);
  box-shadow: var(--shadow-light);
  position: static;
  z-index: 1000;
}

.nav-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 100%;
}

.uk-flag {
  width: 20px;
  height: 15px;
  object-fit: contain;
  vertical-align: middle;
}

.nav-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--background-white);
  text-transform: none;
  letter-spacing: 0.5px;
}

/* 产品区域 */
.product-section {
  background: var(--background-white);
  padding: 10px 0;
  margin: 0;
}

.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: start;
}

/* 显示控制 */
.mobile-title,
.mobile-buy-section {
  display: none;
}

.desktop-only {
  display: block;
}

/* 产品图片区域 */
.product-images {
  position: relative;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin: 0;
}

.image-gallery {
  position: relative;
  display: block;
  width: 630px;
  height: 630px;
  margin: 0;
  overflow: hidden;
  flex: none;
  order: 2;
}

.main-image {
  width: 630px;
  height: 630px;
  object-fit: contain;
  border-radius: var(--border-radius);
  display: block;
  transition: transform 0.3s ease;
}

/* 缩略图容器 */
.thumbnail-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  position: relative;
  width: 80px;
  overflow: visible;
  padding: 0;
  order: 1;
  gap: 8px;
}

.thumbnail {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
  opacity: 0.7;
  transform: scale(0.9);
  z-index: 1;
}

.thumbnail.active,
.thumbnail.globe-center {
  opacity: 1;
  transform: scale(1);
  border-color: #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.thumbnail.globe-left,
.thumbnail.globe-right {
  opacity: 0.7;
  transform: scale(0.9);
  filter: none;
  position: relative;
}

.thumbnail:hover {
  border-color: var(--text-secondary);
  opacity: 1;
  transform: scale(1.05);
}

.thumbnail-container .nav-arrow-left,
.thumbnail-container .nav-arrow-right {
  display: none;
}

/* 产品信息 */
.product-info {
  margin: 0;
}

.product-info h1 {
  font-size: var(--font-size-xlarge);
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.2;
  font-weight: 600;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.stars {
  color: #FFD700;
  font-size: 1.3rem;
}

.rating-text {
  color: #007185;
  text-decoration: none;
  font-size: var(--font-size-base);
  font-weight: 500;
}

/* 倒计时容器 */
.countdown-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #e7e7e7;
  flex-wrap: wrap;
  flex-direction: column;
}

.countdown-text {
  color: #000000;
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  margin-bottom: 5px;
}

.countdown-second-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.discount-text {
  color: #000000;
  font-size: var(--font-size-base);
  font-weight: 500;
  white-space: normal;
}

.countdown-timer {
  color: var(--background-white);
  font-size: var(--font-size-base);
  font-weight: 600;
  font-family: 'Courier New', monospace;
  background: #d32f2f;
  padding: 3px 6px;
  border-radius: 3px;
  display: inline-block;
  line-height: 1.2;
  min-width: 60px;
  text-align: center;
  white-space: nowrap;
}

.countdown-hours,
.countdown-minutes,
.countdown-seconds {
  display: inline-block;
  min-width: 20px;
  text-align: center;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* 关键特性 */
.key-features {
  margin-bottom: 15px;
}

.key-features h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
}

.key-features ul {
  list-style: none;
  padding-left: 0;
  text-align: left;
}

.key-features li {
  padding: 3px 0;
  position: relative;
  padding-left: 25px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: left;
}

.key-features li:before {
  content: "●";
  position: absolute;
  left: 0;
  color: #000;
  font-weight: bold;
  font-size: 1.1rem;
}

/* 按钮样式 - 合并重复样式 */
.buy-button,
.mobile-buy-button,
.cta-button,
.floating-cta {
  width: 100%;
  background: var(--primary-color);
  color: var(--background-white);
  border: none;
  padding: 15px 25px;
  border-radius: var(--border-radius-large);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: 12px;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.buy-button:hover,
.mobile-buy-button:hover,
.cta-button:hover,
.floating-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
  color: var(--background-white);
  text-decoration: none;
}

.cta-button {
  font-size: var(--font-size-large);
  padding: 18px 25px;
  margin: 0;
  max-width: 1200px;
}

.floating-cta {
  position: fixed;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 20px);
  max-width: 1180px;
  font-size: var(--font-size-large);
  padding: 18px 25px;
  z-index: 1000;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
}

.floating-cta:hover {
  transform: translateX(-50%) translateY(-2px);
}

.floating-cta.show {
  opacity: 1;
  visibility: visible;
}

/* 按钮状态样式 - 合并重复样式 */
a.buy-button:visited,
a.mobile-buy-button:visited,
a.cta-button:visited,
a.floating-cta:visited {
  color: var(--background-white);
  text-decoration: none;
}

a.buy-button:focus,
a.mobile-buy-button:focus,
a.cta-button:focus,
a.floating-cta:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  color: var(--background-white);
  text-decoration: none;
}

a.buy-button:active,
a.mobile-buy-button:active,
a.cta-button:active,
a.floating-cta:active {
  transform: translateY(0);
  color: var(--background-white);
  text-decoration: none;
}

.stock-info,
.mobile-stock-info {
  font-size: var(--font-size-base);
  color: #000000;
  text-align: left;
  font-weight: 500;
}

/* 内容区域 */
.content-section {
  max-width: 1200px;
  margin: 12px auto;
  padding: 18px 25px;
  background: var(--background-white);
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
}

.section-title {
  display: none;
}

/* 标题样式 - 合并重复样式 */
.reviews-title,
.centered-title {
  text-align: center;
  font-size: var(--font-size-xlarge);
  color: var(--text-primary);
  margin: 25px 0 20px 0;
  font-weight: 600;
  line-height: 1.4;
  padding: 0;
}

.reviews-title {
  margin-bottom: 25px;
}

.centered-title::before {
  display: none;
}

/* 特殊标题样式 - 合并重复样式 */
.image-details-header,
.connected-header {
  text-align: center;
  background-color: var(--background-blue);
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: 12px;
  border-left: 5px solid var(--background-blue);
  box-shadow: 0 2px 15px rgba(24, 144, 255, 0.15);
}

.image-details-header {
  margin-bottom: 25px;
}

.image-details-header h2,
.connected-header h2 {
  font-size: 2rem;
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* 标签页 */
.tabs {
  margin-bottom: 18px;
}

.tab {
  display: inline-block;
  padding: 14px 0;
  margin-right: 30px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
}

.tab:hover {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}

.tab.active {
  color: #000000;
  border-bottom-color: #000000;
  background: none;
}

.tab-content {
  display: none;
  text-align: left;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  background: none;
  padding: 0;
}

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

/* 标签页内容样式 - 合并重复样式 */
.tab-content p,
.tab-content li {
  margin-bottom: 12px;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tab-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.tab-content ul {
  margin-left: 25px;
  margin-bottom: 12px;
  text-align: left;
}

.tab-content h3 {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 1.3rem;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 详情项目 */
.detail-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  text-align: left;
  flex-direction: row;
}

.detail-item.reversed {
  flex-direction: row-reverse;
}

.detail-image {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
}

.detail-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--border-radius);
}

.detail-text {
  flex: 1;
  text-align: left;
  line-height: 1.8;
}

.detail-text h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.detail-text p {
  line-height: 1.7;
  color: var(--text-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 1.05rem;
  margin-bottom: 12px;
  text-align: left;
}

/* 评论区域 */
.review-item {
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
  text-align: left;
}

.reviewer-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-bottom: 5px;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}

.review-stars {
  color: #FFD700;
  font-size: 1.1rem;
}

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

.review-text {
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* CTA区域 */
.cta-section {
  background: none;
  padding: 20px 0;
  margin: 20px auto 0;
  box-shadow: none;
  border-radius: 0;
  border-top: none;
  max-width: 1200px;
}

/* 页脚 */
footer {
  background: var(--background-footer);
  color: var(--background-white);
  padding: 35px 0 18px;
  margin: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 35px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
  font-size: var(--font-size-base);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.copyright {
  text-align: center;
  color: #ccc;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.disclaimer {
  display: block;
  text-align: center;
  color: #999;
  font-size: var(--font-size-small);
  line-height: 1.5;
  max-width: 850px;
  margin: 0 auto;
  font-style: italic;
}

/* 滑动指示器 */
.swipe-indicator-container {
  display: none;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

.swipe-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e3e3e3;
  transition: background-color 0.3s, transform 0.3s;
  cursor: pointer;
}

.swipe-dot.active {
  background: #878787;
  transform: scale(1.2);
}

/* 移动端适配 - 优化后的媒体查询 */
@media (max-width: 768px) {
  body {
    font-size: 15px;
    line-height: 1.6;
  }

  .container {
    padding: 0 15px;
  }

  .remaining-tabs {
    order: 3;
    width: 100%;
  }

  /* 移动端产品布局 */
  .product-container {
    grid-template-columns: 1fr;
    gap: 0;
    display: flex;
    flex-direction: column;
  }

  .mobile-title {
    display: block;
    order: 1;
    padding: 12px 0;
    text-align: center;
  }

  .mobile-title h1 {
    font-size: 1.7rem;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: left;
  }

  .mobile-title .rating-container {
    justify-content: center;
    margin-bottom: 0;
  }

  /* 移动端图片区域 */
  .product-images {
    order: 2;
    margin-bottom: 0;
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
  }

  .image-gallery {
    margin-bottom: 0;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: var(--border-radius);
    order: unset;
    flex: unset;
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: none;
    border-radius: var(--border-radius);
  }

  .thumbnail-container,
  .nav-arrow {
    display: none;
  }

  .swipe-indicator-container {
    display: flex;
    order: 3;
    margin: 12px 0;
  }

  /* 移动端购买区域 */
  .mobile-buy-section {
    display: block;
    order: 3;
    padding: 12px 0;
    text-align: center;
  }

  .mobile-buy-button {
    font-size: var(--font-size-large);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-stock-info {
    text-align: left;
    margin-left: 20px;
    line-height: 1.4;
  }

  .desktop-only {
    display: none;
  }

  /* 移动端产品信息 */
  .product-info {
    order: 4;
    padding-top: 12px;
  }

  .key-features {
    margin-bottom: 12px;
    margin-left: 20px;
  }

  .key-features h3 {
    font-size: 1.15rem;
    text-align: left;
    margin-bottom: 10px;
  }

  .key-features ul {
    text-align: left;
  }

  .product-section {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
  }

  /* 移动端倒计时 - 合并重复样式 */
  .countdown-container {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    margin-bottom: 15px;
    text-align: left;
    gap: 10px;
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid #e7e7e7;
  }

  .countdown-text {
    font-size: var(--font-size-base) !important;
    text-align: left !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
    width: 100%;
    margin-bottom: 0;
    display: block !important;
    color: #000000;
    font-weight: 500;
  }

  .countdown-second-line {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start !important;
  }

  .discount-text {
    font-size: var(--font-size-base) !important;
    color: #000000 !important;
    font-weight: 600 !important;
    line-height: 1.4;
  }

  .countdown-timer {
    font-size: 1.2rem !important;
    animation: none !important;
    text-align: center !important;
    color: var(--background-white) !important;
    font-weight: 600 !important;
    font-family: 'Courier New', monospace !important;
    background: #d32f2f !important;
    padding: 3px 6px;
    border-radius: 3px;
    min-width: 60px;
    display: inline-block;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* 移动端内容区域 */
  .content-section {
    padding: 15px 20px;
    margin: 12px auto;
    width: 100%;
    box-sizing: border-box;
  }

  .centered-title {
    margin: 20px 0 15px 0;
    line-height: 1.3;
    padding: 0;
  }

  /* 移动端标题 - 合并重复样式 */
  .image-details-header,
  .connected-header {
    padding: 15px 18px;
    text-align: left;
  }

  .image-details-header {
    margin-bottom: 25px;
  }

  .connected-header {
    margin: 25px 0;
  }

  .image-details-header h2,
  .connected-header h2 {
    font-size: var(--font-size-large);
    text-align: left;
  }

  /* 移动端标签页 */
  .tabs {
    margin-bottom: 15px;
    overflow-x: visible;
    white-space: normal;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    display: block;
    width: 100%;
    text-align: left;
    margin-right: 0;
    margin-bottom: 0;
    padding: 15px 0;
    white-space: nowrap;
    min-width: auto;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    cursor: pointer;
    transition: var(--transition-fast);
  }

  .tab::after {
    content: '∨';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-size-base);
    color: #666;
    transition: transform 0.3s ease;
  }

  .tab:first-child::after {
    display: none;
  }

  .tab.collapsed-with-arrow::after {
    content: '∨' !important;
    display: block !important;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-size-base);
    color: #666;
    transition: transform 0.3s ease;
  }

  .tab:first-child.active::after {
    display: none !important;
  }

  .tab.active {
    border-bottom: 2px solid #000000;
  }

  .tab.active:not(:first-child)::after {
    content: '∧';
    transform: translateY(-50%);
  }

  .tab-content {
    display: none;
    padding: 15px 0;
    margin-bottom: 15px;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
  }

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

  /* 移动端详情项目 */
  .detail-item,
  .detail-item.reversed {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .detail-image {
    max-width: 100%;
    width: 100%;
  }

  .detail-text {
    text-align: left;
    width: 100%;
  }

  /* 移动端按钮 */
  .cta-button {
    font-size: 1.3rem;
    padding: 16px 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .floating-cta {
    font-size: var(--font-size-large);
    padding: 16px 20px;
    width: calc(100% - 20px);
    max-width: none;
  }

  /* 移动端页脚 */
  .footer-links {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-links a {
    font-size: 0.95rem;
  }

  .copyright {
    font-size: 0.9rem;
  }

  .disclaimer {
    font-size: 0.8rem;
    padding: 0 10px;
  }
}