/* ============================================================
   코베이 A.I 챗봇 위젯 스타일
   모바일: 상단 헤더에서 트리거 → 상하좌우 10% 마진 모달
   PC:     우측 사이드바에서 트리거 → 패널 좌측에 열림
   ============================================================ */

/* ---------- PC 사이드바 버튼 영역 ---------- */
.ai-chat-pc-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    position: relative;
}

.ai-chat-pc-btns .btn-top {
    width: 70%;
    height: 40px;
    margin-top: 0;
    font-size: 14px;
}

.floating_off_btn {
    width: 100%;
}

.ai-chat-quick-item {
    position: relative;
}

#aiChatPcBtn {
    gap: 4px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.ai-pc-btn-icon {
    line-height: 1;
    pointer-events: none;
    display: block;
    margin: -2px 0;
}

/* ---------- PC 말풍선 (A.I 버튼 좌측) ---------- */
#aiChatBubble {
    display: block;
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    transform: translateY(-50%);
    white-space: nowrap;
    background: #222;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    animation: aiBubbleFadeIn 0.3s ease;
}

#aiChatBubble::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 9px solid #222;
}

#aiChatBubble.hidden {
    display: none !important;
}

#aiChatBubble span {
    display: inline;
    margin: 0;
    padding: 0;
}

#aiChatBubbleClose {
    display: inline;
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    padding: 0;
    margin: 0 0 0 6px;
    line-height: inherit;
    vertical-align: baseline;
}

#aiChatBubbleClose:hover {
    color: #ddd;
}

@keyframes aiBubbleFadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(6px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ---------- 모바일 헤더 버튼 영역 ---------- */
.header-mobile-ai {
    display: none;
}

#aiChatMobileBtn {
    display: block;
    background: #222;
    color: #fff;
    border-radius: 10px;
    text-align: center;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.3;
    -webkit-tap-highlight-color: transparent;
}

#aiChatMobileBtn em {
    font-style: normal;
}

/* ---------- 모바일 말풍선 (헤더 A.I 버튼 하단) ---------- */
#aiChatMobileBubble {
    display: none;
    position: fixed;
    left: auto;
    top: auto;
    white-space: nowrap;
    background: #222;
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    padding: 6px 10px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    animation: aiMobileBubbleIn 0.3s ease;
}

#aiChatMobileBubble::before {
    content: '';
    position: absolute;
    left: var(--ai-mobile-bubble-arrow-left, 50%);
    top: -8px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #222;
}

#aiChatMobileBubble.show {
    display: block;
}

#aiChatMobileBubble span {
    display: inline;
    margin: 0;
    padding: 0;
}

#aiChatMobileBubbleClose {
    display: inline;
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    padding: 0;
    margin: 0 0 0 4px;
    line-height: inherit;
    vertical-align: baseline;
}

#aiChatMobileBubbleClose:hover {
    color: #ddd;
}

@keyframes aiMobileBubbleIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 오버레이 (패널 열렸을 때 배경) ---------- */
#aiChatOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 10002;
    animation: aiOverlayIn 0.2s ease;
}

#aiChatOverlay.active {
    display: block;
}

@keyframes aiOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- 챗봇 패널 (PC 기본) ---------- */
#aiChatPanel {
    display: none;
    position: fixed;
    right: 225px;
    bottom: 12%;
    z-index: 10003;
    width: 370px;
    max-width: calc(100vw - 250px);
    height: 640px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
    animation: aiPanelSlideInPC 0.25s ease;
}

#aiChatPanel.active {
    display: flex;
}

@keyframes aiPanelSlideInPC {
    from { opacity: 0; transform: translateX(16px) scale(0.97); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ---------- 메뉴 화면 ---------- */
.ai-chat-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 32px 24px;
    gap: 16px;
    position: relative;
}

.ai-chat-menu__title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    text-align: center;
}

.ai-chat-menu__btn {
    width: 100%;
    max-width: 260px;
    padding: 16px 20px;
    border: 2px solid #222;
    border-radius: 12px;
    background: #fff;
    color: #222;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ai-chat-menu__btn:hover {
    background: #222;
    color: #fff;
}

/* ---------- 채팅 화면 ---------- */
.ai-chat-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.ai-chat-view.active {
    display: flex;
}

/* 채팅 헤더 */
.ai-chat-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
}

.ai-chat-header__back {
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-header__back svg {
    width: 18px;
    height: 18px;
}

.ai-chat-header__back:hover {
    background: #eee;
    color: #222;
}

.ai-chat-header__title {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.ai-chat-header__actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- 아이콘 + 라벨 통합 버튼 (메인,처음으로,닫기) --- */
.ai-chat-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    border: none;
    background: transparent;
    color: #555;
    cursor: pointer;
    padding: 2px 8px 4px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}

.ai-chat-icon-btn svg {
    width: 18px;
    height: 18px;
}

.ai-chat-icon-btn__icon {
    font-size: 18px;
    line-height: 1;
    height: 18px;
    display: flex;
    align-items: center;
}

.ai-chat-icon-btn__label {
    font-size: 9px;
    font-weight: 600;
    color: #555;
    line-height: 1;
}

.ai-chat-icon-btn:hover {
    background: #eee;
    color: #222;
}

.ai-chat-icon-btn.ai-chat-icon-btn--close {
    color: #999;
}

.ai-chat-icon-btn.ai-chat-icon-btn--close:hover {
    background: #eee;
    color: #222;
}

#aiChatMenuClose {
    position: absolute;
    top: 12px;
    right: 12px;
}

.ai-chat-popup__header .ai-chat-icon-btn {
    color: #999;
}

.ai-chat-popup__header .ai-chat-icon-btn:hover {
    background: #eee;
    color: #222;
}

/* 채팅 메시지 영역 */
.ai-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    background: #f7f8fa;
}

.ai-chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
    word-break: break-word;
    margin-bottom: 12px;
}

.ai-chat-msg:last-child {
    margin-bottom: 0;
}

.ai-chat-msg--bot {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ai-chat-msg--user {
    margin-left: auto;
    background: #222;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-chat-msg--typing {
    background: #fff;
    color: #999;
    border-bottom-left-radius: 4px;
    font-style: italic;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ai-chat-msg__notice {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    color: #888;
}

/* 채팅 입력 영역 */
.ai-chat-input {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}

.ai-chat-input textarea {
    flex: 1;
    resize: none;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 16px;
    line-height: 1.5;
    font-family: inherit;
    max-height: 100px;
    min-height: 42px;
    outline: none;
    transition: border-color 0.15s;
}

@media screen and (min-width: 1201px) {
    .ai-chat-input textarea {
        font-size: 14px;
    }
}

.ai-chat-input textarea:focus {
    border-color: #222;
}

.ai-chat-input textarea::placeholder {
    color: #aaa;
}

.ai-chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #222;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ai-chat-send:hover {
    background: #444;
}

.ai-chat-send:disabled {
    background: #ccc;
    cursor: default;
}

.ai-chat-send svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* ---------- 바로가기 그룹 ---------- */
.ai-chat-shortcuts {
    padding: 4px 0 4px;
}

.ai-chat-shortcuts__section {
    margin-bottom: 10px;
}

.ai-chat-shortcuts__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
}

.ai-chat-shortcuts__label-note {
    margin-left: 6px;
    font-size: 10px;
    font-weight: 500;
    color: #888;
}

.ai-chat-shortcuts__group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-chat-shortcut-btn {
    display: inline-block;
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: #222;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.ai-chat-shortcut-btn:hover {
    background: #444;
}

.ai-chat-shortcut-btn:active {
    transform: scale(0.96);
}

.ai-chat-shortcut-btn--login-required {
    background: #d8d8d8;
    color: #666;
}

.ai-chat-shortcut-btn--login-required:hover {
    background: #cfcfcf;
}

/* ---------- 모바일 대응 (max-width: 1200px) ---------- */
@media screen and (max-width: 1200px) {
    .ai-chat-shortcut-btn {
        font-size: 11px;
        padding: 5px 8px;
    }

    .header-mobile-ai {
        display: flex;
        align-items: center;
        position: absolute;
        right: 16px;
        right: max(16px, env(safe-area-inset-right));
        top: 70%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .header-mobile-ai #aiChatMobileBtn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 54px;
        height: 34px;
        padding: 0 10px;
        border-radius: 999px;
        background: #222;
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    }

    .header-mobile-ai #aiChatMobileBtn span {
        display: block;
        margin-top: -1px;
        font-size: 15px;
        line-height: 1;
    }

    #aiChatPanel {
        /* 모바일: 화면 95% */
        top: 2.5vh;
        left: 2.5vw;
        right: 2.5vw;
        bottom: 2.5vh;
        width: auto;
        max-width: none;
        height: auto;
        max-height: none;
        border-radius: 16px;
        animation: aiPanelFadeIn 0.25s ease;
    }
}

@keyframes aiPanelFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---------- iOS safe-area ---------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media screen and (max-width: 1200px) {
        #aiChatPanel {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* ---------- 팝업 레이어 (구매/판매 내역) - PC ---------- */
#aiChatPopup {
    display: none;
    position: fixed;
    right: 605px; /* 225px(floating menu+gap) + 370px(panel) + 10px(gap) */
    bottom: 12%;
    z-index: 10004;
    width: 370px;
    height: 640px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
    animation: aiPopupSlideInPC 0.25s ease;
}

#aiChatPopup.active {
    display: flex;
}

@media screen and (min-width:1201px) and (max-width:1800px){
    #aiChatPanel {
        right: 130px;
        max-width: calc(100vw - 155px);
    }

    #aiChatPopup {
        right: 510px;
    }
}

@keyframes aiPopupSlideInPC {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* 팝업 헤더 */
.ai-chat-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
}

.ai-chat-popup__title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

/* 팝업 바디 */
.ai-chat-popup__body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.ai-chat-popup__loading {
    text-align: center;
    padding: 40px 16px;
    color: #999;
    font-size: 14px;
}

.ai-chat-popup__empty {
    text-align: center;
    padding: 40px 16px;
    color: #999;
    font-size: 14px;
}

/* 아이템 목록 */
.ai-chat-popup__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ai-chat-popup__item:hover {
    background: #f7f8fa;
}

.ai-chat-popup__item:last-child {
    border-bottom: none;
}

.ai-chat-popup__item input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #222;
    cursor: pointer;
}

.ai-chat-popup__item-info {
    flex: 1;
    min-width: 0;
}

.ai-chat-popup__item-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chat-popup__item-name--full {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.ai-chat-popup__item-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-popup__item-price {
    font-size: 13px;
    font-weight: 600;
    color: #222;
}

.ai-chat-popup__item-status {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0f0f0;
    color: #555;
    font-weight: 500;
}

/* 상태별 색상 */
.ai-chat-popup__item-status--낙찰 { background: #e8f5e9; color: #2e7d32; }
.ai-chat-popup__item-status--거래완료 { background: #e3f2fd; color: #1565c0; }
.ai-chat-popup__item-status--배송중 { background: #fff3e0; color: #e65100; }
.ai-chat-popup__item-status--유찰 { background: #fce4ec; color: #c62828; }
.ai-chat-popup__item-status--반품처리중 { background: #fce4ec; color: #c62828; }
.ai-chat-popup__item-status--입금대기 { background: #f3e5f5; color: #6a1b9a; }
.ai-chat-popup__item-status--수령확인 { background: #e0f2f1; color: #00695c; }

/* 팝업 푸터 (액션 버튼) */
.ai-chat-popup__footer {
    padding: 10px 16px;
    border-top: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
    display: none;
}

.ai-chat-popup__footer.active {
    display: block;
}

.ai-chat-popup__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ai-chat-popup__action-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ai-chat-popup__action-btn:hover {
    border-color: #222;
    color: #222;
}

.ai-chat-popup__action-btn.selected {
    background: #222;
    color: #fff;
    border-color: #222;
}

.ai-chat-popup__submit {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #222;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ai-chat-popup__submit:hover {
    background: #444;
}

.ai-chat-popup__submit:disabled {
    background: #ccc;
    cursor: default;
}

.ai-chat-popup__hint {
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
    text-align: center;
}

/* ---------- 팝업 레이어 모바일 대응 ----------
   모바일에서는 채팅 패널 위에 완전히 덮도록 동일 영역 + 더 높은 z-index */
@media screen and (max-width: 1200px) {
    #aiChatPopup {
        top: 2.5vh;
        left: 2.5vw;
        right: 2.5vw;
        bottom: 2.5vh;
        width: auto;
        max-width: none;
        height: auto;
        max-height: none;
        border-radius: 16px;
        z-index: 10005;
        animation: aiPopupFadeIn 0.25s ease;
    }
}

@keyframes aiPopupFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---------- 팝업 iOS safe-area ---------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media screen and (max-width: 1200px) {
        #aiChatPopup {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* ---------- 가격 검색 힌트 메시지 ---------- */
.ai-chat-msg--hint {
    background: #f0f0f0 !important;
    color: #888 !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    padding: 8px 12px !important;
    margin-bottom: 6px !important;
    box-shadow: none !important;
}

/* ---------- 가격 결과 카드 (채팅 버블 내부) ---------- */
.ai-chat-msg--price {
    max-width: 92% !important;
    padding: 0 !important;
    background: #fff !important;
    border-radius: 14px;
    overflow: visible;
}

.ai-price-result {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    position: relative;
    overflow: visible;
}

.ai-price-result__header {
    font-weight: 700;
    font-size: 13px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #222;
}

.ai-price-result__count {
    font-weight: 400;
    font-size: 12px;
    color: #888;
}

/* 아이템 목록 */
.ai-price-items {
    padding: 4px 0;
}

.ai-price-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid #f7f7f7;
}

.ai-price-item:last-child {
    border-bottom: none;
}

.ai-price-item__rank {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-price-item__info {
    flex: 1;
    min-width: 0;
}

.ai-price-item__name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-price-item__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ai-price-item__price {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.ai-price-item__cat {
    font-size: 11px;
    color: #888;
    background: #f5f5f5;
    padding: 1px 6px;
    border-radius: 4px;
}

.ai-price-item__type {
    font-size: 10px;
    color: #888;
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 4px;
}

/* 카테고리 통계 */
.ai-price-cats {
    border-top: 1px solid #f0f0f0;
    padding: 8px 14px 10px;
    background: #fafafa;
}

.ai-price-cat {
    margin-bottom: 6px;
}

.ai-price-cat:last-child {
    margin-bottom: 0;
}

.ai-price-cat__name {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

.ai-price-cat__count {
    font-size: 11px;
    color: #999;
    margin-left: 2px;
}

.ai-price-cat__tiers {
    margin-top: 3px;
}

.ai-price-cat__tier {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    line-height: 1.6;
}

.ai-price-cat__tier-grade {
    color: #666;
    min-width: 56px;
}

.ai-price-cat__tier-range {
    color: #222;
    font-weight: 500;
}

/* 카테고리 섹션 구분 */
.ai-price-cats__section {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    margin-top: 6px;
}

.ai-price-cats__section:first-child {
    margin-top: 0;
}

/* 카테고리 링크 공통 */
.ai-price-cat__link {
    display: inline-block;
    text-decoration: none;
    color: #222;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 4px 10px;
    margin: 2px 3px 2px 0;
    font-size: 12px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ai-price-cat__link:hover {
    border-color: #222;
    background: #f7f7f7;
}

.ai-price-cat__link:active {
    background: #eee;
}

.ai-price-cat__link .ai-price-cat__name {
    font-weight: 600;
}

.ai-price-cat__link .ai-price-cat__count {
    font-weight: 400;
    color: #888;
    margin-left: 2px;
}

/* 더보기 카테고리 칩 (가로 나열) */
.ai-price-cat__link--more {
    display: inline-block;
}

/* 상세 더보기 링크 */
.ai-price-cat__detail {
    display: inline-block;
    font-size: 11px;
    color: #666;
    text-decoration: none;
    margin-top: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ai-price-cat__detail:hover {
    color: #222;
    background: #eee;
    text-decoration: underline;
}

.ai-price-cat__detail:active {
    background: #ddd;
}
