/* =========================================================
   item-promo.css
   ranking / timesale / todaysale 공통 상품 아이템 스타일
   list_content.css, web_list.css 와 독립적으로 동작

   사용법: 리스트 래퍼에 .content-promo 클래스 추가
   <section class="rk-list-wrap content-promo">
     <div class="layout-grid">...</div>
   </section>
   ========================================================= */


/* =========================
   모바일 그리드 (2열)
   ========================= */
.content-promo .layout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  gap: 0.75rem;
  align-items: start;
  box-sizing: border-box;
  width: 100%;
}


/* =========================
   카드
   ========================= */
.content-promo .list_content {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  text-align: left;
}


/* =========================
   썸네일
   ========================= */
.content-promo .list_content .thum {
  width: 100%;
  height: auto;
  min-width: auto;
  max-width: none;
  position: relative;
  overflow: hidden;
}

.content-promo .list_content .thum img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
  display: block;
}


/* =========================
   정보 영역
   ========================= */
.content-promo .list_content .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.5rem 0.625rem 0.625rem;
  margin: 0;
  min-height: auto;
  border: none;
  gap: 0.5rem;
}


/* =========================
   메타 (장르 | 지역·장소) — 1줄 말줄임
   ========================= */
.content-promo .meta {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: -0.03em;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.content-promo .meta .place_name {
  color: rgba(255,255,255,0.35);
}

.content-promo .meta .place_name_dot {
  color: rgba(255,255,255,0.2);
}

/* 2열 그리드에서 장소명 숨김 */
.content-promo .meta .place_name {
  display: none;
}


/* =========================
   제목 — 1줄 말줄임
   ========================= */
.content-promo .title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
  font-size: 1rem;
  letter-spacing: -0.03em;
}


/* =========================
   가격
   ========================= */
.content-promo .price_box {
  display: flex;
  gap: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.content-promo .discount:empty {
  display: none;
}

.content-promo .price {
  color: #fff;
}


/* =========================
   배지
   ========================= */
.content-promo .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* 크기/색상은 base.css의 .promo_* 공통 정의 사용 */


/* =========================
   별점
   ========================= */
.content-promo .rating {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  margin-top: auto;
}

.content-promo .rating .star {
  width: 0.8125rem;
  height: 0.8125rem;
  margin-right: 0.125rem;
  display: block;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0.5;
}

.content-promo .rating .score {
  color: rgba(255,255,255,0.7);
}

.content-promo .rating .count {
  margin-left: 0.125rem;
  color: rgba(255,255,255,0.35);
}

/* 별점 없음 표시 */
.content-promo .rating[style*="none"] {
  display: flex !important;
  opacity: 0.25;
}
.content-promo .rating[style*="none"] .score { font-size: 0; }
.content-promo .rating[style*="none"] .score::after {
  content: '-';
  font-size: 0.8125rem;
}
.content-promo .rating[style*="none"] .count { font-size: 0; }
.content-promo .rating[style*="none"] .count::after {
  content: '(0)';
  font-size: 0.8125rem;
  margin-left: 0.125rem;
}


/* =========================
   랭킹 뱃지 (기본 숨김)
   ========================= */
.content-promo .rank-badge {
  display: none;
}


/* =========================
   상품 없음
   ========================= */
.content-promo .no-product-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: rgba(255,255,255,0.4);
}

.content-promo .no-product-box img {
  display: inline;
  width: 3rem;
  opacity: 0.3;
  filter: brightness(0) invert(1);
}

.content-promo .no-product-box .no-product-msg {
  font-size: 1rem;
  margin-top: 1rem;
}


/* =========================
   다크 GNB 공통
   ========================= */
.rk-gnb, .ts-gnb, .td-gnb {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3.25rem;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.rk-gnb .gnb-btn,
.ts-gnb .gnb-btn,
.td-gnb .gnb-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.rk-gnb .gnb-btn img,
.ts-gnb .gnb-btn img,
.td-gnb .gnb-btn img {
  width: 1.5rem; height: 1.5rem;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}


/* =========================
   다크 스크롤업 공통
   ========================= */
.scroll-up {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.scroll-up.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.scroll-up svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}


/* =========================================================
   웹(.is-web) 전용 오버라이드
   ========================================================= */
.is-web .content-promo .layout-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 0;
}

.is-web .content-promo .list_content .thum {
  aspect-ratio: 1 / 1;
}

.is-web .content-promo .list_content .thum img {
  transition: transform 0.2s ease;
}

.is-web .content-promo .list_content:hover .thum img {
  transform: scale(1.03);
}

.is-web .content-promo .list_content .info {
  padding: 0.625rem 0.5rem 0.75rem;
}

.is-web .content-promo .no-product-box {
  grid-column: 1 / -1;
  padding: 5rem 0;
}

/* 스크롤업 웹 */
.is-web .scroll-up {
  right: calc((100vw - 68.75rem) / 2 - 5rem);
  bottom: 2.5rem;
  width: 3.125rem;
  height: 3.125rem;
}
.is-web .scroll-up svg { width: 1rem; height: 1rem; }
