/* ===================================================
   Market Home
   =================================================== */

/* ===== Hero ===== */
.market-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f2027 100%);
    padding: 64px 24px 56px;
}

.market-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.market-hero-eyebrow {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #14b8a6;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.market-hero-title {
    font-size: 2.625rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 16px;
    word-break: keep-all;
}

.market-hero-highlight {
    background: linear-gradient(90deg, #14b8a6, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.market-hero-desc {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
    word-break: keep-all;
}

/* 통계 */
.market-hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px 32px;
    width: fit-content;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 28px;
}

.stat-num {
    font-size: 1.625rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

/* 배경 블롭 */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.hero-blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(20, 184, 166, 0.18);
    top: -100px;
    right: 10%;
}

.hero-blob-2 {
    width: 300px;
    height: 300px;
    background: rgba(56, 189, 248, 0.12);
    bottom: -80px;
    right: 30%;
}

/* ===== 카테고리 탭 바 ===== */
.market-category-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 73px;
    z-index: 50;
}

.category-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 12px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: none;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.category-btn:hover {
    color: #111;
    background: #f3f4f6;
}

.category-btn.active {
    color: #0f766e;
    background: #ccfbf1;
    border-color: #99f6e4;
    font-weight: 600;
}

/* ===== 공통 래퍼 ===== */
.market-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 목록 헤더 ===== */
.market-list-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 28px 0 16px;
}

.market-list-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.market-list-count {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 400;
}

/* ===== 빈 상태 ===== */
.market-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 80px 0;
}

.market-empty-icon {
    font-size: 3rem;
}

.market-empty-msg {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0;
}

/* ===== 상품 그리드 ===== */
.market-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding-bottom: 64px;
}

/* ===== 상품 카드 ===== */
.market-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* 썸네일 */
.market-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 10px;
}

.market-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.market-card:hover .market-card-thumb img {
    transform: scale(1.05);
}

/* 기간 뱃지 */
.market-card-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* 카드 본문 */
.market-card-body {
    padding: 10px 2px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* 여행사명 */
.market-card-agency {
    display: flex;
    align-items: center;
}

.agency-name {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #0f766e;
    background: #f0fdf9;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #ccfbf1;
}

/* 상품명 */
.market-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: keep-all;
}

/* 가격 */
.market-card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 4px;
}

.price-from {
    font-size: 0.6875rem;
    color: #9ca3af;
}

.price-value {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #111;
}

/* 출발일 */
.market-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6875rem;
    margin-top: 1px;
}

.date-label {
    color: #d1d5db;
    font-weight: 500;
}

.date-value {
    color: #9ca3af;
}

/* ===== 반응형 ===== */
@media (max-width: 1200px) {
    .market-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .market-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .market-hero-title {
        font-size: 2rem;
    }

    .market-hero-stats {
        padding: 16px 20px;
    }

    .stat-item {
        padding: 0 20px;
    }
}

@media (max-width: 640px) {
    .market-hero {
        padding: 48px 20px 40px;
    }

    .market-hero-title {
        font-size: 1.625rem;
    }

    .market-hero-stats {
        width: 100%;
        justify-content: space-around;
        padding: 16px 12px;
    }

    .stat-item {
        padding: 0 12px;
    }

    .stat-num {
        font-size: 1.25rem;
    }

    .market-wrap {
        padding: 0 12px;
    }

    .market-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding-bottom: 48px;
    }

    .market-card-title {
        font-size: 0.8125rem;
    }

    .price-value {
        font-size: 0.9375rem;
    }

    .market-category-bar {
        top: 64px;
    }
}

@media (max-width: 480px) {
    .market-hero {
        padding: 32px 16px 28px;
    }

    .market-hero-title {
        font-size: 1.375rem;
    }

    .market-wrap {
        padding: 0 16px;
    }

    .market-grid {
        grid-template-columns: 1fr;
    }
}
