* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #0073E6;
  color: #fff;
  margin: 0 auto;
  overflow-x: hidden;
}

.cover-image {
  width: 100%;
  background-color: #ccc;
  margin-bottom: 10px;
}

.sticky-buttons {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-around;
  padding: 10px 15px;
  z-index: 1000;
}

.sticky-buttons a {
  background-color: #ff8c00;
  color: #fff;
  padding: 8px 0;
  font-size: 14px;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  flex: 1;
  margin: 0 5px;
}

.banner-rank10-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  gap: 10px;
  padding: 0 15px;
  margin-bottom: 20px;
}

.banner-rank10-container .product-card.rank-10,
.banner-rank10-container .banner {
  flex: 1;
}

.banner-rank10-container .banner {
  background-color: #ccc;
  height: 160px;
}

/* 針對拆開後的 Rank10 + Banner 單獨排版 */
#rank10-slot {
  margin-bottom: 15px;
}

.banner {
  margin-bottom: 30px;
  background-color: #ccc;
  background: url('https://via.placeholder.com/600x200?text=Banner') no-repeat center center;
  background-size: cover;
  height: 160px;
}

.banner {
  height: 100px;
  background: url('https://via.placeholder.com/390x100?text=Banner') no-repeat center center;
  background-size: cover;
}

.banner {
  background-color: #ccc;
  flex-shrink: 0;
  height: 157px;
  width: 220px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: 20px;
  color: #ff69b4;
  line-height: 20px;
}

.section-title .date {
  font-size: 14px;
  color: #fff;
  line-height: 14px;
}

.product-list {
  padding: 0 15px;
}

.product-card {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.rank-tag {
  position: absolute;
  top: 5px;
  left: 5px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  z-index: 1;
}

.product-image {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.product-info h3 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 3px;
  line-height: 14px;
  word-break: break-all;
}

.product-info p {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 3px;
  line-height: 12px;
  word-break: break-all;
}

/* 行動版樣式 */
@media (max-width: 767px) {
  body {
    width: 100%;
    max-width: 390px;
  }

  .cover-image {
    height: 200px;
    background: url('https://via.placeholder.com/390x200?text=2025熱銷排行榜') no-repeat center center;
    background-size: cover;
  }

  .section-title {
    padding: 10px 15px;
  }

  .banner {
    width: 210px;
    height: 100px;
    background: url('https://via.placeholder.com/210x100?text=Banner') no-repeat center center;
    background-size: cover;
  }

  .product-card.rank-1 .rank-tag {
    width: 40px;
    height: 40px;
    font-size: 18px;
    background-color: #ff69b4;
    color: #fff;
  }

  .product-card.rank-2 .rank-tag,
  .product-card.rank-3 .rank-tag {
    width: 35px;
    height: 35px;
    font-size: 16px;
    background-color: #FF6400;
    color: #fff;
  }

  .product-card.rank-4-9 .rank-tag,
  .product-card.rank-10 .rank-tag {
    width: 30px;
    height: 30px;
    font-size: 14px;
    background-color: #D9D9D9;
    color: #F78DB9;
  }

  .product-card.rank-1 .product-image {
    width: 220px;
    height: 220px;
    margin-right: 10px;
  }

  .product-card.rank-2-9 {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-card.rank-2-9 .product-image {
    margin-bottom: 5px;
  }

  .rank-2-3-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    width: 100%;
  }

  .product-card.rank-2,
  .product-card.rank-3 {
    width: 48%;
  }

  .product-card.rank-2 .product-image,
  .product-card.rank-3 .product-image {
    width: 180px;
    height: 180px;
  }

  .rank-4-9-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 15px;
    width: 100%;
  }

  .product-card.rank-4-9 {
    width: 32%;
    margin-bottom: 10px;
  }

  .product-card.rank-4-9 .product-image {
    width: 120px;
    height: 120px;
  }

  .product-card.rank-10 {
    width: 150px;
    flex-direction: column;
    align-items: flex-start;
  }

  .product-card.rank-10 .product-image {
    width: 120px;
    height: 120px;
    margin-bottom: 5px;
  }
}

/* PC 版樣式 */
@media (min-width: 768px) {
  body {
    width: 100%;
    max-width: 1200px;
  }

  .cover-image {
    height: 400px;
    background: url('https://via.placeholder.com/1200x400?text=2025熱銷排行榜') no-repeat center center;
    background-size: cover;
  }

  .sticky-buttons {
    background-color: #0073E6;
    padding: 15px 30px;
  }

  .sticky-buttons a {
    font-size: 16px;
    padding: 10px 0;
    margin: 0 10px;
  }

  .section-title {
    padding: 15px 30px;
    background-color: #0073E6;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .section-title .date {
    font-size: 16px;
  }

  .product-list {
    padding: 0 30px;
  }

  .product-card.rank-1 .rank-tag {
    width: 50px;
    height: 50px;
    font-size: 24px;
    background-color: #ff69b4;
    color: #fff;
  }

  .product-card.rank-2 .rank-tag,
  .product-card.rank-3 .rank-tag {
    width: 40px;
    height: 40px;
    font-size: 20px;
    background-color: #FF6400;
    color: #fff;
  }

  .product-card.rank-4-9 .rank-tag,
  .product-card.rank-10 .rank-tag {
    width: 30px;
    height: 30px;
    font-size: 16px;
    background-color: #D9D9D9;
    color: #F78DB9;
  }

  .product-card.rank-1 {
    margin-bottom: 20px;
  }

  .product-card.rank-1 .product-image {
    width: 400px;
    height: 400px;
    margin-right: 20px;
  }

  .product-card.rank-1 .product-info h3 {
    font-size: 18px;
    line-height: 18px;
  }

  .product-card.rank-1 .product-info p {
    font-size: 14px;
    line-height: 14px;
  }

  .rank-2-3-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
  }

  .product-card.rank-2,
  .product-card.rank-3 {
    width: 48%;
  }

  .product-card.rank-2 .product-image,
  .product-card.rank-3 .product-image {
    width: 300px;
    height: 300px;
  }

  .product-card.rank-2 .product-info h3,
  .product-card.rank-3 .product-info h3 {
    font-size: 16px;
    line-height: 16px;
  }

  .product-card.rank-2 .product-info p,
  .product-card.rank-3 .product-info p {
    font-size: 12px;
    line-height: 12px;
  }

  .rank-4-9-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
  }

  .product-card.rank-4-9 {
    width: 18%;
    margin-bottom: 15px;
  }

  .product-card.rank-4-9 .product-image {
    width: 200px;
    height: 200px;
  }

  .product-card.rank-4-9 .product-info h3 {
    font-size: 14px;
    line-height: 14px;
  }

  .product-card.rank-4-9 .product-info p {
    font-size: 12px;
    line-height: 12px;
  }

  .product-card.rank-10 {
    width: 200px;
    flex-direction: column;
    align-items: flex-start;
  }

  .product-card.rank-10 .product-image {
    width: 200px;
    height: 200px;
    margin-bottom: 5px;
  }

  .product-card.rank-10 .product-info h3 {
    font-size: 14px;
    line-height: 14px;
  }

  .product-card.rank-10 .product-info p {
    font-size: 12px;
    line-height: 12px;
  }

  .banner {
    width: 600px;
    height: 200px;
    background: url('https://via.placeholder.com/600x200?text=Banner') no-repeat center center;
    background-size: cover;
  }

  .footer {
    background-color: #ff8c00;
    padding: 20px 30px;
    text-align: center;
    font-size: 14px;
  }

  .footer .logo {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
  }

  .footer .social-icons a {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
  }

  .footer p {
    font-size: 12px;
    color: #fff;
  }
}