/* 顶部导航 */
.top-menu {
  width: 1280px;
  margin: 0 auto 10px;
  padding: 0;
}

.h-map li {
  color: #a7a7a7;
  font-size: 14px;
  float: left;
}

.h-map li span {
  margin: 0 8px;
  display: inline-block;
}

/* 顶部图片 */
.head-img {
  width: 100%;
  height: auto;
  display: block;
}

/* 书架容器 */
.shelf-container {
  width: 1280px;
  margin: 50px auto;
  padding: 60px 50px 20px;
  position: relative;
  background: #FFFFFF;
  box-shadow: 
    0px 4px 43px 0px rgba(73, 73, 73, 0.24),
    0px 8px 60px 0px rgba(73, 73, 73, 0.15),
    0px 0px 20px 0px rgba(73, 73, 73, 0.1);
  border-radius: 10px;
  border: 1px solid #FFFFFF;
}

/* 书架板 - 背景图 */
.shelf-board {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  height: 200px;
  background-image: url(../img/article/shujia.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
  pointer-events: none;
}

/* 书籍行 */
.books-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 55px;
  padding-bottom: 100px;
  padding-top: 40px;
  position: relative;
  z-index: 10;
}

/* 单本书 - 固定尺寸 239x323px，放在书架上 */
.book-item {
  width: 239px;
  height: 323px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  transform-style: preserve-3d;
}

.book-item:hover {
  transform: translateY(-25px) scale(1.05);
}

.book-item img {
  width: 239px;
  height: 323px;
  display: block;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.3),
    -5px 0 15px rgba(0, 0, 0, 0.15),
    5px 0 15px rgba(0, 0, 0, 0.15),
    inset 0 2px 5px rgba(255, 255, 255, 0.2);
  object-fit: cover;
  transform: perspective(600px) rotateY(0deg);
  transition: all 0.4s ease;
}

.book-item:hover img {
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.4),
    -8px 0 20px rgba(0, 0, 0, 0.2),
    8px 0 20px rgba(0, 0, 0, 0.2),
    inset 0 3px 8px rgba(255, 255, 255, 0.3);
  transform: perspective(600px) rotateY(2deg);
}

/* ==================== 响应式适配 ==================== */

/* 平板和小屏幕 (1440px以下) */
@media (max-width: 1440px) {
  .top-menu,
  .shelf-container {
    width: 1130px;
  }
}

/* 平板 (1200px以下) */
@media (max-width: 1200px) {
  .top-menu,
  .shelf-container {
    width: 95%;
    max-width: 1000px;
  }
  
  .shelf-container {
    margin: 30px auto;
    padding: 40px 30px 20px;
  }
  
  .books-row {
    gap: 40px;
    padding-bottom: 80px;
    padding-top: 30px;
  }
  
  .shelf-board {
    height: 180px;
  }
  
  /* 一排3本 */
  .book-item {
    width: 200px;
    height: 270px;
  }
  
  .book-item img {
    width: 200px;
    height: 270px;
  }
}

/* 小平板 (900px以下) */
@media (max-width: 900px) {
  .shelf-container {
    padding: 30px 20px 20px;
  }
  
  .books-row {
    gap: 30px;
    padding-bottom: 60px;
    padding-top: 20px;
  }
  
  .shelf-board {
    height: 150px;
    bottom: 20px;
  }
  
  /* 一排2本 */
  .book-item {
    width: 180px;
    height: 243px;
  }
  
  .book-item img {
    width: 180px;
    height: 243px;
  }
}

/* 手机横屏 (768px以下) */
@media (max-width: 768px) {
  .head-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0px 0 5px;
  }
  
  .shelf-container {
    width: 100%;
    margin: 10px auto 30px;
    padding: 15px 16px 30px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow:
      0 4px 18px rgba(0, 0, 0, 0.08),
      0 12px 30px rgba(0, 0, 0, 0.06);
  }
  
  .books-row {
    gap: 12px;
    padding: 10px 0 0px;
    align-items: flex-end;
    justify-content: center;
  }
  
  .shelf-board {
    display: block;
    height: 90px;
    bottom: -5px;
    background-size: contain;
    background-position: center bottom;
  }
  
  .book-item {
    width: calc(30% - 12px);
    max-width: 140px;
    height: auto;
  }
  
  .book-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  }
  
  .book-item:hover {
    transform: translateY(-8px) scale(1.02);
  }
}

/* 手机竖屏 (576px以下) */
@media (max-width: 576px) {
  .shelf-container {
    padding: 12px 12px 25px;
  }
  
  .books-row {
    gap: 9px;
  }
  
  .book-item {
    width: calc(33.333% - 9px);
    max-width: none;
  }
}

/* 小手机 (400px以下) */
@media (max-width: 400px) {
  .books-row {
    gap: 6px;
  }
  
  .book-item {
    width: calc(33.333% - 6px);
  }
}
