/**
 * drsoft-store 테마 - 쇼핑몰 공통 스타일 (헤더 · 내비게이션 · 푸터 · 버튼 · 배지 · 탭 · 상품 카드 · 격자)
 *
 * 접두사 ml-. 페이지별 스타일은 mall-home.css · mall-list.css · mall-detail.css · mall-order.css 에 둔다.
 * 구조·치수는 레퍼런스 쇼핑몰(상단 2단 헤더 · 1300px 본문 · 5열 카드)을 따르고, 로고·이미지·문구는 우리 것을 쓴다.
 *
 * @package drsoft-store
 */

:root {
    --ml-ink: #222;
    --ml-ink2: #555;
    --ml-mute: #8c8c8c;
    --ml-line: #e6e6e6;
    --ml-tile: #f8f8f8;
    --ml-blue: #1e88e5;
    --ml-blue-d: #1565c0;
    --ml-red: #f0463a;
    --ml-wrap: 1348px;
    --ml-font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.st-body { margin: 0; font-family: var(--ml-font); color: var(--ml-ink); background: #fff; letter-spacing: -0.01em; }
body.st-body a { color: inherit; }
.ml-wrap { width: 100%; max-width: var(--ml-wrap); margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.ml-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ml-skip { position: absolute; left: 12px; top: -48px; z-index: 300; background: #111; color: #fff; padding: 10px 14px; border-radius: 6px; }
.ml-skip:focus { top: 12px; }

/* ── 버튼 · 배지 ── */
.ml-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 4px; font: 700 15px/1 var(--ml-font); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; box-sizing: border-box; }
.ml-btn:hover { text-decoration: none; }
.ml-btn--dark { background: var(--ml-ink); color: #fff; }
.ml-btn--dark:hover { background: #000; color: #fff; }
.ml-btn--blue { background: var(--ml-blue); color: #fff; }
.ml-btn--blue:hover { background: var(--ml-blue-d); color: #fff; }
.ml-btn--line { background: #fff; border-color: #cfcfcf; color: var(--ml-ink); }
.ml-btn--line:hover { border-color: var(--ml-ink); }
/* 링크 기본색 규칙(body.st-body a)보다 앞서도록 */
body.st-body a.ml-btn--dark, body.st-body a.ml-btn--blue { color: #fff; }
body.st-body a.ml-btn--line { color: var(--ml-ink); }
.ml-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.ml-btn--block { width: 100%; }
.ml-btn:focus-visible, .ml-iconbtn:focus-visible, .ml-nav__link:focus-visible, .ml-sort a:focus-visible, .ml-card a:focus-visible { outline: 2px solid var(--ml-blue); outline-offset: 2px; }

.ml-pill { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px; font: 700 14px/1 var(--ml-font); color: #fff; white-space: nowrap; }
.ml-pill--red { background: #d93025; }
.ml-pill--blue { background: var(--ml-blue-d); }
.ml-pill--gray { background: #6b6b6b; }

/* ── 헤더(2단) ── */
.ml-header { position: relative; z-index: 60; background: #fff; border-bottom: 1px solid var(--ml-line); }
.ml-top { display: flex; align-items: center; gap: 28px; padding: 14px 32px 4px; min-height: 66px; box-sizing: border-box; }
.ml-logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--ml-ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.ml-logo:hover { text-decoration: none; }
.ml-logo__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: #0d1b2e; color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 0; }
.ml-search { position: relative; display: flex; align-items: center; flex: 0 1 420px; min-width: 0; height: 42px; margin-left: 4px; background: #f1f1f1; border-radius: 12px; }
.ml-search__scope { flex: 0 0 auto; height: 100%; border: 0; background: transparent; padding: 0 4px 0 16px; font: 700 13px var(--ml-font); color: var(--ml-ink2); outline: none; cursor: pointer; }
.ml-search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 48px 0 14px; font: 400 14px var(--ml-font); color: var(--ml-ink); outline: none; -webkit-appearance: none; appearance: none; }
.ml-search input::placeholder { color: #9a9a9a; }
.ml-search button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: #222; }
.ml-search:focus-within { box-shadow: 0 0 0 2px var(--ml-blue) inset; }
.ml-top__links { display: flex; align-items: center; margin-left: auto; font-size: 13px; color: #333; }
.ml-top__links a { color: #333; text-decoration: none; padding: 0 12px; line-height: 1; border-left: 1px solid #d9d9d9; }
.ml-top__links a:first-child { border-left: 0; }
.ml-top__links a:hover { text-decoration: underline; }
.ml-top__links .ml-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 14px; margin-right: 10px; border: 0; border-radius: 3px; background: var(--ml-blue-d); color: #fff; font-weight: 700; font-size: 12px; text-decoration: none; }
.ml-top__links .ml-chip:hover { background: #0d47a1; text-decoration: none; }

.ml-navrow { display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 32px; box-sizing: border-box; }
.ml-iconbtn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 8px; color: #222; cursor: pointer; text-decoration: none; flex: 0 0 auto; }
.ml-iconbtn:hover { background: #f3f3f3; text-decoration: none; }
.ml-iconbtn svg { display: block; }
.ml-badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--ml-red); color: #fff; font: 700 11px/17px var(--ml-font); text-align: center; box-sizing: border-box; }
.ml-badge[hidden] { display: none; }

.ml-nav { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; }
.ml-nav__list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ml-nav--scroll .ml-nav__list { overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.ml-nav--scroll .ml-nav__list::-webkit-scrollbar { display: none; }
.ml-nav__arrow { flex: 0 0 auto; width: 28px; height: 36px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: #444; }
.ml-nav--dd .ml-nav__arrow { display: none; }
.ml-nav__item { position: relative; flex: 0 0 auto; }
.ml-nav__link { display: inline-flex; align-items: center; gap: 3px; height: 40px; padding: 0 12px; color: #222; font-size: 14px; text-decoration: none; background: transparent; border: 0; cursor: pointer; font-family: var(--ml-font); border-radius: 6px; }
.ml-nav__link:hover { color: var(--ml-blue); text-decoration: none; }
.ml-nav__link.is-accent::after { content: ''; width: 5px; height: 5px; margin-left: 2px; margin-top: -9px; border-radius: 50%; background: var(--ml-red); }
.ml-nav__link.is-active { color: var(--ml-blue); font-weight: 700; }
.ml-nav__link .ml-chev { width: 9px; height: 9px; opacity: .6; }
.ml-dd { position: absolute; left: 0; top: 100%; z-index: 80; display: none; min-width: 260px; margin: 0; padding: 10px; list-style: none; background: #fff; border: 1px solid var(--ml-line); border-radius: 10px; box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.ml-nav__item:hover > .ml-dd, .ml-nav__item:focus-within > .ml-dd, .ml-nav__item.is-open > .ml-dd { display: block; }
.ml-dd a { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 6px; color: #222; font-size: 14px; text-decoration: none; }
.ml-dd a:hover { background: #f3f7fd; color: var(--ml-blue); text-decoration: none; }
.ml-dd small { color: var(--ml-mute); font-size: 12px; }

.ml-ticker { position: relative; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; width: 236px; margin-left: 12px; }
.ml-ticker__list { position: relative; flex: 1 1 auto; height: 40px; overflow: hidden; }
.ml-ticker__item { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; color: #222; text-decoration: none; opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .35s; pointer-events: none; }
.ml-ticker__item.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ml-ticker__item img { width: 34px; height: 34px; object-fit: contain; flex: 0 0 auto; }
.ml-ticker__txt { min-width: 0; font-size: 11px; line-height: 1.35; color: #555; }
.ml-ticker__txt b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #111; }
.ml-ticker__btns { display: flex; gap: 4px; }
.ml-ticker__btns button { width: 24px; height: 24px; padding: 0; border: 1px solid #d6d6d6; background: #fff; color: #6b6b6b; cursor: pointer; display: grid; place-items: center; border-radius: 2px; }
.ml-ticker__btns button:hover { border-color: #6b6b6b; color: #222; }

.ml-cartwrap { position: relative; flex: 0 0 auto; }
.ml-cartpop { position: absolute; right: 0; top: 100%; z-index: 80; display: none; min-width: 230px; margin: 0; padding: 10px; list-style: none; background: #fff; border: 1px solid var(--ml-line); border-radius: 10px; box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.ml-cartwrap:hover > .ml-cartpop, .ml-cartwrap:focus-within > .ml-cartpop { display: block; }
.ml-cartpop a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 6px; font-size: 14px; text-decoration: none; color: #222; }
.ml-cartpop a:hover { background: #f3f7fd; color: var(--ml-blue); }
.ml-cartpop b { color: var(--ml-red); }

/* 전체 메뉴(서랍) */
.ml-drawer-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.ml-drawer { position: fixed; z-index: 100; left: 0; top: 0; bottom: 0; width: min(340px, 86vw); background: #fff; transform: translateX(-102%); visibility: hidden; transition: transform .22s, visibility 0s linear .22s; overflow-y: auto; padding: 18px 20px 28px; box-sizing: border-box; }
body.ml-drawer-on .ml-drawer { transform: none; visibility: visible; transition-delay: 0s; }
body.ml-drawer-on .ml-drawer-bg { opacity: 1; pointer-events: auto; }
.ml-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ml-drawer h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 800; }
.ml-drawer ul { margin: 0; padding: 0; list-style: none; }
.ml-drawer li a { display: flex; justify-content: space-between; padding: 9px 4px; border-bottom: 1px solid #f0f0f0; font-size: 14px; text-decoration: none; color: #222; }
.ml-drawer li a small { color: var(--ml-mute); }

/* ── 상품 카드(5열) ── */
.ml-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; margin: 0; padding: 0; list-style: none; }
.ml-card { position: relative; display: flex; flex-direction: column; padding: 20px 20px 18px; background: var(--ml-tile); border-radius: 12px; min-width: 0; box-sizing: border-box; }
.ml-card__img { display: grid; place-items: center; aspect-ratio: 1 / 1; margin: 0; background: transparent; border-radius: 8px; overflow: hidden; }
.ml-card__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ml-card__img.is-placeholder img { width: 46%; height: 46%; opacity: .35; mix-blend-mode: normal; }
.ml-card__name { margin: 0; font-size: 15px; line-height: 22px; font-weight: 400; letter-spacing: -0.02em; min-height: 44px; }
.ml-card__name a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; color: var(--ml-ink); text-decoration: none; }
.ml-card__name a:hover { text-decoration: underline; }
.ml-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 12px; }
.ml-card__won { margin-left: auto; font-size: 17px; font-weight: 700; color: #111; letter-spacing: -0.02em; white-space: nowrap; }
.ml-card__won small { font-size: 13px; font-weight: 500; margin-left: 1px; }
.ml-card__won.is-quote { font-size: 14px; color: var(--ml-ink2); }
.ml-card__meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 12px; color: #6b6b6b; }
.ml-card__media { position: relative; margin: 0 0 14px; }
.ml-card__media .ml-card__img { margin: 0; }
.ml-card__quick { display: none; gap: 6px; }
.ml-card__quick .ml-btn { flex: 1 1 0; padding: 0 6px; background-clip: padding-box; }
@media (hover: hover) {
    .ml-card__quick { position: absolute; left: 8px; right: 8px; bottom: 8px; }
    .ml-card:hover .ml-card__quick, .ml-card:focus-within .ml-card__quick { display: flex; }
}
@media (hover: none) { .ml-card__quick { display: flex; margin-top: 8px; } }

/* ── 정렬 탭 · 선택 상자 · 경로 · 페이지 번호 ── */
.ml-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.ml-sort li { display: flex; align-items: center; }
.ml-sort li + li::before { content: ''; width: 1px; height: 14px; background: #d6d6d6; margin: 0 18px; }
.ml-sort a { font-size: 17px; font-weight: 500; color: #333; text-decoration: none; letter-spacing: -0.02em; }
.ml-sort a:hover { color: var(--ml-blue); }
.ml-sort a.is-on { color: var(--ml-blue); font-weight: 700; }
.ml-select { height: 36px; min-width: 190px; padding: 0 34px 0 14px; border: 1px solid #d6d6d6; border-radius: 3px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23888' stroke-width='1.4'/></svg>") no-repeat right 12px center; font: 400 14px var(--ml-font); color: #333; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ml-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: #666; }
.ml-crumb li + li::before { content: '›'; margin-right: 6px; color: #aaa; }
.ml-crumb a { color: #666; text-decoration: none; }
.ml-crumb a:hover { text-decoration: underline; }
.ml-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 36px 0 12px; }
.ml-pager a, .ml-pager span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 18px; font-size: 14px; color: #333; text-decoration: none; box-sizing: border-box; }
.ml-pager a:hover { background: #f1f1f1; }
.ml-pager .is-on { background: #222; color: #fff; font-weight: 700; }
.ml-pager .is-gap { color: #aaa; }

/* 상세정보 탭(굵은 밑줄) */
.ml-tabs { display: flex; margin: 0; padding: 0; list-style: none; border-bottom: 3px solid #e6e6e6; }
.ml-tabs li { flex: 1 1 0; }
.ml-tabs a, .ml-tabs button { display: block; width: 100%; padding: 16px 8px 14px; margin-bottom: -3px; border: 0; border-bottom: 3px solid transparent; background: transparent; text-align: center; font: 500 16px var(--ml-font); color: #6b6b6b; text-decoration: none; cursor: pointer; }
.ml-tabs .is-on a, .ml-tabs .is-on button { color: #111; font-weight: 700; border-bottom-color: #111; }

/* ── 푸터 ── */
.ml-footer { margin-top: 72px; background: #f4f5f7; color: #666; font-size: 13px; }
.ml-footer a { color: #555; text-decoration: none; }
.ml-footer a:hover { text-decoration: underline; }
.ml-footer__links { display: flex; flex-wrap: wrap; gap: 4px 0; padding: 18px 0; border-bottom: 1px solid #e3e5e9; font-weight: 700; color: #333; }
.ml-footer__links a { position: relative; display: inline-flex; align-items: center; min-height: 28px; padding: 0 16px; color: #333; line-height: 1; }
.ml-footer__links a + a::before { content: ''; position: absolute; left: 0; top: 50%; height: 12px; margin-top: -6px; border-left: 1px solid #d3d6db; }
.ml-footer__links a:first-child { padding-left: 0; }
.ml-footer__main { display: grid; grid-template-columns: 1.1fr 2fr; gap: 40px; padding: 28px 0 30px; }
.ml-footer__tel { margin: 0 0 8px; font-size: 24px; font-weight: 800; color: #111; letter-spacing: -0.02em; }
.ml-footer__tel a { color: #111; }
.ml-footer h4 { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: #222; }
.ml-footer ul { margin: 0; padding: 0; list-style: none; }
.ml-footer li { padding: 2px 0; line-height: 1.7; }
.ml-footer__copy { padding: 16px 0 28px; border-top: 1px solid #e3e5e9; color: #6b6b6b; font-size: 12px; }
.ml-footer__copy p { margin: 0; }

/* ── 반응형 ── */
@media (max-width: 1280px) { .ml-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ml-ticker { display: none; } }
@media (max-width: 991px) {
    .ml-nav--dd .ml-nav__list { overflow-x: auto; scrollbar-width: none; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
    .ml-nav--dd .ml-nav__list::-webkit-scrollbar { display: none; }
    .ml-nav--dd .ml-dd, .ml-nav--dd .ml-chev { display: none !important; }
    .ml-nav--dd .ml-nav__arrow { display: none; }
    .ml-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ml-top { padding: 12px 16px 4px; gap: 12px; }
    .ml-top__links a:not(.ml-chip) { display: none; }
    .ml-navrow { padding: 0 10px; }
    .ml-footer__main { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 640px) {
    .ml-wrap { padding: 0 14px; }
    .ml-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ml-card { padding: 14px 12px 12px; border-radius: 10px; }
    .ml-card__name { font-size: 14px; line-height: 20px; min-height: 40px; }
    .ml-card__row { flex-wrap: wrap; row-gap: 6px; }
    .ml-card__won { font-size: 15px; margin-left: 0; }
    .ml-pill { height: 24px; padding: 0 9px; font-size: 12px; }
    .ml-card__meta { font-size: 11px; flex-direction: column; gap: 2px; }
    .ml-logo__text { display: none; }
    .ml-top { min-height: 60px; }
    .ml-search { flex: 1 1 auto; margin-left: 0; }
    .ml-top__links .ml-chip { display: none; }
    .ml-sort a { font-size: 15px; }
    .ml-sort li + li::before { margin: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { .ml-ticker__item, .ml-drawer, .ml-drawer-bg { transition: none; } }

/* ── 기존 본문 위에 얹는 쇼핑몰 톤(패키지 · 주문 결과 · 주문 조회: ml-plain) ── */
body.st-body .ml-plain .page-header { padding: 22px 0 14px !important; margin: 0; background: #fff !important; text-align: left !important; border: 0; border-bottom: 1px solid var(--ml-line); }
body.st-body .ml-plain .page-header .container { max-width: var(--ml-wrap) !important; padding: 0 24px; margin: 0 auto; }
body.st-body .ml-plain .page-header h1 { margin: 0; font-size: 26px !important; line-height: 1.35; font-weight: 700 !important; letter-spacing: -0.04em; color: #111 !important; text-align: left; }
body.st-body .ml-plain .page-header p { margin: 6px 0 0 !important; max-width: none; font-size: 13px !important; font-weight: 400; color: #777 !important; text-align: left; }
body.st-body .ml-plain .container.mall-bleed { max-width: var(--ml-wrap); padding-left: 24px; padding-right: 24px; margin-left: auto; margin-right: auto; }
body.st-body .ml-plain .breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; background: transparent; list-style: none; font-size: 12px; color: #666; }
body.st-body .ml-plain .breadcrumb-item + .breadcrumb-item::before { content: '›'; padding: 0 6px 0 0; color: #aaa; }
body.st-body .ml-plain .breadcrumb-item a { color: #666; text-decoration: none; }
body.st-body .ml-plain .breadcrumb-item i { display: none; }
body.st-body .ml-plain .btn { border-radius: 4px !important; font-weight: 700; font-family: var(--ml-font); }
body.st-body .ml-plain .btn-primary { background: #222 !important; border-color: #222 !important; color: #fff !important; }
body.st-body .ml-plain .btn-primary:hover { background: #000 !important; border-color: #000 !important; color: #fff !important; }
body.st-body .ml-plain .btn-outline-primary { background: #fff; border-color: #cfcfcf; color: #222; }
body.st-body .ml-plain .btn-outline-primary:hover { border-color: #222; background: #fff; color: #222; }
body.st-body .ml-plain .contact-form-wrapper { border-radius: 12px; border: 1px solid var(--ml-line); box-shadow: none; }
body.st-body .ml-plain .section { padding: 36px 0 56px; }
body.st-body .ml-plain .form-control { border-radius: 4px; border-color: #d6d6d6; height: 46px; }
body.st-body .ml-plain .form-control:focus { border-color: #222; box-shadow: none; }
body.st-body .ml-plain h1.h3, .ml-plain .h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
