/**
 * 雨云服务器优惠推广站点样式
 * 主题：白色背景 + 灰色辅助 + 黑色强调，基于 PureCSS 扩展
 */

/* 基础变量 */
:root {
  --color-bg: #ffffff;
  --color-text: #222222;
  --color-muted: #666666;
  --color-border: #e5e5e5;
  --color-light-bg: #f7f7f7;
  --color-primary: #111111;
  --color-accent: #0078e7;
  --radius: 0.5rem;
}

/* 全局重置与字体 */
html {
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
  margin: 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 内容容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 顶部导航 */
.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  box-sizing: border-box;
}

.site-brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  padding: 0.35rem 0;
  white-space: nowrap;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.site-brand::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 120, 231, 0.18);
}

.site-brand:hover {
  text-decoration: none;
  color: var(--color-accent);
}

/* 导航链接容器 */
.site-nav .pure-menu-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0.2rem 0;
}

.site-nav .pure-menu-item {
  flex-shrink: 0;
}

.site-nav .pure-menu-link {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
}

.site-nav .pure-menu-link:hover {
  color: #0f172a;
  background-color: #f1f5f9;
  text-decoration: none;
}

.site-nav .pure-menu-selected .pure-menu-link {
  color: var(--color-accent);
  background-color: rgba(0, 120, 231, 0.08);
  font-weight: 600;
}

/* 下拉菜单 */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: inherit;
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #ffffff;
  min-width: 170px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  margin: 0.25rem 0 0;
  list-style: none;
  z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: #475569;
  border-radius: 0.375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
}

.dropdown-item-selected {
  color: var(--color-accent);
  background-color: rgba(0, 120, 231, 0.08);
  font-weight: 600;
}

/* 首页大图与优惠券横幅 */
.hero {
  background-color: var(--color-light-bg);
  padding: 2.5rem 1rem;
  text-align: center;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  color: var(--color-primary);
}

.hero-subhead {
  color: var(--color-muted);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 1.25rem;
}

.coupon-bar {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.coupon-text {
  flex: 1 1 300px;
  text-align: left;
  line-height: 1.6;
}

/* 产品列表区域 */
.product-section {
  margin: 2rem 0;
}

.section-title {
  font-size: 1.4rem;
  color: var(--color-primary);
  border-left: 4px solid var(--color-primary);
  padding-left: 0.75rem;
  margin-bottom: 1.25rem;
}

/* 产品网格 */
.product-grid {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

/* 产品卡片 */
.product-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0.5rem;
  height: calc(100% - 1rem);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

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

.product-name {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  color: var(--color-primary);
  line-height: 1.35;
}

.product-region {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-muted);
  background-color: var(--color-light-bg);
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
}

.product-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
}

.product-specs li {
  padding: 0.2rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.product-specs li:last-child {
  border-bottom: none;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.product-price small {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-muted);
}

.original-price {
  text-decoration: line-through;
  color: #999999;
  font-size: 0.85rem;
}

.product-note {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin: 0 0 0.75rem;
  line-height: 1.4;
  flex-grow: 1;
}

/* 购买按钮 */
.btn-buy {
  display: inline-block;
  white-space: nowrap;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  text-align: center;
}

.btn-buy.clicked {
  opacity: 0.7;
  pointer-events: none;
}

/* 正文内容区块 */
.content-section {
  padding: 1rem 0 2rem;
}

.content-block {
  margin-bottom: 2rem;
}

.content-block h2 {
  font-size: 1.3rem;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.content-block p {
  margin-bottom: 0.75rem;
  text-align: justify;
}

/* 相关页面推荐 */
.related-section {
  background-color: var(--color-light-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.related-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.related-list li a {
  display: block;
  padding: 0.5rem 0;
  color: var(--color-accent);
}

/* 底部强转化区域 */
.cta-section {
  text-align: center;
  padding: 2.5rem 1rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.cta-section h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.cta-section p {
  max-width: 700px;
  margin: 0 auto 1.25rem;
  opacity: 0.9;
}

.btn-large {
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
}

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 2rem;
}

.site-footer a {
  color: var(--color-muted);
  text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }

  .site-nav .pure-menu-list {
    width: 100%;
    justify-content: flex-start;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: auto;
    right: 0;
    min-width: 170px;
    border-radius: 0.5rem;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-subhead {
    font-size: 1rem;
  }

  .coupon-text {
    text-align: center;
  }

  .product-card {
    margin: 0.4rem;
    height: calc(100% - 0.8rem);
  }
}
