
/* 할인율 표시 색상 규칙 */
.discount-rate { margin-right: 4px; font-weight: 700; }
.discount-rate-high { color: #dc2626; }   /* 60% 이상: 빨강 */
.discount-rate-medium { color: #1d4ed8; } /* 30% 이상: 파랑 (가격 바뀜 버튼 계열) */
.discount-rate-low { color: #111827; }    /* 30% 이하: 검정 */
/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2px;
    padding-top: 0 !important; /* 컨테이너 상단 패딩 제거 - product-list가 직접 조정 */
}

/* PC: 상품리스트가 카테고리바 바로 아래 오도록 */
@media screen and (min-width: 769px) {
    /* 카테고리바의 정확한 하단 계산: 헤더(42px) + 카테고리바 높이 */
    /* 헤더 top: 42px + 카테고리바(padding 2px*2=4px + border 1px*2=2px + 내용물 약25-30px) = 약73-78px */
    /* 더 안전하게 80px로 설정하여 확실히 카테고리바 아래로 */
    
    /* PC에서 main-content를 정렬바 하단 아래로 아주 조금 내리기 */
    .main-content {
        margin-top: 87px !important; /* 헤더(42px) + 카테고리바(18px) + 여백(2.5px) + 정렬바(18px) + 여유(6.5px) = 87px - 정렬바 바로 아래 조금 */
        padding-top: 0 !important;
    }
    
    /* PC에서 상품 리스트를 정렬바 하단 아래로 아주 조금 내리기 */
    #productList,
    #productList.product-list,
    .product-list {
        margin-top: 6.5px !important; /* 정렬바 바로 아래 조금 */
        padding-top: 0 !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* searchResults도 함께 내리기 */
    .search-results {
        margin-top: 6.5px !important;
    }
    
    /* 모든 하위 요소의 margin-top 제거 */
    .main-content > * {
        margin-top: 0 !important;
    }
    
    .product-item {
        position: relative !important;
        z-index: 1 !important;
    }
}


/* 헤더 스타일 */
.header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 4px 8px 0px 4px !important; /* 하단 패딩 0으로 변경 */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important; /* 하단 테두리 제거 */
    gap: 8px;
    min-height: auto;
    z-index: 100000 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.header-left,
.header-right {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 2px;
}

.header-center {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    margin: 0;
}

/* 로고 최상단 좌측 고정 */
.logo {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
}

/* PC용 버튼 그룹 스타일 */
.pc-button-group {
    display: none !important; /* 기본적으로 숨김 */
    margin-left: auto; /* 오른쪽 끝으로 밀기 */
}

.pc-button-group .header-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 400;
    height: auto;
    margin: 0;
    border-radius: 3px;
    min-width: auto;
    line-height: 1.2;
    display: flex;
    visibility: visible;
}

/* 모바일용 최상단 버튼 바 스타일 */
.top-button-bar.mobile-only {
    display: none !important; /* 기본적으로 숨김 */
}

/* PC 버전 - 헤더 안의 버튼들 표시 */
@media screen and (min-width: 769px) {
    /* 관리자 패널 내부 제품 카드 너비 제한 */
    .all-products, .pending-products, .price-reports {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 상품 카드 너비 제한 */
    .all-product-item, .pending-product-item, .price-report-item {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 공지사항 제목 줄바꿈 방지 */
    .notice-header h4 {
        white-space: nowrap;
        word-break: keep-all;
    }
    
    /* 공지사항 버튼 최소화 및 아이콘과 텍스트 같은 줄에 표시 */
    .notice-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
        min-width: auto;
        display: inline-flex;
        align-items: center;
        gap: 3px;
    }
    
    .pc-button-group {
        display: flex !important;
        gap: 4px !important;
        align-items: center !important;
        margin-left: auto !important; /* 오른쪽 끝으로 밀기 */
    }
    
    .top-button-bar.mobile-only {
        display: none !important; /* 모바일용 버튼 바 숨김 */
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* 로컬 환경에서 로고를 왼쪽 끝으로 이동 */
    .logo {
        text-align: left !important;
        justify-self: start !important;
        width: auto !important;
        font-size: 1.32rem !important; /* 원래 크기로 복원 */
    }
    
    .header-center {
        justify-content: flex-start !important;
        align-items: center !important;
    }
    
    .header {
        display: flex !important;
        grid-template-columns: none !important;
        align-items: center !important;
    }
    
    .header-left {
        grid-column: unset !important;
        flex: 1 !important;
    }
    
    .header-right {
        grid-column: unset !important;
        flex: 0 0 auto !important;
    }
    
    /* 헤더 레이아웃 조정 - 3번째 상품 가운데 정렬 */
    .header {
        margin-top: 0 !important; /* 상단 마진 제거 */
        margin-bottom: 1px;
        padding: 4px 8px; /* 패딩 조정 */
        gap: 8px;
        position: relative;
        min-height: auto;
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr !important; /* 5개 컬럼으로 상품과 동일 */
        align-items: center !important;
    }
    
    .header-left {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        grid-column: 1 / 3 !important; /* 1-2번째 상품 영역 */
    }
    
    .header-center {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        grid-column: 3 !important; /* 3번째 상품 영역에 정확히 배치 */
    }
    
    .header-right {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        justify-content: flex-end !important; /* 오른쪽 끝 정렬 */
        grid-column: 4 / 6 !important; /* 4-5번째 상품 영역 */
    }
    
    /* PC용 로고 스타일 - 크기 1.5배, 가운데 정렬 */
    .logo {
        font-size: 1.98rem !important; /* 1.32rem * 1.5 = 1.98rem */
        font-weight: 600 !important;
        color: #1e40af !important; /* 원래 파란색으로 복원 */
        margin: 0 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        width: 100% !important;
    }
}

/* 모바일 버전 - 최상단 버튼 바만 고정 */
@media screen and (max-width: 768px) {
    /* PC용 버튼 그룹 숨김 */
    .pc-button-group {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* 모바일용 최상단 버튼 바 표시 */
    .top-button-bar.mobile-only {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: auto !important;
        padding: 0px !important;
        margin: 0 !important;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
        border-bottom-left-radius: 4px !important;
        border: 1px solid #e2e8f0 !important;
        z-index: 2147483646 !important; /* 드롭다운보다 1 낮지만 거의 최대값 */
        justify-content: flex-end !important;
        gap: 1px !important;
        height: auto !important;
        max-width: calc(100vw - 20px) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .top-button-bar.mobile-only .header-btn {
        padding: 0px !important;
        font-size: 0.825rem;
        font-weight: 400;
        height: auto !important;
        margin: 0 !important;
        border-radius: 0px !important;
        min-width: auto !important;
        line-height: 0.6 !important;
    }
    
    /* 기존 헤더 (절대방어 쇼핑 로고) - 최상단 완전 고정 */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        margin-top: 0px !important;
        padding: 4px 8px 4px 4px !important; /* 상단 4px, 좌측 4px(최소), 우측 8px */
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important; /* PC와 같은 연한회색 배경 */
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        height: auto !important;
        min-height: auto !important;
        display: flex !important;
        justify-content: flex-start !important; /* 좌측 정렬 */
        align-items: center !important;
        z-index: 9999 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .header-left {
        display: flex !important;
        justify-content: flex-start !important; /* 좌측 정렬 */
        align-items: center !important;
        gap: 0px !important;
        padding: 0px !important;
        margin: 0px !important;
        height: auto !important;
        min-height: auto !important;
        flex: 0 0 auto !important;
    }
    
    .header-center {
        display: flex !important;
        justify-content: flex-start !important; /* 좌측 정렬 */
        align-items: center !important;
        gap: 0px !important;
        padding: 0px 4px !important; /* 패딩 최소화 - 로고를 좌측 모서리에 가깝게 */
        margin: 0px !important;
        height: auto !important;
        min-height: auto !important;
        flex: 0 0 auto !important;
    }
    
    .header-right {
        display: flex !important;
        justify-content: flex-end !important; /* 우측 정렬 */
        align-items: center !important;
        gap: 0px !important;
        padding: 0px !important;
        margin: 0px !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .logo {
        font-size: 1.98rem !important;
        height: auto !important;
        margin: 0px !important;
        padding: 0px !important;
        line-height: 0.9 !important; /* 라인 높이 최소화 */
        text-align: left !important; /* 좌측 정렬 */
        justify-self: start !important; /* 그리드에서 좌측 시작 */
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
    }
    
    /* 모바일: body 배경색 변경 - 로고와 카테고리바 사이 여백 포함 */
    body {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    }
    
    /* 컨테이너와 카테고리 바 정상 위치 */
    .container {
        padding: 0px !important;  /* 모든 패딩 제거 */
        padding-top: 0 !important; /* 상단 패딩 제거 - product-list가 직접 조정 */
        margin: 0 !important;
        background: transparent !important; /* body 배경색 상속 */
    }
    
    .category-bar {
        position: fixed !important;
        top: 42px !important; /* 헤더 바로 아래 */
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 2px 4px !important;
        border-bottom: none !important; /* 정렬 바와 여백 0 */
        z-index: 100000 !important; /* 드롭다운보다 낮지만 버튼보다 높음 */
        width: 100% !important;
        box-sizing: border-box !important;
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
    }
    
    /* 모바일: 정렬 바 스타일 - 카테고리 바와 동일한 높이, 상하 외부 여백 제거 */
    .sort-bar {
        position: fixed !important;
        top: 62.5px !important; /* 헤더(42px) + 카테고리바(18px) + 여백(2.5px) = 62.5px */
        left: 0 !important;
        right: 0 !important;
        padding: 0 4px !important; /* 상하 외부 여백 제거 (0), 좌우만 유지 */
        gap: 2px !important; /* 카테고리 바와 동일한 gap */
        margin: 0 !important;
        z-index: 9998 !important; /* 최상단 버튼바(2147483646)보다 훨씬 낮게, 카테고리바(100000)보다도 낮게, 기본값(9997)보다 약간 높게 */
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
        border-top: none !important; /* 카테고리 바와의 경계선 제거 (여백 0) */
        border-bottom: none !important; /* 하단 경계선도 제거 (상품 리스트와 여백 0) */
        overflow-x: auto !important;
        white-space: nowrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
        pointer-events: auto !important;
        -webkit-overflow-scrolling: touch !important;
        align-items: center !important; /* 카테고리 바와 동일하게 중앙 정렬 */
        min-height: 18px !important; /* 카테고리 바와 동일한 높이 */
    }
    
    .sort-item {
        padding: 2px 3px !important; /* 상하 내부 여백으로 높이 유지 (카테고리 아이템과 비슷한 높이) */
        font-size: 0.65rem !important; /* 카테고리 아이템과 동일한 font-size */
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.3) !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important; /* 카테고리 아이템과 동일하게 중앙 정렬 */
        border-radius: 3px !important; /* 카테고리 아이템과 동일한 border-radius */
    }
    
    /* 모바일: 상품리스트가 정렬바 바로 아래 오도록 (여백 0) */
    #productList {
        margin-top: 0 !important;
        padding-top: 93.5px !important; /* 헤더(42px) + 카테고리바(18px) + 여백(2.5px) + 정렬바(18px) + 여유(13px) = 93.5px - 정렬바 아래 조금 더 */
        position: relative !important;
        z-index: 1 !important; /* 카테고리바(z-index:100000)보다 낮게 */
        pointer-events: auto !important;
    }
    
    .product-list {
        margin-top: 13px !important; /* 정렬바 바로 아래 조금 더 (6.5px + 6.5px) */
        padding-top: 0 !important;
        position: relative !important;
        z-index: 1 !important;
        pointer-events: auto !important;
    }
    
    .product-item {
        position: relative !important;
        z-index: 1 !important;
        pointer-events: auto !important;
    }
    
    .main-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* #productList의 padding-top은 모바일 미디어 쿼리(위쪽)에서 설정됨 */
}

/* PC 버전 - 신고칸 두 배로 늘리고 필독 바로 왼쪽으로 붙이기 */
@media (min-width: 769px) {
    /* 헤더 스타일은 위에서 이미 정의됨 */
    
    .header-btn {
        padding: 0px 4px;
        font-size: 0.6rem;
        font-weight: 400;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        line-height: 0.8;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 50px;
    }
    
    .compact-btn,
    .mini-btn {
        padding: 0px 8px;
        font-size: 0.6rem;
        height: auto;
        min-width: 100px;
        line-height: 0.8;
    }
    
    .header-left {
        flex: 0 0 auto;
    }
    
    .header-center {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .header-right {
        gap: 0px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }
    
    /* 모든 버튼 사이에 여유공간 */
    .header-right .header-btn:not(:first-child) {
        margin-left: 4px;
    }
}

.header-btn {
    padding: 3px 6px;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.compact-btn {
    padding: 2px 4px;
    font-size: 0.6rem;
    height: 20px;
}

.mini-btn {
    padding: 2px 4px;
    font-size: 0.6rem;
    min-width: auto;
    height: 20px;
}

/* 필독 패널 스타일 */
.notice-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    position: fixed;
    top: 42px;
    right: 8px;
    z-index: 100001 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* PC에서 필독 패널 위치 조정 */
@media screen and (min-width: 769px) {
    .notice-panel {
        position: fixed !important;
        top: 42px !important; /* 헤더 바로 아래 */
        right: 8px !important;
        left: auto !important;
        bottom: 0 !important;
        height: calc(100vh - 42px) !important;
        max-height: calc(100vh - 42px) !important;
        z-index: 100001 !important;
    }
    
    /* PC 버전에서 관리자 패널만 오른쪽 정렬 */
    header #adminPanel.header-dropdown {
        position: fixed !important;
        top: 42px !important;
        right: 8px !important;
        left: auto !important;
        max-width: 500px !important;
        width: 500px !important;
        z-index: 100001 !important;
    }
    
    .header-dropdown {
        position: fixed !important;
        top: 42px !important; /* 헤더 바로 아래 */
        right: 8px !important;
        left: auto !important;
        z-index: 100001 !important;
    }
    
    /* PC에서 최저가신고 팝업 우측 정렬 및 크기 제한 */
    #productFormDropdown.header-dropdown {
        right: 8px !important;
        left: auto !important;
        max-width: 400px !important;
        width: 400px !important;
    }
    
    /* PC에서 필독 패널 우측 정렬 */
    #noticePanel.notice-panel {
        right: 8px !important;
        left: auto !important;
        max-width: 400px !important;
        width: 400px !important;
    }
    
    /* PC에서 헤더, 카테고리바, 정렬바를 상품리스트 너비에 맞추기 */
    .header {
        max-width: 1200px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 4px) !important; /* 좌우 2px씩 여백 */
    }
    
    .category-bar {
        max-width: 1200px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 4px) !important; /* 좌우 2px씩 여백 */
    }
    
    .sort-bar {
        max-width: 1200px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 4px) !important; /* 좌우 2px씩 여백 */
    }
    
    /* PC에서 상세보기 전체화면 */
    #productDetailDropdown {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: 50px !important;
        bottom: 0 !important;
        width: 100% !important;
        height: calc(100vh - 50px) !important;
        z-index: 10000 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    
    /* PC에서 세 버튼 모두 같은 크기로 가운데 정렬 */
    #productDetailDropdown .detail-action-btn {
        flex: 1;
        max-width: 120px;
    }
    
    #productDetailDropdown .detail-actions {
        justify-content: center;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* PC에서 상세페이지 가로 너비 절반으로 줄이기 */
    #productDetailDropdown .product-detail-body {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    #productDetailDropdown .detail-info {
        max-width: 50% !important;
        width: 50% !important;
        margin: 0 auto !important;
        padding-top: 20px !important; /* 헤더 아래로 제목이 보이도록 여백 추가 (조정됨) */
    }
    
    #productDetailDropdown .product-detail-name {
        padding-top: 0 !important; /* 제목 자체는 추가 여백 없음 */
    }
    
    #productDetailDropdown .product-detail-image {
        max-width: 50% !important;
        width: 50% !important;
        margin: 0 auto !important;
    }
    
    #productDetailDropdown .product-detail-image img {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    #productDetailDropdown .posts-section {
        max-width: 50% !important;
        width: 50% !important;
        margin: 0 auto !important;
    }
    
    #productDetailDropdown .product-post {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    #productDetailDropdown .comment-form-section {
        max-width: 50% !important;
        width: 50% !important;
        margin: 0 auto !important;
    }
    
    #productDetailDropdown .comment-actions-section {
        max-width: 50% !important;
        width: 50% !important;
        margin: 0 auto !important;
    }
    
    #adminPanel .admin-panel {
        position: relative !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .admin-panel {
        position: absolute !important;
        top: 100% !important; /* 헤더 바로 아래 */
        right: 0 !important;
        z-index: 99999 !important;
    }
}

/* PC에서 필독 패널 열림 상태 */
.notice-panel:not(.collapsed) {
    bottom: 0;
    height: calc(100vh - 42px);
    max-height: calc(100vh - 42px);
    padding: 20px;
    overflow-y: auto;
}

.notice-panel.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

/* PC에서 noticePanel ID별 스타일 */
#noticePanel:not(.collapsed) {
    bottom: 0 !important;
    height: calc(100vh - 42px) !important;
    max-height: calc(100vh - 42px) !important;
    padding: 20px !important;
    overflow-y: auto !important;
    display: block !important;
    visibility: visible !important;
}

#noticePanel.collapsed {
    max-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: none !important;
    visibility: hidden !important;
}

/* 모바일에서 필독 패널 위치 조정 */
@media (max-width: 768px) {
    .notice-panel {
        position: fixed !important;
        top: 65px !important; /* 버튼 바와 헤더 로고 아래로 이동 */
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        border-radius: 0 0 16px 16px !important;
        z-index: 999999 !important; /* 모바일 최상위 우선순위 */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
        border-top: 2px solid #e2e8f0 !important; /* 상단 회색 선 추가 */
        background: white !important;
        pointer-events: auto !important;
    }
    
    .notice-panel:not(.collapsed) {
        bottom: 0 !important;
        height: calc(100vh - 65px) !important;
        max-height: calc(100vh - 65px) !important;
        padding: 20px !important;
        overflow-y: auto !important;
    }
    
    .notice-panel.collapsed {
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* noticePanel 컨테이너의 collapsed 상태 */
    #noticePanel:not(.collapsed) {
        bottom: 0 !important;
        height: calc(100vh - 65px) !important;
        max-height: calc(100vh - 65px) !important;
        padding: 20px !important;
        overflow-y: auto !important;
    }
    
    #noticePanel.collapsed {
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
}

.notice-content {
    padding: 16px;
}

.notice-display {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 2px 4px 2px;
    min-height: 80px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.notice-edit {
    margin-top: 12px;
}

.notice-edit textarea {
    width: 100%;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
}

.notice-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notice-controls {
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
}

.notice-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.notice-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.edit-btn {
    background: #3b82f6;
    color: white;
}

.edit-btn:hover {
    background: #2563eb;
}

.add-btn {
    background: #10b981;
    color: white;
}

.add-btn:hover {
    background: #059669;
}

.delete-btn {
    background: #ef4444;
    color: white;
}

.delete-btn:hover {
    background: #dc2626;
}

.save-btn {
    background: #10b981;
    color: white;
}

.save-btn:hover {
    background: #059669;
}

.cancel-btn {
    background: #6b7280;
    color: white;
}

.cancel-btn:hover {
    background: #4b5563;
}

/* 댓글 섹션 스타일 */
.comments-section {
    border-top: 1px solid #e2e8f0;
    padding: 16px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comments-header h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #374151;
}

.comment-count {
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 10px;
}

.comment-form {
    margin-bottom: 16px;
}

.comment-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
}

.comment-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
}

/* 중첩 댓글 스타일 */
.comment-item.reply {
    border-left: 3px solid #e2e8f0;
    padding-left: 10px;
    margin-left: 20px;
    background-color: #f8fafc;
    border-radius: 4px;
    margin-top: 8px;
}

.comment-item.depth-1 {
    border-left-color: #3b82f6;
    background-color: #f0f9ff;
}

.comment-item.depth-2 {
    border-left-color: #10b981;
    background-color: #f0fdf4;
}

.comment-item.depth-3 {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

.comment-item.depth-4 {
    border-left-color: #ef4444;
    background-color: #fef2f2;
}

.comment-item.depth-5 {
    border-left-color: #8b5cf6;
    background-color: #faf5ff;
}

/* 깊은 중첩에서는 배경색만 변경 */
.comment-item.depth-6,
.comment-item.depth-7,
.comment-item.depth-8,
.comment-item.depth-9,
.comment-item.depth-10 {
    border-left-color: #6b7280;
    background-color: #f9fafb;
}

/* 모바일에서 중첩 댓글 최적화 */
@media (max-width: 768px) {
    .comment-item.reply {
        margin-left: 10px;
        padding-left: 8px;
    }
    
    .comment-item.depth-1,
    .comment-item.depth-2,
    .comment-item.depth-3,
    .comment-item.depth-4,
    .comment-item.depth-5 {
        margin-left: 10px;
        padding-left: 8px;
    }
    
    /* 깊은 중첩에서는 더 작은 들여쓰기 */
    .comment-item.depth-6,
    .comment-item.depth-7,
    .comment-item.depth-8,
    .comment-item.depth-9,
    .comment-item.depth-10 {
        margin-left: 5px;
        padding-left: 5px;
    }
    
    /* 모바일에서 댓글 수정 폼 최적화 */
    .comment-edit-textarea {
        font-size: 0.85rem;
        padding: 6px 10px;
        min-height: 50px;
    }
    
    .comment-edit-actions {
        gap: 6px;
    }
    
    .save-edit-btn,
    .cancel-edit-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    /* 모바일에서 중첩 댓글 최적화 */
    .comment-item.reply {
        margin-left: 10px;
        padding-left: 8px;
    }
    
    .comment-item.depth-1,
    .comment-item.depth-2,
    .comment-item.depth-3,
    .comment-item.depth-4,
    .comment-item.depth-5 {
        margin-left: 10px;
        padding-left: 8px;
    }
    
    /* 깊은 중첩에서는 더 작은 들여쓰기 */
    .comment-item.depth-6,
    .comment-item.depth-7,
    .comment-item.depth-8,
    .comment-item.depth-9,
    .comment-item.depth-10 {
        margin-left: 5px;
        padding-left: 5px;
    }
}

/* 댓글 수정 폼 스타일 */
.comment-edit-form {
    margin-top: 8px;
}

.comment-edit-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    background-color: #f8fafc;
    transition: border-color 0.2s ease;
}

.comment-edit-textarea:focus {
    outline: none;
    border-color: #2563eb;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.save-edit-btn {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.save-edit-btn:hover {
    background-color: #059669;
}

.cancel-edit-btn {
    background-color: #6b7280;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cancel-edit-btn:hover {
    background-color: #4b5563;
}

/* 공지사항 섹션 스타일 */
.notice-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.notice-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1.1rem;
}

.main-notice {
    margin: 0 0 0 0;
    padding: 0 0 0 0;
    background: white;
    border: none;
}

.main-notice h5 {
    margin: 0 0 0 0;
    color: #1f2937;
    font-size: 0.9rem;
    line-height: 1.2;
    padding: 0;
}

#mainNoticeContent {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.sub-notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notice-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #10b981;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notice-item:hover {
    background: #f0f9ff;
}

.notice-label {
    font-weight: 600;
    color: #374151;
    margin-right: 8px;
    min-width: 50px;
}

.notice-content-item {
    flex: 1;
    color: #4b5563;
    word-break: break-word;
}

/* 공지사항 편집 폼 */
.notice-edit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-edit-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notice-edit-form label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.notice-edit-form textarea {
    padding: 8px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.notice-edit-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 숫자별 댓글 폼 */
.number-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.number-comment-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.number-comment-form label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.number-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    max-height: 60px; /* 두 줄까지만 표시 */
    overflow-y: auto;
}

.number-btn {
    padding: 3px 6px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: white;
    color: #374151;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 30px;
    text-align: center;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.number-btn.selected {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.number-btn.selected:hover {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
}

.number-comment-form textarea {
    padding: 8px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.number-comment-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 숫자별 댓글 목록 */
.number-comment-group {
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.number-comment-header {
    background: #3b82f6;
    color: white;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.number-comment-content {
    padding: 12px;
    background: white;
}

/* 공지사항 상세보기 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483647 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    width: 600px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.1rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #374151;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.notice-detail-content {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
    white-space: pre-wrap;
    line-height: 1.6;
}

.notice-comments-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.notice-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.notice-comment-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notice-comment-form label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.notice-comment-form textarea {
    padding: 8px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.notice-comment-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 중첩 댓글 스타일 */
.comment-item.reply {
    border-left: 3px solid #e2e8f0;
    padding-left: 10px;
    margin-left: 20px;
    background-color: #f8fafc;
    border-radius: 4px;
    margin-top: 12px; /* 대댓글 한칸씩 띄우기 */
}

.comment-item.depth-1 { 
    border-left-color: #3b82f6; 
    background-color: #f0f9ff; 
}
.comment-item.depth-2 { 
    border-left-color: #10b981; 
    background-color: #f0fdf4; 
}
.comment-item.depth-3 { 
    border-left-color: #f59e0b; 
    background-color: #fffbeb; 
}
.comment-item.depth-4 { 
    border-left-color: #ef4444; 
    background-color: #fef2f2; 
}
.comment-item.depth-5 { 
    border-left-color: #8b5cf6; 
    background-color: #faf5ff; 
}

/* 깊은 중첩에서는 배경색만 변경 */
.comment-item.depth-6, 
.comment-item.depth-7, 
.comment-item.depth-8, 
.comment-item.depth-9, 
.comment-item.depth-10 {
    border-left-color: #6b7280;
    background-color: #f9fafb;
}

.comment-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    position: relative;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.comment-time {
    font-size: 0.7rem;
    color: #6b7280;
}

.comment-content {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #374151;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.comment-actions {
    display: flex;
    gap: 6px;
}

.comment-action-btn {
    padding: 3px 6px;
    border: none;
    border-radius: 3px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reply-btn {
    background: #3b82f6;
    color: white;
}

.reply-btn:hover {
    background: #2563eb;
}

.edit-btn-comment {
    background: #f59e0b;
    color: white;
}

.edit-btn-comment:hover {
    background: #d97706;
}

.delete-btn-comment {
    background: #ef4444;
    color: white;
}

.delete-btn-comment:hover {
    background: #dc2626;
}

.comment-edit-form {
    margin-top: 8px;
}

.comment-edit-form textarea {
    width: 100%;
    min-height: 50px;
    padding: 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 6px;
}

.comment-edit-actions {
    display: flex;
    gap: 6px;
}

.save-edit-btn {
    background: #10b981;
    color: white;
    padding: 3px 8px;
    border: none;
    border-radius: 3px;
    font-size: 0.7rem;
    cursor: pointer;
}

.save-edit-btn:hover {
    background: #059669;
}

.cancel-edit-btn {
    background: #6b7280;
    color: white;
    padding: 3px 8px;
    border: none;
    border-radius: 3px;
    font-size: 0.7rem;
    cursor: pointer;
}

.cancel-edit-btn:hover {
    background: #4b5563;
}

.header-dropdown {
    position: fixed;
    top: 42px;
    left: 8px;
    right: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 100001 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    min-width: 300px;
    pointer-events: auto;
}

/* 관리 패널만 완전 숨김 (초기 상태) - PC만 */
@media (min-width: 769px) {
    #adminPanel.collapsed {
        display: none !important;
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
    }
}

#adminPanel:not(.collapsed) {
    display: block !important;
    max-height: 95vh !important;
    padding: 20px !important;
    overflow-y: auto !important;
    visibility: visible !important;
}

/* 최저가신고와 필독칸은 정상 동작 */
/* 기본 스타일은 .header-dropdown에서 처리됨 */

.header-dropdown:not(.collapsed) {
    bottom: 0;
    height: calc(100vh - 42px);
    max-height: calc(100vh - 42px);
    padding: 20px;
    margin-top: 4px;
}

/* 관리탭은 원래대로 (자동 높이) */
#adminPanel:not(.collapsed) {
    bottom: auto !important;
    height: auto !important;
    max-height: 95vh !important;
}

/* PC에서 최저가신고 팝업 전체화면 */
#productFormDropdown:not(.collapsed) {
    bottom: 0 !important;
    height: calc(100vh - 42px) !important;
    max-height: calc(100vh - 42px) !important;
}

/* 상세보기 드롭다운은 전체화면 (기본값) */
#productDetailDropdown.collapsed {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 50px !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 9997 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    background: white !important;
    max-height: 0;
}

#productDetailDropdown:not(.collapsed) {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 50px !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 9997 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    background: white !important;
    max-height: calc(100vh - 50px) !important;
    height: calc(100vh - 50px) !important;
    display: flex !important;
}

.header-right .header-dropdown {
    left: auto;
    right: 0;
}

/* 카테고리 바 */
.category-bar {
    position: fixed;
    top: 42px;
    left: 0;
    right: 0;
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 2px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid #cbd5e1;
    border-bottom: none; /* 정렬 바와 여백 0 */
    overflow-x: auto;
    white-space: nowrap;
    z-index: 9998;
    width: 100%;
    box-sizing: border-box;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 0;
}

.category-item:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-item.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #2563eb;
}

/* 초특가(핫딜) 스타일을 식품/생활/가전/유아에도 적용 */
.category-item[data-category="특가"],
.category-item[data-category="식품"],
.category-item[data-category="생활"],
.category-item[data-category="가전"],
.category-item[data-category="유아"] {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
}

.category-item[data-category="특가"] .category-name,
.category-item[data-category="식품"] .category-name,
.category-item[data-category="생활"] .category-name,
.category-item[data-category="가전"] .category-name,
.category-item[data-category="유아"] .category-name {
    color: #854d0e;
    font-weight: 600;
}

.category-item[data-category="특가"] .category-count,
.category-item[data-category="식품"] .category-count,
.category-item[data-category="생활"] .category-count,
.category-item[data-category="가전"] .category-count,
.category-item[data-category="유아"] .category-count {
    background: #fde047;
    color: #854d0e;
    font-weight: 700;
}

.category-item[data-category="특가"]:hover,
.category-item[data-category="식품"]:hover,
.category-item[data-category="생활"]:hover,
.category-item[data-category="가전"]:hover,
.category-item[data-category="유아"]:hover {
    background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
    border-color: #fbbf24;
    transform: translateY(-1px);
}

.category-item[data-category="특가"].active,
.category-item[data-category="식품"].active,
.category-item[data-category="생활"].active,
.category-item[data-category="가전"].active,
.category-item[data-category="유아"].active {
    background: linear-gradient(135deg, #fde047, #fbbf24);
    color: #854d0e;
    border-color: #f59e0b;
}

.category-item[data-category="특가"].active .category-name,
.category-item[data-category="식품"].active .category-name,
.category-item[data-category="생활"].active .category-name,
.category-item[data-category="가전"].active .category-name,
.category-item[data-category="유아"].active .category-name {
    color: #854d0e;
}

.category-item[data-category="특가"].active .category-count,
.category-item[data-category="식품"].active .category-count,
.category-item[data-category="생활"].active .category-count,
.category-item[data-category="가전"].active .category-count,
.category-item[data-category="유아"].active .category-count {
    background: #fef3c7;
    color: #854d0e;
}

.category-name {
    color: #374151;
}

.category-item.active .category-name {
    color: white;
}

.category-count {
    background: #e5e7eb;
    color: #6b7280;
    padding: 1px 3px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 600;
    min-width: 14px;
    text-align: center;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 정렬 바 스타일 */
.sort-bar {
    position: fixed;
    top: 62.5px; /* 헤더(42px) + 카테고리바(18px) + 여백(2.5px) = 62.5px */
    left: 0;
    right: 0;
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 2px; /* 카테고리 바와 동일한 padding */
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-top: none; /* 카테고리 바와 여백 0 */
    border-bottom: none; /* 상품 리스트와 여백 0 */
    overflow-x: auto;
    white-space: nowrap;
    z-index: 9997;
    width: 100%;
    box-sizing: border-box;
    align-items: center; /* 카테고리 바와 동일하게 중앙 정렬 */
    min-height: auto; /* 카테고리 바와 동일한 높이 */
}

.sort-item {
    padding: 1px 3px; /* 카테고리 아이템과 동일한 padding */
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 3px; /* 카테고리 아이템과 동일한 border-radius */
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.65rem; /* 카테고리 아이템과 동일한 font-size */
    font-weight: 500;
    color: #374151;
    flex-shrink: 0;
    white-space: nowrap;
    display: flex;
    align-items: center; /* 카테고리 아이템과 동일하게 중앙 정렬 */
}

.sort-item:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sort-item.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: #dc2626;
}

    .logo {
        font-size: 1.32rem;
        font-weight: 600;
        color: #1e40af; /* 원래 파란색으로 복원 */
        margin: 0;
        line-height: 1.2;
        margin-top: 8px; /* 버튼과 겹치지 않도록 상단 마진 추가 */
        cursor: pointer;
        transition: color 0.2s;
        pointer-events: auto !important;
    }
    
    .logo:hover {
        color: #3b82f6;
    }

.search-container {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 제품 입력 폼 스타일 */
.product-form-section {
    background-color: #f8fafc;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-form-section.collapsed {
    padding: 0;
}

.product-form-section:not(.collapsed) {
    padding: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #e2e8f0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.section-header:hover {
    background-color: #cbd5e1;
}

.section-header h3 {
    color: #374151;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.toggle-icon {
    color: #6b7280;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.product-form-section:not(.collapsed) .section-content {
    max-height: none;
}

.product-form {
    max-width: 600px;
    margin: 0 auto;
}

/* 카테고리 선택기 스타일 */
.category-selector {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.category-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.category-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-selector select:hover {
    border-color: #3b82f6;
}

.category-selector select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 관리자 섹션 */
.admin-section {
    background-color: #f8fafc;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.admin-section.collapsed {
    padding: 0;
}

.admin-section:not(.collapsed) {
    padding: 25px;
}

.admin-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fef3c7;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.admin-section .section-header:hover {
    background-color: #fde68a;
}

.admin-section .section-header h3 {
    color: #92400e;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-section .section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.admin-section:not(.collapsed) .section-content {
    max-height: none;
}

.admin-panel {
    max-width: 800px;
    margin: 0 auto;
}

.admin-controls {
    display: flex;
    gap: 6px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.admin-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.admin-btn:hover {
    background: linear-gradient(135deg, #d97706, #ea580c);
    transform: translateY(-2px);
}

/* 관리자 버튼 배지 스타일 */
.admin-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

.admin-badge.hidden {
    display: none;
}

.edit-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

.logout-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
}

/* 드래그 스크롤 스타일 */
.all-product-item, .pending-product-item, .price-report-item {
    cursor: grab;
    transition: opacity 0.3s ease, transform 0.3s ease;
    user-select: none;
}

.all-product-item.dragging, .pending-product-item.dragging, .price-report-item.dragging {
    opacity: 0.7;
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scroll-indicator {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 2px solid #ffffff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: white;
    font-weight: bold;
    margin: 20px 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.scroll-indicator.drag-over {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.scroll-indicator::before {
    content: "⬇️ ";
    margin-right: 8px;
}

.scroll-indicator::after {
    content: " ⬇️";
    margin-left: 8px;
}

/* 관리자 패널 스크롤 영역 */
.admin-panel {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
}

.admin-panel::-webkit-scrollbar {
    width: 8px;
}

.admin-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.admin-panel::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

.admin-panel::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* 수정 팝업 스타일 */
.edit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483647 !important; /* 관리 패널(z-index:100001)보다 위에 표시 */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.edit-popup-overlay.open {
    opacity: 1;
    visibility: visible;
}

.edit-popup-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.edit-popup-overlay.open .edit-popup-container {
    transform: scale(1);
}

.edit-popup-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.edit-popup-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.edit-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.edit-popup-content {
    padding: 30px;
}

.edit-popup-content .product-form {
    margin: 0;
}

.edit-popup-content .form-group {
    margin-bottom: 20px;
}

.edit-popup-content .form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* 아이템 하이라이트 스타일 */
.item-highlighted {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.item-highlighted .admin-actions button,
.item-highlighted .admin-controls button {
    background: #3b82f6 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* 관리자 패널 스크롤 스타일 */
.admin-panel {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    margin-right: 0;
    transition: margin-right 0.3s ease;
    /* 마우스 휠 스크롤 활성화 */
    scroll-behavior: smooth;
    /* 스크롤바 스타일링 */
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #f1f5f9;
}

/* 스크롤바 커스텀 스타일 */
.admin-panel::-webkit-scrollbar {
    width: 8px;
}

.admin-panel::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.admin-panel::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

.admin-panel::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .edit-popup-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .edit-popup-content {
        padding: 20px;
    }
    
    .edit-popup-content .form-actions {
        flex-direction: column;
    }
    
    .edit-popup-content .form-actions button {
        width: 100%;
    }
}

/* 수정 폼 스타일 */
.edit-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.edit-form-container {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.edit-form-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-form-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.edit-form-container .product-form {
    padding: 30px;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.cancel-btn {
    padding: 12px 24px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
}

.pending-products-list {
    display: grid;
    gap: 20px;
}

.all-product-item {
    background: white;
    border: 2px solid #059669;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    margin-bottom: 15px;
}

.all-product-item::before {
    content: '📦 전체 제품';
    position: absolute;
    top: -10px;
    right: 20px;
    background: #059669;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pending-product-item {
    background: white;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.pending-product-item::before {
    content: '⏳ 승인 대기';
    position: absolute;
    top: -10px;
    right: 20px;
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pending-product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.approve-btn {
    padding: 6px 10px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
}

.approve-btn:hover {
    background: #047857;
}

.edit-btn {
    padding: 6px 10px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
}

.edit-btn:hover {
    background: #2563eb;
}

.reject-btn {
    padding: 6px 10px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
}

.reject-btn:hover {
    background: #b91c1c;
}

.link-btn {
    padding: 6px 10px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.link-btn:hover {
    background: #7c3aed;
    color: white;
    text-decoration: none;
}

.refresh-btn {
    padding: 6px 10px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
}

.refresh-btn:hover {
    background: #d97706;
}

.last-updated-time {
    color: #2563eb;
    font-weight: 600;
}

.price-reports {
    display: grid;
    gap: 15px;
}

.price-report-item {
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 15px;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.price-report-item .report-info {
    width: 100%;
    overflow: hidden;
}

.price-report-item .report-info p {
    margin: 4px 0;
    word-break: break-word;
}

.price-report-item .report-info strong {
    display: inline-block;
    min-width: 80px;
}

.price-report-item .admin-controls {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.price-report-item::before {
    content: '💰 가격 변경 신고';
    position: absolute;
    top: -10px;
    right: 20px;
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-increase {
    color: #dc2626;
    font-weight: 600;
}

.price-decrease {
    color: #059669;
    font-weight: 600;
}

/* 승인 대기 제품 가격 강조 - 기존가격 파란색, 신고가격 빨간색 */
.pending-product-item .product-info .price-label {
    color: #333;
    font-weight: 600;
}

.pending-product-item .product-info .price-value {
    color: #2563eb;
    font-weight: 700;
}

.pending-product-item .product-info .final-price-value {
    color: #dc2626;
    font-weight: 700;
}

/* 전체 제품 가격 강조 - 기존가격 파란색, 신고가격 빨간색 */
.all-product-item .product-info .price-label {
    color: #333;
    font-weight: 600;
}

.all-product-item .product-info .price-value {
    color: #2563eb;
    font-weight: 700;
}

.all-product-item .product-info .final-price-value {
    color: #dc2626;
    font-weight: 700;
}

/* 가격 변경 신고 가격 강조 - 기존 가격은 파란색, 신고 가격은 빨간색 */
.price-report-item .report-info .old-price-label {
    color: #333;
    font-weight: 600;
}

.price-report-item .report-info .old-price-value {
    color: #2563eb;
    font-weight: 700;
}

/* 신고 가격 빨간색 강조 */
.price-report-item .report-info .reported-price {
    color: #dc2626;
    font-weight: 700;
}

/* 신고 링크 스타일 */
.report-link {
    color: #2563eb;
    text-decoration: none;
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.report-link:hover {
    text-decoration: underline;
}

.no-reports {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.no-reports p {
    margin: 0;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

/* 감사 메시지 스타일 */
.thank-you-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.message-content {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.message-content h4 {
    color: #059669;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.message-content p {
    color: #374151;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.close-btn {
    padding: 12px 30px;
    background-color: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: #047857;
    transform: translateY(-2px);
}


.card-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.card-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.card-options label:hover {
    background-color: #e2e8f0;
}

.card-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

/* 메인 콘텐츠 */
.main-content {
    min-height: 400px;
    margin-top: 80.5px; /* 헤더(42px) + 카테고리바(18px) + 여백(2.5px) + 정렬바(18px) = 80.5px, 정렬바 바로 아래 */
    padding-top: 0;
}

/* 상품 리스트 여백 제거 */
.product-list {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* #productList의 padding-top은 미디어 쿼리에서 개별적으로 설정하므로 여기서는 제거 */
#productList {
    margin-top: 0 !important;
    /* padding-top은 PC/모바일 미디어 쿼리에서 각각 설정됨 */
}

/* 로딩 스타일 */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 검색 결과 */
/* 상품 리스트 */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0 !important;
    padding: 0;
}

/* PC용 상품 그리드 - 3개 고정 */
@media screen and (min-width: 769px) {
    .product-list {
        grid-template-columns: repeat(3, 1fr) !important; /* 3개 고정 */
        gap: 0 !important;
        max-width: 100% !important;
    }
    
    /* PC: 상품 아이템 - 좌측 이미지, 우측 정보 */
    .product-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 0 !important;
    }
    
    /* PC: 썸네일 이미지 (작은 크기) */
    .product-thumbnail {
        flex-shrink: 0;
        width: 80px;
        height: 80px;
        border-radius: 4px;
        overflow: hidden;
        background: #f3f4f6;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0;
        margin: 0;
    }
    
    .product-thumbnail img,
    .product-thumbnail-img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center center;
        display: block;
        border: none;
        outline: none;
        pointer-events: none;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        -webkit-user-select: none;
        user-select: none;
        padding: 0 !important;
        margin: 0 !important;
        -webkit-filter: none;
        filter: none;
        transform: scale(1);
    }
    
    /* 모바일에서 이미지 전체가 보이도록 */
    @media (max-width: 768px) {
        .product-thumbnail img,
        .product-thumbnail-img {
            object-fit: contain;
            object-position: center center;
            transform: scale(1);
        }
    }
    
    .product-thumbnail .no-image {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #9ca3af;
        font-size: 0.65rem;
        background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    }
    
    /* PC: 상품 정보 영역 */
    .product-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0 !important;
        min-width: 0;
    }
}

.product-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 설명용 카드 스타일 */
.product-item.info-card {
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

/* 설명 카드의 이미지 플레이스홀더 */
.product-item.info-card .product-thumbnail {
    background: #e5e7eb;
    border: 1px solid #d1d5db;
}

.info-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* 모바일에서 이미지 플레이스홀더 폰트 크기 조정 */
@media (max-width: 768px) {
    .info-image-placeholder {
        font-size: 0.75rem;
    }
}

@media (max-width: 375px) {
    .info-image-placeholder {
        font-size: 0.7rem;
    }
}

/* 초특가(핫딜) 스타일을 상품 카드에도 식품/생활/가전/유아에 적용 - 배경색 제거 */
/* 연노랑 배경색 제거됨 */

.product-item.info-card .info-text {
    font-size: 0.75rem;
    color: #1e40af;
    font-weight: 600;
    line-height: 1.4;
}

.info-placeholder {
    flex: 1;
}

.product-item.info-card:hover {
    border-color: #2563eb;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

/* 상세보기 버튼 스타일 */
.detail-wrapper {
    display: inline-flex;
}

.detail-btn {
    font-size: 0.7rem;
    color: #6b21a8;
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    border: 1px solid #a855f7;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-weight: 600;
    margin: 0;
}

.detail-btn:hover {
    background: linear-gradient(135deg, #e9d5ff, #ddd6fe);
    border-color: #9333ea;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(168, 85, 247, 0.3);
}

/* 상품 상세보기 모달 스타일 */
.product-detail-content {
    max-width: 100%;
    max-height: 100vh;
    width: 100%;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    padding: 0;
}

/* 상세보기 - 최저가신고와 같은 스타일 */
.detail-header {
    display: flex;
    align-items: center;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10001;
    background: white !important;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 16px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-header .detail-actions {
    width: 100%;
}

.detail-actions {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.detail-action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    position: relative;
}

.detail-action-btn.recommend-btn, 
.detail-action-btn.out-of-stock-btn {
    flex: 0 0 auto;
    min-width: 60px;
}

.detail-action-btn.purchase-btn {
    flex: 2;
}

.detail-action-btn span {
    position: absolute;
    top: -4px;
    right: -4px;
    background: rgba(255, 255, 255, 0.95);
    padding: 1px 5px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.detail-action-btn.active {
    opacity: 0.8;
}

.detail-action-btn.recommend-btn {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.detail-action-btn.recommend-btn:hover {
    background: linear-gradient(135deg, #bfdbfe, #93c5fd);
    transform: translateY(-1px);
}

.detail-action-btn.out-of-stock-btn {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.detail-action-btn.out-of-stock-btn:hover {
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    transform: translateY(-1px);
}

.detail-action-btn.purchase-btn {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.detail-action-btn.purchase-btn:hover {
    background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
    transform: translateY(-1px);
}

/* 상세보기 본문 간소화 */
.detail-info {
    min-height: auto;
    margin: 0 !important;
    padding: 0 !important;
}

.product-detail-body {
    padding: 0 !important;
    overflow-y: auto;
    flex: 1;
    margin: 0 !important;
    -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
}

/* 상세보기 헤더 로고 스타일 */
.detail-logo {
    font-size: 1.2rem !important;
    font-weight: 700;
    color: #111827;
    margin: 0;
    padding: 0;
}

.product-info-section {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent;
    border-radius: 0;
}

.detail-info {
    padding: 0 !important;
    margin: 0 !important;
}

.product-info-section h3 {
    margin: 0 0 12px 0;
    color: #1f2937;
    font-size: 1.3rem;
}

.product-info-section p {
    margin: 8px 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.product-detail-image {
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
}

.product-detail-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    display: block;
    margin: 0 !important;
    border-radius: 0;
    box-shadow: none;
}

.product-description {
    margin-top: 16px;
    padding: 12px;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
}

.product-description p {
    color: #000000;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.posts-section {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.comment-actions-section {
    padding: 0 !important;
    margin: 0 !important;
}

.comment-form-section {
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.comment-form-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    resize: vertical;
    margin-bottom: 12px;
}

.comment-form-section button {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.comment-form-section button:hover {
    background: #2563eb;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.modal-close button {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close button:hover {
    background: #f3f4f6;
    color: #374151;
}

/* 상품 게시글 스타일 */
.product-post {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    transition: box-shadow 0.3s ease;
}

.product-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-left {
    display: flex;
    gap: 8px;
}

.post-author {
    font-weight: 600;
    color: #1f2937;
}

.post-date {
    color: #6b7280;
    font-size: 0.85rem;
}

.post-actions {
    display: flex;
    gap: 4px;
}

.post-edit-btn, .post-delete-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-edit-btn {
    background: #3b82f6;
    color: white;
}

.post-edit-btn:hover {
    background: #2563eb;
}

.post-delete-btn {
    background: #ef4444;
    color: white;
}

.post-delete-btn:hover {
    background: #dc2626;
}

.post-image-wrapper {
    margin-bottom: 12px;
}

.post-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-image:hover {
    transform: scale(1.02);
}

.post-content {
    color: #000000 !important;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.product-post .post-content {
    color: #000000 !important;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #3b82f6, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: rgba(37, 99, 235, 0.3);
}

.product-item:hover::before {
    opacity: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
}

.product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.product-row-1 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

.product-rank.first-rank {
    color: #ffffff !important;
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.4) !important;
    font-weight: 800;
    padding: 3px 8px;
    animation: pulse 2s ease-in-out infinite;
}

.product-rank.second-rank {
    color: #ffffff !important;
    background: linear-gradient(135deg, #cbd5e1, #94a3b8) !important;
    box-shadow: 0 2px 4px rgba(203, 213, 225, 0.4) !important;
    font-weight: 800;
    padding: 3px 8px;
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 0.3s;
}

.product-rank.third-rank {
    color: #ffffff !important;
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.4) !important;
    font-weight: 800;
    padding: 3px 8px;
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 0.6s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.product-store {
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 500;
    flex-shrink: 0;
}

.product-category {
    color: #000000;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 4px;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border-radius: 4px;
    display: inline-block;
}

/* 핫딜 번개 아이콘 스타일 */
.hotdeal-icon {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.hotdeal-icon svg {
    display: block;
}

.out-of-stock-wrapper {
    position: relative;
    display: inline-flex;
}

.out-of-stock-btn {
    font-size: 0.7rem;
    color: #000000;
    background: transparent;
    border: 1px solid #9ca3af;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-weight: 600;
    position: relative;
    margin: 0;
}

.out-of-stock-btn:hover {
    background: #f3f4f6;
    border-color: #6b7280;
    transform: translateY(-1px);
}

.out-of-stock-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #7c3aed;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
    border: 2px solid white;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #dc2626;
    margin-left: auto;
}

.discount-rate {
    font-size: 0.95rem;
    font-weight: 700;
    margin-right: 2px;
}

.discount-rate-low {
    color: #000000; /* 검정 - 30% 이하 */
}

.discount-rate-medium {
    color: #1d4ed8; /* 파랑 - 30% 이상 60% 미만 (가격 바뀜 버튼 계열) */
}

.discount-rate-high {
    color: #ff1744; /* 빨강 - 60% 이상 (그대로) */
}

/* 클릭횟수 텍스트 스타일 (보라색, 배경 없음) */
.click-count-text {
    color: #9333ea;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 4px;
}

/* 구매횟수 텍스트 스타일 (녹색 형광색, 배경 없음) */
.purchase-count-text {
    color: #39ff14;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 0px; /* 가격과의 간격 제거 (오른쪽으로 추가 이동) */
    margin-left: auto; /* 오른쪽 끝으로 이동 (가격 바로 왼쪽) */
    padding-left: 0.2em; /* 아주 조금 오른쪽으로 이동 */
    text-shadow: 0 0 3px rgba(57, 255, 20, 0.5);
}

.product-original-price {
    text-align: right;
    margin-right: 0;
    margin-left: auto;
    font-size: 0.95rem;
    font-weight: 700;
    color: #9ca3af; /* 연한 회색 */
    display: flex;
    align-items: center;
    gap: 2px;
}

.info-discount-label {
    color: #9333ea;
    font-size: 0.95rem;
    font-weight: 700;
    margin-right: 2px;
}

.product-volume {
    color: #059669;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-radius: 12px;
    display: inline-block;
    border: 1px solid rgba(5, 150, 105, 0.2);
}



.volume-price {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.volume-price::before {
    content: '🥛';
    font-size: 0.8rem;
}

.price-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}

.final-price {
    font-size: 1rem;
    font-weight: 700;
    color: #dc2626;
    flex-shrink: 0;
}

.product-current-price {
    display: flex;
    justify-content: flex-start;
    padding: 2px 0;
    padding-left: 0;
    margin-left: 0;
}

/* 업데이트 시간 표시 제거 - 공간 절약 */

/* 제품 버튼 컨테이너 */
.product-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* 갱신 버튼 스타일 */
.refresh-product-btn {
    padding: 2px 5px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed); /* 보라색 계열 */
    color: white;
    border: none;
    border-radius: 3px;
    font-weight: 500;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1px;
    text-align: center;
    min-width: 30px;
    height: 20px;
    line-height: 1;
}

.refresh-product-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9); /* 더 진한 보라색 호버 */
    transform: translateY(-1px);
}

.price-report-btn {
    padding: 2px 5px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); /* 파란색 계열 */
    color: white;
    border: none;
    border-radius: 3px;
    font-weight: 500;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1px;
    text-align: center;
}

.price-report-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af); /* 파란색 호버 */
    transform: translateY(-1px);
}

/* 제품 액션 버튼 */
.product-actions {
    margin-top: 8px;
    text-align: center;
}

.product-link-btn {
    display: inline-block;
    padding: 3px 6px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.65rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2);
    flex-shrink: 0;
    text-align: center;
}

.product-link-btn:hover {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
    text-decoration: none;
    color: white;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 6px;
        max-width: 100%;
    }
    
    .logo {
        font-size: 1.4rem;
        text-align: left !important; /* 좌측 정렬로 되돌리기 */
        justify-self: start !important; /* 그리드에서 좌측 시작 */
        margin-left: 0 !important; /* 왼쪽 끝으로 이동 */
        padding-left: 0 !important; /* 왼쪽 패딩 제거 */
        position: relative !important;
        left: 0 !important;
        transform: none !important;
        float: left !important; /* 플로트로 강제 좌측 배치 */
        width: auto !important; /* 너비 자동 조정 */
        max-width: none !important; /* 최대 너비 제한 해제 */
        display: inline-block !important; /* 인라인 블록으로 변경 */
        vertical-align: top !important; /* 상단 정렬 */
        clear: both !important; /* 플로트 클리어 */
        margin-right: auto !important; /* 오른쪽 마진 자동 */
        margin-top: 0 !important; /* 상단 마진 제거 */
        margin-bottom: 0 !important; /* 하단 마진 제거 */
    }
    
    .search-container {
        flex-direction: row;
        gap: 6px;
        width: 100%;
    }
    
    .search-input {
        flex: 1;
        padding: 8px 10px;
        font-size: 0.85rem;
        min-height: 38px;
        border-radius: 6px;
    }
    
    .search-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
        min-height: 38px;
        font-weight: 700;
        flex-shrink: 0;
    }
    
    .card-options {
        grid-template-columns: 1fr;
    }
    
    /* 컨트롤 패널 모바일 */
    .control-panel {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .control-content {
        position: relative;
        max-height: none;
        box-shadow: none;
        border: none;
        margin-top: 0;
    }
    
    .control-content:not(.collapsed) {
        max-height: none;
        padding: 15px;
    }
    
    /* 헤더 모바일 최적화 - 2줄 컴팩트 레이아웃 */
    .header {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        grid-template-rows: auto auto;
        gap: 5px;
        padding: 8px;
        align-items: center;
        margin-bottom: 4px;
    }
    
    /* 첫줄: 로고 | 검색창 | 검색버튼 */
    .header-center {
        grid-column: 1 / 4;
        grid-row: 1;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 6px;
        align-items: center;
        width: 100%;
    }
    
    .logo {
        margin: 0;
        font-size: 1.05rem;
        white-space: nowrap;
        grid-column: 1;
    }
    
    .search-container {
        grid-column: 2 / 4;
        max-width: none;
        gap: 6px;
        display: flex;
        flex-direction: row;
    }
    
    .search-input {
        flex: 1;
        min-width: 0;
    }
    
    .search-btn {
        flex-shrink: 0;
    }
    
    /* 둘째줄: 좌측 최저가 신고 (크게), 우측 관리자 승인 (작게) */
    .header-left {
        grid-column: 1 / 3;
        grid-row: 2;
        position: static;
    }
    
    .header-right {
        grid-column: 3;
        grid-row: 2;
        position: static;
    }
    
    .header-btn {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.85rem;
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
    
    .header-right .header-btn {
        padding: 5px 6px;
        font-size: 0.65rem;
        min-height: 30px;
    }
    
    /* 드롭다운 모바일 최적화 - 카테고리 바로 아래로 */
    .header-dropdown {
        position: fixed !important;
        top: 65px !important; /* 상단으로 이동 */
        bottom: auto;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        border-radius: 0 !important;
        z-index: 999999 !important; /* 모바일 최상위 우선순위 */
        box-shadow: none !important; /* 그림자 제거 */
        border-top: none !important; /* 상단 선 제거 */
        background: white !important;
        transition: max-height 0.3s ease, padding 0.3s ease;
        pointer-events: auto !important;
    }
    
    /* 모바일에서 notice-panel도 최상위 */
    .notice-panel {
        position: fixed !important;
        top: 65px !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 999999 !important; /* 모바일 최상위 우선순위 */
        pointer-events: auto !important;
    }
    
    /* 모바일에서 adminPanel도 최상위 */
    #adminPanel.header-dropdown {
        position: fixed !important;
        top: 65px !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 999999 !important; /* 모바일 최상위 우선순위 */
        pointer-events: auto !important;
    }
    
    /* 모바일 전용 - 3가지 메뉴 최상위 보장 (ID 선택자로 특정성 높임) */
    #productFormDropdown.header-dropdown,
    #productFormDropdown.header-dropdown:not(.collapsed) {
        position: fixed !important;
        top: 65px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 2147483647 !important; /* 최대값 - 모든 요소보다 위 */
        pointer-events: auto !important;
        display: block !important;
    }
    
    /* 필독 패널 - ID 선택자로 특정성 높임 */
    #noticePanel.notice-panel,
    #noticePanel.notice-panel:not(.collapsed) {
        position: fixed !important;
        top: 65px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 2147483647 !important; /* 최대값 - 모든 요소보다 위 */
        pointer-events: auto !important;
        display: block !important;
    }
    
    /* 관리 패널 - ID 선택자로 특정성 높임 */
    #adminPanel.header-dropdown,
    #adminPanel.header-dropdown:not(.collapsed) {
        position: fixed !important;
        top: 65px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 2147483647 !important; /* 최대값 - 모든 요소보다 위 */
        pointer-events: auto !important;
        display: block !important;
    }
    
    /* 상품 리스트는 확실히 뒤로 */
    .product-list,
    .product-item,
    .main-content {
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* 카테고리바는 드롭다운보다 낮게 */
    .category-bar {
        z-index: 9998 !important;
    }
    
    /* 모바일에서 상세보기는 카테고리 바로 아래 (카테고리바와 같은 위치) */
    #productDetailDropdown.collapsed {
        top: 65px !important;
        height: calc(100vh - 65px) !important;
        max-height: 0 !important;
    }
    
    #productDetailDropdown:not(.collapsed) {
        top: 65px !important;
        height: calc(100vh - 65px) !important;
        max-height: calc(100vh - 65px) !important;
    }
    
    #productDetailDropdown {
        top: 65px !important;
        height: calc(100vh - 65px) !important;
    }
    
    /* 접혀있을 때 */
    .header-dropdown.collapsed {
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden;
        box-shadow: none;
    }
    
    /* 펼쳐졌을 때 */
    .header-dropdown:not(.collapsed) {
        bottom: 0 !important;
        height: calc(100vh - 65px) !important;
        max-height: calc(100vh - 65px) !important;
        padding: 20px;
        margin-top: 0;
        overflow-y: auto;
        padding-top: 20px; /* 상단 패딩 제거 */
    }
    
    /* 모바일에서 최저가신고 팝업 전체화면 */
    #productFormDropdown:not(.collapsed) {
        bottom: 0 !important;
        height: calc(100vh - 65px) !important;
        max-height: calc(100vh - 65px) !important;
    }
    
    /* 모바일에서 관리탭은 원래대로 (자동 높이) */
    #adminPanel:not(.collapsed) {
        bottom: auto !important;
        height: auto !important;
        max-height: 80vh !important;
    }
    
    /* 모바일에서 상세보기 내부 여백 제거 */
    #productDetailDropdown .product-detail-body {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #productDetailDropdown .detail-info {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #productDetailDropdown .detail-header {
        padding: 6px 8px !important;
    }
    
    #productDetailDropdown .comment-form-section {
        padding: 8px !important;
        margin: 0 !important;
    }
    
    .header-right .header-dropdown {
        left: 0;
        right: 0;
    }
    
    /* 카테고리 바 모바일 */
    .category-bar {
        gap: 1px;
        padding: 0px 1px;
        margin-bottom: 1px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: wrap;
        white-space: normal;
    }
    
    .category-item {
        padding: 1px 4px;
        font-size: 0.65rem;
        min-height: auto;
        white-space: normal;
        line-height: 1.2;
        max-width: 80px;
        text-align: center;
    }
    
    .category-name {
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .category-count {
        font-size: 0.65rem;
        padding: 1px 4px;
        min-width: 16px;
    }
    
    /* 모바일: 한 줄에 하나씩 */
    .product-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }
    
    /* 모바일: 상품 아이템 - 좌측 이미지, 우측 정보 */
    .product-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
        min-height: auto;
        width: 100%;
    }
    
    /* 모바일: 이미지 컨테이너 여백 제거 */
    @media (max-width: 768px) {
        .product-thumbnail {
            padding: 0 !important;
            margin: 0 !important;
        }
    }
    
    /* 모바일: 썸네일 이미지 (20% 감소: 81px) */
    .product-thumbnail {
        flex-shrink: 0;
        width: 81px;
        height: 81px;
        border-radius: 6px;
        overflow: hidden;
        background: #f3f4f6;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .product-thumbnail img,
    .product-thumbnail-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        object-position: center center;
        display: block;
        border: none !important;
        outline: none;
        pointer-events: none;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        -webkit-user-select: none;
        user-select: none;
        padding: 0 !important;
        margin: 0 !important;
        -webkit-filter: none;
        filter: none;
        transform: scale(1);
    }
    
    /* 모바일에서 이미지 전체가 보이도록 */
    @media (max-width: 768px) {
        .product-thumbnail img,
        .product-thumbnail-img {
            width: 100% !important;
            height: 100% !important;
            padding: 0 !important;
            margin: 0 !important;
            border: none !important;
            object-fit: contain;
            object-position: center center;
            transform: scale(1);
        }
    }
    
    .product-thumbnail .no-image {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #9ca3af;
        font-size: 0.75rem;
        background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    }
    
    /* 모바일: 상품 정보 영역 */
    .product-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
    }
    
    .product-header {
        flex-direction: column;
        gap: 0 !important;
        align-items: flex-start;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }
    
    .product-row-1 {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .product-rank {
        font-size: 0.7rem;
        padding: 2px 5px;
    }
    
    .product-rank.first-rank {
        font-size: 0.75rem;
        padding: 2px 7px;
        color: #ffffff !important;
        background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
        box-shadow: 0 2px 4px rgba(251, 191, 36, 0.4) !important;
        animation: pulse 2s ease-in-out infinite;
    }
    
    .product-rank.second-rank {
        font-size: 0.75rem;
        padding: 2px 7px;
        color: #ffffff !important;
        background: linear-gradient(135deg, #cbd5e1, #94a3b8) !important;
        box-shadow: 0 2px 4px rgba(203, 213, 225, 0.4) !important;
        animation: pulse 2s ease-in-out infinite;
        animation-delay: 0.3s;
    }
    
    .product-rank.third-rank {
        font-size: 0.75rem;
        padding: 2px 7px;
        color: #ffffff !important;
        background: linear-gradient(135deg, #d97706, #b45309) !important;
        box-shadow: 0 2px 4px rgba(217, 119, 6, 0.4) !important;
        animation: pulse 2s ease-in-out infinite;
        animation-delay: 0.6s;
    }
    
    .product-title {
        font-size: 0.85rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: break-word;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }
    
    .product-details {
        width: 100%;
        flex-direction: column;
        gap: 0 !important;
        align-items: flex-start;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .product-row-2 {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .row-top {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .row-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .store-time-info {
        display: flex;
        align-items: center;
        gap: 0 !important;
        font-size: 0.65rem;
        color: #6b7280;
        flex: 1;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .update-time {
        font-size: 0.65rem;
        color: #000000;
        padding: 1px 3px;
        border-radius: 3px;
        font-weight: 600;
        text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    }
    
    /* 모바일용 시간별 색상 */
    .update-time.recent {
        background: linear-gradient(45deg, #a0ff80, #bfff60);
        animation: glow-green 2s ease-in-out infinite alternate;
        color: #2d5a1d;
    }
    
    .update-time.daily {
        background: linear-gradient(45deg, #ffaa00, #ff9900);
        animation: glow-orange 2s ease-in-out infinite alternate;
        color: #663d00;
    }
    
    .update-time.old {
        background: linear-gradient(45deg, #ff6666, #ff4444);
        animation: glow-red 2s ease-in-out infinite alternate;
        color: #ffffff;
    }
    
@keyframes glow-green {
    from {
        box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
    }
    to {
        box-shadow: 0 0 12px rgba(0, 255, 0, 0.6);
    }
}

@keyframes glow-orange {
    from {
        box-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
    }
    to {
        box-shadow: 0 0 12px rgba(255, 204, 0, 0.6);
    }
}

@keyframes glow-red {
    from {
        box-shadow: 0 0 8px rgba(255, 102, 102, 0.3);
    }
    to {
        box-shadow: 0 0 12px rgba(255, 102, 102, 0.6);
    }
}
    
    .product-store {
        font-size: 0.65rem;
    }
    
    /* 모바일: 클릭횟수 텍스트 스타일 */
    .click-count-text {
        font-size: 0.75rem;
        margin-right: 3px;
    }
    
    /* 모바일: 구매횟수 텍스트 스타일 */
    .purchase-count-text {
        font-size: 0.75rem;
        margin-right: 0px; /* 가격과의 간격 제거 (오른쪽으로 추가 이동) */
        margin-left: auto; /* 오른쪽 끝으로 이동 (가격 바로 왼쪽) */
        padding-left: 1.7em; /* 한글 기준 1.5글자 + 아주 조금 추가 이동 */
    }
    
    .product-link-btn,
    .price-report-btn,
    .refresh-product-btn {
        padding: 2px 4px;
        font-size: 0.6rem;
        min-height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        min-width: 30px;
        flex-shrink: 0;
    }
    
    .final-price,
    .product-price {
        font-size: 1rem;
        font-weight: 700;
        color: #dc2626;
    }
    
    .discount-rate {
        font-size: 1rem;
        font-weight: 700;
        margin-right: 2px;
    }
    
    .discount-rate-low {
        color: #000000; /* 검정 - 30% 이하 */
    }
    
    .discount-rate-medium {
        color: #1d4ed8; /* 파랑 - 30% 이상 60% 미만 (가격 바뀜 버튼 계열) */
    }
    
    .discount-rate-high {
        color: #ff1744; /* 빨강 - 60% 이상 (그대로) */
    }
    
    .product-original-price {
        text-align: right;
        margin-right: 0;
        margin-left: auto;
        font-size: 1rem;
        font-weight: 700;
        color: #9ca3af; /* 연한 회색 */
        display: flex;
        align-items: center;
        gap: 2px;
    }
    
    .info-discount-label {
        color: #9333ea;
        font-size: 1rem;
        font-weight: 700;
        margin-right: 2px;
    }
    
    .product-current-price {
        display: flex;
        justify-content: flex-start;
        padding: 2px 0;
        margin-left: 0;
    }
    
    .product-category {
        font-size: 0.75rem;
        padding: 2px 4px;
        background: linear-gradient(135deg, #e0f2fe, #bae6fd);
        border-radius: 4px;
        color: #000000;
        font-weight: 600;
        flex-shrink: 0;
        margin: 0;
    }
    
    .product-store {
        font-size: 0.7rem;
        color: #6b7280;
    }
    
    .product-volume {
        font-size: 0.8rem;
    }
    
    /* 폼 모바일 최적화 */
    .product-form-section:not(.collapsed) {
        padding: 16px;
    }
    
    .product-form-section .section-header h3 {
        font-size: 1rem;
    }
    
    .card-settings:not(.collapsed) {
        padding: 16px;
    }
    
    .card-settings .section-header h3 {
        font-size: 1rem;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 1rem;
        min-height: 44px;
    }
    
    .submit-btn {
        padding: 14px;
        font-size: 1.05rem;
        min-height: 48px;
    }
    
    /* 관리자 패널 모바일 */
    .admin-controls {
        flex-direction: row;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 관리자 패널 모바일 스크롤 최적화 */
    .admin-panel {
        position: fixed !important;
        top: 65px !important; /* 버튼 바와 헤더 로고 아래로 이동 */
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        border-radius: 0 0 16px 16px !important;
        z-index: 9996 !important; /* 가장 낮게 설정하여 겹치지 않게 */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
        border-top: 2px solid #e2e8f0 !important; /* 상단 회색 선 추가 */
        background: white !important;
        margin-right: 0;
        transition: margin-right 0.3s ease;
        scroll-behavior: smooth;
        scrollbar-width: thin;
        scrollbar-color: #3b82f6 #f1f5f9;
    }
    
    .admin-panel:not(.collapsed) {
        max-height: 80vh !important;
        padding: 20px !important;
        overflow-y: auto !important;
    }
    
    .admin-panel.collapsed {
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* adminPanel 컨테이너의 collapsed 상태 */
    #adminPanel:not(.collapsed) {
        max-height: 80vh !important;
        padding: 20px !important;
        overflow-y: auto !important;
    }
    
    #adminPanel.collapsed {
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* 관리 패널만 완전 숨김 (모바일 초기 상태) */
    #adminPanel {
        display: none !important;
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
    }
    
    #adminPanel:not(.collapsed) {
        display: block !important;
        max-height: 80vh !important;
        padding: 20px !important;
        overflow-y: auto !important;
        visibility: visible !important;
    }
    
    /* 최저가신고와 필독칸은 정상 동작 (모바일) */
    /* 기본 스타일은 .header-dropdown에서 처리됨 */
    
    .admin-btn {
        flex: 1;
        min-width: 0;
        padding: 6px 8px;
        min-height: 32px;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    /* 관리 메뉴 메인 버튼들 최소화 */
    .admin-panel .admin-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-height: 30px;
        flex: 1;
        min-width: 0;
    }
    
    /* 관리 메뉴 버튼들 최소화 */
    .admin-controls .approve-btn,
    .admin-controls .edit-btn,
    .admin-controls .reject-btn,
    .admin-controls .link-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-height: 30px;
        flex: 1;
        min-width: 0;
    }
    
    /* 메시지 모바일 */
    .message-content {
        padding: 24px 20px;
        margin: 16px;
        width: calc(100% - 32px);
    }
    
    .message-content h4 {
        font-size: 1.3rem;
    }
    
    .message-content p {
        font-size: 1rem;
    }
    
    .close-btn {
        padding: 14px 30px;
        min-height: 48px;
    }
    
    /* 승인/거절 버튼 */
    .approve-btn,
    .reject-btn {
        padding: 12px 20px;
        min-height: 44px;
        font-size: 0.95rem;
    }
    
    .pending-product-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .pending-product-actions button {
        width: 100%;
    }
}

/* 작은 모바일 기기 (iPhone SE, 소형 안드로이드 등) */
@media (max-width: 375px) {
    .header-center {
        gap: 4px;
    }
    
    .logo {
        font-size: 0.9rem;
    }
    
    .search-container {
        gap: 4px;
    }
    
    .search-input {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    
    .search-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .header-btn {
        font-size: 0.7rem;
        padding: 6px 8px;
        min-height: 34px;
    }
    
    .header-right .header-btn {
        padding: 3px 4px;
        font-size: 0.55rem;
        min-height: 26px;
    }
    
    /* 작은 모바일에서 드롭다운 최적화 */
    .header-dropdown {
        top: 95px; /* 작은 화면에서도 카테고리 바를 가리지 않도록 */
    }
    
    .header-dropdown:not(.collapsed) {
        padding-top: 20px;
        max-height: 65vh;
    }
    
    .product-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .product-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
        min-height: auto;
        width: 100%;
    }
    
    /* 작은 모바일: 썸네일 이미지 (20% 감소: 68px) */
    .product-thumbnail {
        width: 68px;
        height: 68px;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .category-item {
        padding: 2px 5px;
        font-size: 0.65rem;
        max-width: 60px;
    }
    
    .product-price {
        font-size: 0.85rem;
    }
    
    .product-link-btn,
    .price-report-btn,
    .refresh-product-btn {
        padding: 1px 3px;
        font-size: 0.55rem;
        min-width: 28px;
        min-height: 18px;
    }
    
    /* 관리 메뉴 버튼들 더욱 최소화 */
    .admin-controls .approve-btn,
    .admin-controls .edit-btn,
    .admin-controls .reject-btn,
    .admin-controls .link-btn {
        padding: 4px 6px;
        font-size: 0.65rem;
        min-height: 28px;
    }
    
    /* 관리 메뉴 메인 버튼들 더욱 최소화 */
    .admin-panel .admin-btn {
        padding: 4px 6px;
        font-size: 0.65rem;
        min-height: 26px;
    }
    
    .product-category {
        font-size: 0.65rem;
        padding: 1px 3px;
        margin: 0;
    }
}

/* 유틸리티 클래스 */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 1.1rem;
}

/* 새로운 컴팩트 레이아웃 */
/* product-row-1 스타일은 위쪽에 정의됨 (순위 표시 포함) */

.product-row-2 {
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.row-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.store-time-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #6b7280;
    flex: 1;
}

.update-time {
    font-size: 0.7rem;
    color: #000000;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

/* 3시간 이내 - 연두 형광색 배경 */
.update-time.recent {
    background: linear-gradient(45deg, #a0ff80, #bfff60);
    animation: glow-green 2s ease-in-out infinite alternate;
    color: #2d5a1d;
}

/* 3~10시간 - 주황 형광색 배경 */
.update-time.daily {
    background: linear-gradient(45deg, #ffaa00, #ff9900);
    animation: glow-orange 2s ease-in-out infinite alternate;
    color: #663d00;
}

/* 10시간 이상 - 빨강 형광색 배경 */
.update-time.old {
    background: linear-gradient(45deg, #ff6666, #ff4444);
    animation: glow-red 2s ease-in-out infinite alternate;
    color: #ffffff;
}

.product-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.product-category {
    font-size: 0.7rem;
    color: #000000;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
    font-weight: 600;
}

.product-store {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
}

.product-link-btn {
    display: inline-flex;
    padding: 3px 6px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.65rem;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2);
    min-width: 38px;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    flex-shrink: 0;
}

.product-link-btn:hover {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.price-report-btn {
    padding: 3px 6px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); /* 파란색 계열 */
    color: white;
    border: none;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
    min-width: 38px;
    white-space: nowrap;
    min-height: 24px;
    flex-shrink: 0;
}

.price-report-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af); /* 파란색 호버 */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* 업데이트 시간 표시 제거 - 모바일 최적화 */

/* 삭제 확인 팝업 스타일 */
.delete-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2147483647 !important; /* 관리 패널(z-index:100001)보다 위에 표시 */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.delete-confirmation-overlay.open {
    opacity: 1;
    visibility: visible;
}

.delete-confirmation-popup {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.delete-confirmation-overlay.open .delete-confirmation-popup {
    transform: scale(1);
}

.delete-confirmation-header {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.delete-confirmation-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.delete-confirmation-content {
    padding: 25px;
    text-align: center;
}

.delete-confirmation-content p {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #374151;
}

.delete-warning {
    color: #ef4444 !important;
    font-weight: 600;
    font-size: 0.95rem;
}

.delete-confirmation-actions {
    padding: 20px 25px 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.delete-yes-btn, .delete-no-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.delete-yes-btn {
    background: #ef4444;
    color: white;
}

.delete-yes-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.delete-no-btn {
    background: #6b7280;
    color: white;
}

.delete-no-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

/* 관리자 알림 배지 */
.admin-notification {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.admin-notification.hidden {
    display: none;
}

/* 깜빡이는 애니메이션 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        background: #ef4444;
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
        background: #dc2626;
    }
}

.header-btn {
    position: relative;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .delete-confirmation-overlay {
        padding-top: 50px;
    }
    
    .delete-confirmation-popup {
        width: 95%;
        margin: 0 10px;
    }
    
    .delete-confirmation-header h3 {
        font-size: 1.2rem;
    }
    
    .delete-confirmation-content p {
        font-size: 1rem;
    }
    
    .delete-confirmation-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .delete-yes-btn, .delete-no-btn {
        width: 100%;
        padding: 15px;
    }
    
    .admin-notification {
        top: 2px;
        right: 2px;
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
}

/* 가격 변동 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-content-small {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header-small {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-small h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn-small {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn-small:hover {
    opacity: 0.7;
}

.modal-body-small {
    padding: 20px;
}

.modal-body-small .form-group {
    margin-bottom: 16px;
}

.modal-body-small .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.modal-body-small input {
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.modal-body-small input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-actions-small {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.submit-btn-small, .cancel-btn-small {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn-small {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.submit-btn-small:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
}

.cancel-btn-small {
    background: #e5e7eb;
    color: #374151;
}

.cancel-btn-small:hover {
    background: #d1d5db;
}

/* 품절 단계별 X선 스타일 */
.out-of-stock-stage1::before,
.out-of-stock-stage2::before,
.out-of-stock-stage3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* 1단계 - 초록색 X선 */
.out-of-stock-stage1::before {
    background-image: linear-gradient(to top left, transparent 48%, #10b981 50%, transparent 52%), 
                      linear-gradient(to top right, transparent 48%, #10b981 50%, transparent 52%);
    opacity: 0.3;
}

/* 2단계 - 노란색 X선 */
.out-of-stock-stage2::before {
    background-image: linear-gradient(to top left, transparent 48%, #f59e0b 50%, transparent 52%), 
                      linear-gradient(to top right, transparent 48%, #f59e0b 50%, transparent 52%);
    opacity: 0.4;
}

/* 3단계 - 빨강색 X선 */
.out-of-stock-stage3::before {
    background-image: linear-gradient(to top left, transparent 48%, #ef4444 50%, transparent 52%), 
                      linear-gradient(to top right, transparent 48%, #ef4444 50%, transparent 52%);
    opacity: 0.5;
}

/* 카테고리 품절 단계별 스타일 */
.category-out-of-stock-stage1 {
    border-left: 4px solid #10b981 !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%) !important;
}

.category-out-of-stock-stage2 {
    border-left: 4px solid #f59e0b !important;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, transparent 100%) !important;
}

.category-out-of-stock-stage3 {
    border-left: 4px solid #ef4444 !important;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, transparent 100%) !important;
}

/* ==========================================
   모바일 - 3가지 메뉴 최상위 보장 (최종 강제 해결책)
   파일 맨 끝에 배치하여 모든 규칙 덮어쓰기
   ========================================== */
@media (max-width: 768px) {
    /* 최저가 신고 드롭다운 - 열린 상태만 */
    #productFormDropdown.header-dropdown:not(.collapsed) {
        position: fixed !important;
        top: 65px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        z-index: 2147483647 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        will-change: auto !important;
        contain: none !important;
    }
    
    /* 최저가 신고 드롭다운 - 닫힌 상태 (숨김) */
    #productFormDropdown.header-dropdown.collapsed {
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
    
    /* 필독 패널 - 열린 상태만 */
    #noticePanel.notice-panel:not(.collapsed) {
        position: fixed !important;
        top: 65px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        z-index: 2147483647 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        will-change: auto !important;
        contain: none !important;
    }
    
    /* 필독 패널 - 닫힌 상태 (숨김) */
    #noticePanel.notice-panel.collapsed {
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
    
    /* 관리 패널 - 열린 상태만 */
    #adminPanel.header-dropdown:not(.collapsed) {
        position: fixed !important;
        top: 65px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        z-index: 2147483647 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        will-change: auto !important;
        contain: none !important;
        display: block !important;
    }
    
    /* 관리 패널 - 닫힌 상태 (숨김) */
    #adminPanel.header-dropdown.collapsed,
    #adminPanel[style*="display: none"],
    #adminPanel[style*="display:none"] {
        display: none !important;
        visibility: hidden !important;
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
    
    /* 헤더와 로고는 항상 보이게 - 드롭다운보다 낮지만 충분히 높게 */
    .header {
        position: fixed !important;
        z-index: 99999 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .header .logo,
    .header-center,
    .header-left,
    .header-right {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 모바일 버튼 바는 항상 보이게 - 드롭다운보다 1 낮지만 거의 최대값 */
    .top-button-bar.mobile-only {
        z-index: 2147483646 !important;
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
        position: fixed !important;
    }
    
    .top-button-bar.mobile-only .header-btn {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: inherit !important;
    }
    
    /* 카테고리바도 항상 보이게 */
    .category-bar {
        z-index: 100000 !important;
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
        position: fixed !important;
    }
    
    /* 상품 리스트 및 다른 요소는 확실히 뒤로 */
    .container > *:not(#productFormDropdown):not(#noticePanel):not(#adminPanel):not(.header):not(.top-button-bar):not(.category-bar):not(.sort-bar),
    .main-content,
    .product-list,
    .product-item {
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* 정렬 바는 항상 보이게 (하지만 최상단 버튼바보다는 낮게) */
    .sort-bar {
        z-index: 9998 !important; /* 최상단 버튼바(2147483646)보다 훨씬 낮게, 카테고리바(100000)보다도 낮게 */
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
        position: fixed !important;
        pointer-events: auto !important;
    }
}
