/* CHIPHUB 쇼핑몰 공통 (unikeyic 스타일: 흰 배경 + 파랑 포인트) */
:root {
    --blue: #c62828;      /* 브랜드 레드 (변수명은 호환 위해 유지) */
    --blue-dark: #8e1f1a;
    --accent: #f59e0b;   /* 포인트 앰버 */       /* 포인트 오렌지 */
    --accent-soft: #fef3e2;
    --teal: #0d9488;
    --teal-soft: #ecfdf8;
    --violet: #7c5cff;
    --violet-soft: #f1eeff;
    --blue-soft: #fbebe9;
    --line: #e3e6ea;
    --bg: #f7f9fc;
    --txt: #253044;
    --muted: #6b7280;
    --red: #d92d20;
    --green: #067647;
}
* { box-sizing: border-box; }
body.shop { margin: 0; font-family: -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; color: var(--txt); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.shop-header { background: #fff; border-bottom: 1px solid var(--line); }
.shop-header-in { max-width: 1100px; margin: 0 auto; padding: 0.9rem 1rem; display: flex; align-items: center; gap: 1.2rem; }
.shop-logo { font-size: 1.35rem; font-weight: 800; color: var(--blue); letter-spacing: -0.5px; }
.shop-logo:hover { text-decoration: none; }
.shop-search { flex: 1; display: flex; }
.shop-search input { flex: 1; border: 2px solid var(--blue); border-right: 0; border-radius: 4px 0 0 4px; padding: 0.55rem 0.8rem; font-size: 0.95rem; outline: none; }
.shop-search button { border: 0; background: var(--blue); color: #fff; padding: 0 1.2rem; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 0.95rem; }
.shop-nav-links { display: flex; gap: 1rem; align-items: center; font-size: 0.92rem; }
.cart-badge { background: var(--blue); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 0.78rem; margin-left: 3px; }

.shop-main { max-width: 1100px; margin: 1.4rem auto; padding: 0 1rem; }
.shop-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 1rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem; margin-bottom: 1rem; }
.card h3 { margin: 0 0 0.8rem; font-size: 1.02rem; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: #fff; }
table.tbl th, table.tbl td { border-bottom: 1px solid var(--line); padding: 0.65rem 0.6rem; text-align: left; vertical-align: middle; }
table.tbl th { background: #f8fafc; color: var(--muted); font-weight: 600; white-space: nowrap; }
table.tbl .num { text-align: right; white-space: nowrap; }
.tbl-img { width: 54px; height: 54px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff; }

.btn { display: inline-block; border: 0; border-radius: 5px; padding: 0.6rem 1.2rem; font-size: 0.93rem; cursor: pointer; text-align: center; }
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-gray { background: #eef0f3; color: #444; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 0.32rem 0.7rem; font-size: 0.84rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-row { margin-bottom: 0.9rem; }
.form-row label { display: block; font-size: 0.86rem; color: #444; margin-bottom: 0.3rem; font-weight: 600; }
.form-row label .req { color: var(--red); }
.form-row input, .form-row select, .form-row textarea { width: 100%; border: 1px solid #cfd6dd; border-radius: 5px; padding: 0.55rem 0.7rem; font-size: 0.93rem; }
.form-row input:focus, .form-row textarea:focus { border-color: var(--blue); outline: none; }
.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.zip-row { display: flex; gap: 0.5rem; }
.zip-row input { flex: 1; }

.msg { padding: 0.8rem 1rem; border-radius: 6px; font-size: 0.9rem; margin-bottom: 1rem; }
.msg.ok  { background: #ecfdf3; color: var(--green); border: 1px solid #abefc6; }
.msg.err { background: #fef3f2; color: var(--red); border: 1px solid #fecdca; }
.msg.info{ background: #eff8ff; color: var(--blue-dark); border: 1px solid #b2ddff; }

.summary-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; }
.summary-box .row { display: flex; justify-content: space-between; padding: 0.3rem 0; font-size: 0.92rem; }
.summary-box .row.total { border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.7rem; font-weight: 700; font-size: 1.05rem; color: var(--blue-dark); }

.badge { display: inline-block; border-radius: 4px; padding: 2px 8px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.badge.ordered        { background: #fffaeb; color: #b54708; }
.badge.purchased      { background: #eff8ff; color: #175cd3; }
.badge.aci_registered { background: #eef4ff; color: #3538cd; }
.badge.shipping       { background: #f0f9ff; color: #026aa2; }
.badge.delivered      { background: #ecfdf3; color: #067647; }
.badge.canceled       { background: #f2f4f7; color: #667085; }
.badge.cancel_requested { background: #fef3f2; color: #b42318; }

.track-line { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 16px; }
.track-line .ev { position: relative; padding: 0.35rem 0; font-size: 0.88rem; }
.track-line .ev:before { content: ""; position: absolute; left: -21px; top: 0.75rem; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.track-line .ev .t { color: var(--muted); font-size: 0.78rem; }

.checkout-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .checkout-grid, .form-grid { grid-template-columns: 1fr; } .shop-header-in { flex-wrap: wrap; } .shop-search { order: 3; width: 100%; flex-basis: 100%; } }

.shop-footer { max-width: 1100px; margin: 2rem auto; padding: 1rem; color: var(--muted); font-size: 0.8rem; border-top: 1px solid var(--line); }

/* ===== 메인 고도화 (소프트 톤) ===== */
.hero { background: linear-gradient(120deg, #fdeeec 0%, #fff8f6 45%, #fff4e6 100%); border: 1px solid #f5e0dc; border-radius: 18px; padding: 3rem 1.5rem 2.6rem; text-align: center; color: var(--txt); margin-bottom: 1.3rem; position: relative; overflow: hidden; }
.hero:before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(198,40,40,0.10), transparent 70%); top: -90px; left: -60px; }
.hero:after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(245,158,11,0.14), transparent 70%); bottom: -130px; right: -80px; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin: 0 0 0.6rem; font-size: 1.8rem; letter-spacing: -0.5px; color: #3a2422; }
.hero h1 em { font-style: normal; color: var(--blue); border-bottom: 6px solid rgba(245,158,11,0.45); }
.hero p { margin: 0 0 1.6rem; color: #5b6b85; font-size: 0.98rem; }
.hero-search { max-width: 620px; margin: 0 auto; display: flex; background: #fff; border: 2px solid var(--blue); border-radius: 50px; overflow: hidden; box-shadow: 0 10px 28px rgba(140,35,30,0.12); }
.hero-search input { flex: 1; border: 0; padding: 0.95rem 1.4rem; font-size: 1rem; outline: none; }
.hero-search button { border: 0; background: linear-gradient(135deg, var(--blue), #e2574c); color: #fff; padding: 0 1.9rem; font-size: 0.98rem; cursor: pointer; font-weight: 700; }
.hero-chips { margin-top: 1.1rem; display: flex; gap: 0.45rem; justify-content: center; flex-wrap: wrap; }
.hero-chips a { background: #fff; border: 1px solid #f0d4cf; color: var(--blue-dark); border-radius: 20px; padding: 0.3rem 0.9rem; font-size: 0.8rem; box-shadow: 0 1px 3px rgba(140,35,30,0.06); }
.hero-chips a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; margin-bottom: 1.4rem; }
.trust-strip .t { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.05rem 1rem; text-align: center; transition: transform 0.15s, box-shadow 0.15s; }
.trust-strip .t:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(140,35,30,0.08); }
.trust-strip .t .ico { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.trust-strip .t:nth-child(1) .ico { background: var(--blue-soft); color: var(--blue); }
.trust-strip .t:nth-child(2) .ico { background: var(--accent-soft); color: var(--accent); }
.trust-strip .t:nth-child(3) .ico { background: var(--teal-soft); color: var(--teal); }
.trust-strip .t:nth-child(4) .ico { background: var(--violet-soft); color: var(--violet); }
.trust-strip .t .tt { font-weight: 700; font-size: 0.92rem; margin: 0.5rem 0 0.15rem; color: #3a2422; }
.trust-strip .t .td { font-size: 0.78rem; color: var(--muted); }

.sec-title { display: flex; align-items: baseline; gap: 0.6rem; margin: 1.8rem 0 0.9rem; }
.sec-title h2 { margin: 0; font-size: 1.18rem; letter-spacing: -0.3px; color: #3a2422; }
.sec-title h2:before { content: ""; display: inline-block; width: 5px; height: 17px; background: linear-gradient(180deg, var(--accent), var(--blue)); margin-right: 9px; border-radius: 3px; }
.sec-title .more { margin-left: auto; font-size: 0.82rem; }

.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.9rem; }
/* API 비동기 로딩 표시 */
.api-loading { grid-column: 1 / -1; text-align: center; padding: 2.6rem 1rem; color: var(--muted); font-size: 0.95rem; font-weight: 600; background: #fff; border: 1px dashed var(--line); border-radius: 10px; }
.api-loading small { display: block; font-weight: 400; font-size: 0.78rem; margin-top: 0.35rem; }
.api-loading .spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; vertical-align: -2px; margin-right: 6px; animation: apispin 0.8s linear infinite; }
@keyframes apispin { to { transform: rotate(360deg); } }
.feat-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem; transition: box-shadow 0.15s, transform 0.15s; }
.feat-card:hover { box-shadow: 0 6px 18px rgba(150,40,35,0.10); transform: translateY(-2px); }
.feat-card a { color: inherit; }
.feat-card a:hover { text-decoration: none; }
.feat-img { height: 110px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.6rem; background: #fafbfc; border-radius: 6px; }
.feat-img img { max-width: 90%; max-height: 100px; object-fit: contain; }
.feat-pn { font-weight: 700; font-size: 0.9rem; color: var(--blue-dark); word-break: break-all; }
.feat-mfr { font-size: 0.78rem; color: var(--muted); margin: 0.15rem 0 0.35rem; }
.feat-price { font-weight: 700; color: var(--blue); font-size: 0.95rem; }
.feat-meta { font-size: 0.75rem; color: var(--muted); }

.mfr-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mfr-strip a { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 1rem; font-size: 0.86rem; font-weight: 600; color: #444; }
.mfr-strip a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; }
.steps .st { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.1rem 1.1rem; position: relative; }
.steps .st .no { position: absolute; top: -13px; left: 14px; color: #fff; width: 27px; height: 27px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 700; box-shadow: 0 3px 8px rgba(27,58,120,0.2); }
.steps .st:nth-child(1) .no { background: var(--blue); }
.steps .st:nth-child(2) .no { background: var(--accent); }
.steps .st:nth-child(3) .no { background: var(--teal); }
.steps .st:nth-child(4) .no { background: var(--violet); }
.steps .st h3 { margin: 0.4rem 0 0.4rem; font-size: 0.95rem; color: #3a2422; }
.steps .st p { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

.notice-bar { background: linear-gradient(90deg, var(--accent-soft), #fff); border: 1px solid #ffd9bd; border-radius: 12px; padding: 0.75rem 1.1rem; font-size: 0.84rem; color: #8a4a12; margin-bottom: 1.2rem; }
.notice-bar strong { color: var(--accent); }

/* ===== 제품 상세 (UnikeyIC 동일 구성) ===== */
.pd-crumb { font-size: 0.84rem; color: var(--muted); margin-bottom: 0.9rem; }
.pd-crumb a { color: var(--blue); }
.pd-grid { display: grid; grid-template-columns: minmax(0,1fr) 400px; gap: 1rem; align-items: start; }
.pd-main { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem; display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 1.5rem; }
.pd-imgcol .im { width: 300px; height: 300px; border: 1px solid #eef1f5; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    background-image: linear-gradient(#f3f6fa 1px, transparent 1px), linear-gradient(90deg, #f3f6fa 1px, transparent 1px); background-size: 20px 20px; }
.pd-imgcol img { max-width: 88%; max-height: 88%; object-fit: contain; }
.pd-imgcol .ref { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0.25rem 0.5rem; display: inline-block; margin-top: 0.6rem; }
.pd-title-row { display: flex; align-items: center; gap: 0.5rem; }
.pd-title-row h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.3px; color: #3a2422; word-break: break-all; }
.rohs { color: #1a7f37; border: 1px solid #abefc6; background: #ecfdf3; font-size: 0.68rem; font-weight: 700; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.pd-desc { font-size: 0.9rem; color: #4b5563; line-height: 1.65; margin: 0.6rem 0 0.9rem; }
.pd-rows .r { display: flex; padding: 0.4rem 0; font-size: 0.88rem; }
.pd-rows .r .k { width: 130px; flex-shrink: 0; color: var(--muted); text-align: right; margin-right: 1rem; }
.pd-rows .r .v { font-weight: 500; word-break: break-all; }
.pd-rows .r .v a { font-weight: 600; }

.pd-buy { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.3rem; position: sticky; top: 1rem; }
.pd-stock-big { font-size: 1.35rem; font-weight: 800; color: #3a2422; }
.pd-stock-big b { color: var(--blue); }
.pd-stock-sub { font-size: 0.8rem; color: var(--muted); margin: 0.15rem 0 0.9rem; }
.pd-qty { display: flex; margin-bottom: 0.6rem; }
.pd-qty button { width: 40px; height: 42px; border: 1px solid #cfd6dd; background: #f8fafc; font-size: 1.15rem; cursor: pointer; }
.pd-qty button:first-child { border-radius: 6px 0 0 6px; }
.pd-qty button:last-child { border-radius: 0 6px 6px 0; }
.pd-qty input { flex: 1; height: 42px; border: 1px solid #cfd6dd; border-left: 0; border-right: 0; text-align: center; font-size: 1rem; font-weight: 700; outline: none; min-width: 0; }
.pd-nowline { display: flex; justify-content: space-between; font-size: 0.84rem; color: var(--muted); padding: 0.35rem 0; }
.pd-nowline b { color: var(--txt); }
.pd-grand { display: flex; justify-content: space-between; align-items: baseline; padding: 0.6rem 0 0.9rem; }
.pd-grand .lbl { font-size: 0.86rem; color: var(--muted); }
.pd-grand .amt { font-size: 1.5rem; font-weight: 800; color: var(--blue-dark); }
.pd-grand .usd { font-size: 0.8rem; color: var(--muted); margin-left: 0.4rem; font-weight: 400; }
.pd-btns { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; }
.pd-btns .btn { flex: 1; padding: 0.8rem 0; font-size: 0.95rem; }
.pd-meta-line { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 0.8rem; margin-bottom: 1rem; }
.pd-meta-line b { color: var(--txt); }
.pd-price-hd { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.4rem; color: #3a2422; }
.pd-price-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.pd-price-table th { color: var(--muted); font-weight: 600; padding: 0.45rem 0.2rem; text-align: left; border-bottom: 2px solid var(--line); }
.pd-price-table th:last-child, .pd-price-table td:last-child { text-align: right; }
.pd-price-table td { padding: 0.5rem 0.2rem; border-bottom: 1px solid #f0f2f5; cursor: pointer; }
.pd-price-table td:first-child { color: var(--blue); font-weight: 600; }
.pd-price-table tr.sel td { background: var(--blue-soft); }
.pd-price-table tbody tr:hover td { background: #fdf4f2; }

.pd-spec { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 1rem; overflow: hidden; }
.pd-spec .tabhd { display: flex; border-bottom: 1px solid var(--line); }
.pd-spec .tabhd span { padding: 0.8rem 1.3rem; font-weight: 700; font-size: 0.92rem; color: var(--blue); border-bottom: 2px solid var(--blue); }
.pd-spec table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.pd-spec th { background: var(--blue); color: #fff; text-align: left; padding: 0.6rem 1.2rem; font-weight: 700; width: 220px; }
.pd-spec thead th:last-child { width: auto; }
.pd-spec td { padding: 0.6rem 1.2rem; border-bottom: 1px solid #f0f2f5; }
.pd-spec tbody tr:nth-child(even) td { background: #fafbfd; }
.pd-spec td.k { color: #374151; font-weight: 600; width: 220px; background: #f8fafc !important; }

.pd-rel { margin-top: 1.4rem; }
.pd-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.9rem; }
.pd-rel-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem; text-align: center; }
.pd-rel-card .im { height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; }
.pd-rel-card img { max-height: 85px; max-width: 90%; object-fit: contain; }
.pd-rel-card .pn { font-weight: 700; font-size: 0.86rem; color: var(--blue-dark); word-break: break-all; }
.pd-rel-card .mf { font-size: 0.76rem; color: var(--muted); margin: 0.2rem 0 0.6rem; }
@media (max-width: 1000px) {
    .pd-grid, .pd-main { grid-template-columns: 1fr; }
    .pd-buy { position: static; }
    .pd-imgcol .im { width: 100%; }
    .pd-rows .r .k { width: 110px; text-align: left; }
}

/* 다크 푸터 */
.shop-footer-dark { background: #2b1a18; color: #c9b0ab; margin-top: 2.5rem; font-size: 0.84rem; }
.shop-footer-in { max-width: 1100px; margin: 0 auto; padding: 2.2rem 1rem 1.6rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
.shop-footer-dark h4 { color: #fff; font-size: 0.92rem; margin: 0 0 0.7rem; }
.shop-footer-dark a { color: #c9b0ab; display: block; margin-bottom: 0.4rem; }
.shop-footer-dark a:hover { color: #fff; }
.shop-footer-dark .brand { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.shop-footer-dark .brand span { color: var(--accent); }
.shop-footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 0.9rem 1rem; text-align: center; font-size: 0.76rem; color: #64748b; }
.shop-footer-bottom a { display: inline; margin: 0 0.2rem; }
@media (max-width: 800px) { .hero h1 { font-size: 1.35rem; } .shop-footer-in { grid-template-columns: 1fr; } }
