/* ============================================
   Hero Section — Layout
   ============================================ */

.home-hero {
  background: #ffffff;
  padding: 40px 24px 32px;
}

.home-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.home-hero-left {
  flex: 1;
  min-width: 0;
}

.home-hero-right {
  width: 100%;
}

/* Desktop: two-column layout */
@media (min-width: 768px) {
  .home-hero {
    padding: 56px 32px 56px;
  }

  .home-hero-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

  .home-hero-right {
    width: 300px;
    flex-shrink: 0;
  }
}

/* ============================================
   Hero Typography
   ============================================ */

.hero-heading {
  margin-bottom: 24px;
}

.home-headline {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  color: #0d0d0d;
  margin-bottom: 10px;
}

@media (min-width: 640px) {
  .home-headline {
    font-size: 34px;
  }
}

@media (min-width: 768px) {
  .home-headline {
    font-size: 38px;
  }
}

.home-subheadline {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.6;
}

/* ============================================
   Search Bar
   ============================================ */

.home-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.home-search-input {
  width: 100%;
  border-radius: 50px;
  padding: 14px 56px 14px 20px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #0d0d0d;
  transition: border-color 0.2s;
  outline: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.home-search-input:focus {
  border-color: #9ca3af;
}

.home-search-input::placeholder {
  color: #9ca3af;
  font-size: 15px;
}

.home-search-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #374151;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-search-btn:hover {
  color: #0d0d0d;
}

/* Legacy ID selector */
#home-search-input {
  font-family: "Pretendard", "Noto Sans KR", sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: #333333 !important;
  background-color: #ffffff !important;
}

#home-search-input::placeholder {
  font-family: "Pretendard", "Noto Sans KR", sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #6b7280 !important;
}

/* ============================================
   Suggestion Chips
   ============================================ */

.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

/* Mobile: full-width card style */
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
}

.suggestion-item:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.suggestion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #6b7280;
  flex-shrink: 0;
}

.suggestion-text {
  flex: 1;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  line-height: 1.4;
}

.suggestion-arrow {
  font-size: 18px;
  color: #9ca3af;
  flex-shrink: 0;
  line-height: 1;
}

/* Desktop: compact horizontal pills */
@media (min-width: 768px) {
  .suggestion-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
  }

  .suggestion-item {
    width: auto;
    padding: 8px 14px;
    border-radius: 50px;
    background: #f3f4f6;
    border-color: transparent;
    gap: 8px;
  }

  .suggestion-item:hover {
    background: #e9eaec;
    border-color: transparent;
  }

  .suggestion-icon {
    width: 22px;
    height: 22px;
    background: transparent;
    border-radius: 0;
  }

  .suggestion-text {
    font-size: 13px;
  }

  .suggestion-arrow {
    display: none;
  }
}

/* ============================================
   Mobile CTA Row (hidden on desktop)
   ============================================ */

.home-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .home-cta-row {
    display: none;
  }
}

.home-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 12px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  text-align: center;
}

.home-cta-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.home-cta-btn:active {
  transform: translateY(0);
}

.home-cta-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.home-cta-btn strong {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: inherit;
}

.home-cta-btn small {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 1px;
  color: inherit;
}

.home-cta-dark {
  background: #0d0d0d;
  color: #ffffff;
}

.home-cta-dark svg {
  color: #ffffff;
}

.home-cta-outline {
  background: #ffffff;
  color: #0d0d0d;
  border: 1.5px solid #e5e7eb !important;
}

.home-cta-outline svg {
  color: #374151;
}

/* ============================================
   Quick Actions Panel
   ============================================ */

.home-quick-label {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.home-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-quick-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  text-align: left;
}

.home-quick-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.home-quick-btn:active {
  transform: translateY(0);
}

.home-quick-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-quick-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.home-quick-btn strong {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: block;
}

.home-quick-btn small {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 3px;
  display: block;
}

/* Primary: dark fill */
.home-quick-primary {
  background: #0d0d0d;
}

.home-quick-primary .home-quick-btn-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.home-quick-primary strong,
.home-quick-primary small {
  color: #ffffff;
}

/* Secondary: white with border */
.home-quick-secondary {
  background: #ffffff;
  border: 1.5px solid #e5e7eb !important;
}

.home-quick-secondary .home-quick-btn-icon {
  background: #f3f4f6;
  color: #374151;
}

.home-quick-secondary strong {
  color: #0d0d0d;
}

.home-quick-secondary small {
  color: #6b7280;
}

/* Trust badge */
.home-trust-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  margin-top: 2px;
}

.home-trust-badge svg {
  flex-shrink: 0;
  color: #9ca3af;
  margin-top: 1px;
}

.home-trust-badge p {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
}

/* ============================================
   Ranking Table Styling
   ============================================ */

.rank_list {
  font-family: Pretendard, "Noto Sans KR", dotum, Arial, sans-serif;
  color: #000;
}

.rank-list-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 12px;
  margin-bottom: 20px;
}

.rank-list-header-text {
  min-width: 0;
  flex: 1;
}

.rank-list-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 6px;
}

.rank-list-updated {
  font-size: 13px;
  color: #6b7280;
}

.rank-list-more {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 4px;
}

.rank-list-more:hover {
  color: #111827;
}

@media (min-width: 640px) {
  .rank-list-title {
    font-size: 22px;
  }
}

@media (min-width: 768px) {
  .rank-list-title {
    font-size: 28px;
    margin-bottom: 8px;
  }

  .rank-list-header {
    margin-bottom: 24px;
  }
}

.rank-table-panel {
  position: relative;
  min-height: 280px;
}

@media (min-width: 768px) {
  .rank-table-panel {
    min-height: 320px;
  }
}

.rank-table-loading,
.rank-table-error {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.rank-table-loading.hidden,
.rank-table-error.hidden {
  display: none;
}

.rank-table-skeleton-row td {
  height: 240px;
  padding: 0;
  border: none;
}

/* Mobile ranking cards */
.rank-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-table-desktop {
  display: none;
}

.rank-mobile-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
}

.rank-mobile-rank {
  flex-shrink: 0;
  width: 28px;
  font-size: 17px;
  font-weight: 700;
  color: #0d0d0d;
  line-height: 1.3;
  padding-top: 1px;
}

.rank-mobile-main {
  flex: 1;
  min-width: 0;
}

.rank-mobile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.rank-mobile-name {
  font-size: 15px;
  font-weight: 600;
  color: #0d0d0d;
  line-height: 1.35;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.rank-mobile-score {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0d0d0d;
  line-height: 1.35;
  margin: 0;
}

.rank-mobile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
}

.rank-mobile-stat {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
}

.rank-mobile-stat em {
  font-style: normal;
  font-weight: 600;
  color: #9ca3af;
  margin-right: 3px;
}

.rank-mobile-empty {
  text-align: center;
  padding: 40px 16px;
  font-size: 14px;
  color: #6b7280;
}

@media (min-width: 768px) {
  .rank-mobile-list {
    display: none;
  }

  .rank-table-desktop {
    display: block;
  }
}

.table-wrapper {
  position: relative;
  width: 100%;
}

.table-scroll-container {
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.table-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll-container::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5);
  border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(156, 163, 175, 0.8);
}

.table-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.9) 70%,
    rgba(255, 255, 255, 1) 100%
  );
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.table-wrapper.scrolled-to-bottom .table-fade-overlay {
  opacity: 0;
}

.over_cont {
  width: 100%;
  max-height: 500px;
  overflow: auto;
}

#rank_tb {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  table-layout: fixed;
  transition: opacity 0.3s ease;
  margin-top: 8px;
}

#rank_tb th,
#rank_tb td {
  font-family: Pretendard, "Noto Sans KR", dotum, Arial, sans-serif;
  font-size: 13px;
  color: #000;
  padding: 10px 8px 10px 0;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(243, 244, 246, 0.3);
}

#rank_tb th {
  font-weight: normal;
  padding-bottom: 12px;
  padding-top: 8px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.3);
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0);
  transition: box-shadow 0.3s ease;
}

.table-scroll-container.scrolled #rank_tb th {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#rank_tb th:nth-child(1), #rank_tb td:nth-child(1) { width: 50px; }
#rank_tb th:nth-child(2), #rank_tb td:nth-child(2) { width: 100px; }
#rank_tb th:nth-child(3), #rank_tb td:nth-child(3) { width: 140px; }
#rank_tb th:nth-child(4), #rank_tb td:nth-child(4) { width: 150px; }
#rank_tb th:nth-child(5), #rank_tb td:nth-child(5) { width: 130px; }
#rank_tb th:nth-child(6), #rank_tb td:nth-child(6) { width: 90px; }
#rank_tb th:nth-child(7), #rank_tb td:nth-child(7) { width: 110px; }

#rank_tb td.stk { font-weight: 500; }

.data_tr {
  border-spacing: 0;
  transition: all 0.2s ease;
}

.data_tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.fl_t2,
.fl_t2.pur {
  font-family: Pretendard, Arial, sans-serif;
  font-size: 16px;
  color: #808080;
  margin: 0;
  padding-right: 5px;
}

.fl_t4 {
  font-family: Pretendard, Arial, sans-serif;
  font-size: 20px;
  color: #0d0d0d;
  margin: 0;
}

.fl_t4.f600 { font-weight: 600; }

.ranking-score {
  font-weight: 600;
  color: #0d0d0d;
}

#loading-indicator {
  transition: all 0.3s ease;
}

.right {
  padding-top: 24px;
  padding-left: 0;
  padding-right: 0;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
}

/* ============================================
   HOT Sections
   ============================================ */

#hot-sections {
  font-family: Pretendard, "Noto Sans KR", dotum, Arial, sans-serif;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.hot-sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  #hot-sections {
    margin-top: 48px;
    padding-top: 32px;
  }

  .hot-sections-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

.hot-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hot-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #0d0d0d;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .hot-section-title {
    font-size: 16px;
  }

  .hot-section-header {
    margin-bottom: 16px;
  }
}

.hot-section-plus {
  font-size: 22px;
  font-weight: 300;
  color: #4b5563;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hot-section-plus:hover {
  color: #0d0d0d;
}

.hot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  overflow: hidden;
}

.hot-list li {
  border-bottom: 1px solid #eef0f2;
}

.hot-list li:last-child {
  border-bottom: none;
}

.hot-list .hot-list-empty {
  padding: 20px 14px;
  font-size: 14px;
  color: #9ca3af;
}

.hot-list-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.hot-list-link:hover {
  background: #f3f4f6;
  color: #0d0d0d;
}

.hot-list-text {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-list-chevron {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  color: #9ca3af;
}

@media (min-width: 768px) {
  .hot-list {
    background: transparent;
    border: none;
    border-radius: 0;
  }

  .hot-list li {
    border-bottom: 1px solid #e5e7eb;
  }

  .hot-list-link {
    min-height: auto;
    padding: 10px 0;
    font-size: 13px;
    background: transparent;
  }

  .hot-list-link:hover {
    background: transparent;
    text-decoration: underline;
  }

  .hot-list-text {
    -webkit-line-clamp: 1;
  }
}

.one-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.hot-fashion-scroll-wrap {
  position: relative;
}

@media (max-width: 767px) {
  .hot-fashion-scroll-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 90%);
    pointer-events: none;
  }
}

.hot-fashion-empty {
  font-size: 14px;
  color: #9ca3af;
  padding: 12px 4px;
}

.hot-fashion-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
}

.hot-fashion-grid::-webkit-scrollbar {
  display: none;
}

.hot-fashion-card {
  flex: 0 0 42%;
  max-width: 160px;
  scroll-snap-align: start;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.hot-fashion-card:active {
  transform: scale(0.98);
}

@media (min-width: 480px) and (max-width: 767px) {
  .hot-fashion-card {
    flex-basis: 38%;
    max-width: 180px;
  }
}

@media (min-width: 768px) {
  .hot-fashion-scroll-wrap {
    overflow: visible;
  }

  .hot-fashion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    overflow: visible;
    scroll-snap-type: none;
    margin: 0;
    padding: 0;
  }

  .hot-fashion-card {
    flex: none;
    max-width: none;
  }

  .hot-fashion-card:hover {
    transform: translateY(-2px);
  }

  .hot-fashion-card:active {
    transform: translateY(-2px);
  }
}

.hot-fashion-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 120%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background-color: #f3f4f6;
}

@media (min-width: 768px) {
  .hot-fashion-thumb {
    padding-bottom: 133.33%;
    border-radius: 8px;
  }
}

.hot-fashion-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-fashion-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
  background-color: #f3f4f6;
}

.hot-fashion-caption {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

@media (min-width: 768px) {
  .hot-fashion-caption {
    margin-top: 6px;
  }
}
