.sales-rank-section{
  display: block;
}
.sales-rank {
  padding: 0 20px;
  max-width: calc(var(--page-width) + 60px);
  margin: 0 auto;
}
.sales-rank .ranking-tip {
  text-align: center;
  font-size: 0.9rem;
  padding: 10px 20px;
  color: #E65552;
}
.sales-rank .sales-rank-title {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-top: 1px solid red;
  border-bottom: 1px solid red;
  margin-bottom: 20px;
}
.sales-rank .title-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: #E65552;
  text-align: center;
}
.sales-rank .products-top {
  padding: 0 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.sales-rank .product-card {
  display: flex;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  gap: 10px;
  width: 100%;
  max-width: 768px;
}
.sales-rank .product-card .product-photo {
  flex: 1;
  position: relative;
}
.sales-rank .product-card .product-photo .discount {
  background: #CC0001;
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 5px;
  color: #fff;
  font-weight: 700;
}
.sales-rank .image-wrapper {
  position: relative;
  padding-bottom: 100%;
}
.sales-rank .image-wrapper .image-box {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f3f3f3;
}
.sales-rank .image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sales-rank .product-card .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sales-rank .product-card .ranking {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #E65552;
}
.sales-rank .product-card .ranking-icon {
  max-width: 30px;
  height: auto;
}
.sales-rank .product-card .title {
  font-size: 12px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
.sales-rank .product-card .product-info .stars {
  display: none;
}
.sales-rank .product-card .product-info .stars img {
  max-width: 11px;
}
.sales-rank .product-card .product-info .sale-price {
  font-weight: 700;
  color: #CC0001;
}
.sales-rank .product-card .product-info .compare-price {
  text-decoration: line-through;
}
.sales-rank .product-card .product-info .view-btn {
  display: inline-flex;
  gap: 5px;
  background: #CC0001;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
  align-items: center;
  padding: 2px 10px;
  border-radius: 30px;
}
.sales-rank .product-card .product-info .view-btn img {
  max-width: 25px;
}

/* Slider area */
.sales-rank .sales-rank-slider {
  background-color: #fff;
  padding: 10px;
  overflow: hidden;
  position: relative;
}
.sales-rank .sales-rank-swiper .swiper-slide {
  width: calc(100% / var(--row-mobile));
  padding: 0 4px;
  box-sizing: border-box;
}
.sales-rank .product-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sales-rank .product-item .product-photo {
  position: relative;
}
.sales-rank .product-item .product-photo .index {
  background: #CC0001;
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 9px;
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
}
.sales-rank .product-item .product-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  padding-top: 8px;
}
.sales-rank .product-item .product-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sales-rank .product-item .sale-price {
  font-weight: 700;
  color: #CC0001;
}
.sales-rank .product-item .compare-price {
  text-decoration: line-through;
  margin-inline-start: 8px;
}

/* Navigation */
.sales-rank .sales-rank-nav-prev,
.sales-rank .sales-rank-nav-next {
  display: none;
}

@media (min-width: 768px) {
  .sales-rank .ranking-tip {
    padding: 20px;
    font-size: 1.1rem;
  }
  .sales-rank .product-card .product-info {
    gap: 10px;
  }
  .sales-rank .product-card .product-info .ranking-icon {
    max-width: 60px;
  }
  .sales-rank .product-card .product-info .ranking {
    font-size: 2rem;
  }
  .sales-rank .product-card .product-info .title {
    font-size: 1.2rem;
  }
  .sales-rank .product-card .product-info .stars {
    display: block;
  }
  .sales-rank .product-card .product-info .stars img {
    max-width: 16px;
  }
  .sales-rank .product-card .product-info .view-btn {
    gap: 10px;
    padding: 5px 20px;
    font-size: 1.5rem;
  }
  .sales-rank .sales-rank-swiper .swiper-slide {
    width: calc(100% / var(--row-pc));
    padding: 0 5px;
  }
  .sales-rank .product-item .product-title {
    padding-top: 20px;
  }
  .sales-rank .sales-rank-nav-prev,
  .sales-rank .sales-rank-nav-next {
    display: flex;
    align-items: center;
    background-color: rgba(var(--color-page-background));
    border: 1px solid rgba(var(--color-entry-line));
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.08);
    color: rgba(var(--color-text));
    cursor: pointer;
    height: 40px;
    justify-content: center;
    position: absolute;
    top: calc(50% - 20px);
    width: 40px;
    z-index: 3;
    opacity: 0.8;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
  }
  .sales-rank .sales-rank-nav-next {
    right: 10px;
  }
  .sales-rank .sales-rank-nav-prev {
    left: 10px;
  }
  .sales-rank .sales-rank-nav-prev svg {
    transform: rotate(180deg);
  }
  .sales-rank .sales-rank-nav-next svg {
    transform: rotate(0);
  }
  .sales-rank .swiper-button-disabled {
    cursor: not-allowed;
    opacity: 0.3;
  }
}
