/**
 * drsoft-store 테마 - 제품 상세 화면 (제목 · 갤러리 · 구매 박스 · 탭 · 함께 보면 좋은 상품)
 * 기존 tp-link.css / synology.css 의 갤러리·탭·사양표 스타일 위에 쇼핑몰 구조로 덮어쓴다.
 */

.ml-pd { padding-top: 6px; }
.ml-pd .ml-crumb { margin: 16px 0 12px; }
.ml-pd__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 24px; padding: 6px 0 18px; border-bottom: 1px solid var(--ml-line); }
.ml-pd__title { grid-column: 1 / -1; margin: 0; font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -0.04em; color: #111; }
.ml-pd__spec { margin: 0; font-size: 13px; line-height: 1.6; color: #6b6b6b; }
.ml-pd__no { margin: 0; font-size: 12px; color: #6b6b6b; white-space: nowrap; }

.ml-main .tps-detail-section, .ml-main .sys-detail-section { padding: 0; background: #fff; }
.ml-main .tps-detail-section .container, .ml-main .sys-detail-section .container { max-width: var(--ml-wrap); padding-left: 24px; padding-right: 24px; margin-left: auto; margin-right: auto; }
.ml-main .tps-detail, .ml-main .sys-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; margin: 28px 0 44px; align-items: start; }
.ml-main .tps-detail-visual, .ml-main .sys-detail-visual { min-width: 0; }
.ml-main .tps-detail-img, .ml-main .sys-detail-img { display: grid; place-items: center; aspect-ratio: 1 / 1; background: #fff; border: 0; border-radius: 0; }
.ml-main .tps-detail-img img, .ml-main .sys-detail-img img { width: 100%; max-width: 560px; height: 100%; object-fit: contain; }
.ml-main .tps-thumb-row, .ml-main .sys-thumb-row { margin-top: 14px; }
.ml-main .tps-thumb, .ml-main .sys-thumb { border-radius: 4px; border: 1px solid #ddd; background: #fff; }
.ml-main .tps-thumb.is-on, .ml-main .sys-thumb.is-on { border: 2px solid #222; }

/* 오른쪽 정보 */
.ml-pd__info { min-width: 0; }
.ml-pd__table { margin: 0; padding: 0; }
.ml-pd__row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 16px 4px; margin: 0; border-bottom: 1px solid var(--ml-line); font-size: 14px; }
.ml-pd__row dt { margin: 0; font-weight: 700; color: #111; }
.ml-pd__row dd { margin: 0; color: #333; line-height: 1.6; }
.ml-pd__row dd small { display: block; margin-top: 2px; font-size: 12px; color: #6b6b6b; }
.ml-pd__row--price { padding: 22px 4px; }
.ml-pd__row--price dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.ml-pd__row--price dd small { display: inline; margin: 0; }
.ml-pd__won { font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -0.04em; color: #111; }
.ml-pd__won span { font-size: 18px; font-weight: 700; margin-left: 1px; }
.ml-pd__quote { font-size: 20px; font-weight: 700; color: #555; }
.ml-pd__note { margin: 12px 4px 18px; font-size: 12px; line-height: 1.6; color: #6b6b6b; }

.ml-pd__sel { margin: 0 0 6px; padding: 16px 18px; background: #f6f6f6; box-sizing: border-box; }
.ml-pd__selname { margin: 0 0 12px; font-size: 14px; color: #222; line-height: 1.5; }
.ml-pd__selrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ml-pd__selprice { font-size: 15px; font-weight: 500; color: #222; }
.ml-pd__sel .tps-qty, .ml-pd__sel .sys-qty { display: inline-flex; align-items: center; border: 1px solid #cfcfcf; background: #fff; height: 32px; }
.ml-pd__sel .tps-qty button, .ml-pd__sel .sys-qty button { width: 30px; height: 30px; border: 0; background: #fff; color: #444; font-size: 16px; line-height: 1; cursor: pointer; }
.ml-pd__sel .tps-qty button:hover, .ml-pd__sel .sys-qty button:hover { background: #f1f1f1; }
.ml-pd__sel .tps-qty input, .ml-pd__sel .sys-qty input { width: 44px; height: 30px; border: 0; border-left: 1px solid #e1e1e1; border-right: 1px solid #e1e1e1; text-align: center; font: 500 14px var(--ml-font); -moz-appearance: textfield; background: #fff; }
.ml-pd__sel .tps-qty input::-webkit-outer-spin-button, .ml-pd__sel .tps-qty input::-webkit-inner-spin-button, .ml-pd__sel .sys-qty input::-webkit-outer-spin-button, .ml-pd__sel .sys-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ml-pd__total { display: flex; align-items: baseline; justify-content: flex-end; gap: 16px; margin: 18px 2px 16px; font-size: 14px; color: #333; }
.ml-pd__total strong { font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--ml-red); }
.ml-btn--lg { height: 54px; font-size: 16px; }
.ml-pd__btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; padding-bottom: 18px; border-bottom: 2px solid #222; }
.ml-pd__btns .ml-btn:only-child { grid-column: 1 / -1; }
.ml-pd__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 14px 2px 0; font-size: 13px; }
.ml-pd__links a { color: #555; text-decoration: none; }
.ml-pd__links a:hover { color: var(--ml-blue); text-decoration: underline; }

/* 상세정보 탭(굵은 밑줄) */
.ml-main .tps-tabs, .ml-main .sys-tabs { margin-top: 8px; }
.ml-main .tps-tabbar, .ml-main .sys-tabbar { display: flex; gap: 0; padding: 0; margin: 0; position: sticky; top: 0; z-index: 30; background: #fff; border: 0; border-bottom: 3px solid #e6e6e6; overflow-x: auto; scrollbar-width: none; }
.ml-main .tps-tab, .ml-main .sys-tab { flex: 1 1 0; min-width: max-content; padding: 16px 14px 14px; margin: 0 0 -3px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; font: 500 16px var(--ml-font); color: #6b6b6b; cursor: pointer; text-align: center; }
.ml-main .tps-tab:hover, .ml-main .sys-tab:hover { color: #111; background: transparent; }
.ml-main .tps-tab.is-on, .ml-main .sys-tab.is-on { color: #111; font-weight: 700; border-bottom-color: #111; background: transparent; }
.ml-main .tps-block h2, .ml-main .sys-block h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.ml-main .tps-spec-table th, .ml-main .sys-spec-table th { background: #f7f7f7; font-weight: 700; }

/* 함께 보면 좋은 상품 */
.ml-pd__related { margin-top: 44px; }
.ml-main .ml-pd__h2 { display: inline-block; margin: 0 0 18px; padding: 10px 20px; border-radius: 999px; background: #222; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.ml-pd__related .ml-grid > li { display: flex; min-width: 0; }
.ml-pd__related .ml-grid > li > .ml-card { flex: 1 1 auto; }

@media (max-width: 991px) {
    .ml-main .tps-detail, .ml-main .sys-detail { grid-template-columns: 1fr; gap: 24px; margin-top: 18px; }
    .ml-pd__title { font-size: 22px; }
}
@media (max-width: 640px) {
    .ml-pd__head { grid-template-columns: 1fr; }
    .ml-pd__row { grid-template-columns: 78px minmax(0, 1fr); }
    .ml-pd__won { font-size: 26px; }
    .ml-pd__btns { grid-template-columns: 1fr; }
    .ml-main .tps-tab, .ml-main .sys-tab { font-size: 14px; padding: 14px 10px 12px; }
}
