/* ============================================
   Search Page - Toss Design System
   검색 페이지 전용 토스 스타일

   의존성:
   - css/design-tokens.css
   - css/toss-design-system.css
   - css/components/product-card.css
   ============================================ */

/* ========================================
   CSS Custom Properties (페이지 전용)
   ======================================== */
:root {
    --search-header-height: 80px;
    --search-filter-height: 60px;
    --search-content-padding-desktop: 40px;
    --search-content-padding-tablet: 24px;
    --search-content-padding-mobile: 16px;
}

/* ========================================
   Search Page Container
   ======================================== */
.search-page-container {
    width: 100%;
    min-height: calc(100vh - var(--search-header-height));
    display: flex;
    flex-direction: column;
    background: var(--toss-bg-white, #FFFFFF);
}

/* ========================================
   Search Header Section - REMOVED
   검색 헤더 섹션 제거됨 (2024-01)
   결과 수는 필터 바에 표시
   ======================================== */

/* ========================================
   Filter Section - Toss Style
   필터 버튼 영역
   ======================================== */
.filter-section {
    width: 100%;
    background: var(--toss-bg-white, #FFFFFF);
    border-bottom: none;
    padding: 16px var(--search-content-padding-desktop);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.filter-section.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.filter-section.has-subcategories {
    border-bottom: none;
}

/* ========================================
   Results Count - Filter Bar Style
   ======================================== */
.results-count {
    margin-left: auto;
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--toss-text-secondary, #4E5968);
    white-space: nowrap;
}

/* ========================================
   Filter Buttons - Toss Chip Style
   ======================================== */
.filter-button,
.location-filter-btn,
.discount-toggle,
.price-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 10px 16px;

    /* Visual - Toss Style */
    background: var(--toss-bg-grouped-base, #F7F8F9);
    border: none;
    border-radius: var(--toss-radius-md, 12px);

    /* Typography */
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--toss-text-secondary, #4E5968);

    /* Interaction */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.filter-button:hover,
.location-filter-btn:hover,
.discount-toggle:hover,
.price-filter-button:hover {
    background: var(--toss-line-normal, #E5E8EB);
    color: var(--toss-text-primary, #191F28);
}

/* Press feedback - Toss signature */
.filter-button:active,
.location-filter-btn:active,
.discount-toggle:active,
.price-filter-button:active {
    transform: scale(0.96);
}

/* Focus state - Accessibility */
.filter-button:focus-visible,
.location-filter-btn:focus-visible,
.discount-toggle:focus-visible,
.price-filter-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.3);
}

/* Active state - Toss Blue */
.filter-button.active {
    background: var(--toss-blue-primary, #3182F6);
    color: #FFFFFF;
    border: none;
}

.filter-button.active:hover {
    background: var(--toss-blue-secondary, #1B64DA);
}

/* Location filter active - Light blue */
.location-filter-btn.active {
    background: var(--toss-blue-light, #E8F3FF);
    color: var(--toss-blue-primary, #3182F6);
    border: none;
}

.location-filter-btn.active svg path {
    fill: var(--toss-blue-primary, #3182F6);
}

/* Discount toggle active - Green tint */
.discount-toggle.active {
    background: rgba(55, 210, 141, 0.12);
    color: var(--toss-status-success, #37D28D);
    border: none;
}

.discount-toggle.active svg path {
    stroke: var(--toss-status-success, #37D28D);
}

/* Price filter active */
.price-filter-button.active {
    background: var(--toss-blue-light, #E8F3FF);
    color: var(--toss-blue-primary, #3182F6);
    border: none;
}

.price-filter-button.active svg {
    transform: rotate(180deg);
}

.price-filter-button.active svg path {
    stroke: var(--toss-blue-primary, #3182F6);
}

/* Remove shimmer effects */
.filter-button.active::before,
.filter-button.active::after,
.location-filter-btn.active::before,
.location-filter-btn.active::after,
.discount-toggle.active::before,
.discount-toggle.active::after,
.price-filter-button.active::before,
.price-filter-button.active::after {
    display: none;
    content: none;
}

/* ========================================
   Filter Groups
   ======================================== */
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.location-filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========================================
   Distance Buttons - Toss Style
   ======================================== */
.distance-buttons {
    display: flex;
    gap: 8px;
    margin-top: 0;
    flex-wrap: wrap;
}

.distance-btn {
    padding: 8px 14px;
    background: var(--toss-bg-white, #FFFFFF);
    border: 1px solid var(--toss-line-normal, #E5E8EB);
    border-radius: var(--toss-radius-sm, 8px);
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--toss-text-tertiary, #8B95A1);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    white-space: nowrap;
}

.distance-btn:hover {
    border-color: var(--toss-line-emphasized, #D1D6DB);
    background: var(--toss-bg-grouped-base, #F7F8F9);
    color: var(--toss-text-secondary, #4E5968);
}

.distance-btn:active {
    transform: scale(0.96);
}

.distance-btn.active {
    background: var(--toss-blue-primary, #3182F6);
    border-color: var(--toss-blue-primary, #3182F6);
    color: #FFFFFF;
}

/* ========================================
   Price Filter Dropdown - Toss Style
   ======================================== */
.price-filter-container {
    position: relative;
    display: inline-block;
}

.price-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;

    background: var(--toss-bg-white, #FFFFFF);
    border: none;
    border-radius: var(--toss-radius-xl, 24px);
    box-shadow: var(--toss-shadow-floating, 0 20px 60px rgba(0, 0, 0, 0.12));

    padding: 24px;
    min-width: 420px;
    z-index: 1000;

    /* Animation */
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.price-dropdown-panel.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.price-panel-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--toss-text-primary, #191F28);
    margin-bottom: 20px;
}

/* Price Quick Buttons */
.price-quick-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.price-quick-btn {
    padding: 12px 8px;
    border: none;
    background: var(--toss-bg-grouped-base, #F7F8F9);
    border-radius: var(--toss-radius-sm, 8px);
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--toss-text-secondary, #4E5968);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.price-quick-btn:hover {
    background: var(--toss-line-normal, #E5E8EB);
    color: var(--toss-text-primary, #191F28);
}

.price-quick-btn:active {
    background: var(--toss-blue-light, #E8F3FF);
    color: var(--toss-blue-primary, #3182F6);
    transform: scale(0.96);
}

/* Price Input Row */
.price-input-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.price-adjust-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--toss-bg-grouped-base, #F7F8F9);
    border-radius: var(--toss-radius-sm, 8px);
    font-size: 18px;
    font-weight: 500;
    color: var(--toss-text-secondary, #4E5968);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    flex-shrink: 0;
}

.price-adjust-btn:hover {
    background: var(--toss-line-normal, #E5E8EB);
    color: var(--toss-text-primary, #191F28);
}

.price-adjust-btn:active {
    transform: scale(0.94);
    background: var(--toss-blue-light, #E8F3FF);
    color: var(--toss-blue-primary, #3182F6);
}

.price-input-wrapper {
    position: relative;
    flex: 1;
}

.price-input-wrapper input {
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: var(--toss-bg-grouped-base, #F7F8F9);
    border-radius: var(--toss-radius-md, 12px);
    font-family: 'Pretendard', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--toss-text-primary, #191F28);
    text-align: center;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.price-input-wrapper input:focus {
    outline: none;
    background: var(--toss-bg-white, #FFFFFF);
    box-shadow: 0 0 0 2px var(--toss-blue-primary, #3182F6);
}

.price-input-wrapper input::placeholder {
    color: var(--toss-text-placeholder, #B0B8C1);
}

.price-input-wrapper label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Pretendard', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--toss-text-tertiary, #8B95A1);
    white-space: nowrap;
}

.price-separator {
    font-size: 18px;
    font-weight: 500;
    color: var(--toss-text-tertiary, #8B95A1);
    flex-shrink: 0;
}

/* Price Reset Button */
.price-reset-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 10px 0;
    margin-left: auto;
    margin-top: 12px;
    background: transparent;
    border: none;
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--toss-text-tertiary, #8B95A1);
    cursor: pointer;
    transition: color 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.price-reset-btn:hover {
    color: var(--toss-status-error, #DE362F);
}

/* ========================================
   Subcategory Section - Toss Style
   ======================================== */
.additional-tab-section {
    width: 100%;
    background: var(--toss-bg-white, #FFFFFF);
    border-top: 1px solid var(--toss-line-weak, #F2F4F6);
    border-bottom: 1px solid var(--toss-line-weak, #F2F4F6);
    padding: 12px var(--search-content-padding-desktop);
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.additional-tab-section.has-subcategories {
    display: flex;
}

.subcategory-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    animation: tossFadeIn 0.3s ease;
}

@keyframes tossFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subcategory-filter {
    padding: 10px 16px;
    background: var(--toss-bg-grouped-base, #F7F8F9);
    border: none;
    border-radius: var(--toss-radius-md, 12px);
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--toss-text-secondary, #4E5968);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.subcategory-filter:hover {
    background: var(--toss-line-normal, #E5E8EB);
    color: var(--toss-text-primary, #191F28);
}

.subcategory-filter:active {
    transform: scale(0.96);
}

.subcategory-filter.active {
    background: var(--toss-blue-primary, #3182F6);
    color: #FFFFFF;
}

.subcategory-filter.active::before,
.subcategory-filter.active::after {
    display: none;
    content: none;
}

/* ========================================
   Sort Select - Toss Style
   ======================================== */
.sort-select {
    height: 44px;
    padding: 0 36px 0 14px;
    background: var(--toss-bg-grouped-base, #F7F8F9);
    border: none;
    border-radius: var(--toss-radius-md, 12px);
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--toss-text-secondary, #4E5968);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%234E5968' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.sort-select:hover {
    background-color: var(--toss-line-normal, #E5E8EB);
    color: var(--toss-text-primary, #191F28);
}

.sort-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--toss-blue-primary, #3182F6);
}

/* ========================================
   Search Results Section - Toss Style
   ======================================== */
.search-results-section {
    flex: 1;
    padding: 24px var(--search-content-padding-desktop);
    background: var(--toss-bg-base, #F2F4F6);
    border-radius: var(--toss-radius-xl, 24px) var(--toss-radius-xl, 24px) 0 0;
    overflow-y: auto;
}

/* Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding-bottom: 40px;
}

/* Empty State */
.search-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.search-empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.search-empty-state .empty-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--toss-text-primary, #191F28);
    margin: 0 0 8px 0;
}

.search-empty-state .empty-subtitle {
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--toss-text-tertiary, #8B95A1);
    margin: 0;
}

/* Keyword Highlight */
.keyword-highlight {
    background: linear-gradient(to top, rgba(49, 130, 246, 0.2) 40%, transparent 40%);
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

/* ========================================
   Mobile Filter Sheet - Toss Style
   ======================================== */
.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.mobile-filter-overlay.active {
    opacity: 1;
}

.mobile-filter-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--toss-bg-white, #FFFFFF);
    border-radius: var(--toss-radius-2xl, 32px) var(--toss-radius-2xl, 32px) 0 0;
    box-shadow: var(--toss-shadow-floating, 0 20px 60px rgba(0, 0, 0, 0.12));
    z-index: 10001;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.mobile-filter-sheet.active {
    transform: translateY(0);
}

/* Drag Handle */
.mobile-filter-sheet::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--toss-line-emphasized, #D1D6DB);
    border-radius: 2px;
}

.mobile-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 24px 20px;
    border-bottom: none;
    position: sticky;
    top: 0;
    background: var(--toss-bg-white, #FFFFFF);
    z-index: 10;
}

.mobile-filter-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--toss-text-primary, #191F28);
}

.mobile-filter-close {
    background: var(--toss-bg-grouped-base, #F7F8F9);
    border: none;
    font-size: 20px;
    color: var(--toss-text-secondary, #4E5968);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--toss-radius-full, 9999px);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.mobile-filter-close:hover {
    background: var(--toss-line-normal, #E5E8EB);
}

.mobile-filter-close:active {
    transform: scale(0.94);
}

.mobile-filter-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.mobile-filter-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-filter-group-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--toss-text-primary, #191F28);
}

.mobile-filter-actions {
    position: sticky;
    bottom: 0;
    background: var(--toss-bg-white, #FFFFFF);
    padding: 20px 24px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    border-top: none;
    display: flex;
    gap: 12px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.mobile-filter-reset-btn {
    flex: 1;
    padding: 16px;
    background: var(--toss-bg-grouped-base, #F7F8F9);
    border: none;
    border-radius: var(--toss-radius-md, 12px);
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--toss-text-secondary, #4E5968);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.mobile-filter-reset-btn:hover {
    background: var(--toss-line-normal, #E5E8EB);
}

.mobile-filter-reset-btn:active {
    transform: scale(0.98);
}

.mobile-filter-apply-btn {
    flex: 2;
    padding: 16px;
    background: var(--toss-blue-primary, #3182F6);
    border: none;
    border-radius: var(--toss-radius-md, 12px);
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.mobile-filter-apply-btn:hover {
    background: var(--toss-blue-secondary, #1B64DA);
}

.mobile-filter-apply-btn:active {
    transform: scale(0.98);
}

/* Mobile filter toggle button (hidden on desktop) */
.mobile-filter-toggle {
    display: none;
}

/* ========================================
   Card Hover Effects - Toss Floating Card Style
   ======================================== */
.search-results-grid .deal-card {
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1),
                box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
    border-radius: var(--toss-radius-lg, 16px);
    background: var(--toss-bg-white, #FFFFFF);
    /* Toss Floating Card Shadow - 미세한 그림자로 떠있는 느낌 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
                0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.search-results-grid .deal-card:hover {
    transform: translateY(-4px);
    /* Hover 시 그림자 강화 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
                0 16px 40px rgba(0, 0, 0, 0.06);
}

.search-results-grid .deal-card:active {
    transform: translateY(-2px) scale(0.99);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.search-results-grid .deal-card-image {
    border-radius: var(--toss-radius-md, 12px) var(--toss-radius-md, 12px) 0 0;
    overflow: hidden;
}

/* Card Info - 데스크톱 좌우 패딩 8px */
.search-results-grid .deal-card-info {
    padding: 0 8px 12px 8px;
}

/* ========================================
   Responsive - Tablet (768px - 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .toss-search-header,
    .search-info-section {
        padding: 20px var(--search-content-padding-tablet) 12px;
    }

    .filter-section {
        padding: 14px var(--search-content-padding-tablet);
        gap: 10px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .filter-section::-webkit-scrollbar {
        display: none;
    }

    .filter-button,
    .price-filter-button,
    .discount-toggle,
    .location-filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .category-filters {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .additional-tab-section {
        padding: 12px var(--search-content-padding-tablet);
    }

    .search-results-section {
        padding: 20px var(--search-content-padding-tablet);
        border-radius: var(--toss-radius-lg, 16px) var(--toss-radius-lg, 16px) 0 0;
    }

    .search-results-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .price-dropdown-panel {
        min-width: 360px;
    }
}

/* ========================================
   Responsive - Mobile (< 768px)
   ======================================== */
@media (max-width: 767px) {
    .toss-search-header,
    .search-info-section {
        padding: 16px var(--search-content-padding-mobile) 12px;
    }

    .toss-search-title,
    .search-info-section .notion-section-title {
        font-size: 18px;
    }

    .search-results-description,
    #search-results-count {
        padding-left: 28px;
        font-size: 13px;
    }

    .filter-section {
        padding: 12px var(--search-content-padding-mobile);
        gap: 8px;
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .filter-section::-webkit-scrollbar {
        display: none;
    }

    .filter-button,
    .price-filter-button,
    .discount-toggle,
    .location-filter-btn,
    .subcategory-filter {
        flex-shrink: 0;
        white-space: nowrap;
        height: 40px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .category-filters {
        display: flex;
        flex-wrap: nowrap;
        flex-shrink: 0;
        gap: 6px;
    }

    .sort-select {
        height: 40px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .additional-tab-section {
        padding: 0;
        gap: 8px;
        display: none;
        overflow-x: auto;
        flex-wrap: nowrap;
        border-top: none;
        border-bottom: none;
        height: 0;
        min-height: 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .additional-tab-section.has-subcategories {
        display: flex;
        padding: 12px var(--search-content-padding-mobile);
        border-top: 1px solid var(--toss-line-weak, #F2F4F6);
        border-bottom: 1px solid var(--toss-line-weak, #F2F4F6);
        height: auto;
    }

    .additional-tab-section::-webkit-scrollbar {
        display: none;
    }

    #subcategory-container {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        width: max-content;
    }

    #subcategory-container .subcategory-filter {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Mobile: index.html 스타일 - 흰색 배경 */
    .search-results-section {
        padding: 16px var(--search-content-padding-mobile);
        background: white;
        border-radius: 0;
    }

    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Mobile Card - index.html 스타일 (그림자/테두리 없음) */
    .search-results-grid .deal-card {
        box-shadow: none;
        border: none;
        background: white;
    }

    .search-results-grid .deal-card:hover {
        box-shadow: none;
    }

    /* 모바일 카드 info - 좌우 패딩 제거 */
    .search-results-grid .deal-card-info {
        padding: 0 0 12px 0;
    }

    /* 모바일 할인가 - 할인율(14px)과 동일한 폰트 사이즈 */
    .search-results-grid .deal-current-price {
        font-size: 14px;
    }

    /* Mobile Bottom Sheet enhancements */
    .mobile-filter-sheet {
        max-height: 90vh;
    }

    .mobile-filter-header {
        padding: 28px 20px 16px;
    }

    .mobile-filter-content {
        padding: 20px;
    }

    .mobile-filter-actions {
        padding: 16px 20px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    /* Price Quick Buttons - Mobile Grid */
    .price-quick-buttons.mobile {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .price-input-row.mobile {
        gap: 8px;
    }

    .price-reset-btn.mobile {
        justify-content: center;
        padding: 14px;
        background: var(--toss-bg-grouped-base, #F7F8F9);
        border-radius: var(--toss-radius-md, 12px);
        margin-top: 16px;
        width: 100%;
    }

    .price-dropdown-panel {
        min-width: 320px;
        left: 50%;
        transform: translateX(-50%);
    }

    .price-dropdown-panel.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   Wide Desktop (1200px - 1599px)
   ======================================== */
@media (min-width: 1200px) and (max-width: 1599px) {
    .search-results-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ========================================
   Ultra Wide (1600px - 1920px)
   ======================================== */
@media (min-width: 1600px) and (max-width: 1920px) {
    .search-results-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ========================================
   Ultra Wide (1921px+)
   ======================================== */
@media (min-width: 1921px) {
    .search-results-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

/* ========================================
   Accessibility Enhancements
   ======================================== */
/* High Contrast Mode */
@media (prefers-contrast: high) {
    .filter-button,
    .location-filter-btn,
    .discount-toggle,
    .price-filter-button {
        border: 2px solid var(--toss-text-primary, #191F28);
    }

    .filter-button.active,
    .location-filter-btn.active,
    .discount-toggle.active {
        border-color: currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Scrollbar - Toss Style
   ======================================== */
.search-results-section::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.search-results-section::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-section::-webkit-scrollbar-thumb {
    background: var(--toss-line-emphasized, #D1D6DB);
    border-radius: 3px;
}

.search-results-section::-webkit-scrollbar-thumb:hover {
    background: var(--toss-text-tertiary, #8B95A1);
}

/* ========================================
   Staggered Animation for Cards
   검색 결과 그리드 전용 (product-card.css와 충돌 방지)
   ======================================== */
.search-results-grid .deal-card {
    animation: tossCardFadeIn 0.3s cubic-bezier(0.2, 0, 0, 1) forwards !important;
    opacity: 0;
}

@keyframes tossCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-grid .deal-card:nth-child(1) { animation-delay: 0ms; }
.search-results-grid .deal-card:nth-child(2) { animation-delay: 30ms; }
.search-results-grid .deal-card:nth-child(3) { animation-delay: 60ms; }
.search-results-grid .deal-card:nth-child(4) { animation-delay: 90ms; }
.search-results-grid .deal-card:nth-child(5) { animation-delay: 120ms; }
.search-results-grid .deal-card:nth-child(6) { animation-delay: 150ms; }
.search-results-grid .deal-card:nth-child(7) { animation-delay: 180ms; }
.search-results-grid .deal-card:nth-child(8) { animation-delay: 210ms; }
.search-results-grid .deal-card:nth-child(9) { animation-delay: 240ms; }
.search-results-grid .deal-card:nth-child(10) { animation-delay: 270ms; }
