/* htv2 — giao diện mới trang chi tiết sản phẩm (bản vẽ trang-san-pham-dien-thoai.html / trang-san-pham-may-tinh.html).
   Chỉ nạp trên trang sản phẩm (product_detail.php). Mọi lớp mới có tiền tố .htv2- để không đụng CSS cũ. */
.htv2-pdp {
	--htv2-dam: #13286b; --htv2-xanh: #0f6fb0; --htv2-cam: #c94f17; --htv2-do: #c8281c;
	--htv2-phu: #4a5568; --htv2-nen: #f3f5f9; --htv2-vien: #d5dce8; --htv2-vien2: #e3e8f0; --htv2-chu: #1c2433;
	width: 100%; min-width: 0; max-width: 1200px; margin: 0 auto; padding: 0 0 24px; display: flex; flex-direction: column; gap: 12px;
	font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--htv2-chu);
	font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; background: var(--htv2-nen);
}
.htv2-pdp *, .htv2-pdp *::before, .htv2-pdp *::after { box-sizing: border-box; }
.htv2-pdp a { color: var(--htv2-xanh); }
.htv2-pdp a:hover { color: var(--htv2-dam); }
.htv2-pdp img { max-width: 100%; height: auto; }
.htv2-pdp h1, .htv2-pdp h2 { font-family: inherit; text-transform: none; letter-spacing: 0; }

/* Đường dẫn (list_breadcrumb.php in ra, chỉ đổi kiểu trên trang sản phẩm; CSS cũ ẩn nó trên điện thoại, bản vẽ thì hiện) */
.htv2-js .breadcrumb-list { font-family: 'Be Vietnam Pro', system-ui, sans-serif; overflow-wrap: anywhere; }
@media (max-width: 899px) {
	.htv2-js .breadcrumb-list { display: block !important; }
	.htv2-js .breadcrumb-list ul { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 10px 16px; }
	.htv2-js .breadcrumb-list li { list-style: none; min-width: 0; }
}
.htv2-js .breadcrumb-list ul { padding: 10px 12px; margin: 0; font-size: 13px; color: #4a5568; }
.htv2-js .breadcrumb-list li a { color: #0f6fb0; }
.htv2-js .breadcrumb-list li.current-p a { color: #4a5568; }

/* ---------- Khối trên: ảnh + thông tin ---------- */
.htv2-top { background: #fff; border-radius: 16px; padding: 16px; margin: 0 12px; display: flex; flex-direction: column; gap: 12px; }
.htv2-cot-anh, .htv2-cot-tt { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.htv2-anh-lon { position: relative; height: 240px; border-radius: 12px; background: #eef2f8; overflow: hidden; }
.htv2-anh-lon #image-block { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; cursor: zoom-in; }
.htv2-anh-lon #proimage { width: 100%; height: 100%; object-fit: contain; }
.htv2-nhan-tt { position: absolute; top: 10px; left: 10px; z-index: 2; background: #e6f0fb; color: var(--htv2-dam); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.htv2-dem { position: absolute; bottom: 10px; right: 10px; z-index: 2; background: var(--htv2-dam); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.htv2-anh-nho .thumb_item a { display: block; height: 56px; border: 1px solid var(--htv2-vien); border-radius: 10px; background: #eef2f8; overflow: hidden; }
.htv2-anh-nho .thumb_item.is-chon a { border: 2px solid var(--htv2-xanh); }
.htv2-anh-nho .thumb_item img { width: 100%; height: 100%; object-fit: contain; }
.htv2-anh-nho .owl-nav { display: none; }
.htv2-anh { min-width: 0; max-width: 100%; }
.htv2-anh-nho, .htv2-anh-nho #thumbs_list, .htv2-anh-nho #thumblist { min-width: 0; max-width: 100%; width: 100%; }
.htv2-anh-nho .thumb_item { min-width: 0; max-width: 100%; }
/* Khi Owl chưa nạp, ảnh nhỏ vẫn bấm được; không đổi stage/width do Owl đang quản lý. */
.htv2-anh-nho .owl-carousel:not(.owl-loaded):not(.owl-theme) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

.htv2-ten { margin: 4px 0 0; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--htv2-dam); white-space: normal; }
.htv2-meta { font-size: 13px; color: var(--htv2-phu); display: flex; gap: 6px 14px; flex-wrap: wrap; }
.htv2-meta b { color: var(--htv2-chu); }
.htv2-kho.is-con { color: #0d7a3a; font-weight: 600; }
.htv2-kho.is-het { color: var(--htv2-do); font-weight: 600; }

.htv2-khoi { display: flex; flex-direction: column; gap: 8px; }
.htv2-khoi-ten { font-size: 15px; font-weight: 600; }
.htv2-cauhinh { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #eef4fc; border: 2px solid var(--htv2-xanh); }
.htv2-cauhinh-chu { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.htv2-cauhinh-chu b { font-size: 15px; }
.htv2-cauhinh-chu span { font-size: 13px; color: var(--htv2-phu); }
.htv2-cauhinh-gia { font-size: 16px; color: var(--htv2-do); white-space: nowrap; }

.htv2-gia { background: #f6f8fc; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.htv2-gia-nhan { font-size: 12px; color: var(--htv2-phu); }
.htv2-gia-so { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.htv2-gia-so p { margin: 0; }
.htv2-gia-so .sell-price { font-size: 30px; line-height: 1.2; font-weight: 700; color: var(--htv2-do); }
.htv2-gia-so .old-price { font-size: 15px; color: var(--htv2-phu); text-decoration: line-through; }
.htv2-gia-so .no-price { font-size: 13px; font-weight: 600; color: var(--htv2-do); }
.htv2-bh { font-size: 13px; color: var(--htv2-chu); }

.htv2-km { border: 1px dashed #e8b9a3; background: #fff8f4; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.htv2-km-ten { color: var(--htv2-cam); }
.htv2-km-noi p:last-child { margin-bottom: 0; }

.htv2-sl { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.htv2-sl .amount-group { display: flex; align-items: stretch; border: 1px solid var(--htv2-vien); border-radius: 10px; overflow: hidden; width: auto; }
.htv2-sl .control-quantity { min-width: 44px; min-height: 44px; border: 0; background: #f6f8fc; color: var(--htv2-dam); font-size: 18px; cursor: pointer; }
.htv2-sl .txt-qty { width: 56px; min-height: 44px; border: 0; border-left: 1px solid var(--htv2-vien); border-right: 1px solid var(--htv2-vien); text-align: center; font: inherit; }

.htv2-nut { display: flex; flex-wrap: wrap; gap: 8px; }
.htv2-nut-mua, .htv2-nut-gio { flex: 1 1 0; min-width: 0; min-height: 52px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; padding: 8px 12px; white-space: normal; }
.htv2-nut-mua { border: 0; background: var(--htv2-cam); color: #fff; }
.htv2-nut-mua:hover { background: #b0440f; }
.htv2-nut-gio { border: 2px solid var(--htv2-dam); background: #fff; color: var(--htv2-dam); }
.htv2-nut-gio:hover { background: #eef4fc; }
.htv2-pdp .htv2-nut-zalo { flex: 1 1 100%; min-height: 48px; border-radius: 12px; background: var(--htv2-xanh); color: #fff; text-decoration: none; display: flex; align-items: center; justify-content: center; font-weight: 600; text-align: center; padding: 0 12px; }
.htv2-pdp .htv2-nut-zalo:hover { background: #0c5d94; color: #fff; }
.htv2-giao { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #f2faf2; color: #0d7a3a; font-size: 13px; }
.htv2-giao img { width: 28px; height: auto; }
.htv2-ship { font-size: 13px; color: #0d7a3a; }
.htv2-chia-se ul { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.htv2-chia-se a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Khối dưới: tab + cùng tầm giá ---------- */
.htv2-duoi { display: flex; flex-direction: column; gap: 12px; }
.htv2-tabs-khoi { margin: 0 12px; background: #fff; border-radius: 16px; overflow: hidden; min-width: 0; }
.htv2-tabs { display: flex; border-bottom: 1px solid var(--htv2-vien2); }
.htv2-tab { flex: 1 1 0; min-height: 48px; border: 0; border-bottom: 3px solid transparent; background: #fff; font: inherit; font-size: 14px; color: var(--htv2-phu); cursor: pointer; padding: 0 8px; }
.htv2-tab.is-chon { border-bottom-color: var(--htv2-cam); font-weight: 700; color: var(--htv2-dam); }
.htv2-dai { display: none; }
.htv2-js .htv2-panel:not(.is-chon) { display: none; }
.htv2-panel { padding: 14px 16px 16px; min-width: 0; max-width: 100%; }
/* Nội dung quản trị có thể chứa bảng/khối rộng: cuộn trong nội dung, không đẩy tràn trang. */
.htv2-ts, .htv2-dd { position: relative; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.htv2-ts.htv2-gon, .htv2-dd.htv2-gon { max-height: 420px; overflow-x: auto; overflow-y: hidden; }
.htv2-ts.htv2-gon::after, .htv2-dd.htv2-gon::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.htv2-ts table, .htv2-dd table { width: 100%; border-collapse: collapse; }
.htv2-ts td, .htv2-ts th { padding: 10px 6px 10px 0; border: 0; border-bottom: 1px solid #eef1f6; vertical-align: top; text-align: left; }
.htv2-ts td:first-child, .htv2-ts th:first-child { width: 120px; color: var(--htv2-phu); }
.htv2-dd { font-size: 14px; line-height: 22px; color: #2d3748; }
.htv2-ts img, .htv2-dd img { max-width: 100% !important; height: auto !important; }
.htv2-panel iframe, .htv2-panel video, .htv2-panel embed, .htv2-panel object { max-width: 100% !important; }
.htv2-ts pre, .htv2-dd pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.htv2-panel .box-detail, .htv2-panel .video_youtube, .htv2-panel form { min-width: 0; max-width: 100%; }
.htv2-panel input:not([type="hidden"]), .htv2-panel select, .htv2-panel textarea, .htv2-panel button { min-height: 44px; max-width: 100%; font-family: inherit; }
.htv2-mo-them { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 12px; min-height: 44px; border: 1px solid var(--htv2-vien); border-radius: 10px; background: #fff; font: inherit; color: var(--htv2-dam); font-weight: 600; cursor: pointer; }
.htv2-mo-them[hidden] { display: none; }
.htv2-pdp .htv2-hoi-zalo { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 12px; border-radius: 10px; border: 1px solid var(--htv2-xanh); text-decoration: none; font-weight: 600; font-size: 14px; }

.htv2-cung-gia, .htv2-da-xem { margin: 0 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.htv2-dau { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.htv2-dau h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--htv2-dam); }
.htv2-dau a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; white-space: nowrap; }
.htv2-ds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.htv2-pdp .htv2-the { background: #fff; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--htv2-chu); min-width: 0; }
.htv2-the-anh { display: flex; align-items: center; justify-content: center; height: 110px; border-radius: 10px; background: #eef2f8; overflow: hidden; }
.htv2-the-anh img { width: 100%; height: 100%; object-fit: contain; }
.htv2-the-chu { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.htv2-the-ten { font-size: 13px; font-weight: 600; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.htv2-the-gia p { margin: 0; }
.htv2-the-gia .sell-price { color: var(--htv2-do); font-weight: 700; font-size: 15px; }
.htv2-the-gia .old-price { color: var(--htv2-phu); font-size: 12px; text-decoration: line-through; }
.htv2-the-gia .no-price { color: var(--htv2-phu); font-size: 12px; }
.htv2-cung-gia .user-htkt:empty { display: none; }
.htv2-tab:focus-visible, .htv2-mo-them:focus-visible, .htv2-nut-mua:focus-visible, .htv2-nut-gio:focus-visible,
.htv2-nut-zalo:focus-visible, .htv2-hoi-zalo:focus-visible, .htv2-the:focus-visible, .htv2-anh-nho a:focus-visible,
.htv2-chia-se a:focus-visible, .htv2-dau a:focus-visible, .htv2-sl button:focus-visible, .htv2-sl input:focus-visible {
	outline: 3px solid var(--htv2-xanh); outline-offset: 3px;
}

/* ---------- Thanh mua dính đáy (ht-pdp-sticky): giữ cách hiện, chỉ đổi màu ---------- */
.htv2-js .ht-pdp-sticky .ht-pdp-sticky-name { color: #4a5568; }
.htv2-js .ht-pdp-sticky .ht-pdp-sticky-price .sell-price { color: #c8281c; }
.htv2-js .ht-pdp-sticky .ht-pdp-sticky-buy { background: #c94f17; border-color: #c94f17; color: #fff; }
.htv2-js .ht-pdp-sticky .ht-pdp-sticky-cart { background: #fff; border-color: #13286b; color: #13286b; }

/* ---------- Yên tâm mua sắm (Issue #198): dải 3 cam kết dưới khối trên ---------- */
.htv2-yen-tam { background: #fff; border-radius: 16px; padding: 4px 16px; margin: 0 12px; display: grid; grid-template-columns: minmax(0, 1fr); }
.htv2-yt-muc { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-width: 0; }
.htv2-yt-muc + .htv2-yt-muc { border-top: 1px solid var(--htv2-vien2); }
.htv2-yt-ic { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: #eef4fc; color: var(--htv2-xanh); display: flex; align-items: center; justify-content: center; }
.htv2-yt-ic svg { width: 22px; height: 22px; display: block; }
.htv2-yt-chu { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.htv2-yt-chu b { font-size: 15px; font-weight: 600; color: var(--htv2-dam); line-height: 1.35; }
.htv2-yt-chu span { font-size: 13px; color: var(--htv2-phu); line-height: 1.45; }
@media (min-width: 768px) {
	.htv2-yen-tam { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 0; }
	.htv2-yt-muc { padding: 2px 16px; align-items: flex-start; }
	.htv2-yt-muc + .htv2-yt-muc { border-top: 0; border-left: 1px solid var(--htv2-vien2); }
}

/* ---------- Máy tính bảng / máy tính ---------- */
@media (min-width: 900px) {
	.htv2-pdp { padding-top: 4px; gap: 16px; }
	.htv2-top { margin: 0; padding: 24px; border-radius: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
	.htv2-cot-tt { gap: 16px; }
	.htv2-anh-lon { height: 440px; border-radius: 14px; }
	.htv2-nhan-tt { top: 14px; left: 14px; font-size: 13px; padding: 5px 12px; }
	.htv2-dem { bottom: 14px; right: 14px; font-size: 13px; padding: 4px 12px; }
	.htv2-anh-nho .thumb_item a { height: 76px; }
	.htv2-anh-nho .owl-carousel:not(.owl-loaded):not(.owl-theme) { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
	.htv2-ten { margin: 0; font-size: 26px; line-height: 34px; }
	.htv2-meta { font-size: 14px; gap: 6px 18px; }
	.htv2-cauhinh { padding: 10px 16px; }
	.htv2-cauhinh-chu b { font-size: 16px; }
	.htv2-cauhinh-gia { font-size: 17px; }
	.htv2-gia { padding: 16px 18px; }
	.htv2-gia-nhan { font-size: 13px; }
	.htv2-gia-so .sell-price { font-size: 34px; }
	.htv2-bh { font-size: 14px; }
	.htv2-nut { gap: 10px; flex-wrap: nowrap; }
	.htv2-nut-mua, .htv2-nut-gio { min-height: 54px; font-size: 17px; }
	.htv2-nut-gio { font-size: 16px; }
	.htv2-pdp .htv2-nut-zalo { flex: 1 1 0; min-height: 54px; }
	.htv2-pdp .htv2-nut-chi-zalo .htv2-nut-zalo { flex: 0 1 360px; }
	.htv2-zalo-so { display: none; }
	.htv2-yen-tam { margin: 0; border-radius: 18px; padding: 18px 0; }
	.htv2-yt-muc { padding: 2px 24px; gap: 14px; }
	.htv2-yt-ic { flex-basis: 48px; width: 48px; height: 48px; }
	.htv2-yt-chu b { font-size: 16px; }
	.htv2-yt-chu span { font-size: 14px; }
	.htv2-duoi { flex-direction: row; gap: 16px; align-items: flex-start; }
	.htv2-tabs-khoi { flex: 999 1 560px; margin: 0; border-radius: 18px; }
	.htv2-tabs { padding: 0 12px; }
	.htv2-tab { flex: 0 0 auto; min-height: 52px; padding: 0 18px; font-size: 15px; }
	.htv2-dai { display: inline; }
	.htv2-panel { padding: 18px 24px 24px; }
	.htv2-ts { font-size: 15px; }
	.htv2-ts td, .htv2-ts th { padding-top: 12px; padding-bottom: 12px; }
	.htv2-ts td:first-child, .htv2-ts th:first-child { width: 200px; }
	.htv2-dd { font-size: 15px; line-height: 24px; }
	.htv2-mo-them { width: auto; align-self: flex-start; padding: 0 20px; display: inline-flex; }
	.htv2-cung-gia { flex: 1 1 360px; margin: 0; background: #fff; border-radius: 18px; padding: 18px; gap: 12px; }
	.htv2-cung-gia .htv2-dau h2 { font-size: 17px; }
	.htv2-cung-gia .htv2-ds { display: flex; flex-direction: column; gap: 0; }
	.htv2-cung-gia .htv2-the { flex-direction: row; align-items: center; gap: 12px; padding: 0 0 12px; margin-bottom: 12px; border-radius: 0; border-bottom: 1px solid #eef1f6; }
	.htv2-cung-gia .htv2-the:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
	.htv2-cung-gia .htv2-the-anh { width: 84px; height: 64px; flex-shrink: 0; }
	.htv2-da-xem { margin: 0; }
	.htv2-da-xem .htv2-ds { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
	.htv2-js .breadcrumb-list ul { padding: 12px 0; }
}

/* Chọn cấu hình RAM/SSD (Issue 5) — theo mẫu bao-cao/mau-chon-cau-hinh.html */
.htv2-ch-ds { display: flex; flex-direction: column; gap: 8px; }
.htv2-ch-o { width: 100%; background: #fff; border: 1px solid var(--htv2-vien); padding: 11px 15px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.htv2-ch-o:hover { border-color: var(--htv2-xanh); }
.htv2-ch-o[aria-checked="true"] { background: #eef4fc; border: 2px solid var(--htv2-xanh); padding: 10px 14px; }
.htv2-ch-o:focus-visible { outline: 3px solid #9cc3ea; outline-offset: 2px; }
.htv2-ch-gia { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.htv2-ch-gia small { font-size: 12px; color: var(--htv2-phu); }

/* Ở bề rộng máy tính bảng/ngang nhỏ, CTA và tabs vẫn đủ chỗ đọc, không ép nội dung tràn. */
@media (min-width: 900px) and (max-width: 1099px) {
	.htv2-nut { flex-wrap: wrap; }
	.htv2-pdp .htv2-nut-zalo { flex-basis: 100%; }
	.htv2-duoi { flex-direction: column; align-items: stretch; }
	.htv2-tabs-khoi, .htv2-cung-gia { flex: 0 1 auto; }
	.htv2-cung-gia .htv2-ds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.htv2-cung-gia .htv2-the { border-bottom: 0; padding: 0; margin: 0; }
}
