/* deals/templates/deals/deal_list.html의 <style>에서 옮김(2026-11-24) — 페이지마다 다시 받지 않게. 고치면 그 템플릿의 ?v=를 올린다. */
.list-shell {
  display: grid;
  gap: 14px;
}

.deal-list-wrap,
.search-panel {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.deal-list-wrap {
  overflow: hidden;
  min-width: 0;
}

.deal-list-wrap--stacked {
  border-radius: 0;
  box-shadow: none;
}

.deal-list-wrap--stacked:not(.deal-list-wrap--stacked-top) {
  border-top: none;
}

.deal-list-wrap--stacked-top {
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
}

.deal-list-wrap--stacked-bottom {
  border-radius: 0 0 22px 22px;
  box-shadow: var(--shadow);
}

.deal-list-subsection--divided {
  border-top: 1px solid rgba(225, 215, 200, 0.95);
}

.deal-list-wrap--card {
  padding: 14px;
}

.deal-list-wrap--carousel {
  padding: 18px 14px;
}

.home-card-band {
  --home-band-columns: 4;
  --home-band-gap: 12px;
  width: 100%;
  min-width: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

/* 띠 머리의 "더보기" — 홈의 "가격하락 더보기"와 같은 모양(브랜드색 굵은 글자). */
.section-head__more {
  flex: 0 0 auto;
  color: var(--brand-strong);
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
/* popular-only 머리(2026-10-28): 두 줄 고정 — 각 줄은 좌우로 나뉘고 접히지 않는다(접히면 줄이 넷이 되어 공간을 먹는다). CSS 주석은 HTML에 그대로 실리므로 화면 문구를 적지 않는다. */
/* `.section-head`의 justify-content: space-between이 grid에서는 auto 열을 늘리지 않는다(열이 317px로 줄었다) — 열을 1fr로 못박고 stretch로 되돌린다. */
.section-head--popular-only { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 4px; margin-bottom: 10px; }
.section-head__row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap; min-width: 0; }
.section-head__row h2 { min-width: 0; }
.section-head__row--sub .section-subcopy { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-head__tools { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-head--feed-toggle { margin-bottom: 8px; }
.section-head--popular-only .section-subcopy { color: #64748b; font-size: .84rem; }

.price-carousel {
  --price-carousel-gap: var(--home-band-gap);
  --price-carousel-columns: var(--home-band-columns);
  position: relative;
}

.price-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.price-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.price-carousel__track {
  display: flex;
  gap: var(--price-carousel-gap);
}

.price-carousel__item {
  flex: 0 0 calc((100% - (var(--price-carousel-gap) * (var(--price-carousel-columns) - 1))) / var(--price-carousel-columns));
  min-width: 0;
  max-width: calc((100% - (var(--price-carousel-gap) * (var(--price-carousel-columns) - 1))) / var(--price-carousel-columns));
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.price-carousel__button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(217, 104, 141, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--brand-strong);
  box-shadow: 0 12px 26px rgba(164, 74, 110, 0.16);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.price-carousel__button:hover:not(:disabled),
.price-carousel__button:focus-visible:not(:disabled) {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
  outline: none;
}

.price-carousel__button:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.price-carousel__button--prev {
  left: 8px;
}

.price-carousel__button--next {
  right: 8px;
}

.product-feed-grid.hotdeal-feed-grid {
  gap: var(--home-band-gap);
  grid-template-columns: repeat(var(--home-band-columns), minmax(0, 1fr));
  align-items: start;
}

.hotdeal-card-feed__footer {
  display: grid;
  place-items: center;
  min-height: 36px;
  margin-top: 14px;
}

.hotdeal-card-feed__status {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.hotdeal-card-feed__sentinel {
  width: 100%;
  height: 1px;
}

.deal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.deal-item {
  border-bottom: 1px solid rgba(225, 215, 200, 0.95);
}

.deal-item:last-child {
  border-bottom: none;
}

.deal-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
}

.deal-thumb-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deal-thumb {
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 12px;
  background: #f4eee4;
  display: block;
  flex-shrink: 0;
}

.deal-media-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(241, 210, 138, 0.92);
  background: linear-gradient(135deg, rgba(255, 245, 217, 0.98), rgba(255, 223, 152, 0.98));
  color: #8a5a00;
  font-size: 0.64rem;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(138, 90, 0, 0.16);
  pointer-events: none;
}

.deal-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.deal-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.42;
  font-weight: 800;
  color: var(--text);
  word-break: break-word;
  display: block;
  overflow: hidden;
}

.deal-title-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-width: 0;
  margin-right: 6px;
  vertical-align: baseline;
}

.deal-flag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 900;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--muted);
}

.deal-flag.notice {
  background: #fff0ec;
  color: #8b3b24;
  border-color: #f0c7bb;
}

.deal-flag.pinned {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: rgba(39, 91, 81, 0.18);
}

.deal-title-text {
  display: inline;
  min-width: 0;
}

.deal-title .js-title {
  display: inline;
  min-width: 0;
  word-break: break-word;
}

.deal-new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(217, 104, 141, 0.92);
  background: linear-gradient(135deg, #ffe4ee, #f7b8cd);
  color: #8e234c;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  vertical-align: baseline;
  box-shadow: 0 4px 10px rgba(217, 104, 141, 0.2);
}

.deal-meta {
  margin: 0;
  color: var(--muted);
}

.deal-meta.deal-card-meta {
  display: flex;
  align-items: center;
  gap: 6px 10px;
  flex-wrap: wrap;
}

.view-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: var(--muted);
}

.view-icon svg {
  display: block;
}

.view-count {
  font-weight: 700;
}

.deal-empty {
  padding: 2.4rem 1.2rem;
  text-align: center;
  color: var(--muted);
}

.pagination-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-number,
.page-arrow {
  padding: 7px 11px;
  border-radius: 10px;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.page-number.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.page-ellipsis {
  padding: 0 4px;
  color: var(--muted);
}

.search-panel {
  padding: 14px 16px;
}

.search-wrap {
  display: flex;
  justify-content: flex-end;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.search-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 46px 0 14px;
  font-size: 14px;
  line-height: 1.2;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
}

.search-submit {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  min-width: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: 0 8px 16px rgba(217, 104, 141, 0.18);
}

@media (max-width: 920px) {
  .home-card-band {
    --home-band-columns: 3;
  }
}

@media (max-width: 640px) {
  .deal-list-wrap--carousel,
  .deal-list-wrap--card,
  .search-panel {
    padding: 12px;
  }

  .price-carousel__button {
    width: 34px;
    height: 58px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.32);
    background: linear-gradient(180deg, rgba(244, 142, 173, 0.62), rgba(217, 104, 141, 0.72));
    color: #fff;
    box-shadow: 0 8px 14px rgba(164, 74, 110, 0.14);
    font-size: 1.35rem;
  }

  .price-carousel__button--prev {
    left: 4px;
  }

  .price-carousel__button--next {
    right: 4px;
  }

  .price-carousel__button:disabled {
    opacity: 0.14;
    background: linear-gradient(180deg, rgba(244, 142, 173, 0.42), rgba(217, 104, 141, 0.48));
  }

  .deal-link {
    gap: 12px;
    padding: 0.9rem;
  }

  .deal-thumb-wrap,
  .deal-thumb {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .deal-flag {
    padding: 3px 8px;
    font-size: 0.68rem;
  }

  .deal-new-badge {
    margin-left: 5px;
    padding: 2px 6px;
    font-size: 0.64rem;
  }

  .pagination-wrap {
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .home-card-band {
    --home-band-columns: 2;
    --home-band-gap: 10px;
  }
}

.list-shell[data-route-name="ali_hotdeals"][data-view-mode="list"] {
  gap: 0;
}

.list-shell[data-route-name="ali_hotdeals"][data-view-mode="list"] .search-panel {
  margin-top: 14px;
}
/* 검색어 알림 배너 — 결과 유무와 무관하게 검색의 순간을 구독으로 잇는다.
   base.html이 button에 width:100%를 전역으로 걸므로 width:auto·margin:0 필수(§7). */
.search-alert {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,240,244,.96));
  border: 1px solid rgba(242, 215, 223, 0.92);
}
.search-alert--on {
  background: #fff8fa;
}
.search-alert__text {
  margin: 0;
  flex: 1 1 200px;
  min-width: 0;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.5;
}
.search-alert__button,
.search-alert__manage {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.search-alert__button {
  background: var(--brand-deep, #c04a72);
  color: #fff;
}
.search-alert__manage {
  background: var(--surface-muted, #fff0f4);
  color: var(--brand-deep, #c04a72);
}
.search-alert__form { display: inline-flex; margin: 0; }
