* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #ffffff;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 메인 검색 영역 */
.hero-section {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.hero-title {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 12px;
    color: #111;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 36px;
}

/* 검색 바 */
.search-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 760px;
}

.logo-text {
    font-size: 28px;
    font-weight: 900;
    color: #e51010;
    letter-spacing: -1px;
    white-space: nowrap;
    user-select: none;
}

.search-input-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    width: 18px;
    height: 18px;
    color: #888;
}

.search-input {
    width: 100%;
    height: 52px;
    padding: 0 20px 0 46px;
    border: 1.5px solid #dcdfe4;
    border-radius: 26px;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: #111;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input::placeholder {
    color: #9aa0a6;
}

.search-btn {
    height: 52px;
    padding: 0 32px;
    background-color: #e51010;
    color: #ffffff;
    border: none;
    border-radius: 26px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #cc0e0e;
}

/* 인기 검색어 태그 */
.popular-tags {
    margin-top: 18px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 13px;
}

.popular-label {
    color: #888;
    margin-right: 4px;
    align-self: center;
}

.tag-badge {
    background-color: #f1f3f5;
    color: #495057;
    padding: 6px 14px;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.tag-badge:hover {
    background-color: #e9ecef;
}

/* 검색 결과 대시보드 */
.results-section {
    display: none;
    padding-bottom: 60px;
}

.summary-bar {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.summary-title {
    font-weight: 800;
    font-size: 16px;
}

.summary-sub {
    color: #666;
}

.summary-metric {
    font-weight: 700;
    color: #e51010;
}

/* 랭킹 리스트 카드 */
.rank-card {
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 70px 100px 1fr 140px 130px;
    align-items: center;
    gap: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rank-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.rank-badge {
    font-size: 18px;
    font-weight: 900;
    color: #111;
    text-align: center;
}

.rank-badge.top-1 { color: #e51010; }
.rank-badge.top-2 { color: #2563eb; }
.rank-badge.top-3 { color: #16a34a; }

.thumb-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f3f5;
}

.item-info .mall-tag {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-info .item-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
}

.item-info .item-sub {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.price-info {
    text-align: right;
}

.price-info .final-price {
    font-size: 18px;
    font-weight: 900;
    color: #111;
}

.price-info .shipping-price {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.btn-buy {
    display: inline-block;
    text-align: center;
    padding: 10px 16px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-buy:hover {
    background: #333;
}

/* 로딩 스피너 */
.loading-wrap {
    display: none;
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e51010;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.loading-text {
    font-weight: 600;
    color: #555;
}

.no-result-text {
    text-align: center;
    padding: 40px;
    color: #888;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    .rank-card {
        grid-template-columns: 40px 70px 1fr;
        gap: 10px;
    }
    .price-info, .btn-buy {
        grid-column: span 3;
        text-align: left;
    }
}