/* =========================================================
   item-tsnow.css
   마감임박(타임세일 NOW) 상품 카드 + 배너 + 칩 스타일
   list_content.css 와 독립적으로 동작

   사용법: PHP 래퍼에 .content-tsnow 클래스 추가
   <div class="content-tsnow">
     <div class="list_tsnow_wrap">...</div>
   </div>

   폰트 표준:
     상품명  1.0625rem (17px) — 700
     보조    0.875rem (14px) — run_date, meta, ticket, timeleft
   ========================================================= */


/* =========================
   래퍼 (PHP 생성)
   ========================= */
.content-tsnow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 1rem;
}


/* =========================
   카드
   ========================= */
.content-tsnow .list_tsnow_wrap {
  width: calc(50% - 0.5rem);
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  border-radius: 0.75rem;
}


/* =========================
   미디어 블록
   ========================= */
.content-tsnow .list_tsnow_media {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
}

/* 썸네일 (1:1) */
.content-tsnow .list_tsnow_thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-color: #e5e5e5;
}

/* 남은시간 바 */
.content-tsnow .list_tsnow_timeleft {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.375rem 0 0.5rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.8125rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}


/* =========================
   정보 영역
   ========================= */
.content-tsnow .list_tsnow_info {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
  padding: 0 0.1875rem;
  gap: 0.4375rem;
  width: 100%;
  text-align: left;
}

.content-tsnow .list_tsnow_info .run_date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ff4b4b;
}

.content-tsnow .list_tsnow_info .meta {
  font-size: 0.8125rem;
  color: #777;
}

.content-tsnow .list_tsnow_info .product_name {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.content-tsnow .list_tsnow_info .ticket {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #4161EB;
}

.content-tsnow .list_tsnow_info .ticket .icon {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  vertical-align: -0.125rem;
  padding-right: 0.125rem;
}

.content-tsnow .list_tsnow_info .ticket img {
  display: inline-block;
}


/* =========================
   터치 피드백
   ========================= */
.content-tsnow .list_tsnow_wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
  transition: background-color 0.12s ease;
}

.content-tsnow .list_tsnow_wrap:active::before {
  background: rgba(0, 0, 0, 0.03);
}

.content-tsnow .list_tsnow_wrap:active .list_tsnow_thumb {
  filter: brightness(0.96);
  transition: filter 0.12s ease;
}


/* =========================
   상품 없음
   ========================= */
.content-tsnow .no-product-box {
  width: 100%;
  text-align: center;
  padding: 4rem 0;
  color: #999;
}

.content-tsnow .no-product-box img {
  display: inline;
  width: 3rem;
  opacity: 0.5;
}

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


/* =========================================================
   배너 (마감임박 타임세일 배너)
   NOTE: 배너는 .content-tsnow 밖에 위치하므로 스코프 없이 작성
   ========================================================= */
.tt-banner-tsnow {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1035 40%, #2d1b69 70%, #1a1035 100%);
  border-radius: 0;
  padding: 1.5rem 1.25rem 1.5rem 1.75rem;
  margin-top: -1px;
  color: #fff;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.tt-banner-tsnow::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 50%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,75,75,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.tt-banner-tsnow::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 40%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* 상단 글로우 라인 */
.tt-banner-tsnow__glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,75,75,0.5) 50%, transparent 100%);
}

/* 반짝이 별 (레드 톤) */
.tt-banner-tsnow__star {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.tt-banner-tsnow__star::before,
.tt-banner-tsnow__star::after {
  content: "";
  position: absolute;
  background: #ff6b6b;
  border-radius: 1px;
}
.tt-banner-tsnow__star::before {
  width: 100%; height: 2px;
  top: 50%; left: 0;
  transform: translateY(-50%);
}
.tt-banner-tsnow__star::after {
  width: 2px; height: 100%;
  left: 50%; top: 0;
  transform: translateX(-50%);
}
.tt-banner-tsnow__star--1 { width: 0.5rem; height: 0.5rem; top: 18%; right: 12%; animation: tsnow-twinkle 3s ease-in-out infinite; }
.tt-banner-tsnow__star--2 { width: 0.375rem; height: 0.375rem; top: 55%; right: 6%; animation: tsnow-twinkle 2.5s ease-in-out infinite 0.8s; }
.tt-banner-tsnow__star--3 { width: 0.375rem; height: 0.375rem; bottom: 20%; right: 20%; animation: tsnow-twinkle 3.5s ease-in-out infinite 1.5s; }

@keyframes tsnow-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

/* 헤더 */
.tt-banner-tsnow__head {
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
}

.tt-banner-tsnow__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}

.tt-banner-tsnow__title span {
  font-weight: 900;
  background: linear-gradient(135deg, #ff4b4b 0%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 0.5rem rgba(255,75,75,0.3));
}

.tt-banner-tsnow__desc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  position: relative;
  z-index: 1;
}

.tt-banner-tsnow__desc li {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}


/* =========================
   필터 정적 칩
   NOTE: 필터 영역에 위치하므로 스코프 없이 작성
   ========================= */
.tt-chip--static {
  border: none !important;
  padding: 0 !important;
  color: #777 !important;
  cursor: default;
  background: transparent !important;
}


/* =========================================================
   웹(.is-web) 전용 오버라이드
   ========================================================= */

/* 웹: PHP 래퍼를 4열 그리드로 전환 */
.is-web .content-tsnow {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 2.5rem 1.5rem !important;
  padding: 1.5rem 0 3.75rem !important;
}

/* 웹: 카드 */
.is-web .content-tsnow .list_tsnow_wrap {
  width: 100%;
  margin: 0;
}

.is-web .content-tsnow .list_tsnow_media {
  border-radius: 0.75rem;
}

.is-web .content-tsnow .list_tsnow_thumb {
  transition: transform 0.2s ease;
}

.is-web .content-tsnow .list_tsnow_wrap:hover .list_tsnow_thumb {
  transform: scale(1.03);
}

.is-web .content-tsnow .list_tsnow_timeleft {
  padding: 0.5rem 0 0.625rem;
}

.is-web .content-tsnow .list_tsnow_info {
  margin-top: 0.75rem;
  padding: 0 0.25rem;
  gap: 0.5rem;
}

.is-web .content-tsnow .list_tsnow_info .ticket > div {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
}

.is-web .content-tsnow .list_tsnow_info .ticket .icon {
  width: 0.875rem;
  height: 0.875rem;
  padding-right: 0;
  vertical-align: 0;
}

/* 웹: 오늘/내일 배지 (PHP 인라인 스타일 보정) */
.is-web .content-tsnow .list_tsnow_info .run_date span {
  font-size: 0.75rem !important;
  padding: 0.1875rem 0.625rem !important;
  border-radius: 1.25rem !important;
}

/* 웹: 터치 피드백 제거 */
.is-web .content-tsnow .list_tsnow_wrap::before {
  display: none;
}

/* 웹: 상품 없음 */
.is-web .content-tsnow .no-product-box {
  grid-column: 1 / -1;
  padding: 5rem 0;
}

/* 웹: 배너 */
.is-web .tt-banner-tsnow {
  border-radius: 0.75rem;
  padding: 1.875rem 2.25rem 1.875rem 3.5rem;
}

.is-web .tt-banner-tsnow::before {
  width: 21.25rem;
  height: 21.25rem;
  aspect-ratio: auto;
}

.is-web .tt-banner-tsnow::after {
  width: 16.25rem;
  height: 16.25rem;
  aspect-ratio: auto;
}

.is-web .tt-banner-tsnow__head {
  margin-bottom: 0.75rem;
}

.is-web .tt-banner-tsnow__title {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
}

.is-web .tt-banner-tsnow__desc {
  gap: 0.25rem;
}

.is-web .tt-banner-tsnow__desc li {
  font-size: 0.875rem;
}

/* 웹: 필터 정적 칩 */
.is-web .tt-chip--static {
  border: none;
  padding: 0;
  color: #777;
  cursor: default;
}
