.product-ranking-section {
  --background: transparent;
}

.product-ranking-section .ranking-container {
  /* container */
}

/* Section Header */
.product-ranking-section .section-header {
  margin-bottom: 20px;
}

.product-ranking-section .section-title {
  margin: 0 0 8px 0;
  color: #333;
  line-height: 1.3;
}

.product-ranking-section .section-subtitle {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

/* Tab Navigation */
.product-ranking-section .tab-navigation-wrapper {
  position: relative;
}

.product-ranking-section .tab-navigation-placeholder {
  display: none;
}

.product-ranking-section .tab-navigation {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
  transition: box-shadow 0.3s ease;
}

.product-ranking-section .tab-navigation.is-sticky {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10;
  margin-bottom: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-ranking-section .tab-navigation.is-sticky + .tab-navigation-placeholder {
  display: block;
}

.product-ranking-section .tab-item {
  padding: 15px 30px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.product-ranking-section .tab-item:hover {
  color: #333;
}

/* Product Grid */
.product-ranking-section .tab-content {
  display: none;
}

.product-ranking-section .tab-content.active {
  display: block;
}

.product-ranking-section .product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* PC Slider Mode */
.product-ranking-section.slider-mode .product-grid-wrapper {
  position: relative;
}

.product-ranking-section.slider-mode .product-grid {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 20px;
  padding: 10px 0;
}

.product-ranking-section.slider-mode .product-grid::-webkit-scrollbar {
  display: none;
}

.product-ranking-section.slider-mode .product-card {
  flex: 0 0 calc((100% - 80px) / 5);
  min-width: calc((100% - 80px) / 5);
}

/* Slider Navigation Arrows */
.product-ranking-section .slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-ranking-section .slider-nav:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-ranking-section .slider-nav.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.product-ranking-section .slider-nav-prev {
  left: -20px;
}

.product-ranking-section .slider-nav-next {
  right: -20px;
}

.product-ranking-section .slider-nav svg {
  width: 20px;
  height: 20px;
  fill: #333;
}

/* Product Card */
.product-ranking-section .product-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f0f0f0;
}

.product-ranking-section .product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Ranking Badge */
.product-ranking-section .ranking-badge {
  position: absolute;
  top: -19px;
  left: 2px;
  width: 30px;
  height: 30px;
  background: #ff6b6b;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.product-ranking-section .ranking-badge.top-3 {
  background: #ffd700;
  color: #333;
}

.product-ranking-section .ranking-badge.rank-1 { background: #ffd700; }
.product-ranking-section .ranking-badge.rank-2 { background: #c0c0c0; }
.product-ranking-section .ranking-badge.rank-3 { background: #cd7f32; }

/* Product Image */
.product-ranking-section .product-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}

.product-ranking-section .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.product-ranking-section .product-card:hover .product-image img {
  transform: scale(1);
}

/* Product Info */
.product-ranking-section .product-info {
  padding: 12px;
}

.product-ranking-section .product-title {
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8em;
}

.product-ranking-section .product-title a {
  color: inherit;
  text-decoration: none;
}

.product-ranking-section .product-price {
  font-size: 16px;
  font-weight: bold;
  color: #e74c3c;
}

.product-ranking-section .product-price .compare-price,
.product-ranking-section .product-price .tax-text {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  font-weight: normal;
}

.product-ranking-section .product-price .tax-text {
  font-size: 12px;
  margin-left: 5px;
  text-decoration: none;
}

/* More Button */
.product-ranking-section .more-button {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 30px auto 0;
  padding: 12px 24px;
  background-color: #666;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.product-ranking-section .more-button:hover {
  background-color: #555;
  color: white;
  text-decoration: none;
}

.product-ranking-section .more-button:empty {
  display: none;
}

/* Mobile */
@media (max-width: 768px) {
  .product-ranking-section .ranking-container {
    padding: 0 15px;
  }
  .product-ranking-section .section-header {
    margin-bottom: 15px;
  }
  .product-ranking-section .section-title {
    /* font-size: clamp(18px, 5vw, 24px) !important; */
  }
  .product-ranking-section .section-subtitle {
    /* font-size controlled by typography class */
  }
  .product-ranking-section .tab-navigation {
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .product-ranking-section .tab-navigation::-webkit-scrollbar {
    display: none;
  }
  .product-ranking-section .tab-item {
    padding: 8px 20px;
    font-size: 14px;
    flex-shrink: 0;
  }
  .product-ranking-section .product-grid,
  .product-ranking-section.slider-mode .product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    overflow-x: visible;
  }
  .product-ranking-section.slider-mode .product-card {
    flex: none;
    min-width: auto;
    transform: unset;
    box-shadow: unset;
  }
  .product-ranking-section .product-card:hover,
  .product-ranking-section .product-card:hover .product-image img {
    transform: unset;
    box-shadow: unset;
  }
  .product-ranking-section .slider-nav {
    display: none;
  }
  .product-ranking-section .product-title {
    font-size: 13px;
  }
  .product-ranking-section .product-price {
    font-size: 12px;
  }
  .product-ranking-section .ranking-badge {
    width: 25px;
    height: 25px;
    font-size: 11px;
    top: -16px;
    left: 2px;
  }
  .product-ranking-section .more-button {
    font-size: 14px;
    padding: 10px 20px;
    margin: 20px auto 0;
  }
}

@media (max-width: 480px) {
  .product-ranking-section .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-ranking-section .product-info {
    padding: 10px;
  }
}