/* Trang món: mép sân khấu và chia hàng dùng xám nhạt; điều khiển viền đen, đỏ đánh dấu trạng thái. */

.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 520px); }

/* ---------- Sân khấu ảnh ---------- */
.pd-stage { position: sticky; top: 64px; height: calc(100svh - 64px); min-height: 560px; display: grid; grid-template-columns: 64px minmax(0, 1fr); border-right: var(--rule-hair); }
.pd-views { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 30px; border-right: var(--rule-hair); }
.pd-view { writing-mode: vertical-rl; transform: rotate(180deg); padding: 8px 5px; background: none; border: 0; border-right: 1px solid transparent; font: 600 11px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); cursor: pointer; transition: color .3s var(--ease), border-color .3s var(--ease); }
.pd-view:hover { color: var(--fg); }
.pd-view.is-on { color: var(--fg); font-weight: 700; border-right-color: var(--accent); }
.pd-view:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pd-frame { position: relative; overflow: hidden; min-width: 0; }
.pd-num { position: absolute; left: clamp(16px, 2.4vw, 36px); top: clamp(12px, 2vw, 28px); font: 800 clamp(110px, 13vw, 200px)/.8 var(--font); letter-spacing: -.05em; color: color-mix(in srgb, var(--fg) 6%, var(--bg)); pointer-events: none; user-select: none; }
.pd-slides { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pd-slides::-webkit-scrollbar { display: none; }
.pd-slide { position: relative; flex: 0 0 100%; margin: 0; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; }
.pd-slide > img { width: auto; height: auto; max-width: 78%; max-height: calc(100% - 96px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pd-slide.is-look > img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: 50% 30%; }
.pd-slide.is-detail > img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.pd-art { position: relative; height: calc(100% - 96px); max-height: 1000px; aspect-ratio: 3 / 4; max-width: 80%; }
.pd-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; backface-visibility: hidden; -webkit-backface-visibility: hidden; user-select: none; -webkit-user-drag: none; }
.pd-art .pd-back { transform: rotateY(180deg); }
.pd-stage[data-view="set"] .pd-art { aspect-ratio: 9 / 7; height: auto; width: min(88%, 820px); max-width: none; }
[data-flip-stage] .pd-slide[data-slide="main"] { touch-action: pan-y; cursor: grab; }
.pd-count { position: absolute; right: 24px; bottom: 20px; margin: 0; font: 600 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); pointer-events: none; }
.pd-hint { color: var(--fg); }

/* ---------- Cột mua ---------- */
.pd-buy { min-width: 0; padding: 44px 48px 64px; display: flex; flex-direction: column; gap: 34px; }
.pd-head { display: flex; flex-direction: column; gap: 10px; }
.pd-kicker { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--dim); }
.pd-title { margin: 0; font-size: clamp(36px, 3.4vw, 50px); font-weight: 800; line-height: 1; letter-spacing: -.01em; text-wrap: balance; }
.pd-line { margin: 0; max-width: 38ch; font-size: 14px; line-height: 1.6; color: color-mix(in srgb, var(--fg) 80%, var(--bg)); }
.pd-price { margin: 6px 0 0; font-size: 22px; font-weight: 700; }
.pd-price small { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--dim); }
.pd-price .is-tick { animation: none; }

/* Tiến trình là xám nhạt; chỉ số bước hiện hành và bước hoàn tất dùng đỏ. */
.pd .kho-buy form.cart { position: relative; display: flex; flex-direction: column; gap: 0; margin: 0; padding-left: 44px; counter-reset: pd; }
.pd .kho-buy form.cart::before { content: ''; position: absolute; left: 9px; top: 12px; bottom: 96px; border-left: var(--rule-hair); }
.pd .kho-buy .woocommerce-variation-add-to-cart, .pd .kho-buy form.cart:not(.variations_form) { display: flex; flex-direction: column; gap: 0; margin: 0; }
.pd .single_variation_wrap { margin: 0; }
.pd-step, .pd .kho-size legend.pd-step { position: relative; display: block; margin: 0 0 14px; padding: 0; font: 700 11px/20px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--fg); }
.pd-step::before { counter-increment: pd; content: counter(pd); position: absolute; left: -44px; top: 0; width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%; border: var(--rule-hair); background: var(--bg); color: var(--dim); font-size: 10px; line-height: 17px; letter-spacing: 0; text-align: center; transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.pd-step.is-now::before { border: var(--rule-state); color: var(--fg); line-height: 17px; }
.pd-step.is-done::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.pd .kho-size legend.pd-step span { margin-left: 8px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--dim); }
.pd-step-hold { margin-top: 30px; }

/* Bước 1: chọn món, dạng thẻ chữ có gạch chân đậm khi chọn */
.pd .kho-chips { display: flex; flex-wrap: wrap; column-gap: 18px; border: 0; border-top: var(--rule-ink); margin-bottom: 30px; }
.pd .kho-chip { flex: 1 1 0; min-width: 84px; min-height: 66px; padding: 12px 4px 12px 0; border: 0; border-bottom: var(--rule-hair); background: none; color: var(--dim); justify-content: center; gap: 4px; transition: color .3s var(--ease), border-color .3s var(--ease); }
.pd .kho-chip::before { display: none; }
.pd .kho-chip:hover { color: var(--fg); }
.pd .kho-chip[aria-checked="true"] { color: var(--fg); border-bottom: var(--rule-state); }
.pd .kho-chip-name { font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.pd .kho-chip-price { font-size: 13px; opacity: 1; }
.pd .kho-chips .kho-chip:last-child:nth-child(odd) { grid-column: auto; }

/* Bước 2: chọn cỡ, ba ô liền một dải */
.pd .kho-size { margin: 0; }
.pd .kho-size-123 .kho-size-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: var(--rule-ink); }
.pd .kho-size-123 label span { align-items: center; justify-content: center; text-align: center; gap: 4px; min-height: 86px; padding: 10px 6px; border: 0; border-right: var(--rule-hair); background: none; box-shadow: none !important; }
.pd .kho-size-123 label:last-child span { border-right: 0; }
.pd .kho-size-123 label:hover span { background: color-mix(in srgb, var(--fg) 5%, var(--bg)); }
.pd .kho-size-123 label span b { font-size: 30px; }
.pd .kho-size-123 label span small { font-size: 10px; line-height: 1.4; }
.pd .kho-size-123 label span small em { display: block; }
.pd .kho-size-123 label span small i { display: none; }
.pd .kho-size-123 input:checked + span { background: var(--fg); color: var(--bg); }
.pd .kho-size-123 label.is-rec span::after { content: ''; position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pd .kho-size.is-need .kho-size-row { animation: pd-need .5s var(--ease); border-color: var(--accent); }
@keyframes pd-need { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Thử cỡ: thẻ xám nhạt có hình người nét mảnh */
.pd .kho-fit-open { margin-top: 10px; padding: 12px 14px; gap: 14px; border: 0; background: color-mix(in srgb, var(--fg) 6%, var(--bg)); }
.pd .kho-fit-open:hover, .pd .kho-fit-open:focus-visible { background: color-mix(in srgb, var(--fg) 10%, var(--bg)); }
.pd .kho-fit-ico { flex: none; width: 34px; height: 44px; border-radius: 0; -webkit-mask: none; mask: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 44'%3E%3Cpath d='M8 14h18l1 12H7z' fill='%23C2341B' opacity='.25'/%3E%3Cg fill='none' stroke='%23141412' stroke-width='1.2'%3E%3Ccircle cx='17' cy='6' r='4.5'/%3E%3Cpath d='M9 14h16l3 16M9 14 6 30M11 14l1 28M23 14l-1 28'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; color: transparent; font-size: 0; }
.pd .kho-fit-ico::before, .pd .kho-fit-ico::after { display: none; }
.pd .kho-fit-txt b { font-size: 13px; }
.pd .kho-fit-sub { font-size: 12px; font-weight: 500; }

/* Bước 3: giữ chỗ, nút tóm tắt lựa chọn */
.pd .quantity { display: none !important; }
.pd .kho-buy .single_add_to_cart_button { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px; text-align: left; background: var(--fg) !important; color: var(--bg) !important; letter-spacing: 0; }
.pd .kho-buy .single_add_to_cart_button::after { display: none; }
.pd-btn-l { display: flex; flex-direction: column; gap: 3px; position: relative; }
.pd-btn-l b { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pd-btn-l small, .pd-bar-l small { font-size: 11px; font-weight: 500; letter-spacing: .02em; text-transform: none; opacity: .75; }
.pd-btn-p { position: relative; font-size: 16px; font-weight: 700; white-space: nowrap; }
.pd .kho-reserve-line { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--dim); opacity: 1; }

/* Thông tin phụ: gập lại */
.pd-more { border-top: var(--rule-hair); }
.pd-acc { border-bottom: var(--rule-hair); }
.pd-acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.pd-acc summary::-webkit-details-marker { display: none; }
.pd-acc summary::after { content: '+'; font-size: 18px; font-weight: 400; transition: transform .3s var(--ease); }
.pd-acc[open] summary::after { transform: rotate(45deg); }
.pd-acc-b { padding: 0 0 20px; font-size: 13px; line-height: 1.7; }
.pd-acc-b p { margin: 0 0 10px; }
.pd-fine { font-size: 12px; color: var(--dim); }
.pd-sizes { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 13px; font-variant-numeric: tabular-nums; }
.pd-sizes caption { text-align: left; padding-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pd-sizes th, .pd-sizes td { padding: 8px 0; border-bottom: var(--rule-hair); text-align: right; font-weight: 500; }
.pd-sizes th[scope="row"] { text-align: left; color: var(--dim); }
.pd-sizes thead th { font-weight: 800; font-size: 15px; }
.pd-spec { margin: 0; }
.pd-spec div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: var(--rule-hair); }
.pd-spec dt { color: var(--dim); }
.pd-spec dd { margin: 0; text-align: right; }
.pd-notify .chat-input { margin: 10px 0; }
.pd-back { align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); text-decoration: none; }
.pd-back:hover { color: var(--fg); }
.pd-prices { margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.8; }
.pd-notify-cta { font-weight: 700; }

/* Thanh giữ chỗ dính đáy màn hình (điện thoại, khi nút thật ra khỏi tầm nhìn) */
.pd-bar { display: none; }

@media (max-width: 900px) {
	.pd { grid-template-columns: 1fr; }
	.pd-stage { position: relative; top: auto; height: auto; min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto auto; border-right: 0; }
	.pd-frame { order: 1; height: min(64svh, 560px); }
	.pd-views { order: 2; flex-direction: row; justify-content: space-between; gap: 8px; padding: 0 16px; border-right: 0; border-top: var(--rule-hair); border-bottom: var(--rule-hair); }
	.pd-view { writing-mode: horizontal-tb; transform: none; padding: 14px 0 12px; border-right: 0; border-bottom: 1px solid transparent; font-size: 10px; letter-spacing: .12em; }
	.pd-view.is-on { border-bottom-color: var(--accent); }
	.pd-slide > img { max-width: 84%; max-height: calc(100% - 48px); }
	.pd-art { height: calc(100% - 48px); max-width: 86%; }
	.pd-count { right: 16px; bottom: 12px; font-size: 10px; }
	.pd-hint { display: none; }
	.pd-buy { padding: 26px 16px 110px; gap: 28px; }
	.pd-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 96%, transparent); border-top: var(--rule-hair); transform: translateY(110%); transition: transform .35s var(--ease); }
	.pd-bar.is-on { transform: none; }
	.pd-bar-btn { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border: 0; background: var(--fg); color: var(--bg); font: 700 15px var(--font); text-align: left; }
	.pd-bar-l { display: flex; flex-direction: column; gap: 2px; }
	.pd-bar-l b { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
}
@media (prefers-reduced-motion: reduce) { .pd-bar, .pd-step::before, .pd-view { transition: none; } .pd .kho-size.is-need .kho-size-row { animation: none; } }

/* Thử cỡ: hình số đo mới (06/11) — dáng người nét mảnh, áo cỡ đang xem viền đậm, hai cỡ còn lại nét đứt, vạch đo đỏ */
.kho-fit-view { grid-template-columns: 1fr !important; gap: 18px !important; }
.kho-fit-fig { width: 100%; max-height: 420px !important; margin: 0 auto; background: color-mix(in srgb, var(--fg) 4%, var(--bg)); }
.kho-fit-body { fill: none !important; stroke: #A9A397; stroke-width: 1; stroke-linejoin: round; }
.kho-fit-garment { fill: rgba(20, 20, 18, .08) !important; stroke: var(--fg); stroke-width: 1.6; stroke-linejoin: round; }
.kho-fit-ghost { fill: none; stroke: var(--dim); stroke-width: .8; opacity: .55; }
.kho-fit-dim { stroke: var(--fg); stroke-width: 1; }
.kho-fit-dtxt { font: 700 9.5px var(--font); fill: var(--fg); }
.kho-fit-dsub { font: 500 8.5px var(--font); fill: var(--fg); }
.kho-fit-gnd { stroke: var(--line); stroke-width: 1; }
.kho-fit-ruler { stroke: var(--dim); stroke-width: .8; }
.kho-fit-rtxt { font: 600 8.5px var(--font); fill: var(--dim); }
.kho-fit-lead { stroke: var(--dim); stroke-width: .8; }

/* 1.9.0 ảnh người mẫu đã xoá nền */
.pd-slide.is-look > img { width: auto; height: calc(100% - 48px); max-width: 90%; object-fit: contain; object-position: 50% 100%; }

/* 1.9.8 Set là lựa chọn thêm: ô đánh dấu dưới hàng Áo / Quần */
.pd .kho-chips.is-single { display: none; }
.pd .kho-chips + .pd-set { margin-top: -18px; }
.pd .kho-chips.is-single + .pd-set { margin-top: 0; }
.pd-set { display: flex; align-items: center; gap: 12px; margin: 0 0 30px; padding: 12px 14px; border: var(--rule-ink); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.pd-set:hover { border-color: var(--fg); }
.pd-set input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--fg); cursor: pointer; }
.pd-set-t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pd-set-t b { font-size: 13px; font-weight: 700; }
.pd-set-t small { font-size: 12px; color: var(--dim); }
.pd-set-p { font-size: 13px; font-weight: 700; white-space: nowrap; }
.pd-set:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--fg) 5%, var(--bg)); }
.pd .kho-chips.is-set .kho-chip[aria-checked="false"] { color: var(--dim); }
.kho-chips .kho-chip[hidden] { display: none !important; }
