/* =========================================================
   Terry Assistant - CarPaint 모바일 카드 전용 CSS

   변경 이유:
   - 실제 CarPaint 모바일 검색 결과의 세로형 카드 구조를
     Terry 채팅 화면에서도 동일한 비율로 표시하기 위함.
   - 기존 PC형 3열 레이아웃으로 인한 가로 넘침/세로 글자 문제 제거.

   역할:
   - 색상 샘플 → 제조사 → 색상정보 → 판매상태 → 제품표 순으로 표시.
   - CHEIL / MOBIS 제품표는 모바일에서도 2열 유지.
   ========================================================= */

.carpaint-card,
.carpaint-card * {
  box-sizing: border-box;
  min-width: 0;
}

.carpaint-card {
  width: 100%;
  max-width: 720px;
  margin: 0;
  padding: 0;
  font-family: inherit;
  color: #1f2937;
}

.carpaint-result-card {
  width: 100%;
  margin: 0 0 14px;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 14px;
  overflow: hidden;
}

/* ---------- 상단 ---------- */

.cp-mobile-head {
  display: block;
  padding: 16px;
  background: #fff;
}

.cp-paint-sample {
  width: 100%;
  margin: 0 0 18px;
}

.cp-paint-sample-inner {
  display: flex;
  width: 100%;
  height: 155px;
  border: 1px solid #d7dce1;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}

.cp-paint-sample-empty {
  background: #f4f5f6;
  color: #8b949e;
  font-size: 13px;
}

.cp-main-info {
  width: 100%;
}

.cp-maker-logo-wrap {
  display: flex;
  align-items: center;
  min-height: 58px;
  margin-bottom: 8px;
}

.cp-maker-logo {
  display: block;
  width: auto;
  max-width: 150px;
  height: 55px;
  object-fit: contain;
  object-position: left center;
}

.cp-maker-logo-fallback {
  display: none;
  font-size: 22px;
  font-weight: 700;
}

.cp-maker-text {
  min-height: 55px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 700;
}

/* ---------- 색상명 ---------- */

.cp-color-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  width: 100%;
  margin: 4px 0 10px;
  line-height: 1.3;
}

.cp-oem-code,
.cp-color-name {
  font-size: 22px;
  font-weight: 700;
  white-space: normal;
  word-break: keep-all;
}

.cp-same-code {
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
}

/* ---------- 제품번호 / 도장타입 ---------- */

.cp-product-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 11px;
}

.cp-product-number {
  color: #2563eb;
  font-size: 18px;
  font-weight: 500;
}

.cp-paint-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid #d6dbe1;
  border-radius: 7px;
  background: #f8f9fa;
  font-size: 13px;
  white-space: nowrap;
}

.cp-paint-type-chip span {
  color: #6b7280;
}

.cp-paint-type-chip strong {
  color: #374151;
  font-weight: 600;
}

/* ---------- 판매 상태 ---------- */

.cp-sales-status {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 2px;
  font-size: 14px;
  line-height: 1.5;
}

.cp-sales-status strong {
  color: #2563eb;
  font-weight: 700;
}

/* ---------- 제품표 ---------- */

.cp-product-table {
  width: 100%;
  border-top: 1px solid #dfe3e8;
  background: #fff;
}

.cp-product-brand-row,
.cp-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
}

.cp-product-brand-row > div,
.cp-product-row > div {
  min-width: 0;
}

.cp-product-brand-row > div {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-bottom: 1px solid #dfe3e8;
}

.cp-product-brand-row > div + div,
.cp-product-row > div + div {
  border-left: 1px solid #dfe3e8;
}

.cp-product-brand-logo {
  display: block;
  width: auto;
  max-width: 125px;
  max-height: 44px;
  object-fit: contain;
}

.cp-cheil-logo {
  max-height: 42px;
}

.cp-mobis-logo {
  max-height: 43px;
}

.cp-product-row > div {
  min-height: 145px;
  padding: 9px 8px;
  border-bottom: 1px solid #dfe3e8;
}

.cp-product-row:last-child > div {
  border-bottom: 0;
}

/* ---------- ERP 품목 ---------- */

.cp-erp-product {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 126px;
  text-align: center;
  align-items: center;
}

.cp-erp-empty {
  min-height: 126px;
}

.cp-erp-item-code {
  width: 100%;
  margin: 2px 0 8px;
  color: #374151;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cp-erp-item-name {
  width: 100%;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  word-break: keep-all;
}

.cp-erp-item-name > div + div {
  margin-top: 2px;
}

.cp-erp-inventory {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  width: 100%;
  margin-top: auto;
  padding-top: 10px;
  color: #4b5563;
  font-size: 12px;
}

.cp-erp-inventory strong {
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- 검색결과 없음 ---------- */

.carpaint-empty {
  width: 100%;
  padding: 18px;
  border: 1px solid #dfe3e8;
  border-radius: 12px;
  background: #fff;
  color: #6b7280;
  text-align: center;
}

/* =========================================================
   Terry 모바일
   ========================================================= */

@media (max-width: 768px) {
  .carpaint-card {
    width: 100%;
    max-width: 100%;
  }

  .carpaint-result-card {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
  }

  .cp-mobile-head {
    padding: 14px;
  }

  .cp-paint-sample-inner {
    height: auto;
    aspect-ratio: 3.55 / 1;
    min-height: 105px;
  }

  .cp-maker-logo {
    height: 55px;
    max-width: 145px;
  }

  .cp-oem-code,
  .cp-color-name {
    font-size: 22px;
  }

  .cp-product-number {
    font-size: 18px;
    font-weight: 500;
  }

  .cp-product-row > div {
    min-height: 145px;
    padding: 9px 8px;
  }

  .cp-erp-product {
    min-height: 126px;
  }
}

@media (max-width: 460px) {
  .cp-mobile-head {
    padding: 12px;
  }

  .cp-paint-sample {
    margin-bottom: 14px;
  }

  .cp-maker-logo-wrap {
    min-height: 50px;
  }

  .cp-maker-logo {
    height: 48px;
    max-width: 135px;
  }

  .cp-oem-code,
  .cp-color-name {
    font-size: 20px;
  }

  .cp-product-line {
    gap: 7px;
  }

  .cp-product-number {
    font-size: 17px;
  }

  .cp-paint-type-chip {
    padding: 4px 8px;
    font-size: 12px;
  }

  .cp-product-brand-row > div {
    height: 58px;
  }

  .cp-product-brand-logo {
    max-width: 105px;
    max-height: 39px;
  }

  .cp-erp-item-code {
    font-size: 10px;
  }

  .cp-erp-item-name {
    font-size: 11px;
  }
}

/* =========================================================
   2026-10-03 CarPaint 실제 모바일 화면 최종 보정
   변경 이유:
   - 실제 CarPaint 모바일 화면의 여백/로고/제품표 비율에 맞춤.
   - 기존 HTML/검색/API 로직은 변경하지 않음.
   ========================================================= */

@media (max-width: 768px) {

  /* Terry 안에서 카드가 사용할 수 있는 폭을 모두 사용 */
  .carpaint-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .carpaint-result-card {
    width: 100% !important;
    margin: 0 0 14px !important;
    border: 1px solid #d9e0e7 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  /* 실제 사이트처럼 카드 내부 좌우 여백 확보 */
  .cp-mobile-head {
    padding: 16px 22px 22px !important;
  }

  /* 색상 미리보기 */
  .cp-paint-sample {
    width: 100% !important;
    margin: 0 0 20px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid #e1e5e9 !important;
  }

  .cp-paint-sample-inner {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 3.55 / 1 !important;
    border: 1px solid #d5dbe1 !important;
    border-radius: 17px !important;
  }

  /* KIA 등 제조사 로고 */
  .cp-maker-logo-wrap {
    min-height: 64px !important;
    margin: 0 0 10px !important;
    align-items: center !important;
  }

  .cp-maker-logo {
    width: auto !important;
    height: 54px !important;
    max-width: 170px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  /* SWP 스노우화이트펄 */
  .cp-color-title {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 5px 12px !important;
    margin: 2px 0 6px !important;
    line-height: 1.2 !important;
  }

  .cp-oem-code,
  .cp-color-name {
    font-size: 22px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
  }

  /* 기아 204번 + 도장타입 */
  .cp-product-line {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px 12px !important;
    margin: 0 0 8px !important;
  }

  .cp-product-number {
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #1670d2 !important;
  }

  .cp-paint-type-chip {
    min-height: 32px !important;
    padding: 4px 10px !important;
    gap: 7px !important;
    border: 1px solid #d8dee6 !important;
    border-radius: 15px !important;
    background: #f5f7fa !important;
    font-size: 13px !important;
  }

  /* 판매상태 */
  .cp-sales-status {
    gap: 2px !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  /* CHEIL / MOBIS 표 */
  .cp-product-table {
    width: calc(100% - 44px) !important;
    margin: 0 22px 22px !important;
    border: 1px solid #d9e0e7 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .cp-product-brand-row {
    height: 82px !important;
  }

  .cp-product-brand-row > div {
    height: 82px !important;
    padding: 10px !important;
    background: #fff !important;
  }

  .cp-product-brand-logo {
    width: auto !important;
    object-fit: contain !important;
  }

  .cp-cheil-logo {
    max-width: 125px !important;
    max-height: 47px !important;
  }

  .cp-mobis-logo {
    max-width: 112px !important;
    max-height: 43px !important;
  }

  /* 각 제품칸 */
  .cp-product-row > div {
    min-height: 158px !important;
    padding: 11px 9px !important;
  }

  .cp-erp-product {
    min-height: 136px !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  /* 품목코드 회색 캡슐 */
  .cp-erp-item-code {
    width: auto !important;
    max-width: 100% !important;
    display: inline-block !important;
    margin: 0 0 8px !important;
    padding: 4px 8px !important;
    border-radius: 14px !important;
    background: #f3f5f7 !important;
    color: #253246 !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }

  .cp-erp-item-name {
    width: 100% !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
    text-align: left !important;
  }

  .cp-erp-item-name > div:first-child {
    font-weight: 600 !important;
  }

  /* 현재고 */
  .cp-erp-inventory {
    width: 100% !important;
    margin-top: 13px !important;
    padding: 0 !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    color: #8a96a5 !important;
    font-size: 12px !important;
  }

  .cp-erp-inventory strong {
    color: #172235 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
  }
}

/* 아주 작은 휴대폰만 추가 축소 */
@media (max-width: 420px) {

  .cp-mobile-head {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .cp-product-table {
    width: calc(100% - 32px) !important;
    margin-left: 16px !important;
    margin-right: 16px !important;
  }

  .cp-maker-logo {
    max-width: 155px !important;
    height: 50px !important;
  }

  .cp-cheil-logo {
    max-width: 110px !important;
  }

  .cp-mobis-logo {
    max-width: 100px !important;
  }
}

/* =========================================================
   Terry CarPaint 카드 실제 모바일 화면 고정 보정
   변경 이유:
   Terry PC 화면에서는 브라우저 viewport가 768px보다 커서
   모바일용 @media 규칙이 적용되지 않는 문제를 해결한다.
   ========================================================= */


/* =========================================================
   2026-10-03 Terry 카드 폭 통일
   역할:
   - CarPaint 바깥 폭을 주식/날씨 카드와 동일하게 사용
   - 내부 요소 때문에 카드 자체가 화면 오른쪽으로 늘어나는 현상 방지
========================================================= */

.message.assistant.card-message .carpaint-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.message.assistant.card-message .carpaint-result-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* 내부 상품표가 부모 카드 폭을 밀어내지 못하도록 제한 */
.carpaint-card .cp-mobile-head,
.carpaint-card .cp-product-table,
.carpaint-card .cp-product-brand-row,
.carpaint-card .cp-product-row {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* =========================================================
   2026-10-03 CarPaint 내부 레이아웃 최종 정리
   변경 이유:
   - Terry 카드의 성공한 외부 가로폭은 그대로 유지
   - 실제 CarPaint 모바일 검색화면과 같은 내부 구성으로 정리
   - 색상 → 제조사 → 색상정보 → 판매상태 → CHEIL/MOBIS 순서 유지
========================================================= */

/* 카드 내부 상단 */
.carpaint-card .cp-mobile-head {
  padding: 16px 16px 18px !important;
}

/* 색상 미리보기 */
.carpaint-card .cp-paint-sample {
  margin: 0 0 18px !important;
  padding-bottom: 18px !important;
  border-bottom: 1px solid #e1e5e9 !important;
}

.carpaint-card .cp-paint-sample-inner {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3.55 / 1 !important;
  min-height: 0 !important;
  border: 1px solid #d5dbe1 !important;
  border-radius: 16px !important;
}

/* 제조사 로고 */
.carpaint-card .cp-maker-logo-wrap {
  min-height: 54px !important;
  margin: 0 0 8px !important;
}

.carpaint-card .cp-maker-logo {
  width: auto !important;
  height: 45px !important;
  max-width: 135px !important;
  object-fit: contain !important;
  object-position: left center !important;
}

/* SWP 스노우화이트펄 */
.carpaint-card .cp-color-title {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 5px 10px !important;
  margin: 2px 0 7px !important;
  line-height: 1.2 !important;
}

.carpaint-card .cp-oem-code,
.carpaint-card .cp-color-name {
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

/* 기아 204번 + 도장타입 */
.carpaint-card .cp-product-line {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 7px 10px !important;
  margin: 0 0 8px !important;
}

.carpaint-card .cp-product-number {
  color: #1670d2 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.carpaint-card .cp-paint-type-chip {
  min-height: 30px !important;
  padding: 4px 9px !important;
  gap: 6px !important;
  border: 1px solid #d8dee6 !important;
  border-radius: 15px !important;
  background: #f5f7fa !important;
  font-size: 12px !important;
}

/* 판매상태 */
.carpaint-card .cp-sales-status {
  gap: 2px !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* CHEIL / MOBIS 제품표 */
.carpaint-card .cp-product-table {
  width: calc(100% - 32px) !important;
  max-width: calc(100% - 32px) !important;
  margin: 0 16px 16px !important;
  border: 1px solid #d9e0e7 !important;
  border-radius: 15px !important;
  overflow: hidden !important;
  background: #fff !important;
}

/* 정확히 50 : 50 */
.carpaint-card .cp-product-brand-row,
.carpaint-card .cp-product-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  width: 100% !important;
}

.carpaint-card .cp-product-brand-row > div {
  height: 68px !important;
  padding: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* 브랜드 로고 */
.carpaint-card .cp-cheil-logo {
  width: auto !important;
  max-width: 105px !important;
  max-height: 39px !important;
}

.carpaint-card .cp-mobis-logo {
  width: auto !important;
  max-width: 95px !important;
  max-height: 37px !important;
}

/* 스프레이 / 붓펜 제품칸 */
.carpaint-card .cp-product-row > div {
  min-height: 132px !important;
  padding: 10px 8px !important;
}

.carpaint-card .cp-erp-product {
  width: 100% !important;
  min-height: 112px !important;
  align-items: flex-start !important;
  text-align: left !important;
}

/* 품목코드 캡슐 */
.carpaint-card .cp-erp-item-code {
  display: inline-block !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 0 7px !important;
  padding: 4px 7px !important;
  border-radius: 14px !important;
  background: #f3f5f7 !important;
  color: #253246 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* 품명 */
.carpaint-card .cp-erp-item-name {
  width: 100% !important;
  color: #111827 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  word-break: keep-all !important;
}

/* 현재고 */
.carpaint-card .cp-erp-inventory {
  width: 100% !important;
  margin-top: 10px !important;
  padding: 0 !important;
  justify-content: flex-start !important;
  gap: 3px !important;
  color: #8a96a5 !important;
  font-size: 11px !important;
}

.carpaint-card .cp-erp-inventory strong {
  color: #172235 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* 2026-10-03 CHEIL / MOBIS 로고 크기 미세조정
   역할: 현재 완성된 카드 배치는 유지하고 브랜드 로고만 축소 */
.carpaint-card .cp-cheil-logo {
  max-width: 90px !important;
  max-height: 34px !important;
}

.carpaint-card .cp-mobis-logo {
  max-width: 82px !important;
  max-height: 32px !important;
}

/* 2026-10-03 브랜드 로고 최종 크기 조정
   MOBIS 로고가 시각적으로 크게 보여 CHEIL보다 작게 설정 */
.carpaint-card .cp-cheil-logo {
  max-width: 78px !important;
  max-height: 30px !important;
}

.carpaint-card .cp-mobis-logo {
  max-width: 64px !important;
  max-height: 27px !important;
}

/* 2026-10-03 CarPaint 세로 높이 압축
   역할: 현재 디자인/가로폭은 유지하고 행간과 상하여백만 축소 */

/* 색상명 */
.carpaint-card .cp-color-title {
  margin-top: 0 !important;
  margin-bottom: 4px !important;
  line-height: 1.1 !important;
}

.carpaint-card .cp-oem-code,
.carpaint-card .cp-color-name {
  line-height: 1.1 !important;
}

/* 제품번호 + 도장타입 */
.carpaint-card .cp-product-line {
  margin-bottom: 5px !important;
}

/* 판매상태 두 줄 */
.carpaint-card .cp-sales-status {
  gap: 0 !important;
  line-height: 1.3 !important;
}

/* CHEIL / MOBIS 헤더 높이 */
.carpaint-card .cp-product-brand-row > div {
  height: 58px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

/* 제품칸 전체 높이 */
.carpaint-card .cp-product-row > div {
  min-height: 112px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.carpaint-card .cp-erp-product {
  min-height: 94px !important;
}

/* 품목코드와 품명 간격 */
.carpaint-card .cp-erp-item-code {
  margin-bottom: 4px !important;
}

/* 품명 행간 */
.carpaint-card .cp-erp-item-name {
  line-height: 1.25 !important;
}

/* 재고 위쪽 간격 */
.carpaint-card .cp-erp-inventory {
  margin-top: 6px !important;
  line-height: 1.2 !important;
}

/* 2026-10-03 CarPaint 상단 세로여백 압축
   역할: 현재 디자인은 유지하고 불필요한 상하 공간만 축소 */

/* 전체 상단 영역 패딩 */
.carpaint-card .cp-mobile-head {
  padding: 12px 16px 10px !important;
}

/* 색상영역 높이 및 아래 공간 축소 */
.carpaint-card .cp-paint-sample {
  margin-bottom: 10px !important;
  padding-bottom: 10px !important;
}

.carpaint-card .cp-paint-sample-inner {
  aspect-ratio: 4.2 / 1 !important;
}

/* 색상영역 → KIA 로고 간격 */
.carpaint-card .cp-maker-logo-wrap {
  min-height: 44px !important;
  margin: 0 0 2px !important;
}

/* KIA 로고 크기는 유지하면서 빈 영역 제거 */
.carpaint-card .cp-maker-logo {
  height: 40px !important;
}

/* KIA → SWP 간격 축소 */
.carpaint-card .cp-color-title {
  margin: 0 0 3px !important;
}

/* 기아204번 → 판매상태 */
.carpaint-card .cp-product-line {
  margin-bottom: 3px !important;
}

/* 판매상태 → 제품표 사이 여백 축소 */
.carpaint-card .cp-sales-status {
  margin-bottom: 0 !important;
}

/* 제품표를 상단 정보에 더 가깝게 */
.carpaint-card .cp-product-table {
  margin-top: 0 !important;
}

/* 2026-10-03 CarPaint 제품표 세로공간 최종 압축
   변경 이유:
   고정 height/min-height 때문에 생기는 불필요한 빈 공간 제거
   가로폭/글자크기/2열 구조는 변경하지 않음 */

/* CHEIL / MOBIS 로고 행 */
.carpaint-card .cp-product-brand-row,
.carpaint-card .cp-product-brand-row > div {
  height: auto !important;
  min-height: 46px !important;
}

.carpaint-card .cp-product-brand-row > div {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

/* 스프레이 / 붓펜 행 */
.carpaint-card .cp-product-row > div {
  min-height: 0 !important;
  height: auto !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

/* 제품 내부에 남아있는 최소높이 제거 */
.carpaint-card .cp-erp-product,
.carpaint-card .cp-erp-empty {
  min-height: 0 !important;
  height: auto !important;
}

/* 품목코드 → 품명 */
.carpaint-card .cp-erp-item-code {
  margin-top: 0 !important;
  margin-bottom: 3px !important;
}

/* 품명 자체 */
.carpaint-card .cp-erp-item-name {
  line-height: 1.2 !important;
}

/* 품명 → 현재고 */
.carpaint-card .cp-erp-inventory {
  margin-top: 5px !important;
  padding-top: 0 !important;
  line-height: 1.15 !important;
}

/* ========================
   CarPaint 색상명 굵기 보정
   - OEM 색상코드는 기존 굵기 유지
   - 색상명만 CarPaint 사이트처럼 가볍게 표시
======================== */
.carpaint-card .cp-color-name {
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
}

/* CarPaint 제품번호 굵기 보정
   - 색상코드가 메인으로 보이도록 제품번호 강조를 낮춤 */
.carpaint-card .cp-product-number {
  font-weight: 400 !important;
}


/* ========================
   CarPaint 투톤 카드 - 원본 화면형
======================== */

.carpaint-card .cp-two-tone-card {
  overflow: hidden;
}

.carpaint-card .cp-two-tone-preview {
  width: calc(100% - 32px);
  height: 150px;
  margin: 16px auto 0;
  border: 1px solid #d9dee7;
  border-radius: 18px;
  overflow: hidden;
}

.carpaint-card .cp-two-tone-upper,
.carpaint-card .cp-two-tone-lower {
  width: 100%;
  height: 50%;
}

.carpaint-card .cp-two-tone-body {
  padding: 22px 16px 18px;
}

.carpaint-card .cp-two-tone-body .cp-maker-logo-wrap {
  margin-bottom: 18px;
}

.carpaint-card .cp-two-tone-equation {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 18px;
  line-height: 1.25;
}

.carpaint-card .cp-two-tone-main-code {
  font-size: 26px;
  font-weight: 700;
  margin-right: 3px;
}

.carpaint-card .cp-two-tone-equation > strong:not(.cp-two-tone-main-code) {
  font-size: 21px;
  font-weight: 600;
}

.carpaint-card .cp-two-tone-equal,
.carpaint-card .cp-two-tone-plus {
  font-size: 15px;
  font-weight: 400;
  color: #8c98a8;
}

.carpaint-card .cp-two-tone-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 9px;
}

.carpaint-card .cp-two-tone-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid #cfd6df;
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.carpaint-card .cp-two-tone-link {
  appearance: none;
  border: 1px solid #d4dce7;
  border-radius: 10px;
  background: #f8fafc;
  padding: 5px 10px;
  color: #263b59;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

.carpaint-card .cp-two-tone-application-box {
  margin-top: 18px;
  padding: 15px 14px;
  border: 1px solid #dce2e9;
  border-radius: 16px;
  background: #fff;
}

.carpaint-card .cp-two-tone-app-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #0871d5;
  font-size: 18px;
}

.carpaint-card .cp-two-tone-app-title strong {
  font-weight: 700;
}

.carpaint-card .cp-two-tone-car-icon {
  font-size: 21px;
}

.carpaint-card .cp-two-tone-app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.carpaint-card .cp-two-tone-vehicle {
  font-size: 15px;
  font-weight: 400;
}

.carpaint-card .cp-two-tone-period {
  padding: 7px 12px;
  border-radius: 12px;
  background: #f1f3f7;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .carpaint-card .cp-two-tone-preview {
    height: 130px;
  }

  .carpaint-card .cp-two-tone-body {
    padding: 20px 14px 16px;
  }

  .carpaint-card .cp-two-tone-equation {
    gap: 6px;
    font-size: 17px;
  }

  .carpaint-card .cp-two-tone-main-code {
    font-size: 25px;
  }

  .carpaint-card .cp-two-tone-equation > strong:not(.cp-two-tone-main-code) {
    font-size: 20px;
  }

  .carpaint-card .cp-two-tone-actions {
    gap: 12px;
  }
}

/* ========================
   투톤 카드 최종 미세조정
   - 색상영역 높이 축소
   - 상단/하단 안내문구 회색 처리
======================== */

.carpaint-card .cp-two-tone-preview {
  height: 100px !important;
}

/* 상단 / 하단 글자만 보조정보처럼 회색 */
.carpaint-card .cp-two-tone-equation > span:not(.cp-two-tone-equal):not(.cp-two-tone-plus) {
  color: #66758a !important;
  font-weight: 400 !important;
}

/* 모바일도 동일한 높이 */
@media (max-width: 600px) {
  .carpaint-card .cp-two-tone-preview {
    height: 100px !important;
  }
}

/* ========================
   투톤 코드 표시 최종 보정
   메인 SWP / 상단 SWP / 하단 WF 크기 동일
======================== */

/* 메인 투톤코드 */
.carpaint-card .cp-two-tone-main-code {
  font-size: 25px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
}

/* 상단 / 하단 */
.carpaint-card .cp-two-tone-equation > span:not(.cp-two-tone-equal):not(.cp-two-tone-plus) {
  font-size: 25px !important;
  font-weight: 400 !important;
  color: #8b96a6 !important;
}

/* 상단 SWP / 하단 WF의 코드도 연한 회색 */
.carpaint-card .cp-two-tone-equation > strong:not(.cp-two-tone-main-code) {
  font-size: 25px !important;
  font-weight: 600 !important;
  color: #8b96a6 !important;
}

/* = 와 + 는 보조기호이므로 작고 연하게 */
.carpaint-card .cp-two-tone-equal,
.carpaint-card .cp-two-tone-plus {
  font-size: 16px !important;
  font-weight: 400 !important;
  color: #a5afbc !important;
}

/* ========================
   투톤 코드 시각적 크기 최종 보정
   - 메인 투톤코드가 가장 크게 보이도록 유지
   - 상단/하단 정보는 한 단계 작고 연하게
======================== */

/* 메인 투톤코드 */
.carpaint-card .cp-two-tone-main-code {
  font-size: 25px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
}

/* 상단 / 하단 */
.carpaint-card .cp-two-tone-equation > span:not(.cp-two-tone-equal):not(.cp-two-tone-plus) {
  font-size: 22px !important;
  font-weight: 400 !important;
  color: #929dac !important;
}

/* 상단 SWP / 하단 WF */
.carpaint-card .cp-two-tone-equation > strong:not(.cp-two-tone-main-code) {
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #929dac !important;
}

/* = / + */
.carpaint-card .cp-two-tone-equal,
.carpaint-card .cp-two-tone-plus {
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #aab2bd !important;
}

/* 투톤 상단/하단 한글 자간 축소 */
.carpaint-card .cp-two-tone-equation > span:not(.cp-two-tone-equal):not(.cp-two-tone-plus) {
  letter-spacing: -1.5px !important;
}

/* 투톤 상단/하단 한글만 최종 축소
   - SWP / WF 코드는 변경하지 않음 */
.carpaint-card .cp-two-tone-equation > span:not(.cp-two-tone-equal):not(.cp-two-tone-plus) {
  font-size: 19px !important;
  letter-spacing: -2px !important;
  font-weight: 400 !important;
  color: #929dac !important;
}

/* ========================
   투톤 카드 세로 여백 압축
   - 글자크기/가로폭/색상영역 높이는 유지
======================== */

/* 색상영역 아래 → KIA 로고 */
.carpaint-card .cp-two-tone-body {
  padding-top: 14px !important;
  padding-bottom: 12px !important;
}

/* KIA 로고 아래 여백 */
.carpaint-card .cp-two-tone-body .cp-maker-logo-wrap {
  margin-bottom: 10px !important;
}

/* SWP = 상단 SWP + 하단 WF 행간 */
.carpaint-card .cp-two-tone-equation {
  line-height: 1.05 !important;
}

/* 코드행 → 버튼행 */
.carpaint-card .cp-two-tone-actions {
  margin-top: 6px !important;
}

/* 버튼 자체 세로 높이 약간 축소 */
.carpaint-card .cp-two-tone-badge,
.carpaint-card .cp-two-tone-link {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}

/* 버튼행 → 적용차종 박스 */
.carpaint-card .cp-two-tone-application-box {
  margin-top: 11px !important;
  padding-top: 11px !important;
  padding-bottom: 11px !important;
}

/* 적용차종 제목 → 실제 차종 행 */
.carpaint-card .cp-two-tone-app-row {
  margin-top: 10px !important;
}

/* 모바일도 불필요한 세로 여백 제거 */
@media (max-width: 600px) {
  .carpaint-card .cp-two-tone-body {
    padding-top: 14px !important;
    padding-bottom: 12px !important;
  }
}

/* 투톤 카드 상단 여백 추가 압축 */

/* 색상영역 → 제조사 로고 */
.carpaint-card .cp-two-tone-body {
  padding-top: 8px !important;
}

/* 제조사 로고 → 투톤 코드 */
.carpaint-card .cp-two-tone-body .cp-maker-logo-wrap {
  margin-bottom: 4px !important;
}

/* 공용색상 제조사 로고 좌우 배치 */
.carpaint-card .cp-maker-logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}
