/* =============================================
   DealRadar - premium.css
   역할: 프리미엄 디자인 시스템 (style.css 이후 로드되어 덮어씀)
   - 디자인 토큰 / 타이포그래피 / 헤더·내비 / 딜 카드 / 사이드바 / 푸터 / 모바일
   인코딩: UTF-8
   ============================================= */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

/* ---------------------------------------------
   1. 디자인 토큰
   --------------------------------------------- */
:root {
    --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;

    /* 브랜드: 레이더 코랄 (핫딜의 에너지) + 잉크 뉴트럴 */
    --primary: #E8461E;
    --primary-dark: #C93A15;
    --primary-light: rgba(232, 70, 30, 0.08);
    --primary-glow: rgba(232, 70, 30, 0.24);
    --secondary: #0E9F6E;
    --accent: #F59E0B;
    --accent-dark: #D97706;
    --gradient-primary: linear-gradient(135deg, #FF7A45 0%, #E8461E 100%);
    --gradient-accent: linear-gradient(135deg, #FF7A45 0%, #E8461E 100%);
    --gradient-warm: linear-gradient(135deg, #FF7A45 0%, #E8461E 100%);

    --price: #E8461E;
    --ink: #111113;

    /* 라이트 테마 */
    --bg: #F5F5F3;
    --bg-card: #FFFFFF;
    --bg-secondary: #F2F2EF;
    --bg-elev: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --text: #111113;
    --text-secondary: #55555C;
    --text-muted: #8E8E96;
    --border: #E6E6E1;
    --border-strong: #D6D6D0;
    --header-bg: rgba(255, 255, 255, 0.86);
    --input-bg: #F2F2EF;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --shadow: 0 1px 2px rgba(17, 17, 19, 0.04), 0 1px 1px rgba(17, 17, 19, 0.02);
    --shadow-md: 0 6px 20px -8px rgba(17, 17, 19, 0.12), 0 2px 6px -2px rgba(17, 17, 19, 0.06);
    --shadow-hover: 0 18px 40px -18px rgba(17, 17, 19, 0.28), 0 4px 12px -4px rgba(17, 17, 19, 0.08);
    --shadow-glow: 0 0 0 1px var(--border);

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --container: 1320px;
    --header-h: 64px;
}

[data-theme="dark"] {
    --primary: #FF6B3D;
    --primary-dark: #E8461E;
    --primary-light: rgba(255, 107, 61, 0.12);
    --primary-glow: rgba(255, 107, 61, 0.28);
    --secondary: #34D399;
    --price: #FF7A4F;
    --ink: #F4F4F5;

    --bg: #0B0B0D;
    --bg-card: #141417;
    --bg-secondary: #1B1B1F;
    --bg-elev: #1B1B1F;
    --bg-glass: rgba(20, 20, 23, 0.72);
    --text: #F4F4F5;
    --text-secondary: #A6A6AE;
    --text-muted: #6E6E77;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);
    --header-bg: rgba(11, 11, 13, 0.82);
    --input-bg: #1B1B1F;

    --shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 24px 48px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-glow: 0 0 0 1px var(--border);
}

/* ---------------------------------------------
   2. 베이스
   --------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    font-feature-settings: 'ss06', 'tnum' 0;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: var(--bg);
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* 기존 스타일의 Poppins 숫자 폰트를 통일 */
.deal-sale-price, .rank-number, .hero-stat-number, .logo-text, .footer-logo,
.detail-sale-price, .stat-number, .toss-card-price {
    font-family: var(--font-sans) !important;
    font-variant-numeric: tabular-nums;
}

::selection { background: var(--primary); color: #fff; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 10001;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--bg);
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.ico { display: block; flex-shrink: 0; }

/* 과한 진입 애니메이션 제거 (스크롤 시 깜빡임 방지) */
.deal-card, .sidebar-widget, .section-card, .coupon-card, .deal-card.expired { animation: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------
   3. 헤더
   --------------------------------------------- */
.site-header {
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    transition: box-shadow .25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.35); }

.header-inner {
    max-width: var(--container);
    height: var(--header-h);
    padding: 0 24px;
    gap: 20px;
}

.logo { gap: 10px; }
.logo-mark { display: flex; width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 4px 14px -4px var(--primary-glow); }
.logo-mark svg { display: block; }
.logo-words { display: flex; flex-direction: column; line-height: 1; }
.logo-text {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text);
}
.logo-sub {
    margin-top: 3px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--text-muted);
}
.logo-slogan, .logo-icon { display: none !important; }

/* 검색 */
.header-search {
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
    display: flex !important;
    align-items: center;
    position: relative;
}
.header-search-ico {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
}
.header-search input {
    height: 44px;
    padding: 0 76px 0 44px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--input-bg);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.header-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.header-search input:hover { border-color: var(--border-strong); }
.header-search input:focus {
    background: var(--bg-card);
    border-color: var(--text);
    box-shadow: 0 0 0 4px var(--primary-light);
}
.search-btn {
    right: 6px;
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--bg);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.search-btn:hover { color: var(--bg); background: var(--primary); }

/* 액션 */
.header-actions { gap: 4px; }
.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0;
}
.btn-icon:hover, .btn-icon.active {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: transparent;
    transform: none;
}
.notification-badge {
    top: 6px; right: 6px;
    min-width: 8px; height: 8px;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-card);
}

/* 테마 아이콘 전환 */
.theme-ico-sun, .theme-ico-moon { display: flex; }
[data-theme="dark"] .theme-ico-moon { display: none; }
[data-theme="light"] .theme-ico-sun, html:not([data-theme]) .theme-ico-sun { display: none; }

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    margin-left: 6px;
    padding: 0 16px 0 12px;
    border-radius: 10px;
    background: var(--ink);
    color: var(--bg);
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
    transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn-submit:hover { background: var(--primary); color: #fff; transform: none; box-shadow: 0 8px 20px -8px var(--primary-glow); }

.only-mobile { display: none !important; }

/* 모바일 검색 바 */
.mobile-search-bar {
    padding: 10px 16px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}
.mobile-search-bar[hidden] { display: none !important; }
.mobile-search-form { position: relative; display: flex; gap: 8px; align-items: center; }
.mobile-search-form input {
    flex: 1; min-width: 0;
    height: 44px;
    padding: 0 14px 0 42px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--input-bg);
    color: var(--text);
    font-size: 16px;
    outline: none;
}
.mobile-search-form input:focus { border-color: var(--text); }
.mobile-search-form button {
    height: 44px; padding: 0 16px;
    border: none; border-radius: 12px;
    background: var(--ink); color: var(--bg);
    font-weight: 700; font-size: 14px; cursor: pointer;
}

/* ---------------------------------------------
   4. 메인 내비게이션 (헤더에 포함, 함께 고정)
   --------------------------------------------- */
.site-nav {
    position: static !important;
    top: auto !important;
    background: transparent !important;
    border-bottom: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0 !important;
}
.site-nav-inner {
    max-width: var(--container);
    padding: 0 24px;
    gap: 4px;
    align-items: center;
    height: 46px;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 12px;
    border: none;
    background: none;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: none;
    cursor: pointer;
    letter-spacing: -0.02em;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 800; border-bottom: none; }
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: 0;
    width: auto;
    transform: none;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--text);
}
.nav-toss::before {
    content: '';
    width: 6px; height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background: #3182F6;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.18);
}
.nav-spacer { flex: 1; }
.nav-sub { font-size: 13px; font-weight: 500; color: var(--text-muted); }

/* ---------------------------------------------
   5. 라이브 스트립
   --------------------------------------------- */
.live-strip { border-bottom: 1px solid var(--border); background: var(--bg-card); }
.live-strip-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.live-strip-inner::-webkit-scrollbar { display: none; }
.live-stats { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.live-stat strong { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; margin-left: 2px; }
.live-urgent strong { color: var(--primary); }
.live-sep { width: 1px; height: 12px; background: var(--border-strong); }
.live-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 8px 3px 7px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px; font-weight: 800; letter-spacing: .08em;
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); position: relative; }
.live-dot::after {
    content: ''; position: absolute; inset: -3px; border-radius: 50%;
    border: 1.5px solid var(--primary); opacity: 0;
    animation: dr-ping 1.8s var(--ease) infinite;
}
@keyframes dr-ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
.live-tags { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.live-tag {
    display: inline-flex; align-items: center; gap: 6px;
    height: 28px; padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
    white-space: nowrap;
    transition: border-color .2s, color .2s;
}
.live-tag:hover { border-color: var(--border-strong); color: var(--text); }
.live-tag-count { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

/* 플랫폼 컬러 도트 */
.pf-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #9CA3AF; flex-shrink: 0; }
.pf-dot.coupang { background: var(--coupang); }
.pf-dot.naver { background: var(--naver); }
.pf-dot.elevenst { background: var(--elevenst); }
.pf-dot.oliveyoung { background: var(--oliveyoung); }
.pf-dot.kurly { background: #8B3DBA; }
.pf-dot.musinsa { background: var(--text); }
.pf-dot.gmarket { background: var(--gmarket); }
.pf-dot.auction { background: var(--auction); }
.pf-dot.ssg { background: var(--ssg); }
.pf-dot.kakao { background: #F7D100; }
.pf-dot.toss { background: #3182F6; }
.pf-dot.nsmall { background: var(--nsmall); }
.pf-dot.aliexpress { background: var(--aliexpress); }
.pf-dot.lotteon { background: var(--lotteon); }
.pf-dot.ohou { background: var(--ohou); }
.pf-dot.goodwear { background: #5B6B7C; }
.pf-dot.epost { background: var(--epost); }
.pf-dot.offline { background: var(--offline); }
.pf-dot.lotteimall, .badge-platform.lotteimall { background: #E60012; }
.pf-dot.gsshop, .badge-platform.gsshop { background: #6CC24A; }
.pf-dot.cjonstyle, .badge-platform.cjonstyle { background: #7B2BF9; }
.pf-dot.hmall, .badge-platform.hmall { background: #00A495; }
.badge-platform.lotteimall, .badge-platform.gsshop, .badge-platform.cjonstyle, .badge-platform.hmall { color: #fff; }

/* ---------------------------------------------
   6. 레이아웃
   --------------------------------------------- */
.main-wrapper {
    max-width: var(--container);
    padding: 28px 24px 8px;
    gap: 32px;
}
@media (min-width: 1024px) {
    .main-wrapper { grid-template-columns: minmax(0, 1fr) 320px; }
    .home-aside { position: sticky; top: calc(var(--header-h) + 62px); align-self: start; }
}

.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ---------------------------------------------
   7. 필터 패널
   --------------------------------------------- */
.filter-panel {
    margin-bottom: 20px;
    padding: 4px 0 0;
}
.category-tabs {
    gap: 2px;
    padding: 0;
    border-bottom: 1px solid var(--border) !important;
    margin-bottom: 14px;
}
.cat-tab {
    padding: 12px 12px 13px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    letter-spacing: -0.02em;
}
.cat-tab:hover { color: var(--text); }
.cat-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 800; }
.cat-tab-link { color: var(--text-muted); }

.platform-filter { gap: 6px; padding: 0; }
.pf-btn {
    gap: 7px;
    height: 34px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.pf-btn:hover { border-color: var(--border-strong); color: var(--text); background: var(--bg-card); }
.pf-btn.active, .pf-btn.pf-all.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}
.pf-btn.active .pf-dot { box-shadow: 0 0 0 2px var(--bg); }
.pf-toss { color: #3182F6; border-color: rgba(49, 130, 246, 0.35); }

/* 피드 헤더 */
.feed-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 16px;
}
.feed-title-wrap { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.feed-title { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; color: var(--text); line-height: 1.2; }
.feed-count { font-size: 13px; color: var(--text-muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sort-bar { gap: 2px; flex-wrap: nowrap; }
.sort-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}
.sort-btn:hover { background: var(--bg-secondary); color: var(--text); }
.sort-btn.active { background: none; color: var(--text); font-weight: 800; }
.sort-btn.active::before { content: '✓ '; font-weight: 800; }
.view-toggle-container {
    display: flex; gap: 2px; padding: 3px;
    background: var(--bg-secondary);
    border-radius: 10px;
}
.view-toggle-btn { width: 30px; height: 28px; border-radius: 7px; }
.view-toggle-btn.active { background: var(--bg-card) !important; color: var(--text) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.view-toggle-btn:hover { background: transparent !important; color: var(--text) !important; }

/* ---------------------------------------------
   8. 딜 카드
   --------------------------------------------- */
.deals-grid {
    grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
    gap: 28px 18px;
}
.deal-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: none;
}
.deal-card:hover { transform: none; box-shadow: none; }
[data-theme="dark"] .deal-card { border-color: transparent; }

.deal-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    isolation: isolate;
}
.deal-thumb::after {
    /* 밝은 상품 이미지와 배경의 경계를 은은하게 */
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: none;
}
[data-theme="dark"] .deal-thumb::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.deal-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
    transition: transform .6s var(--ease);
}
.deal-card:hover .deal-card-image { transform: scale(1.04); }
.deal-card-image-placeholder {
    width: 100%; height: 100%;
    font-size: 44px;
    background: var(--bg-secondary);
}

.card-badges { top: 10px; left: 10px; flex-direction: row; flex-wrap: wrap; gap: 4px; right: 52px; }
.badge {
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.badge-platform { font-size: 11px; box-shadow: none; }
.badge-hot { background: var(--primary); color: #fff; box-shadow: none; }
.badge-expired { background: rgba(17, 17, 19, 0.8); color: #fff; }
.deal-expired-veil {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(17, 17, 19, 0.45);
    z-index: 1;
}
.deal-expired-veil span {
    padding: 6px 12px; border-radius: 8px;
    background: rgba(0, 0, 0, 0.55); color: #fff;
    font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.deal-card.expired .deal-card-image { filter: grayscale(.6); }
.deal-card.expired .deal-card-body { opacity: .6; }

.save-btn {
    top: 8px; right: 8px;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(17, 17, 19, 0.28);
    backdrop-filter: blur(6px);
    color: #fff;
    opacity: 0;
    transition: opacity .2s, background .2s;
}
.deal-card:hover .save-btn, .save-btn.saved, .save-btn:focus-visible { opacity: 1; }
.save-btn:hover { background: rgba(17, 17, 19, 0.55); transform: none; }
.save-btn.saved { background: var(--primary); }
.save-btn.saved .ico { fill: currentColor; }
@media (hover: none) { .save-btn { opacity: 1; } }

.deal-card-body { padding: 12px 2px 0; }
.deal-meta {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap; overflow: hidden;
}
.deal-meta-cat { overflow: hidden; text-overflow: ellipsis; }
.deal-card-title {
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text);
    min-height: calc(1.45em * 2);
    margin-bottom: 8px;
    letter-spacing: -0.015em;
}
.deal-card-title a { color: inherit; }
.deal-card:hover .deal-card-title a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--border-strong); }

.deal-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.deal-tag {
    display: inline-flex; align-items: center;
    height: 20px; padding: 0 6px;
    border-radius: 5px;
    font-size: 11px; font-weight: 700;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}
.tag-verified { color: var(--secondary); background: rgba(14, 159, 110, 0.1); }
.tag-coupon { color: #7C5CFA; background: rgba(124, 92, 250, 0.1); }
.tag-cheaper { color: var(--accent-dark); background: rgba(245, 158, 11, 0.12); }

.deal-price-area { min-height: 0; margin-bottom: 8px; justify-content: flex-start; }
.deal-original-price { font-size: 12.5px; color: var(--text-muted); line-height: 1.3; font-variant-numeric: tabular-nums; }
.deal-price-row { align-items: baseline; gap: 6px; }
.deal-discount-badge {
    background: none;
    padding: 0;
    color: var(--price);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.deal-sale-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.25;
}
.price-badge { font-size: 13px; }

.deal-expiry {
    font-size: 12px; font-weight: 600;
    color: var(--accent-dark);
    margin-bottom: 8px;
}
.deal-expiry.urgent { color: var(--primary); animation: none; }

.deal-card-footer { padding-top: 0; border-top: none; }
.deal-stats { gap: 10px; }
.deal-stat { gap: 4px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.deal-card .like-btn {
    height: 28px; padding: 0 9px; gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    font-size: 12px; font-weight: 700;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.deal-card .like-btn:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.deal-card .like-btn.liked { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.deal-card .like-btn.liked .ico { fill: currentColor; }
.deal-card .like-btn .heart { display: flex; }
.deal-card .like-btn.liked .heart, .deal-card .like-btn:hover .heart { transform: scale(1.1); }

/* 리스트 모드 */
.deals-grid.list-mode { gap: 0; border-top: 1px solid var(--border); }
.deals-grid.list-mode .deal-card {
    padding: 14px 0;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
}
.deals-grid.list-mode .deal-card:hover { transform: none !important; box-shadow: none !important; }
.deals-grid.list-mode .deal-card > .deal-thumb { width: 104px; height: 104px; aspect-ratio: auto; border-radius: var(--radius-sm); }
.deals-grid.list-mode .card-badges { position: absolute; top: 6px; left: 6px; right: auto; margin: 0; }
.deals-grid.list-mode .card-badges .badge:not(.badge-platform) { display: none; }
.deals-grid.list-mode .badge { height: 18px; font-size: 10px; padding: 0 5px; border-radius: 4px; }
.deals-grid.list-mode .save-btn { top: auto; bottom: 6px; right: 6px; width: 28px; height: 28px; opacity: 1; }
.deals-grid.list-mode .save-btn .ico { width: 14px; height: 14px; }
.deals-grid.list-mode .deal-card-body { padding: 2px 0 0; justify-content: flex-start; }
.deals-grid.list-mode .deal-card-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; min-height: 0; font-size: 15px; margin-bottom: 6px; }
.deals-grid.list-mode .deal-price-area { margin-bottom: 6px; }
.deals-grid.list-mode .deal-sale-price, .deals-grid.list-mode .deal-discount-badge { font-size: 16px; }
.deals-grid.list-mode .deal-card-footer { margin-top: auto; }

/* ---------------------------------------------
   9. 사이드바 위젯
   --------------------------------------------- */
.home-aside { display: flex; flex-direction: column; gap: 16px; }
.home-aside .mt-16 { margin-top: 0; }
.sidebar-widget {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.sidebar-widget:hover { box-shadow: var(--shadow); }
.widget-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}
.widget-title::after { display: none; }
.widget-empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 16px; }
.widget-more {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.widget-more:hover { color: var(--text); }

.rank-list { gap: 0; list-style: none; margin: 0; padding: 0; }
.rank-list > li + li .rank-item { border-top: 1px solid var(--border); }
.rank-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 0;
    border-radius: 0;
    background: none;
    color: inherit;
}
.rank-item:hover { background: none; }
.rank-item:hover .rank-title { color: var(--primary); }
.rank-number {
    min-width: 18px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-muted);
    font-style: italic;
}
.rank-number.top1, .rank-number.top2, .rank-number.top3 { color: var(--text); }
.rank-number.top1 { color: var(--primary); }
.rank-info { display: flex; flex-direction: column; gap: 3px; }
.rank-title { font-size: 13.5px; font-weight: 600; transition: color .15s; }
.rank-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.rank-price { font-size: 12.5px; font-weight: 800; color: var(--text); margin-left: 2px; }
.rank-likes { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.expiry-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 6px; border-radius: 5px;
    background: var(--primary-light); color: var(--primary);
    font-size: 11px; font-weight: 700;
}

.coupon-mini-list { display: flex; flex-direction: column; }
.coupon-mini { padding: 12px 0; }
.coupon-mini + .coupon-mini { border-top: 1px solid var(--border); }
.coupon-mini:first-child { padding-top: 0; }
.coupon-mini-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.coupon-mini-head .badge { flex-shrink: 0; }
.coupon-mini-title { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coupon-mini-code {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 6px 6px 12px;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
}
.coupon-mini-code code { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.coupon-copy-mini {
    border: none; border-radius: 7px;
    padding: 6px 10px;
    background: var(--ink); color: var(--bg);
    font-size: 12px; font-weight: 700; cursor: pointer;
}
.coupon-mini-link {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    height: 36px; border-radius: 10px;
    background: var(--bg-secondary); color: var(--text);
    font-size: 13px; font-weight: 700;
}
.coupon-mini-link:hover { background: var(--ink); color: var(--bg); }
.coupon-mini-value { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.coupon-mini-event { color: var(--secondary); font-weight: 800; }

.king-row { display: flex; align-items: center; gap: 12px; }
.king-avatar {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary); font-size: 22px;
}
.king-name { font-size: 15px; font-weight: 800; color: var(--text); }
.king-sub { font-size: 12px; color: var(--text-muted); }

.widget-cta {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: var(--bg);
    position: relative; overflow: hidden;
}
.widget-cta::before {
    content: ''; position: absolute; right: -40px; top: -40px;
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
}
.widget-cta-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .2em; color: var(--primary); margin-bottom: 8px; }
.widget-cta-title { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; position: relative; }
.widget-cta-desc { font-size: 13px; opacity: .7; margin-bottom: 16px; position: relative; }
.widget-cta-btn {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    height: 44px; border-radius: 12px;
    background: var(--primary); color: #fff;
    font-size: 14px; font-weight: 800;
    transition: filter .2s;
}
.widget-cta-btn:hover { filter: brightness(1.08); }

.review-item { align-items: flex-start; }
.review-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--bg-secondary); }
.review-thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 20px; }
.review-stars { font-size: 11px; color: var(--accent); letter-spacing: 1px; }
.review-author { font-size: 11.5px; color: var(--text-muted); }

/* ---------------------------------------------
   10. 공용 요소 (버튼/빈 상태/페이지네이션/토스트/모달)
   --------------------------------------------- */
.btn-primary {
    border-radius: 12px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 800;
    box-shadow: none;
}
.btn-primary:hover { background: var(--primary); color: #fff; transform: none; box-shadow: 0 10px 24px -10px var(--primary-glow); }
.empty-state-btn { display: inline-flex; width: auto; margin-top: 20px; padding: 12px 28px; }

.pagination { gap: 4px; margin: 40px 0 8px; }
.page-btn {
    min-width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 8px;
    border: none; border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600; font-variant-numeric: tabular-nums;
}
.page-btn:hover { background: var(--bg-secondary); color: var(--text); border-color: transparent; }
.page-btn.active { background: var(--ink); color: var(--bg); }
.page-ellipsis { display: inline-flex; align-items: center; color: var(--text-muted); padding: 0 4px; }

.toast { border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-hover); }

.modal-overlay { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); }
.modal-content, .modal-box {
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
}

/* 입력 요소 공통 톤 */
.form-input, .form-select, .form-textarea {
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--input-bg);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--text); box-shadow: 0 0 0 4px var(--primary-light); }

/* ---------------------------------------------
   11. 토스 섹션 톤 정리
   --------------------------------------------- */
.toss-section,
[data-theme="light"] .toss-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 28px !important;
}
.toss-main-title { font-size: 18px; letter-spacing: -0.03em; }
.toss-highlight { background: none; -webkit-text-fill-color: currentColor; color: var(--text); }
.toss-card { border-radius: 12px; }
.toss-card:hover { transform: none; box-shadow: var(--shadow-md); border-color: rgba(49, 130, 246, 0.5); }
@media (max-width: 768px) {
    .toss-section, [data-theme="light"] .toss-section { padding: 14px 12px; border-radius: 16px; margin-bottom: 20px !important; }
    .toss-card { flex: 0 0 136px; width: 136px; }
    .toss-card-reviews { display: none; }
}

/* ---------------------------------------------
   11-1. 페이지 히어로 통일 (쿠폰/검색/마이페이지)
   --------------------------------------------- */
body .coupon-hero,
body .search-hero,
body .mypage-hero {
    background:
        radial-gradient(600px 240px at 85% -20%, rgba(255, 107, 61, 0.35), transparent 70%),
        radial-gradient(500px 200px at 0% 120%, rgba(255, 122, 69, 0.18), transparent 70%),
        #121214;
    color: #F4F4F5;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
body .coupon-hero { max-width: var(--container); margin: 20px auto 0; border-radius: var(--radius-xl); padding: 48px 20px; }
body .search-hero { padding: 40px 16px 44px; border: none; border-bottom: 1px solid var(--border); }
body .coupon-hero::before { display: none; }
body .mypage-hero::before { opacity: .08; }
.search-hero-title { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.search-big-box input { border-radius: 12px !important; }
.search-big-box button { border-radius: 12px !important; background: var(--primary) !important; color: #fff !important; }
@media (max-width: 768px) {
    body .coupon-hero { margin: 12px 16px 0; padding: 32px 16px; border-radius: 20px; }
}

/* ---------------------------------------------
   11-2. 상세 페이지
   --------------------------------------------- */
.btn-buy {
    border-radius: 14px;
    background: var(--primary);
    box-shadow: 0 12px 28px -12px var(--primary-glow);
    transition: filter .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-buy:hover { transform: none; filter: brightness(1.06); box-shadow: 0 16px 32px -12px var(--primary-glow); }
.btn-ghost {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; height: 46px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit; font-size: 14px; font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-ghost-danger:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.deal-actions { gap: 8px; }
.action-btn {
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-card) !important;
    color: var(--text-secondary);
    transition: border-color .2s, color .2s;
}
.action-btn:hover { border-color: var(--border-strong) !important; color: var(--text); transform: none; }
.action-btn.liked, .action-btn.saved { border-color: var(--primary) !important; color: var(--primary); background: var(--primary-light) !important; }
@media (max-width: 768px) {
    /* 모바일: 구매 버튼을 하단 탭바 위에 고정 */
    .btn-buy {
        position: sticky;
        bottom: calc(72px + env(safe-area-inset-bottom));
        z-index: 50;
    }
}

/* ---------------------------------------------
   12. 푸터
   --------------------------------------------- */
.site-footer {
    margin-top: 72px;
    padding: 56px 24px 40px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}
.site-footer::before { display: none; }
.footer-inner { max-width: var(--container); }
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}
.footer-logo {
    display: flex; align-items: baseline; gap: 8px;
    font-size: 20px; font-weight: 800; letter-spacing: -0.04em;
    background: none; -webkit-text-fill-color: currentColor;
    color: var(--text);
    margin-bottom: 12px;
}
.footer-logo span { font-size: 10px; letter-spacing: .22em; color: var(--text-muted); font-weight: 700; }
.footer-desc { font-size: 13.5px; line-height: 1.7; color: var(--text-muted); max-width: 340px; margin-bottom: 16px; }
.footer-cta { font-size: 13.5px; font-weight: 700; color: var(--text); }
.footer-cta:hover { color: var(--primary); }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-heading { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.footer-link {
    padding: 0; border: none; background: none; border-radius: 0;
    font-size: 13.5px; color: var(--text-muted);
}
.footer-link:hover { color: var(--text); background: none; border: none; }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: left;
    opacity: 1;
    font-size: 12px;
    color: var(--text-muted);
}
.footer-notice { line-height: 1.7; margin-bottom: 14px; max-width: 760px; }
.footer-bottom-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-meta { display: flex; gap: 16px; }
.footer-meta a:hover { color: var(--text); }

/* ---------------------------------------------
   13. 모바일 하단 탭바
   --------------------------------------------- */
.mobile-bottom-bar {
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--border);
    box-shadow: none;
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.bottom-tab {
    flex: 1;
    gap: 3px;
    padding: 4px 0;
    color: var(--text-muted);
    border-radius: 10px;
}
.bottom-tab-icon { font-size: 0; display: flex; }
.bottom-tab-label { font-size: 10.5px; font-weight: 600; letter-spacing: -0.02em; }
.bottom-tab.active { color: var(--text); }
.bottom-tab.active .bottom-tab-icon { transform: none; }
.bottom-tab.active::before { display: none; }
.bottom-tab.active .ico { stroke-width: 2.2; }
.bottom-tab-cta .bottom-tab-icon {
    width: 40px; height: 30px;
    border-radius: 10px;
    align-items: center; justify-content: center;
    background: var(--ink); color: var(--bg);
}
.bottom-tab-cta .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.bottom-tab-cta.active .bottom-tab-icon { background: var(--primary); color: #fff; }

/* ---------------------------------------------
   14. 반응형
   --------------------------------------------- */
@media (max-width: 1023px) {
    .main-wrapper { grid-template-columns: 1fr; }
    .home-aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root { --header-h: 56px; }
    .header-inner { height: var(--header-h); padding: 0 12px 0 16px; gap: 8px; }
    .header-search { display: none !important; }
    .only-mobile { display: flex !important; }
    .hide-mobile { display: none !important; }
    .header-actions { margin-left: auto; gap: 0; }
    .logo-text { font-size: 18px; }
    .logo-sub { display: none; }
    .logo-mark, .logo-mark svg { width: 28px; height: 28px; }

    .site-nav { overflow-x: auto; scrollbar-width: none; }
    .site-nav::-webkit-scrollbar { display: none; }
    .site-nav-inner { height: 42px; padding: 0 8px; gap: 0; width: max-content; min-width: 100%; }
    .nav-link { height: 42px; padding: 0 10px; font-size: 14px; }
    .nav-link.active::after { left: 10px; right: 10px; }
    .nav-spacer { display: none; }

    .live-strip-inner { padding: 9px 16px; gap: 12px; }
    .live-tags { margin-left: 0; }

    .main-wrapper { padding: 16px 16px 0; gap: 28px; }

    .category-tabs { margin: 0 -16px 12px; padding: 0 8px; }
    .cat-tab { padding: 10px 9px 11px; font-size: 14.5px; }
    .platform-filter { margin: 0 -16px; padding: 0 16px; }
    .pf-btn { height: 32px; padding: 0 11px; font-size: 12.5px; }
    .filter-panel { margin-bottom: 12px; }

    .feed-head { margin: 12px 0 12px; align-items: center; }
    .feed-title { font-size: 18px; }
    .sort-btn { padding: 6px 7px; font-size: 12.5px; }
    .sort-btn.active::before { content: ''; }

    /* 모바일 2열 그리드 */
    .deals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; }
    .deal-thumb { border-radius: 12px; }
    .card-badges { top: 7px; left: 7px; right: 44px; }
    .badge { height: 20px; padding: 0 6px; font-size: 10.5px; border-radius: 5px; }
    .save-btn { top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 9px; }
    .deal-card-body { padding-top: 10px; }
    .deal-meta { font-size: 11.5px; }
    .deal-card-title { font-size: 13.5px; }
    .deal-sale-price, .deal-discount-badge { font-size: 16px; }
    .deal-stats { gap: 8px; }
    .deal-stat { font-size: 11.5px; }
    .deal-card .like-btn { height: 26px; padding: 0 7px; font-size: 11.5px; }

    .deals-grid.list-mode { grid-template-columns: none; }
    .deals-grid.list-mode .deal-card { padding: 12px 0; gap: 12px; }
    .deals-grid.list-mode .deal-card > .deal-thumb { width: 92px; height: 92px; }
    .deals-grid.list-mode .deal-card-title { font-size: 14px; }

    .home-aside { grid-template-columns: 1fr; }

    .site-footer { margin-top: 48px; padding: 40px 20px 24px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; padding-bottom: 28px; }
    .footer-col:last-child { display: none; }
    .footer-bottom-row { flex-direction: column; align-items: flex-start; }

    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important; }
    .site-footer { padding-bottom: 24px !important; }
}

@media (max-width: 360px) {
    .deals-grid { gap: 18px 8px; }
    .deal-sale-price, .deal-discount-badge { font-size: 15px; }
    .deal-stat:first-child { display: none; }
}
