/* 商品列表页样式文件 - 四川学考科技有限公司 */
/* 所有自定义类和ID使用 zh_ 前缀 */

/* ============================================
   基础样式
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0F1214;
  background: #F8F8F8;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.zh_container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.zh_cat-main {
  min-height: calc(100vh - 300px);
}

/* ============================================
   面包屑导航
   ============================================ */
.zh_breadcrumb {
  background: #FFFFFF;
  padding: 20px 0;
  border-bottom: 1px solid #EEEEEE;
}

.zh_breadcrumb-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.zh_breadcrumb-content i {
  color: #BF9271;
  font-size: 16px;
}

.zh_breadcrumb-content a {
  color: #666;
  transition: color 0.3s;
}

.zh_breadcrumb-content a:hover {
  color: #BF9271;
}

/* ============================================
   列表布局
   ============================================ */
.zh_product-list-section {
  padding: 40px 0 80px;
}

.zh_list-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

/* ============================================
   侧边栏
   ============================================ */
.zh_sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.zh_sidebar-widget {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.zh_widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #EEEEEE;
}

.zh_widget-header i {
  color: #BF9271;
  font-size: 18px;
}

.zh_widget-header h3 {
  font-family: 'Mulish', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0F1214;
  margin: 0;
}

/* 分类列表 */
.zh_category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.zh_category-list li {
  margin-bottom: 5px;
}

.zh_category-list li a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  color: #0F1214;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.zh_category-list li a i:first-child {
  font-size: 16px;
  width: 20px;
  color: #BF9271;
}

.zh_category-list li a span {
  flex: 1;
  font-size: 15px;
}

.zh_category-list li a i:last-child {
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.zh_category-list li a:hover {
  background: #F8F8F8;
  border-color: #BF9271;
}

.zh_category-list li a:hover i:last-child {
  opacity: 1;
}

/* 热门商品 */
.zh_hot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.zh_hot-list li {
  margin-bottom: 15px;
}

.zh_hot-list li:last-child {
  margin-bottom: 0;
}

.zh_hot-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.3s;
}

.zh_hot-item:hover {
  background: #F8F8F8;
}

.zh_hot-image {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #F8F8F8;
}

.zh_hot-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.zh_hot-item:hover .zh_hot-image img {
  transform: scale(1.1);
}

.zh_hot-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.zh_hot-title {
  font-size: 13px;
  font-weight: 500;
  color: #0F1214;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  transition: color 0.3s;
}

.zh_hot-title:hover {
  color: #BF9271;
}

.zh_hot-price {
  display: flex;
  align-items: center;
}

.zh_hot-current {
  font-size: 16px;
  font-weight: 700;
  color: #DA3E31;
}

/* ============================================
   商品网格布局
   ============================================ */
.zh_product-main {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.zh_product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.zh_product-card-list {
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #EEEEEE;
  transition: all 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.zh_product-card-list:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  transform: translateY(-5px);
  border-color: #BF9271;
}

.zh_card-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background: #F8F8F8;
}

.zh_card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.zh_product-card-list:hover .zh_card-image img {
  transform: scale(1.1);
}

.zh_card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.zh_product-card-list:hover .zh_card-overlay {
  opacity: 1;
}

.zh_quick-btn {
  background: #FFFFFF;
  color: #0F1214;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.zh_product-card-list:hover .zh_quick-btn {
  transform: translateY(0);
}

.zh_card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.zh_card-meta {
  margin-bottom: 10px;
}

.zh_card-date {
  font-size: 12px;
  color: #999;
}

.zh_card-title {
  font-size: 16px;
  font-weight: 600;
  color: #0F1214;
  margin-bottom: 15px;
  flex: 1;
}

.zh_card-title a {
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  transition: color 0.3s;
}

.zh_card-title a:hover {
  color: #BF9271;
}

.zh_card-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.zh_price-now {
  font-size: 24px;
  font-weight: 700;
  color: #DA3E31;
}

.zh_price-old {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}

.zh_card-button {
  background: #BF9271;
  color: #FFFFFF;
  padding: 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s;
}

.zh_card-button:hover {
  background: #362222;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(191, 146, 113, 0.4);
}

/* ============================================
   商品列表布局
   ============================================ */
.zh_product-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.zh_list-product {
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #EEEEEE;
  display: flex;
  transition: all 0.3s;
}

.zh_list-product:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transform: translateX(5px);
  border-color: #BF9271;
}

.zh_list-image {
  width: 280px;
  height: 280px;
  flex-shrink: 0;
  overflow: hidden;
  background: #F8F8F8;
}

.zh_list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.zh_list-product:hover .zh_list-image img {
  transform: scale(1.1);
}

.zh_list-info {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.zh_list-meta {
  margin-bottom: 10px;
}

.zh_list-date {
  font-size: 12px;
  color: #999;
}

.zh_list-title {
  font-size: 22px;
  font-weight: 700;
  color: #0F1214;
  margin-bottom: 15px;
}

.zh_list-title a {
  color: inherit;
  transition: color 0.3s;
}

.zh_list-title a:hover {
  color: #BF9271;
}

.zh_list-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zh_list-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zh_list-price {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zh_list-price-now {
  font-size: 28px;
  font-weight: 700;
  color: #DA3E31;
}

.zh_list-price-old {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
}

.zh_list-button {
  background: #BF9271;
  color: #FFFFFF;
  padding: 14px 40px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
}

.zh_list-button:hover {
  background: #362222;
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(191, 146, 113, 0.4);
}

/* ============================================
   分页
   ============================================ */
.zh_pagination-wrapper {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #EEEEEE;
  display: flex;
  justify-content: center;
}

/* 分页列表 */
.zh_pagination-wrapper ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

/* 分页项 */
.zh_pagination-wrapper li {
  margin: 0;
  padding: 0;
}

/* 分页链接 */
.zh_pagination-wrapper a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  height: 45px;
  padding: 0 15px;
  background: #FFFFFF;
  border: 2px solid #EEEEEE;
  border-radius: 10px;
  color: #362222;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Mulish', sans-serif;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* 分页链接悬停效果 */
.zh_pagination-wrapper a:hover {
  background: #BF9271;
  border-color: #BF9271;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(191, 146, 113, 0.3);
}

/* 当前页（无href的a标签或active类） */
.zh_pagination-wrapper li.active a,
.zh_pagination-wrapper a:not([href]) {
  background: linear-gradient(135deg, #BF9271 0%, #E3B7A0 100%);
  border-color: #BF9271;
  color: #FFFFFF;
  cursor: default;
  box-shadow: 0 4px 12px rgba(191, 146, 113, 0.25);
}

/* 当前页不响应悬停 */
.zh_pagination-wrapper li.active a:hover,
.zh_pagination-wrapper a:not([href]):hover {
  transform: none;
}

/* 上一页/下一页 */
.zh_pagination-wrapper li.prev a,
.zh_pagination-wrapper li.next a {
  padding: 0 20px;
  background: #F7F7F7;
  border-color: #E0E0E0;
  font-weight: 500;
}

.zh_pagination-wrapper li.prev a:hover,
.zh_pagination-wrapper li.next a:hover {
  background: #362222;
  border-color: #362222;
  color: #FFFFFF;
}

/* 禁用状态 */
.zh_pagination-wrapper li.disabled a {
  background: #F7F7F7;
  border-color: #EEEEEE;
  color: #CCCCCC;
  cursor: not-allowed;
  pointer-events: none;
}

/* 省略号 */
.zh_pagination-wrapper li.dots {
  color: #666666;
  font-size: 18px;
  font-weight: 700;
  padding: 0 5px;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1200px) {
  .zh_list-layout {
    grid-template-columns: 250px 1fr;
    gap: 25px;
  }

  .zh_product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .zh_list-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .zh_sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .zh_sidebar-widget {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .zh_product-list-section {
    padding: 30px 0 50px;
  }

  .zh_sidebar {
    grid-template-columns: 1fr;
  }

  .zh_product-main {
    padding: 20px;
  }

  .zh_product-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .zh_list-product {
    flex-direction: column;
  }

  .zh_list-image {
    width: 100%;
    height: 250px;
  }

  .zh_list-info {
    padding: 20px;
  }

  .zh_list-title {
    font-size: 18px;
  }

  .zh_list-bottom {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .zh_list-button {
    width: 100%;
    text-align: center;
  }

  /* 分页移动端 */
  .zh_pagination-wrapper {
    margin-top: 30px;
    padding-top: 20px;
  }

  .zh_pagination-wrapper ul {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .zh_pagination-wrapper a {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }

  .zh_pagination-wrapper li.prev a,
  .zh_pagination-wrapper li.next a {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .zh_breadcrumb-content {
    font-size: 12px;
  }

  .zh_card-price {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .zh_price-now {
    font-size: 20px;
  }

  .zh_list-price {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .zh_list-price-now {
    font-size: 24px;
  }

  /* 分页小屏幕 */
  .zh_pagination-wrapper ul {
    gap: 6px;
  }

  .zh_pagination-wrapper a {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 8px;
  }

  .zh_pagination-wrapper li.prev a,
  .zh_pagination-wrapper li.next a {
    padding: 0 12px;
    font-size: 12px;
  }
}
