/* PC 온라인 견적 - 다나와 스타일 */

/* ===== gnuboard 불필요 요소 제거 (PC 견적 앱 전용) ===== */
#container_title {
    display: none !important;
    /* 페이지 제목 h2 숨김 */
}

#container {
    padding: 0 !important;
    margin: 0 !important;
}

#cbp-hrmenu-btm,
.rb_sidemenu,
#aside {
    display: none !important;
    /* 모바일메뉴·사이드위젯 숨김 */
}

/* ===== 타이틀 하단 라인 제거 ===== */
.mb-header {
    border-bottom: none !important;
    margin-bottom: 10px !important;
}

/* ===== 빠른 카테고리 네비게이션 바 ===== */
.dw-quick-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 14px 14px;
    margin-bottom: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.dw-quick-nav::-webkit-scrollbar {
    display: none;
}

.dw-quick-nav-label {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    margin-right: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dw-quick-nav-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
    flex-shrink: 0;
}

.dw-quick-nav-btn:hover {
    border-color: #2b2b2b;
    color: #2b2b2b;
}

.dw-quick-nav-btn.active {
    background: #2b2b2b;
    border-color: #2b2b2b;
    color: #fff;
}

/* ===== 전체 앱 컨테이너 (mb-wrap 가로폭 내, 높이는 JS로 계산) ===== */
.dw-wrap {
    display: flex;
    flex-direction: row;
    font-family: inherit;
    font-size: 13px;
    color: #333;
    width: 100%;
    gap: 10px;
    padding-top: 10px;
    box-sizing: border-box;
    /* height: JS로 동적 설정 (window.innerHeight - getBoundingClientRect().top) */
}

/* ===== 좌측: 상품 목록 영역 ===== */
.dw-product-area {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    min-width: 0;
    min-height: 0;
    /* flex 자식의 overflow 정상 동작에 필수 */
    display: flex;
    flex-direction: column;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
}

/* 통합 패널 헤더 바 (카테고리명 + 검색 + 정렬) */
.dw-panel-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 52px;
    box-sizing: border-box;
}

/* 좌측: 카테고리명 + 갯수 한 줄 */
.dw-panel-bar .dw-panel-title-wrap {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
    flex-shrink: 0;
}

.dw-panel-bar .dw-panel-title {
    font-size: 16px;
    font-weight: 800;
    color: #111;
}

.dw-panel-bar .dw-panel-count {
    font-size: 11px;
    color: #888;
    font-weight: 400;
}

/* 우측: 검색 + 정렬 그룹 */
.dw-panel-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.dw-search-input-wrap {
    width: 200px;
    position: relative;
}

.dw-search-input {
    width: 100%;
    height: 32px;
    padding: 0 32px 0 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.dw-search-input:focus {
    border-color: #888;
}

.dw-search-icon {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.dw-sort-select {
    height: 32px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 12px;
    font-family: inherit;
    color: #333;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
}

.dw-sort-select:focus {
    border-color: #888;
}

/* 패널 영역 */
.dw-panels-wrap {
    padding: 0;
    flex: 1;
}

/* 빈 상태 (카테고리 미선택) */
.dw-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #aaa;
    font-size: 14px;
}

.dw-empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ===== 상품 패널 (카테고리별) ===== */
.dw-panel {
    display: none;
}

.dw-panel.active {
    display: block;
}

.dw-panel-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

/* ===== 상품 목록 (리스트 스타일) ===== */
.dw-product-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.dw-item {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.dw-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: #efefef;
}

.dw-item:last-child::after {
    display: none;
}

/* 상품 이미지 */
.dw-item-img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 5px;
    flex-shrink: 0;
    background: #fafafa;
}

.dw-item-img-placeholder {
    width: 74px;
    height: 74px;
    border-radius: 5px;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 24px;
    flex-shrink: 0;
}

/* 상품 정보 */
.dw-item-info {
    flex: 1;
    min-width: 0;
}

.dw-item-maker {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dw-item-spec {
    font-size: 11px;
    color: #777;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 상세보기 버튼 */
.dw-detail-btn {
    display: inline-block;
    margin-top: 3px;
    font-size: 10px;
    color: #c0392b;
    background: none;
    border: 1px solid #e5bab4;
    border-radius: 3px;
    padding: 1px 5px;
    cursor: pointer;
    line-height: 1.6;
    font-family: inherit;
    transition: background .1s;
}

.dw-detail-btn:hover {
    background: #fdf0ee;
}

/* 상세보기 + 차트 버튼 묶음 */
.dw-item-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 3px;
}
.dw-item-btns .dw-detail-btn {
    margin-top: 0;
}

/* 가격 추이 차트 버튼 (관리자 전용) */
.dw-chart-btn {
    display: inline-block;
    font-size: 10px;
    color: #9333EA;
    background: none;
    border: 1px solid #bfdbfe;
    border-radius: 3px;
    padding: 1px 5px;
    cursor: pointer;
    line-height: 1.6;
    font-family: inherit;
    transition: background .1s;
}
.dw-chart-btn:hover {
    background: #fdf4ff;
}

/* 가격 변동 배지 (관리자 전용) */
.dw-price-change {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
    line-height: 1.4;
    margin-top: 1px;
}
.dw-price-change.up   { color: #ef4444; } /* 원가 상승 = 빨강 (판매자 부담) */
.dw-price-change.down { color: #16a34a; } /* 원가 하락 = 초록 (판매자 유리) */

/* ===== 상품 상세 모달 ===== */
.dw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.dw-modal {
    background: #fff;
    border-radius: 10px;
    width: 480px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .22);
}

.dw-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
}

.dw-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.dw-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 2px 6px;
}

.dw-modal-close:hover {
    color: #333;
}

.dw-modal-body {
    display: flex;
    gap: 16px;
    padding: 18px;
}

.dw-modal-img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 6px;
    flex-shrink: 0;
}

.dw-modal-info {
    flex: 1;
    min-width: 0;
}

.dw-modal-maker {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 4px;
}

.dw-modal-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 8px;
}

.dw-modal-spec {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-all;
}

.dw-modal-price {
    font-size: 16px;
    font-weight: 800;
    color: #1e1e1e;
    margin-bottom: 12px;
}

.dw-modal-link {
    display: inline-block;
    font-size: 12px;
    color: #fff;
    background: #c0392b;
    border-radius: 4px;
    padding: 5px 12px;
    text-decoration: none;
    font-weight: 600;
}

.dw-modal-link:hover {
    background: #a93226;
}

/* 가격 + 담기 버튼 */
.dw-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 110px;
}

.dw-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    text-align: right;
    white-space: nowrap;
}

.dw-item-price-unknown {
    font-size: 12px;
    color: #bbb;
}

/* 관리자 전용: 원가 [▲▼직전변동] → 판매가 인라인 표시 */
.dw-item-orig-price {
    color: #bbb;
    font-size: 11px;
    font-weight: 400;
}
.dw-item-sell-arrow {
    font-size: 13px;
    font-weight: 700;
    color: #111;
}

.dw-add-btn {
    padding: 6px 16px;
    background: #fff;
    color: #555;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    font-family: inherit;
}

.dw-add-btn:hover {
    background: #f0f0f0;
}

.dw-add-btn.selected-btn {
    background: #2b2b2b;
    color: #fff;
    border-color: #2b2b2b;
}

.dw-add-btn.selected-btn:hover {
    background: #111;
    border-color: #111;
}

/* 상품 없음 메시지 */
.dw-no-products {
    padding: 40px 0;
    text-align: center;
    color: #bbb;
    font-size: 13px;
}

/* ===== 페이지네이션 ===== */
.dw-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0 8px;
    flex-wrap: wrap;
}

.dw-pg-btn {
    padding: 5px 11px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: all .15s;
    font-family: inherit;
}

.dw-pg-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #2b2b2b;
    color: #2b2b2b;
}

.dw-pg-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.dw-pg-num {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: all .15s;
    font-family: inherit;
}

.dw-pg-num:hover:not(.active) {
    background: #f5f5f5;
    border-color: #2b2b2b;
    color: #2b2b2b;
}

.dw-pg-num.active {
    background: #2b2b2b;
    border-color: #2b2b2b;
    color: #fff;
    font-weight: 700;
}

.dw-pg-ellipsis {
    font-size: 12px;
    color: #bbb;
    padding: 0 2px;
}

.dw-pg-info {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    margin-left: 4px;
}

/* ===== 우측: 사이드바 ===== */
.dw-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    /* flex 자식의 overflow 정상 동작에 필수 */
}

.dw-sidebar-header {
    padding: 12px 14px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    background: #fff;
    flex-shrink: 0;
    letter-spacing: -0.02em;
    text-align: center;
}

/* ===== 카테고리 네비게이션 ===== */
.dw-cat-nav {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
    min-height: 180px;
    /* wrap 높이가 작아도 카테고리 목록이 가려지지 않도록 최소 높이 지정 */
}

/* 카테고리 그룹 */
.dw-group {
    margin-bottom: 1px;
}

.dw-group-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    letter-spacing: -0.01em;
    cursor: pointer;
    user-select: none;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    border-top: 2px solid #e0e0e0;
}

.dw-group-title:hover {
    background: #eeeeee;
}

.dw-group-arrow {
    font-size: 9px;
    transition: transform .2s;
    color: #888;
}

.dw-group.collapsed .dw-group-arrow {
    transform: rotate(-90deg);
}

.dw-group.collapsed .dw-group-body {
    display: none;
}

/* 카테고리 아이템 - 다나와 스타일 */
.dw-cat-item {
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background .12s;
    border-left: 3px solid transparent;
}

.dw-cat-item:hover {
    background: #f8f8f8;
}

.dw-cat-item.active {
    background: #2b2b2b;
    border-left-color: #2b2b2b;
}

.dw-cat-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dw-cat-item-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    transition: color .12s;
}

.dw-cat-item.active .dw-cat-item-label {
    color: #fff;
    font-weight: 700;
}

.dw-cat-item:hover .dw-cat-item-label {
    color: #111;
}

/* active 상태에서는 hover 시에도 흰색 유지 */
.dw-cat-item.active:hover {
    background: #3a3a3a;
}

.dw-cat-item.active:hover .dw-cat-item-label {
    color: #fff;
}

.dw-cat-count-badge {
    font-size: 10px;
    color: #999;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 10px;
    flex-shrink: 0;
    font-weight: 500;
}

.dw-cat-item.active .dw-cat-count-badge {
    background: rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .8);
}

/* 선택된 상품 미니 표시 (카테고리 아이템 아래) */
.dw-cat-selected-mini {
    margin-top: 7px;
    padding: 7px 9px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, .25);
    position: relative;
}

.dw-cat-selected-mini-remove {
    position: absolute;
    top: 5px;
    right: 7px;
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 12px;
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

.dw-cat-selected-mini-remove:hover {
    color: #e53e3e;
}

.dw-cat-selected-mini-name {
    font-size: 11px;
    color: #222;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: 16px;
}

.dw-cat-selected-mini-price {
    font-size: 11px;
    color: #c0392b;
    margin-top: 4px;
    font-weight: 700;
}

/* 다중선택 개별 항목 행 (2줄 레이아웃) */
.dw-cat-mini-item {
    display: block;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.dw-cat-mini-item:last-of-type {
    border-bottom: none;
}

.dw-cat-mini-item-name {
    flex: 1;
    font-size: 10px;
    color: #222;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-cat-mini-item-price {
    font-size: 10px;
    color: #c0392b;
    font-weight: 700;
    white-space: nowrap;
}

.dw-cat-mini-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 10px;
    padding: 0 0 0 2px;
    line-height: 1;
    flex-shrink: 0;
    font-family: inherit;
}

.dw-cat-mini-item-remove:hover {
    color: #e53e3e;
}

.dw-cat-mini-total {
    font-size: 11px;
    color: #c0392b;
    font-weight: 700;
    margin-top: 5px;
    text-align: right;
    border-top: 1px solid rgba(0, 0, 0, .1);
    padding-top: 4px;
}

/* ===== 공임비 섹션 (카테고리 하단) ===== */
.dw-labor-section {
    flex-shrink: 0;
    border-top: 2px solid #c8c8c8;
    padding: 0;
    background: #fff;
}

.dw-labor-title {
    font-size: 12px;
    font-weight: 700;
    color: #444;
    letter-spacing: -0.01em;
    padding: 9px 14px;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    border-top: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.dw-labor-body {
    padding-top: 5px;
}

.dw-labor-section.collapsed .dw-labor-body,
.dw-coupon-section.collapsed .dw-labor-body,
.dw-customer-form.collapsed .dw-labor-body {
    display: none;
}

.dw-labor-section.collapsed .dw-group-arrow,
.dw-coupon-section.collapsed .dw-group-arrow,
.dw-customer-form.collapsed .dw-group-arrow {
    transform: rotate(-90deg);
}

.dw-labor-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    padding: 0 12px;
}

.dw-labor-label {
    width: 62px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-align: right;
    white-space: nowrap;
}

.dw-labor-select {
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    color: #333;
    background: #fff;
    outline: none;
    font-family: inherit;
    cursor: pointer;
}

.dw-labor-select:focus {
    border-color: #2b2b2b;
}

/* ===== 견적 요약 (사이드바 하단, 고객폼 포함) ===== */
.dw-summary {
    flex-shrink: 0;
    border-top: 1px solid #e0e0e0;
    padding: 12px 14px;
    background: #fff;
}

.dw-sum-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dw-sum-count-label {
    font-size: 12px;
    color: #555;
}

.dw-sum-count-num {
    font-weight: 700;
    color: #2b2b2b;
}

.dw-sum-clear-btn {
    font-size: 11px;
    color: #999;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.dw-sum-clear-btn:hover {
    border-color: #e53e3e;
    color: #e53e3e;
}

.dw-sum-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
    padding: 9px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.dw-sum-total-label {
    font-size: 13px;
    color: #666;
}

.dw-sum-total-note {
    font-size: 10px;
    color: #bbb;
    margin-top: 2px;
}

.dw-sum-total-price {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.dw-sum-labor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.dw-sum-labor-label {
    color: #777;
}

.dw-sum-labor-price {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.dw-sum-grand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0 10px;
    border-top: 2px solid #d0d0d0;
    margin-top: 6px;
}

.dw-sum-grand-label {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.dw-sum-grand-price {
    font-size: 22px;
    font-weight: 800;
    color: #1e1e1e;
    white-space: nowrap;
}

/* 메인 액션 버튼 (견적 등록하기) */
.dw-btn-register {
    display: block;
    width: 100%;
    padding: 11px;
    background: #1e1e1e;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background .15s;
    font-family: inherit;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    box-sizing: border-box;
}

.dw-btn-register:hover {
    background: #000;
}

/* 보조 버튼 (견적저장/공유/출력) */
.dw-sum-secondary {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.dw-btn-sm {
    flex: 1;
    padding: 7px 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    color: #555;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dw-btn-sm:hover {
    border-color: #2b2b2b;
    color: #2b2b2b;
    background: #f5f5f5;
}

/* ===== 고객 정보 폼 (항상 표시) ===== */
.dw-customer-form {
    border-top: 1px solid #e8e8e8;
}

.dw-customer-form .dw-labor-body {
    padding: 8px 0 4px;
}

/* 가로 레이아웃: 라벨 왼쪽, 인풋 오른쪽 */
.dw-form-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    padding: 0 12px;
}

.dw-form-label {
    width: 62px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-align: right;
    white-space: nowrap;
}

.dw-form-input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.dw-form-input:focus {
    border-color: #2b2b2b;
}

select.dw-form-input {
    cursor: pointer;
    padding-right: 24px;
}

.dw-form-textarea {
    resize: vertical;
    min-height: 56px;
    line-height: 1.4;
}

/* 요청사항 행 — 라벨을 상단 정렬 */
.dw-form-row:has(.dw-form-textarea) {
    align-items: flex-start;
}

.dw-form-row:has(.dw-form-textarea) .dw-form-label {
    padding-top: 6px;
}

.dw-form-input[readonly] {
    background: #f8f8f8;
    color: #aaa;
    cursor: default;
    font-size: 11px;
}


/* ===== 관리자 패널 ===== */
.dw-admin-bar {
    border: 1px solid #e0e0e0;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
}

.dw-admin-bar.collapsed .dw-admin-body {
    display: none;
}

.dw-admin-bar.collapsed {
    border: none;
    margin-bottom: 0;
}

/* 타이틀 영역 토글 버튼 */
.dw-admin-toggle {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.dw-admin-toggle:hover {
    background: #f5f5f5;
    border-color: #999;
}

.dw-admin-body {
    padding: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 관리자 탭 네비게이션 */
.dw-admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    background: #f8f9fa;
    padding: 8px 12px 0;
}
.dw-admin-tab {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}
.dw-admin-tab:hover { color: #374151; background: #f0f0f0; }
.dw-admin-tab.active {
    color: #7C3AED;
    background: #fff;
    border-color: #e5e7eb;
    border-bottom-color: #fff;
}

/* 탭 콘텐츠 래퍼 */
.dw-admin-tab-content {
    padding: 12px 16px 16px;
}

/* 탭 패널 (숨김/표시) */
.dw-admin-tab-pane {
    display: none;
    flex-direction: column;
    gap: 10px;
}
.dw-admin-tab-pane.active {
    display: flex;
}

/* 섹션 카드 */
.dw-admin-section {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    overflow: hidden;
}

.dw-admin-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    background: #f2f3f5;
    padding: 6px 12px;
    border-bottom: 1px solid #e4e4e4;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.dw-admin-section-note {
    font-weight: 400;
    font-size: 10px;
    color: #888;
    text-transform: none;
    letter-spacing: 0;
}

/* 가로 필드 그리드 */
.dw-admin-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.dw-admin-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
}

.dw-admin-field label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    width: 60px;
    flex-shrink: 0;
    white-space: nowrap;
}

.dw-admin-field input {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
}

.dw-admin-field input:focus {
    outline: none;
    border-color: #2b2b2b;
    box-shadow: 0 0 0 2px rgba(43, 43, 43, .07);
}

/* 마진율 섹션: 그룹명이 길어서 label 유동폭 */
.dw-admin-field-margin {
    min-width: 0;
}

.dw-admin-field-margin label {
    width: auto;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-admin-field-margin input {
    width: 64px;
    flex: none;
    text-align: right;
}

/* 액션 버튼 행 */
.dw-admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.dw-admin-section .dw-admin-actions {
    border-top: 1px solid #f0f0f0;
}

.dw-admin-save {
    background: #2b2b2b;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}

.dw-admin-save:hover {
    background: #111;
}

/* 임포트 버튼 색상 */
.dw-btn-dark {
    background: #2b2b2b;
}

.dw-btn-dark:hover {
    background: #111;
}

.dw-btn-gray {
    background: #666;
}

.dw-btn-gray:hover {
    background: #444;
}

/* 임포트 섹션 */
.dw-admin-import-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    flex-wrap: wrap;
}

/* ===== 관리자 공임비 설정 ===== */
.dw-admin-labor-grid {
    padding: 10px 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.dw-admin-labor-cat {
    margin-bottom: 0;
}

.dw-admin-labor-cat-name {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    background: #f2f3f5;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    border: 1px solid #e4e4e4;
}

.dw-admin-labor-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 2px;
    border-bottom: 1px solid #f5f5f5;
}

.dw-admin-labor-label {
    flex: 1;
    font-size: 11px;
    color: #555;
    line-height: 1.4;
}

.dw-admin-labor-price {
    width: 85px;
    flex-shrink: 0;
    padding: 3px 22px 3px 6px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
    text-align: right;
    background: #fff;
}

.dw-admin-labor-price:focus {
    outline: none;
    border-color: #2b2b2b;
}

/* 공임비 편집 UI (카테고리명 인풋 + 항목추가/삭제 버튼) */
.dw-admin-labor-cat-header { margin-bottom: 5px; }
.dw-admin-labor-catname {
    width: 100%;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    background: #f2f3f5;
    border: 1px solid #d8dde4;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}
.dw-admin-labor-catname:focus { outline: none; border-color: #7C3AED; background: #fff; }
.dw-admin-labor-options-list { margin-bottom: 3px; }
.dw-admin-labor-label-input {
    flex: 1;
    padding: 3px 6px;
    font-size: 11px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    font-family: inherit;
    background: #fff;
    min-width: 0;
}
.dw-admin-labor-label-input:focus { outline: none; border-color: #2b2b2b; }
.dw-labor-del-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    background: #fff;
    color: #bbb;
    font-size: 14px;
    line-height: 18px;
    cursor: pointer;
    padding: 0;
    text-align: center;
}
.dw-labor-del-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.dw-labor-add-btn {
    display: block;
    width: 100%;
    padding: 4px 0;
    margin-top: 3px;
    border: 1px dashed #bbb;
    border-radius: 4px;
    background: #fafafa;
    color: #666;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}
.dw-labor-add-btn:hover { background: #f0f4ff; border-color: #7C3AED; color: #7C3AED; }

/* ===== 카트 미니 2줄 레이아웃 ===== */
.dw-cat-mini-row1 {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dw-cat-mini-row2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
    gap: 4px;
}

.dw-cat-mini-qty {
    display: flex;
    align-items: center;
    gap: 3px;
}

.dw-cat-mini-qty-btn {
    width: 18px;
    height: 18px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    color: #333;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.dw-cat-mini-qty-btn:hover {
    background: #e0e0e0;
}

.dw-cat-mini-qty-num {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    min-width: 14px;
    text-align: center;
}

/* ===== 인풋 단위 래퍼 (%, 원) ===== */
.dw-input-unit-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dw-input-unit {
    position: absolute;
    right: 7px;
    font-size: 11px;
    color: #999;
    pointer-events: none;
    font-weight: 500;
    white-space: nowrap;
}

/* 마진 인풋: % 공간 확보 */
.dw-admin-field-margin .dw-input-unit-wrap input {
    padding-right: 22px;
}

/* 공임비 인풋: 원 공간 확보 + text-align */
.dw-admin-labor-row .dw-input-unit-wrap {
    width: 100%;
    max-width: 105px;
}

.dw-admin-labor-row .dw-input-unit-wrap input {
    width: 100%;
    font-size: 11px;
    box-sizing: border-box;
}

/* 업체정보 4열 통합 그리드 */
.dw-seller-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.dw-seller-col2 {
    grid-column: span 2;
}

@media (max-width: 1100px) {
    .dw-seller-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dw-seller-col2 {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .dw-seller-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dw-seller-col2 {
        grid-column: span 2;
    }
}

/* ===== 쿠폰 관리자 섹션 (공임비와 동일한 구조) ===== */
.dw-admin-coupon-grid {
    padding: 10px 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.dw-admin-coupon-box {
    min-width: 0;
}

/* 카테고리명 헤더 — .dw-admin-labor-cat-header 동일 */
.dw-admin-coupon-header {
    margin-bottom: 5px;
}

/* 쿠폰 이름 인풋 — .dw-admin-labor-catname 동일 */
.dw-coupon-title-input {
    width: 100%;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    background: #f2f3f5;
    border: 1px solid #d8dde4;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

.dw-coupon-title-input:focus {
    outline: none;
    border-color: #7C3AED;
    background: #fff;
}

/* 아이템 목록 컨테이너 — .dw-admin-labor-options-list 동일 */
.dw-coupon-items-list {
    margin-bottom: 3px;
}

/* 아이템 행 — .dw-admin-labor-row 동일 */
.dw-admin-coupon-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 2px;
    border-bottom: 1px solid #f5f5f5;
}

.dw-admin-coupon-item-row:last-child {
    border-bottom: none;
}

/* 항목명 인풋 — .dw-admin-labor-label-input 동일 */
.dw-coupon-item-title {
    flex: 1;
    min-width: 0;
    padding: 3px 6px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
    background: #fff;
}

.dw-coupon-item-title:focus {
    outline: none;
    border-color: #2b2b2b;
}

/* 가격 인풋 — .dw-admin-labor-price 동일 */
.dw-coupon-item-price {
    width: 72px;
    flex-shrink: 0;
    padding: 3px 22px 3px 6px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
    text-align: right;
    background: #fff;
}

.dw-coupon-item-price:focus {
    outline: none;
    border-color: #2b2b2b;
}

/* 반응형 */
@media (max-width: 1100px) {
    .dw-admin-coupon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 사이드바 쿠폰 섹션 ===== */
.dw-coupon-section {
    border-top: 1px solid #ebebeb;
    padding: 8px 0 4px;
}

/* ===== 요약 소계 / 쿠폰 할인 ===== */
.dw-sum-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-top: 1px solid #e8e8e8;
    margin-top: 2px;
}

.dw-sum-subtotal-label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.dw-sum-subtotal-price {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.dw-sum-coupon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.dw-sum-coupon-label {
    font-size: 13px;
    color: #c0392b;
}

.dw-sum-coupon-price {
    font-size: 14px;
    font-weight: 700;
    color: #c0392b;
}

/* ===== 추천 견적 프리셋 그리드 ===== */
.dw-preset-grid {
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: 6px;
    padding: 8px;
    background: #f3f5fa;
    border: 1px solid #e2e6f0;
    border-radius: 12px;
    margin: 0 0 10px;
    box-sizing: border-box;
    width: 100%;
}

.dw-preset-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    aspect-ratio: 1 / 1;
    gap: 6px;
    padding: 8px 4px;
    background: #fff;
    border: 1.5px solid #e8eaf2;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    min-width: 0;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    text-align: center;
    width: 100%;
}

/* 이미지 없는 카드: 솔리드 컬러 호버 */
.dw-preset-card:not(.has-img):hover {
    border-color: var(--pc, #aaa);
    background: var(--pc, #aaa);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.dw-preset-card:not(.has-img).active {
    border-color: var(--pc, #555);
    border-width: 2px;
    background: var(--pc, #555);
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

/* 배경 이미지 카드 */
.dw-preset-card.has-img {
    background-image: var(--pi);
    background-size: cover;
    background-position: center;
    border-color: transparent;
}
.dw-preset-card.has-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--pc, #aaa);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}
.dw-preset-card.has-img:hover {
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.dw-preset-card.has-img:hover::after {
    opacity: 0.15;
}
.dw-preset-card.has-img.active {
    border-color: transparent;
    border-width: 1.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.dw-preset-card.has-img.active::after {
    opacity: 0.2;
}

.dw-preset-icon {
    display: block !important;
    position: relative;
    z-index: 1;
    color: #b0b5c5;
    line-height: 0;
    transition: color 0.15s;
}

.dw-preset-icon svg {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 auto;
}

.dw-preset-card:not(.has-img):hover .dw-preset-icon,
.dw-preset-card:not(.has-img).active .dw-preset-icon {
    color: #fff;
}
.dw-preset-card.has-img .dw-preset-icon {
    color: #fff;
}

.dw-preset-name {
    display: block !important;
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    line-height: 1.4;
    word-break: keep-all;
    transition: color 0.15s;
    width: 100%;
}

.dw-preset-card:not(.has-img):hover .dw-preset-name,
.dw-preset-card:not(.has-img).active .dw-preset-name {
    color: #fff;
}
.dw-preset-card.has-img .dw-preset-name {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ===== 반응형 ===== */
@media (max-width: 960px) {
    .dw-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .dw-wrap {
        flex-direction: column;
    }

    .dw-sidebar {
        width: 100%;
        height: 240px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        order: -1;
    }

    .dw-cat-nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .dw-group {
        display: inline-block;
        vertical-align: top;
    }
}

/* ===== 부품별 개별 마진율 그리드 (관리자 패널) ===== */
.dw-margin-group {
    padding: 6px 12px 8px;
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
}
.dw-margin-group:last-of-type {
    border-bottom: none;
    padding-bottom: 10px;
}
.dw-margin-group-title {
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 6px;
    padding: 2px 4px;
    background: #f9fafb;
    border-left: 3px solid #d1d5db;
    border-radius: 0 4px 4px 0;
}
.dw-margin-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 5px 6px;
}
@media (max-width: 600px) { .dw-margin-cat-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); } }

.dw-margin-cat-item label {
    font-size: 10px;
    color: #555;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}
.dw-margin-cat-item .dw-input-unit-wrap {
    display: flex;
    align-items: center;
    width: 100%;
}
.dw-margin-cat-item .dw-input-unit-wrap input {
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 20px 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
}
.dw-margin-cat-item .dw-input-unit-wrap input:focus {
    outline: none;
    border-color: #2b2b2b;
    box-shadow: 0 0 0 2px rgba(43,43,43,.07);
}

/* ============================================================
   추천견적 프리셋 관리 (관리자 패널)
   ============================================================ */

/* 목록 컨테이너 */
.dw-preset-mgmt-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 420px;
    overflow-y: auto;
    padding: 4px 2px;
}

/* 개별 행: 색상점·아이콘셀렉트·이름·설명·색상피커·이미지·▲·▼·저장·삭제 */
.dw-preset-mgmt-row {
    display: grid;
    grid-template-columns: 18px 110px 1fr 1.4fr 36px 40px 28px 28px 46px 46px;
    gap: 5px;
    align-items: center;
    padding: 5px 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: border-color .15s;
}
.dw-preset-mgmt-row:hover { border-color: #cbd5e1; }

/* 색상 원형 점 */
.dw-pmgmt-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.12);
}

/* 아이콘 select */
.dw-pmgmt-icon-select {
    width: 100%;
    font-size: 11px;
    padding: 3px 4px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #374151;
}

/* 이름·설명 인라인 input */
.dw-pmgmt-name,
.dw-pmgmt-desc {
    width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    padding: 4px 7px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    background: #fff;
    color: #111;
}
.dw-pmgmt-name:focus,
.dw-pmgmt-desc:focus {
    outline: none;
    border-color: #9333EA;
    box-shadow: 0 0 0 2px rgba(147,51,234,.1);
}

/* 색상 피커 (color input) */
.dw-pmgmt-color-pick {
    width: 32px;
    height: 26px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
}

/* 소형 버튼 공통 */
.dw-pmgmt-btn {
    font-size: 11px;
    padding: 4px 0;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    transition: background .12s, color .12s;
}
.dw-pmgmt-up,
.dw-pmgmt-down {
    color: #6b7280;
    font-size: 10px;
}
.dw-pmgmt-up:hover,
.dw-pmgmt-down:hover { background: #f3f4f6; color: #111; }

.dw-pmgmt-save {
    background: #9333EA;
    color: #fff;
    border-color: #9333EA;
    font-weight: 600;
}
.dw-pmgmt-save:hover  { background: #7C3AED; }
.dw-pmgmt-save:disabled { opacity: .5; cursor: not-allowed; }

.dw-pmgmt-del {
    color: #ef4444;
    border-color: #fca5a5;
}
.dw-pmgmt-del:hover { background: #fef2f2; border-color: #ef4444; }

/* 관리 목록 이미지 업로드 셀 */
.dw-pmgmt-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dw-pmgmt-img-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 26px;
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    overflow: hidden;
    background: #f9fafb;
}
.dw-pmgmt-img-label:hover { border-color: #6b7280; background: #f1f5f9; }
.dw-pmgmt-img-thumb { width: 36px; height: 26px; object-fit: cover; display: none; }
.dw-pmgmt-img-icon  { display: block; }
.dw-pmgmt-img-wrap.has-img .dw-pmgmt-img-thumb { display: block; }
.dw-pmgmt-img-wrap.has-img .dw-pmgmt-img-icon  { display: none; }
.dw-pmgmt-img-x {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 9px;
    line-height: 1;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
}
.dw-pmgmt-img-wrap.has-img .dw-pmgmt-img-x { display: flex; }

/* ============================================================
   사이드바 "★ 추천견적으로 저장" 버튼
   ============================================================ */
.dw-btn-save-preset {
    display: block;
    width: 100%;
    padding: 9px 0;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    background: #f3f4f6;
    border: 1.5px dashed #9ca3af;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background .15s, border-color .15s, color .15s;
}
.dw-btn-save-preset:hover {
    background: #e5e7eb;
    border-color: #6b7280;
    color: #1f2937;
}

/* ============================================================
   저장 모달 — 색상 피커 점
   ============================================================ */
.dw-color-dot {
    display: inline-block;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: transform .12s, border-color .12s;
}
.dw-color-dot:hover {
    transform: scale(1.18);
    border-color: rgba(0,0,0,.25);
}
.dw-color-dot.active {
    border-color: #9333EA;
    transform: scale(1.12);
    box-shadow: 0 0 0 2px rgba(147,51,234,.25);
}

/* 저장 모달 — 아이콘 피커 버튼 */
.dw-icon-pick-btn {
    font-size: 11px;
    padding: 4px 9px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.dw-icon-pick-btn:hover  { background: #e0e7ff; border-color: #818cf8; color: #3730a3; }

/* 도장 이미지 업로드 버튼 */
.dw-stamp-btn {
    width: 46px; height: 46px;
    border: 1.5px dashed #ccc; border-radius: 4px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #f9f9f9; flex-shrink: 0;
    transition: border-color 0.2s;
}
.dw-stamp-btn:hover { border-color: #7C3AED; }
.dw-stamp-btn .dw-stamp-thumb { width: 100%; height: 100%; object-fit: contain; }
.dw-stamp-btn .dw-stamp-icon { font-size: 20px; color: #ccc; line-height: 1; }
.dw-icon-pick-btn.active { background: #9333EA; color: #fff; border-color: #9333EA; font-weight: 600; }

/* ===== 필터 패널 (상세검색) ===== */
.dw-filter-panel {
    width: 200px;
    min-width: 180px;
    max-width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 60px;
    align-self: flex-start;
}
.dw-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}
.dw-filter-title {
    font-size: 12px;
    font-weight: 700;
    color: #222;
}
.dw-filter-reset-btn {
    font-size: 11px;
    color: #9333EA;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.dw-filter-reset-btn:hover { text-decoration: underline; }

.dw-filter-group {
    border-bottom: 1px solid #e5e7eb;
}
.dw-filter-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
}
.dw-filter-group-header:hover { background: #f3f4f6; }
.dw-filter-group-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    flex: 1;
}
.dw-filter-group-count {
    font-size: 11px;
    color: #6b7280;
    margin-right: 4px;
}
.dw-filter-group-arrow {
    font-size: 10px;
    color: #9ca3af;
    transition: transform 0.15s;
}
.dw-filter-group.collapsed .dw-filter-group-arrow { transform: rotate(-90deg); }
.dw-filter-group-body {
    padding: 2px 0 6px 0;
}
.dw-filter-group.collapsed .dw-filter-group-body { display: none; }

.dw-filter-item {
    display: flex;
    align-items: center;
    padding: 3px 12px 3px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #444;
    gap: 5px;
}
.dw-filter-item:hover { background: #f3f4f6; }
.dw-filter-item input[type="checkbox"] {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #9333EA;
}
.dw-filter-item label {
    flex: 1;
    cursor: pointer;
    line-height: 1.4;
    word-break: keep-all;
}
.dw-filter-item .dw-filter-item-cnt {
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
}
.dw-filter-more-btn {
    display: block;
    margin: 2px 10px 4px;
    font-size: 11px;
    color: #9333EA;
    background: none;
    border: 1px solid #f3e8ff;
    border-radius: 3px;
    padding: 2px 6px;
    cursor: pointer;
    width: calc(100% - 20px);
    text-align: center;
}
.dw-filter-more-btn:hover { background: #fdf4ff; }

/* 필터 패널이 열릴 때 상품 영역 레이아웃 조정 */
.dw-product-area.has-filter {
    display: flex;
    flex-direction: row;
    gap: 0;
}
.dw-product-area.has-filter .dw-filter-panel { display: block !important; }
.dw-product-area.has-filter .dw-panels-wrap-inner {
    flex: 1;
    min-width: 0;
}

/* 필터 활성 표시 */
.dw-filter-item.active label { color: #9333EA; font-weight: 600; }
.dw-filter-item.active input[type="checkbox"] { accent-color: #9333EA; }

/* 필터 활성 배지 (패널 바) */
.dw-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #ef4444;
    border-radius: 8px;
    padding: 0 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* 필터 토글 버튼 (패널 바 내) */
.dw-filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #555;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    height: 28px;
    white-space: nowrap;
}
.dw-filter-toggle-btn:hover { background: #e5e7eb; }
.dw-filter-toggle-btn.active { background: #f3e8ff; border-color: #9333EA; color: #7C3AED; }

@media (max-width: 700px) {
    .dw-filter-panel { display: none !important; }
    .dw-product-area.has-filter .dw-filter-panel { display: none !important; }
}