/* Minimalist Premium Design - Price Comparison Page */

:root {
    --page-bg: #FFFFFF;
    --section-bg: #FFFFFF;
    /* Pure White */
    --card-bg: #FFFFFF;

    --text-primary: #191919;
    /* Standard Dark */
    --text-secondary: #666666;
    /* Clean Grey */
    --text-placeholder: #999999;

    --brand-orange: #ff6f0f;
    /* Original Brand Orange */
    --border-color: #E5E5E5;
    /* Subtle Border */
    --input-bg: #F8F9FA;

    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    font-family: var(--font-family) !important;
    overflow-x: hidden;
    min-height: 100vh;
}

html {
    background-color: #fff;
    /* Fallback */
}

/* Premium background pattern */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 10%, rgba(255, 111, 15, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 85% 90%, rgba(255, 111, 15, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%);
    z-index: -9999;
    pointer-events: none;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.main-content {
    background: transparent !important;
    padding-top: 60px;
}

/* 1. Intro Section (Typography Only) */
.intro-section {
    padding: 80px 0 60px;
    background: transparent;
    text-align: left;
    /* Distinctive left alignment */
    border: none;
    margin-bottom: 0;
}

.intro-section::before {
    display: none;
}

/* Remove pattern */

.intro-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.intro-title {
    font-size: 56px;
    font-weight: 800;
    /* Black weight */
    color: var(--text-primary);
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    background: none;
    -webkit-text-fill-color: initial;
    text-shadow: none;
}

.intro-title::after {
    display: none;
}

.intro-description {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    line-height: 1.6;
}

.intro-description::before {
    display: none;
}

/* Remove bulb icon */


/* 2. Search Section (Clean & Big) */
.search-section {
    margin-bottom: 60px;
}

.search-container {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-header {
    display: none;
}

/* Remove redundant header */

.search-box {
    display: flex;
    gap: 0;
    max-width: 100%;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    border-bottom: 2px solid #000;
    /* Key Design Element: Bold Underline */
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-bottom-color: var(--brand-orange);
}

.search-box .form-control {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    height: 70px;
}

.search-box .form-control::placeholder {
    color: #CCCCCC;
    font-weight: 400;
}

.search-box #compareBtn {
    background: transparent;
    color: var(--text-primary);
    border: none;
    font-size: 24px;
    padding: 0 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.search-box #compareBtn:hover {
    color: var(--brand-orange);
}


/* 3. Filters (Toggle Chips) */
.filter-group {
    margin-top: 30px;
}

.platform-checkboxes {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.platform-checkbox-label {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 100px;
    /* Pillow shape */
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-checkbox-label::before {
    display: none;
}

/* Remove shine */

.platform-checkbox-label:hover {
    border-color: #000;
    color: #000;
    transform: none;
    box-shadow: none;
    background: transparent;
}

/* Checked State */
.platform-checkbox-label:has(input[type="checkbox"]:checked) {
    background: #000;
    border-color: #000;
    color: #fff;
    box-shadow: none;
}

.platform-checkbox-label input[type="checkbox"]:checked+span {
    color: #fff;
    font-weight: 600;
}

.platform-checkbox-label input[type="checkbox"] {
    display: none;
    /* Hide default checkbox */
}

/* Popular Search Terms & Local Search */
.popular-search-terms {
    display: none;
}

/* Clean up clutter */
.region-change-box {
    display: none;
}

/* Hide for now to simplify */

/* Detail Filter Panel */
.detail-filter-panel {
    margin-bottom: 30px;
}

.detail-filter-panel .filter-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.detail-filter-panel .filter-panel .filter-groups-row {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-filter-panel .filter-panel .filter-group {
    flex: 1;
    min-width: 280px;
    margin-bottom: 0;
}

.detail-filter-panel .filter-panel .filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.detail-filter-panel .filter-panel .filter-group small {
    color: var(--text-placeholder);
    font-size: 12px;
    display: block;
    margin-top: 4px;
    line-height: 1.4;
}

.detail-filter-panel .keyword-input-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.detail-filter-panel .keyword-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-bg);
    transition: all 0.2s;
}

.detail-filter-panel .keyword-input-group input:focus {
    outline: none;
    border-color: var(--brand-orange);
    background: #fff;
}

.detail-filter-panel .keyword-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
}

.detail-filter-panel .keyword-item span {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.detail-filter-panel .keyword-item .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    background: var(--brand-orange);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.detail-filter-panel .keyword-item .btn-sm:hover {
    background: #e55f0a;
}

.detail-filter-panel .price-range-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.detail-filter-panel .price-range-inputs input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-bg);
    transition: all 0.2s;
}

.detail-filter-panel .price-range-inputs input:focus {
    outline: none;
    border-color: var(--brand-orange);
    background: #fff;
}

.detail-filter-panel .price-range-inputs span {
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-filter-panel .filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.detail-filter-panel .btn-outline {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.detail-filter-panel .btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: #f8f9fa;
}

.detail-filter-panel .btn-primary {
    padding: 10px 20px;
    background: var(--brand-orange);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.detail-filter-panel .btn-primary:hover {
    background: #e55f0a;
}

@media (max-width: 1200px) {
    .detail-filter-panel .filter-panel .filter-groups-row {
        flex-direction: column;
    }

    .detail-filter-panel .filter-panel .filter-group {
        min-width: 100%;
    }
}


.result-section {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-top: 40px;
    padding: 0;
}

.section-header {
    border-bottom: 1px solid #000;
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.section-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.section-header i {
    display: none;
}


.statistics-cards {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 30px;
    width: 100%;
}

.stat-card {
    flex: 1;
    background: #FAFAFA;
    border: 1px solid var(--border-color);
    box-shadow: none;
    padding: 16px;
    text-align: left;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-height: 80px;
}

.stat-card:hover {
    border-color: #000;
    transform: none;
}

.stat-card i {
    color: var(--brand-orange);
    font-size: 18px;
    position: absolute;
    top: 16px;
    right: 16px;
    margin: 0;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
}

.stat-unit {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 2px;
}


.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px !important;
}

.product-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    box-shadow: none;
    border-radius: 0;
    transition: all 0.2s ease;
    overflow: hidden;
}

.product-card::before {
    display: none;
}

.product-card:hover {
    border-color: #000;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.image-container {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    background: #F8F9FA;
    position: relative;
    overflow: hidden;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;

    object-position: center;
}


.image-container .platform-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #fff !important;

    z-index: 10;
}

.image-container .platform-badge.joongna {
    background: #e71d36;
    /* Red-ish for Joongna */
}

.image-container .platform-badge.bunjang {
    background: #d32f2f;
    /* Red for Bunjang */
}

.image-container .platform-badge.hellomarket {
    background: #2a9d8f;
    /* Teal for Hello */
}

.image-container .platform-badge.fleamarket {
    background: #03c75a;
    /* Naver Green */
}


/* Sort Controls */
.section-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-select {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

.custom-select:focus {
    border-color: #000;
}



.content {
    padding: 12px;
}

.content h6 {
    font-size: 13px;
    font-weight: 500;
    color: #000;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 36px;
    /* Fixed 2-line height */
}

.product-card:hover .content h6 {
    color: #000;
    text-decoration: underline;
}

.region-info {
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-time {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #F0F0F0;
}

.price {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    background: none;
    -webkit-text-fill-color: initial;
}

/* Tabs */
.platform-filter-tabs {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 30px;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
}

.platform-tab {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 12px 24px;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
}

.platform-tab:hover {
    color: #000;
    border-color: transparent;
}

.platform-tab.active {
    color: #000;
    font-weight: 700;
    border-bottom-color: var(--brand-orange);
    background: transparent;
}

.platform-tab .count {
    background: #F0F0F0;
    color: #666;
    font-size: 11px;
}

.platform-tab.active .count {
    background: #000;
    color: #fff;
}

/* Loading */
/* Loading - Skeleton UI */
.loading-spinner-container {
    display: none !important;
    /* Hide old spinner */
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.skeleton-card {
    background: #fff;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.skeleton-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
}

.skeleton-content {
    padding: 12px;
}

.skeleton-line {
    height: 12px;
    background: #f0f0f0;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 60%;
}

/* Shimmer Animation */
.skeleton-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   6. PAGINATION STYLES
   ======================================== */
#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
    padding: 20px 0;
}

#pagination button,
#pagination a,
.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#pagination button:hover,
#pagination a:hover,
.pagination-btn:hover {
    border-color: #000;
    color: #000;
}

#pagination button.active,
#pagination a.active,
.pagination-btn.active {
    background: #000;
    border-color: #000;
    color: #fff;
    font-weight: 700;
}

#pagination button:disabled,
.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========================================
   7. BUTTON STYLES (Search, Compare)
   ======================================== */
#compareBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 56px;
    background: var(--brand-orange);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

#compareBtn:hover {
    background: #e65f00;
}

.btn-primary {
    background: var(--brand-orange) !important;
    border: none !important;
    color: #fff !important;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #e65f00 !important;
}

/* ========================================
   8. RESPONSIVE TITLE (Clamp based)
   ======================================== */
.content h6 {
    font-size: clamp(11px, 1.2vw, 14px);
    /* Responsive: 11px ~ 14px */
    font-weight: 500;
    color: #000;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
    /* 2 lines */
    max-height: 2.8em;
}

.price {
    font-size: clamp(13px, 1.5vw, 16px);
}

.seo-guide-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.guide-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.guide-card:hover {
    border-color: #ff6f0f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.guide-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 111, 15, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.guide-icon i {
    font-size: 24px;
    color: #ff6f0f;
}

.guide-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
}

.guide-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 0;
}

@media(max-width:768px) {
    .guide-grid {
        grid-template-columns: 1fr;
    }
}