/* 基本重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* font-family:
    "PingFang SC", "Microsoft YaHei", "Heiti SC", "WenQuanYi Micro Hei",
    sans-serif; */
}

body {
  line-height: 1.6;
  color: #333;
  background-color: #fcfcfc;
  font-size: 18px;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* 变量 */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #e74c3c;
  /* --secondary-color: #ffcc01; */
  /* --secondary-color: #6e337c; */
  --text-color: #333;
  --light-bg: #f5f6fa;
  --white: #ffffff;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 响应式容器 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-padding {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.underline {
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 0 auto 15px;
}

.section-title p {
  color: #666;
}

/* 导航栏 */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo h1 {
  font-size: 1.6rem;
  /* color: var(--primary-color); */
}
.logo a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo span {
  color: var(--secondary-color);
}

.nav-menu ul {
  display: flex;
  gap: 30px;
}

.nav-menu a {
  font-weight: 500;
  transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--secondary-color);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: bold;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

/* 首页 Hero 区块 */
.hero-section {
  height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("/static/images/banner.jpg")
      center 10% /cover;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding-top: 80px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.2s;
  animation-fill-mode: both;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  animation: fadeInUp 1s ease 0.4s;
  animation-fill-mode: both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 特色/热销区块 */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.featured-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.featured-card:hover {
  transform: translateY(-5px);
}

.card-img {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.card-img img {
  width: auto;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
  transition: transform 0.5s;
}

.featured-card:hover .card-img img {
  transform: scale(1.1);
}

.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge.seasonal {
  background-color: #f39c12;
}

.card-info {
  padding: 20px;
}

.card-info h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.card-info p {
  color: #666;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.text-link {
  color: var(--secondary-color);
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.text-link:hover {
  color: var(--primary-color);
}

/* 关于我们 */
.about-section {
  background-color: var(--light-bg);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 15px;
  color: #555;
}

.advantage-list {
  margin-top: 20px;
}

.advantage-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.advantage-list i {
  color: var(--secondary-color);
  margin-top: 5px;
}

.about-image {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: var(--transition);
}

.about-image:hover img {
  transform: scale(1.05);
}

/* 产品展示 */
.product-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.product-item {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-img {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.product-img img {
  /* width: 100%; */
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
  transition: transform 0.5s;
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.product-item:hover .product-img img {
  transform: scale(1.1);
}

.product-item:hover .product-overlay {
  opacity: 1;
}

.product-info {
  padding: 20px;
}

.product-info h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.product-info p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 5px;
}

.product-info .materials,
.product-info .target {
  font-weight: 500;
}

/* 新闻与活动 */
.news-section {
  background-color: var(--light-bg);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.news-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.news-thumbnail {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.news-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.news-card:hover .news-thumbnail img {
  transform: scale(1.05);
}

.news-card-content {
  padding: 20px;
  display: flex;
  gap: 15px;
}

.news-date {
  background: var(--primary-color);
  color: var(--white);
  min-width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
}

.news-date .day {
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1;
}

.news-date .month {
  font-size: 0.7rem;
}

.news-content {
  flex: 1;
}

.news-content h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.1rem;
  line-height: 1.4;
}

.news-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.8rem;
  color: #666;
}

.news-meta .views {
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-meta .date {
  color: #999;
}

.news-excerpt {
  color: #666;
  font-size: 0.9rem;
  margin: 10px 0 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 分页组件 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 50px;
}

.pagination button,
.pagination a {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  background-color: var(--white);
  color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination button:hover,
.pagination a:hover {
  background-color: var(--light-bg);
  border-color: var(--primary-color);
}

.pagination button.active,
.pagination a.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.pagination button:disabled,
.pagination a:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #ddd;
  background-color: var(--light-bg);
  color: #999;
}

/* 产品详情页 */
.breadcrumb {
  margin-bottom: 30px;
  color: #666;
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--primary-color);
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--secondary-color);
}

.breadcrumb i {
  font-size: 0.8rem;
  margin: 0 8px;
  color: #999;
}

.product-detail-container {
  display: flex;
  gap: 50px;
  margin-bottom: 60px;
}

.product-detail-image {
  flex: 1;
}

.main-image {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}

.main-image img {
  /* width: 100%; */
  /* height: 100%;
  object-fit: cover; */
  height: 100%;
  margin: 0 auto;
}

.thumbnail-list {
  display: flex;
  gap: 15px;
}

.thumbnail-list img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
  border: 2px solid transparent;
}

.thumbnail-list img:hover,
.thumbnail-list img.active {
  opacity: 1;
  border-color: var(--secondary-color);
}

.product-detail-info {
  flex: 1;
}

.product-detail-info h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.category-tag {
  background-color: var(--light-bg);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #666;
}

.stock-status.in-stock {
  color: #27ae60;
  font-weight: bold;
}

.product-description {
  color: #555;
  margin-bottom: 30px;
  line-height: 1.8;
}

.product-attributes {
  background-color: var(--light-bg);
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.attr-item {
  display: flex;
  margin-bottom: 15px;
}

.attr-item:last-child {
  margin-bottom: 0;
}

.attr-label {
  width: 100px;
  color: #666;
  font-weight: bold;
}

.attr-value {
  flex: 1;
  color: #333;
}

.color-options {
  display: flex;
  gap: 10px;
}

.color-swatch {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.color-swatch:hover {
  transform: scale(1.2);
}

.action-buttons {
  display: flex;
  gap: 20px;
}

/* 产品详情 Tabs */
.product-tabs {
  margin-top: 60px;
}

.tab-headers {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 30px;
}

.tab-btn {
  padding: 15px 30px;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-pane.active {
  display: block;
}

.tab-pane h3 {
  color: var(--primary-color);
  margin: 20px 0 10px;
}

.tab-pane p {
  color: #555;
  margin-bottom: 15px;
  line-height: 1.8;
}

.tab-pane ul {
  list-style-type: disc;
  margin-left: 20px;
  color: #555;
  line-height: 1.8;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  padding: 15px;
  border: 1px solid #eee;
}

.specs-table th {
  background-color: var(--light-bg);
  width: 200px;
  text-align: left;
  color: #666;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 联系我们 */
.contact-container {
  display: flex;
  gap: 50px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.contact-info {
  flex: 1;
  background: var(--primary-color);
  color: var(--white);
  padding: 50px;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.contact-info > p {
  margin-bottom: 30px;
  color: #ddd;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.info-item i {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-top: 5px;
}

.info-item h4 {
  margin-bottom: 5px;
}

.info-item p {
  color: #ddd;
  font-size: 0.9rem;
}

.contact-form {
  flex: 1;
  padding: 50px;
}

.contact-form h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
}

/* 页尾 */
footer {
  background-color: #1a252f;
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo h2 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-logo span {
  color: var(--secondary-color);
}

.footer-logo p {
  color: #aaa;
  font-size: 0.9rem;
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after,
.footer-contact h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #aaa;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-contact-list {
  color: #aaa;
}

.footer-contact-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
}

.footer-contact-list i {
  color: var(--secondary-color);
  margin-top: 5px;
  min-width: 15px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .nav-menu a {
    font-size: 1.1rem;
  }
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    width: 100%;
    text-align: center;
    padding-top: 2rem;
  }

  .nav-menu ul li {
    margin: 15px 0;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .about-content {
    flex-direction: column;
    gap: 30px;
  }

  .news-card {
    flex-direction: column;
  }

  .news-thumbnail {
    height: 150px;
  }

  .news-card-content {
    flex-direction: column;
    gap: 10px;
  }

  .news-date {
    min-width: 100%;
    min-height: 60px;
  }

  .contact-container {
    flex-direction: column;
  }

  .contact-info,
  .contact-form {
    padding: 30px 20px;
  }

  .product-detail-container {
    flex-direction: column;
  }

  .main-image {
    height: 350px;
  }

  .thumbnail-list img {
    width: 80px;
    height: 80px;
  }

  .tab-headers {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #eee;
  }

  .tab-btn.active::after {
    display: none;
  }
}

.page-content {
  padding-top: 80px;
}

.news-detail {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 40px;
}

.news-detail-header {
  padding: 40px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.news-detail-header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.3;
}

.news-detail-meta {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
  color: #666;
  font-size: 0.9rem;
}

.news-detail-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-detail-cover {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
}

.news-detail-cover img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.news-detail-content {
  padding: 40px;
  line-height: 1.8;
  color: #333;
}

.news-detail-content p {
  margin-bottom: 20px;
}

.news-detail-content h2 {
  color: var(--primary-color);
  margin: 30px 0 20px;
  font-size: 1.5rem;
}

.news-detail-content h3 {
  color: var(--primary-color);
  margin: 25px 0 15px;
  font-size: 1.2rem;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.news-navigation {
  display: flex;
  justify-content: space-between;
  padding: 30px 40px;
  border-top: 1px solid #eee;
  gap: 20px;
}

.news-nav-item {
  flex: 1;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: var(--transition);
}

.news-nav-item:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-nav-item.prev {
  text-align: left;
}

.news-nav-item.next {
  text-align: right;
}

.news-nav-item h4 {
  color: var(--primary-color);
  margin-bottom: 5px;
  font-size: 1rem;
}

.news-nav-item p {
  color: #666;
  font-size: 0.8rem;
  margin-bottom: 0;
}

.related-news {
  margin-top: 60px;
}

.related-news h3 {
  color: var(--primary-color);
  margin-bottom: 30px;
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  .news-detail-header,
  .news-detail-content,
  .news-navigation {
    padding: 20px;
  }

  .news-detail-header h1 {
    font-size: 1.5rem;
  }

  .news-detail-meta {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .news-navigation {
    flex-direction: column;
  }

  .news-nav-item {
    text-align: center !important;
  }
}
