/**
 * Module Products - giao diện ngoài site (theme solar)
 * Chỉ được nạp trên các trang của module products (xem modules/products/functions.php).
 */
.pd-page { padding: 8px 0 48px; }

/* ---- Đầu trang danh sách ---- */
.pd-head { margin-bottom: 20px; }
.pd-title { font-size: 1.75rem; font-weight: 800; color: var(--smt-navy); margin: 0 0 8px; }
.pd-intro { color: var(--smt-text-soft); max-width: 860px; line-height: 1.65; }

/* Ô điều hướng danh mục con */
.pd-subcats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.pd-subcat {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
    border: 1px solid var(--smt-border); border-radius: 999px; background: #fff;
    color: var(--smt-text-soft); font-weight: 600; font-size: .9rem; text-decoration: none;
    transition: border-color .2s, color .2s, box-shadow .2s;
}
.pd-subcat img { width: 26px; height: 26px; object-fit: contain; }
.pd-subcat:hover { border-color: var(--smt-orange); color: var(--smt-orange); box-shadow: 0 4px 14px rgba(15,43,82,.08); }

/* ---- Bố cục danh sách: cột lọc + kết quả ---- */
@media (min-width: 992px) {
    .pd-layout.has-filters { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
    .pd-sidebar { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
    .pd-filter-actions { display: none; }
}
.pd-results { min-width: 0; transition: opacity .2s; }
.pd-results.is-loading { opacity: .45; pointer-events: none; }

.pd-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; color: var(--smt-text-mute); font-size: .9rem; }
.pd-count { margin-right: auto; }
.pd-sort .form-select { min-width: 170px; border-color: var(--smt-border); }
.pd-filter-toggle {
    display: inline-flex; align-items: center; gap: 8px; padding: .4rem .9rem; border: 1px solid var(--smt-border);
    border-radius: 8px; background: #fff; color: var(--smt-navy); font-weight: 700; font-size: .9rem;
}
.pd-filter-toggle:hover, .pd-filter-toggle:focus { border-color: var(--smt-orange); color: var(--smt-orange); }
.pd-filter-toggle .badge { background: var(--smt-orange); font-size: .7rem; }
.pd-filter-icon {
    width: 16px; height: 16px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M3 5h18l-7 8.5V20l-4-2v-4.5z%27/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M3 5h18l-7 8.5V20l-4-2v-4.5z%27/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Khung lọc */
.pd-filter-form { width: 100%; }
.pd-filter-heading { font-size: 1.1rem; font-weight: 800; color: var(--smt-navy); margin: 0; }
.pd-fgroup { border: 1px solid var(--smt-border); border-radius: 12px; padding: 12px 14px 8px; margin-bottom: 14px; background: #fff; }
.pd-fgroup-title { float: none; width: auto; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--smt-navy); margin: 0 0 8px; padding: 0; }
.pd-fgroup-list { max-height: 260px; overflow-y: auto; scrollbar-width: thin; margin-right: -6px; padding-right: 6px; }
.pd-fopt { margin-bottom: 6px; font-size: .92rem; }
.pd-fopt .form-check-input { cursor: pointer; }
.pd-fopt .form-check-input:checked { background-color: var(--smt-orange); border-color: var(--smt-orange); }
.pd-fopt .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(245,146,30,.25); border-color: var(--smt-orange); }
.pd-fopt .form-check-label { cursor: pointer; color: var(--smt-text-soft); }
.pd-fopt .pd-fopt-link, .pd-fopt .pd-fopt-link:link, .pd-fopt .pd-fopt-link:visited { color: inherit; text-decoration: none; }
.pd-fopt .pd-fopt-link:hover { color: var(--smt-orange); }
.pd-fopt-count { color: var(--smt-text-mute); font-size: .8rem; }
.pd-filter-actions { position: sticky; bottom: 0; padding: 12px 0 4px; background: #fff; }
.pd-filter-actions .btn { font-weight: 700; padding: .7rem; background: var(--smt-orange); border-color: var(--smt-orange); }

/* Lựa chọn đang lọc */
.pd-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.pd-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px; border-radius: 999px;
    background: #fff4ea; border: 1px solid #ffd8b5; color: #b85400; font-size: .85rem; font-weight: 600; text-decoration: none;
}
.pd-chip:hover { background: #ffe6cf; color: #8f4100; }
.pd-chip-x { font-size: 1.1rem; line-height: 1; }
.pd-chip-clear { font-size: .85rem; font-weight: 600; color: var(--smt-text-mute); text-decoration: underline; }
.pd-chip-clear:hover { color: var(--smt-orange); }

/* ---- Thẻ sản phẩm ---- */
.pd-card {
    height: 100%; display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden;
    border: 1px solid var(--smt-border); transition: box-shadow .25s ease, transform .25s ease, border-color .25s;
}
.pd-card:hover { box-shadow: 0 16px 34px rgba(15,43,82,.12); transform: translateY(-3px); border-color: transparent; }
.pd-card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.pd-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .35s ease; }
.pd-card:hover .pd-card-media img { transform: scale(1.04); }
.pd-card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; flex: 1; border-top: 1px solid var(--smt-border); }
.pd-card-brand { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--smt-text-mute); margin-bottom: 4px; }
.pd-card-title { font-size: .95rem; font-weight: 700; line-height: 1.35; margin: 0 0 10px; min-height: 2.7em; }
.pd-card-title a {
    color: var(--smt-navy); text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pd-card-title a:hover { color: var(--smt-orange); }
.pd-card-price { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }

.pd-price { font-weight: 800; color: #d9480f; font-size: 1.05rem; }
.pd-price-contact { color: var(--smt-orange); }
.pd-price-old { color: var(--smt-text-mute); font-size: .85rem; }
.pd-price-lg { font-size: 1.75rem; }

.pd-badge {
    position: absolute; top: 10px; z-index: 1; padding: 3px 8px; border-radius: 6px;
    font-size: .75rem; font-weight: 700; color: #fff; line-height: 1.4;
}
.pd-badge-sale { left: 10px; background: #e03131; }
.pd-badge-hot { right: 10px; background: var(--smt-orange); }
.pd-badge-inline { position: static; margin-left: 4px; vertical-align: middle; }

.pd-empty { padding: 48px 16px; text-align: center; color: var(--smt-text-mute); background: var(--smt-bg-soft); border-radius: 12px; }
.pd-pages { margin-top: 28px; display: flex; justify-content: center; }
.pd-cat-content { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--smt-border); color: var(--smt-text-soft); line-height: 1.75; }

/* ---- Câu hỏi thường gặp (danh mục / trang SEO bộ lọc): khung nền nhạt, mỗi câu là 1 thẻ trắng riêng.
   Câu đang mở: nền câu hỏi tô nhạt màu thương hiệu, câu trả lời nền trắng ngăn bằng
   đường kẻ -> phân biệt rõ hỏi / đáp. Dùng Bootstrap Collapse có sẵn (mở 1 câu tại 1 thời điểm). ---- */
.pd-faq { margin-top: 40px; padding: 8px 20px 20px; background: var(--smt-bg-soft, #f4f7fb); border: 1px solid var(--smt-border, #e3e8ef); border-radius: 16px; }
.pd-faq-title { margin: 0; padding: 18px 0 14px; text-align: center; font-size: 1.375rem; color: var(--smt-navy, #0f2b52); }
.pd-faq-list { display: flex; flex-direction: column; gap: 10px; }
.pd-faq-item { background: #fff; border: 1px solid var(--smt-border, #e3e8ef); border-radius: 10px; overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease; }
.pd-faq-item:hover { border-color: #c9d6e6; }
.pd-faq-item:has(.pd-faq-q[aria-expanded="true"]) { border-color: #f5c48a; box-shadow: 0 4px 14px rgba(15, 43, 82, .08); }
.pd-faq-h { margin: 0; font-size: inherit; line-height: inherit; }
.pd-faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border: none; padding: 14px 20px; text-align: left; font-weight: 600; font-size: 0.9375rem; color: var(--smt-navy, #0f2b52); transition: background-color .2s ease, color .2s ease; }
.pd-faq-q:hover { background: #f8fafd; }
.pd-faq-q[aria-expanded="true"] { background: #fff4e8; color: var(--smt-navy, #0f2b52); }
.pd-faq-caret { color: var(--smt-orange, #f5921e); font-size: 0.8125rem; flex-shrink: 0; transition: transform .2s ease; }
.pd-faq-q[aria-expanded="true"] .pd-faq-caret { transform: rotate(180deg); }
.pd-faq-a { padding: 16px 20px 18px; background: #fff; border-top: 1px solid #f5dcbf; color: var(--smt-text-soft, #3d4b5f); font-size: 0.9375rem; line-height: 1.7; }
.pd-faq-a > :last-child { margin-bottom: 0; }
.pd-faq-a img { max-width: 100%; height: auto; }
.pd-faq-a table { max-width: 100%; }
@media (max-width: 575.98px) {
    .pd-faq { padding: 4px 12px 12px; }
    .pd-faq-title { padding: 14px 0 10px; font-size: 1.25rem; }
    .pd-faq-q { padding: 12px 14px; }
    .pd-faq-a { padding: 14px; overflow-x: auto; }
}

/* ---- Chi tiết: gallery ---- */
.pd-gallery { position: sticky; top: 90px; }
.pd-stage {
    position: relative; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--smt-border); border-radius: 16px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.pd-stage-image { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.pd-stage img, .pd-stage-image img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.pd-stage video, .pd-stage iframe { width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
.pd-stage-video { position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.pd-stage-video img { object-fit: cover; padding: 0; opacity: .9; }
.pd-play-icon {
    position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; transform: translate(-50%, -50%);
    border-radius: 50%; background: rgba(224, 49, 49, .92); box-shadow: 0 6px 20px rgba(0,0,0,.3); transition: transform .2s;
}
.pd-play-icon::after {
    content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
    border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff;
}
.pd-stage-video:hover .pd-play-icon { transform: translate(-50%, -50%) scale(1.08); }
.pd-play-sm { width: 28px; height: 28px; }
.pd-play-sm::after { border-width: 6px 0 6px 10px; }

.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pd-thumb {
    flex: 0 0 72px; height: 72px; padding: 0; border: 2px solid var(--smt-border); border-radius: 10px;
    background: #fff; overflow: hidden; cursor: pointer; transition: border-color .2s;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.pd-thumb.active, .pd-thumb:hover { border-color: var(--smt-orange); }
.pd-thumb-video { position: relative; display: block; width: 100%; height: 100%; background: #222 center / cover no-repeat; }

/* ---- Chi tiết: thông tin ---- */
.pd-info-cat { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--smt-orange); text-decoration: none; margin-bottom: 6px; }
.pd-info-title { font-size: 1.75rem; font-weight: 800; color: var(--smt-navy); line-height: 1.3; margin: 0 0 12px; }
.pd-info-meta { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--smt-text-mute); font-size: .9rem; }
.pd-info-meta strong { color: var(--smt-text); }
.pd-stock { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: .8rem; }
.pd-stock-in { background: #e6fcf5; color: #0c8a5f; }
.pd-stock-out { background: #fff5f5; color: #c92a2a; }
.pd-info-price { padding: 14px 18px; background: var(--smt-bg-soft); border-radius: 12px; margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pd-price-note { width: 100%; color: var(--smt-text-mute); font-size: .85rem; }

.pd-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.pd-highlights > div { padding: 10px 12px; border: 1px solid var(--smt-border); border-radius: 10px; }
.pd-highlights dt { font-size: .75rem; font-weight: 600; color: var(--smt-text-mute); text-transform: uppercase; letter-spacing: .03em; }
.pd-highlights dd { margin: 2px 0 0; font-weight: 700; color: var(--smt-navy); }
.pd-hometext { color: var(--smt-text-soft); line-height: 1.7; margin-bottom: 20px; }

.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-actions .btn { flex: 1 1 200px; padding: .85rem 1.25rem; font-weight: 700; border-radius: .5rem; }
.pd-btn-call { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--smt-navy); color: #fff; border: 0; }
.pd-btn-call:hover { background: var(--smt-navy-deep); color: #fff; }
.pd-call-icon {
    width: 16px; height: 16px; background: currentColor; flex: 0 0 16px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.34 1.79.65 2.65a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.43-1.22a2 2 0 0 1 2.11-.45c.86.31 1.75.53 2.65.65A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.34 1.79.65 2.65a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.43-1.22a2 2 0 0 1 2.11-.45c.86.31 1.75.53 2.65.65A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- Chi tiết: mô tả / thông số / liên quan ---- */
/* Tab Mô tả / Thông số: 2 nút căn giữa, nút đang chọn nền cam nhạt */
.pd-tabs { margin-top: 40px; padding: 20px; background: #fff; border: 1px solid var(--smt-border); border-radius: 14px; scroll-margin-top: 100px; }
.pd-tab-nav { display: flex; justify-content: center; gap: 12px; margin-bottom: 20px; }
.pd-tab-btn {
    flex: 0 1 240px; padding: 11px 20px; border: 1px solid var(--smt-border); border-radius: 10px;
    background: #fff; color: var(--smt-navy); font-weight: 700; font-size: 1rem; line-height: 1.3;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pd-tab-btn:hover { border-color: var(--smt-orange); color: var(--smt-orange); }
.pd-tab-btn.active { background: #fff4e6; border-color: #fdd8a8; color: var(--smt-orange); }
.pd-tabs .pd-section { margin-top: 0; }
/* Nhóm thông số đóng/mở */
.pd-spec-group + .pd-spec-group { margin-top: 10px; }
.pd-spec-head {
    position: relative; display: block; width: 100%; padding: 13px 44px 13px 16px; border: 0; border-radius: 10px;
    background: var(--smt-bg-soft); color: var(--smt-navy); font-weight: 700; font-size: 1rem; text-align: left;
}
.pd-spec-head::after {
    content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -2px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-50%) rotate(225deg);
    transition: transform .2s ease;
}
.pd-spec-head.collapsed::after { transform: translateY(-50%) rotate(45deg); margin-top: -4px; }
.pd-spec-head:hover { color: var(--smt-orange); }
.pd-spec-group .pd-specs-table { border: 0; }
.pd-spec-group .pd-specs-table th { background: transparent; }
.pd-spec-group .pd-specs-table tr:nth-child(even) td { background: transparent; }
.pd-spec-group .pd-specs-table tr:last-child th, .pd-spec-group .pd-specs-table tr:last-child td { border-bottom: 0; }
.pd-section { margin-top: 32px; scroll-margin-top: 140px; }
.pd-section-title { font-size: 1.35rem; font-weight: 800; color: var(--smt-navy); margin-bottom: 16px; }
.pd-section .bodytext { color: var(--smt-text-soft); line-height: 1.8; }
/* Heading trong bài mô tả: bài thường dán từ nơi khác có cả h1/h2 rất to -> thu về cùng thang cỡ
   chữ với nội dung (tiêu đề sản phẩm ở trên vẫn là chữ lớn nhất trang) */
.pd-section .bodytext h1, .pd-section .bodytext h2, .pd-section .bodytext h3,
.pd-section .bodytext h4, .pd-section .bodytext h5, .pd-section .bodytext h6 {
    color: var(--smt-navy); font-weight: 700; line-height: 1.4; margin: 28px 0 12px;
}
.pd-section .bodytext h1 { font-size: 1.375rem; }
.pd-section .bodytext h2 { font-size: 1.25rem; }
.pd-section .bodytext h3 { font-size: 1.125rem; margin-top: 22px; }
.pd-section .bodytext h4, .pd-section .bodytext h5, .pd-section .bodytext h6 { font-size: 1rem; margin: 18px 0 8px; }
.pd-section .bodytext > :first-child { margin-top: 0; }
.pd-section .bodytext img { max-width: 100%; height: auto; border-radius: 8px; }
.pd-section .bodytext iframe { max-width: 100%; }
.pd-specs-table { border: 1px solid var(--smt-border); margin: 0; }
.pd-specs-table th, .pd-specs-table td { padding: 11px 16px; border-color: var(--smt-border); }
.pd-specs-table th { width: 38%; background: var(--smt-bg-soft); font-weight: 600; color: var(--smt-text-soft); }
.pd-specs-table tr:nth-child(even) td { background: #fbfcfe; }

/* Lightbox phóng to ảnh */
.pd-lightbox .modal-content { background: transparent; border: 0; }
.pd-lightbox .btn-close { position: absolute; right: 0; top: -40px; }
.pd-lightbox-img { width: 100%; max-height: 85vh; object-fit: contain; background: #fff; border-radius: 12px; }

@media (max-width: 991.98px) {
    .pd-gallery { position: static; }
    .pd-info-title, .pd-title { font-size: 1.4rem; }
    .pd-price-lg { font-size: 1.45rem; }
    .pd-tabs { padding: 14px; }
    .pd-section .bodytext h1 { font-size: 1.25rem; }
    .pd-section .bodytext h2 { font-size: 1.125rem; }
    .pd-section .bodytext h3 { font-size: 1.0625rem; }
}
@media (max-width: 575.98px) {
    .pd-tab-nav { gap: 8px; }
    .pd-tab-btn { flex: 1 1 0; padding: 10px 8px; font-size: .9rem; }
    .pd-spec-group .pd-specs-table th, .pd-spec-group .pd-specs-table td { padding: 9px 10px; }
    .pd-card-body { padding: 10px 10px 12px; }
    .pd-card-title { font-size: .875rem; }
    .pd-price { font-size: .95rem; }
    .pd-thumb { flex-basis: 60px; height: 60px; }
    .pd-specs-table th { width: 45%; }
}
@media (max-width: 575.98px) {
    .pd-toolbar { gap: 8px; }
    .pd-count { order: 3; width: 100%; }
    .pd-sort { margin-left: auto; }
    .pd-sort .form-select { min-width: 150px; }
}

/* ---- Chi tiết: ô phiên bản (mỗi ô 1 sản phẩm/URL) + ô biến thể (màu sắc...) ---- */
.pd-options { margin: 0 0 16px; }
.pd-options-label { font-weight: 700; color: var(--smt-navy); font-size: .95rem; margin-bottom: 8px; }
.pd-options-label strong { font-weight: 600; color: var(--smt-text-soft); }
.pd-options-list { display: grid; gap: 10px; }
.pd-options-group { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pd-options-variant { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.pd-opt {
    position: relative; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 12px;
    border: 1px solid var(--smt-border); border-radius: 10px; background: #fff; color: var(--smt-text);
    text-decoration: none; line-height: 1.3; transition: border-color .2s, box-shadow .2s;
}
.pd-options .pd-opt { color: var(--smt-text); } /* thắng a:link màu cam của custom.css */
.pd-opt:hover { border-color: var(--smt-orange); color: var(--smt-text); box-shadow: 0 2px 10px rgba(15,43,82,.08); }
.pd-opt.active { border-color: #d9480f; box-shadow: inset 0 0 0 1px #d9480f; }
.pd-opt.active::after {
    content: ""; position: absolute; top: -1px; right: -1px; width: 20px; height: 18px; border-radius: 0 10px 0 8px;
    background: #d9480f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.pd-opt-group { flex-direction: column; justify-content: center; text-align: center; gap: 2px; }
.pd-opt-group .pd-opt-name { font-weight: 700; color: var(--smt-navy); font-size: .9rem; }
.pd-opt-price { font-size: .85rem; font-weight: 600; color: var(--smt-text-mute); }
.pd-opt-price.is-contact { color: var(--smt-orange); }
.pd-opt-group.active .pd-opt-price { color: #d9480f; }
.pd-opt-variant img { width: 36px; height: 36px; flex: 0 0 36px; object-fit: contain; border-radius: 6px; background: var(--smt-bg-soft); }
.pd-opt-variant .pd-opt-name { font-weight: 600; font-size: .9rem; }
.pd-options .pd-opt-variant.is-out { color: var(--smt-text-mute); background: var(--smt-bg-soft); }
.pd-opt-variant.is-out img { opacity: .45; filter: grayscale(1); }
.pd-options .pd-opt-variant.is-na { color: var(--smt-text-mute); border-style: dashed; }
.pd-opt-variant.is-na img { opacity: .45; }
@media (max-width: 575.98px) {
    .pd-options-group, .pd-options-variant { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ Đặt hàng: nút mua trên trang chi tiết ============ */
.pd-buy { margin-bottom: 12px; }
.pd-buy-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pd-buy-label { font-weight: 600; color: var(--smt-text-soft); font-size: .9rem; }
.pd-buy-msg { margin: -4px 0 12px; padding: 8px 12px; border-radius: 8px; background: #fff5f5; color: #c92a2a; font-size: .9rem; font-weight: 600; }
.pd-btn-cart { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: var(--smt-orange-dark); border: 2px solid var(--smt-orange); }
.pd-btn-cart:hover, .pd-btn-cart:focus { background: #fff8ec; color: var(--smt-orange-dark); border-color: var(--smt-orange-dark); }
.pd-buy + .pd-actions:empty { display: none; }
.pd-variants.is-missing .pd-options { padding: 8px 10px; margin-left: -10px; margin-right: -10px; border-radius: 10px; background: #fff5f5; }

/* Ô số lượng - + */
.pd-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--smt-border); border-radius: 8px; overflow: hidden; background: #fff; }
.pd-qty-btn { width: 36px; border: 0; background: var(--smt-bg-soft); color: var(--smt-navy); font-size: 1.1rem; font-weight: 700; line-height: 1; }
.pd-qty-btn:hover { background: #e8eef6; }
.pd-qty input { width: 56px; border: 0; text-align: center; font-weight: 700; color: var(--smt-text); -moz-appearance: textfield; appearance: textfield; padding: 6px 0; }
.pd-qty input::-webkit-outer-spin-button, .pd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Thông báo nhỏ góc màn hình */
.pd-toast {
    position: fixed; right: 16px; bottom: 16px; z-index: 1090; max-width: calc(100vw - 32px);
    display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 10px;
    background: var(--smt-navy); color: #fff; box-shadow: 0 10px 30px rgba(10,28,56,.25);
    opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.pd-toast.show { opacity: 1; transform: none; pointer-events: auto; }
.pd-toast a { color: var(--smt-orange); font-weight: 700; white-space: nowrap; text-decoration: none; }

/* ============ Giỏ hàng / đặt hàng / xem đơn ============ */
.pd-cart-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 992px) {
    .pd-cart-layout { grid-template-columns: minmax(0, 1fr) 360px; }
    .pd-cart-summary { position: sticky; top: 90px; }
}
.pd-cart-page.is-loading { opacity: .5; pointer-events: none; transition: opacity .2s; }
.pd-cart-empty { padding: 40px 20px; text-align: center; border: 1px dashed var(--smt-border); border-radius: 12px; color: var(--smt-text-mute); }
.pd-cart-lines { border: 1px solid var(--smt-border); border-radius: 12px; background: #fff; }
.pd-cart-head, .pd-cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) 120px 130px 120px 36px; gap: 12px; align-items: center; padding: 14px 16px; }
.pd-cart-head { grid-template-columns: minmax(0, 1fr) 120px 130px 120px 36px; padding-left: 100px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--smt-text-mute); border-bottom: 1px solid var(--smt-border); }
.pd-cart-line + .pd-cart-line { border-top: 1px solid var(--smt-border); }
.pd-cart-thumb { width: 72px; height: 72px; border-radius: 8px; background: var(--smt-bg-soft); display: block; overflow: hidden; }
.pd-cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pd-cart-name { font-weight: 700; color: var(--smt-navy); text-decoration: none; line-height: 1.4; }
.pd-cart-name:hover { color: var(--smt-orange-dark); }
.pd-cart-variant { font-size: .85rem; color: var(--smt-text-mute); margin-top: 2px; }
.pd-cart-out { font-size: .8rem; color: #c92a2a; margin-top: 4px; }
.pd-cart-price { font-weight: 600; }
.pd-cart-price del { display: block; font-size: .8rem; color: var(--smt-text-mute); font-weight: 400; }
.pd-cart-price .is-contact { color: var(--smt-orange-dark); }
.pd-cart-subtotal { font-weight: 800; color: var(--smt-orange-dark); white-space: nowrap; }
.pd-cart-qty, .pd-cart-remove { margin: 0; }
.pd-cart-remove-btn { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--smt-text-mute); display: inline-flex; align-items: center; justify-content: center; }
.pd-cart-remove-btn:hover { background: #fff5f5; color: #c92a2a; }
.pd-cart-back { display: block; padding: 14px 16px; font-weight: 600; color: var(--smt-text-soft); text-decoration: none; border-top: 1px solid var(--smt-border); }
@media (max-width: 767.98px) {
    .pd-cart-head { display: none; }
    .pd-cart-line { grid-template-columns: 64px minmax(0, 1fr) 36px; grid-template-areas: "thumb info remove" "thumb price price" "qty qty sub"; row-gap: 8px; }
    .pd-cart-thumb { grid-area: thumb; width: 64px; height: 64px; }
    .pd-cart-info { grid-area: info; }
    .pd-cart-remove { grid-area: remove; }
    .pd-cart-price { grid-area: price; }
    .pd-cart-qty { grid-area: qty; }
    .pd-cart-subtotal { grid-area: sub; text-align: right; }
}

.pd-cart-summary, .pd-box { border: 1px solid var(--smt-border); border-radius: 12px; background: #fff; padding: 18px 20px; }
.pd-box + .pd-box { margin-top: 20px; }
.pd-box-title { font-size: 1.1rem; font-weight: 800; color: var(--smt-navy); margin: 0 0 14px; }
.pd-cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid var(--smt-border); font-weight: 600; }
.pd-cart-total strong { font-size: 1.35rem; color: var(--smt-orange-dark); }
.pd-cart-note { font-size: .85rem; color: var(--smt-text-mute); margin: 0 0 12px; }
.pd-cart-note.is-quote { padding: 10px 12px; border-radius: 8px; background: #fff8ec; color: #8a5300; }
.pd-cart-go { padding: .85rem 1rem; font-weight: 700; }

.pd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pd-pay-list { display: grid; gap: 10px; }
.pd-pay { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--smt-border); border-radius: 10px; cursor: pointer; margin: 0; }
.pd-pay:has(input:checked) { border-color: var(--smt-orange); background: #fffaf3; }
.pd-pay input { margin-top: 4px; accent-color: var(--smt-orange); }
.pd-pay strong { display: block; color: var(--smt-navy); }
.pd-pay small { color: var(--smt-text-mute); }

.pd-summary-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.pd-summary-head a { font-size: .85rem; font-weight: 600; }
.pd-summary-lines { list-style: none; padding: 0; margin: 0 0 4px; }
.pd-summary-lines li { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.pd-summary-thumb { position: relative; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 8px; background: var(--smt-bg-soft); }
.pd-summary-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.pd-summary-qty { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--smt-navy); color: #fff; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pd-summary-name { flex: 1 1 auto; min-width: 0; font-size: .9rem; font-weight: 600; color: var(--smt-text); line-height: 1.35; }
.pd-summary-name small { display: block; font-weight: 400; color: var(--smt-text-mute); }
.pd-summary-price { font-weight: 700; font-size: .9rem; white-space: nowrap; }

.pd-order-thanks { text-align: center; padding: 12px 0 28px; }
.pd-order-thanks p { max-width: 640px; margin: 0 auto; color: var(--smt-text-soft); }
.pd-order-check { width: 60px; height: 60px; border-radius: 50%; background: #e6fcf5; color: #0c8a5f; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.pd-order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; margin: 0; }
.pd-order-customer { grid-template-columns: 1fr; }
.pd-order-customer > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; }
.pd-order-meta dt { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--smt-text-mute); }
.pd-order-customer dt { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.pd-order-meta dd { margin: 2px 0 0; }
.pd-order-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #e7f0ff; color: #1c5fc4; }
.pd-order-stage-6, .pd-order-stage-7 { background: #e6fcf5; color: #0c8a5f; }
.pd-order-stage-5 { background: #fff4e6; color: #c25e00; }
.pd-order-stage-8 { background: #fff5f5; color: #c92a2a; }
/* Tiến trình đơn hàng (trang xem đơn của khách) */
.pd-order-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 20px 0 4px; padding: 0; list-style: none; counter-reset: none; }
.pd-order-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .85rem; color: var(--smt-text-mute); }
.pd-order-step::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: #e5e7eb; z-index: 0; }
.pd-order-step:first-child::before { display: none; }
.pd-order-step-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 3px solid #e5e7eb; font-weight: 700; color: var(--smt-text-mute); }
.pd-order-step.is-done::before, .pd-order-step.is-current::before { background: #0c8a5f; }
.pd-order-step.is-done .pd-order-step-dot { background: #0c8a5f; border-color: #0c8a5f; color: #fff; }
.pd-order-step.is-current .pd-order-step-dot { border-color: #0c8a5f; color: #0c8a5f; box-shadow: 0 0 0 4px rgba(12,138,95,.15); }
.pd-order-step.is-current, .pd-order-step.is-done { color: var(--smt-text); font-weight: 600; }
.pd-order-cancelled { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: #fff5f5; color: #c92a2a; }
.pd-order-fees { margin: 10px 0 0; }
.pd-order-fees > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .92rem; }
.pd-order-fees dt { font-weight: 400; color: var(--smt-text-soft); }
.pd-order-fees dd { margin: 0; white-space: nowrap; }
.pd-order-fees .is-minus dd { color: #c92a2a; }
.pd-summary-name .pd-summary-returned { color: #c92a2a; font-weight: 600; }
@media (max-width: 575.98px) {
    .pd-order-step { font-size: .75rem; }
}
.pd-bank-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-bottom: 12px; }
.pd-bank-qr { margin: 0; text-align: center; }
.pd-bank-qr svg { display: block; margin: 0 auto 6px; border: 1px solid var(--smt-border); border-radius: 8px; padding: 6px; background: #fff; }
.pd-bank-qr figcaption { font-size: .8rem; color: var(--smt-text-mute); max-width: 220px; }
.pd-bank-info { flex: 1 1 240px; margin: 0; display: grid; gap: 10px; }
.pd-bank-info dt { font-size: .8rem; color: var(--smt-text-mute); font-weight: 600; }
.pd-bank-info dd { margin: 0; }
.pd-bank-amount { color: var(--smt-orange-dark); font-size: 1.15rem; }
.pd-copy { margin-left: 6px; padding: 1px 8px; border: 1px solid var(--smt-border); border-radius: 6px; background: #fff; font-size: .75rem; color: var(--smt-text-soft); }
.pd-copy:hover { border-color: var(--smt-orange); color: var(--smt-orange-dark); }

/* ---- Theo dõi đơn: vận đơn (trang xem đơn / tra cứu) + trang tra cứu đơn ---- */
.pd-ships { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--smt-border, #e3e8ef); }
.pd-ships-title { font-size: 0.9375rem; font-weight: 700; margin: 0 0 8px; color: var(--smt-navy, #0f2b52); }
.pd-ship { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; margin-top: 8px; background: var(--smt-bg-soft, #f4f7fb); border-radius: 8px; font-size: 0.875rem; }
.pd-ship-carrier { font-weight: 700; color: var(--smt-navy, #0f2b52); }
.pd-ship-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #fff; border: 1px solid var(--smt-border, #e3e8ef); border-radius: 4px; padding: 1px 6px; word-break: break-all; }
.pd-ship-note { color: var(--smt-text-mute, #5b6b80); font-size: 0.8125rem; }
.pd-ship-track { margin-left: auto; font-weight: 600; color: var(--smt-orange, #f5921e); text-decoration: none; white-space: nowrap; }
.pd-ship-track:hover { text-decoration: underline; }
.pd-lookup-link { display: block; margin-top: 12px; text-align: center; font-size: 0.875rem; }
.pd-lookup-page { max-width: 820px; margin: 0 auto; }
.pd-lookup-intro { color: var(--smt-text-mute, #5b6b80); margin-bottom: 20px; }
.pd-lookup-page .pd-box { margin-bottom: 20px; }
.pd-lookup-hint { font-size: 0.8125rem; color: var(--smt-text-mute, #5b6b80); margin: 12px 0; }
.pd-lookup-list { list-style: none; margin: 0; padding: 0; }
.pd-lookup-item { padding: 12px 0; border-top: 1px solid var(--smt-border, #e3e8ef); }
.pd-lookup-item:first-child { border-top: none; padding-top: 0; }
.pd-lookup-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pd-lookup-code { font-weight: 700; }
.pd-lookup-view { margin-left: auto; font-size: 0.875rem; font-weight: 600; }
.pd-lookup-help { text-align: center; color: var(--smt-text-mute, #5b6b80); font-size: 0.875rem; }
@media (max-width: 575.98px) {
    .pd-ship-track { margin-left: 0; }
}
.pd-lookup-page .pd-box + .pd-box { margin-top: 0; }

/* Phụ kiện mua kèm / Sản phẩm liên quan: trượt ngang (4 thẻ máy tính, 3 máy tính bảng, 2 điện thoại) */
.pd-rel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pd-rel-head .pd-section-title { margin-bottom: 0; }
.pd-rel-nav { display: flex; gap: 8px; flex: 0 0 auto; }
.pd-rel-nav[hidden] { display: none; }
.pd-rel-btn {
    width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    border: 1px solid var(--smt-border); border-radius: 50%; background: #fff; color: var(--smt-navy);
    transition: border-color .2s, color .2s, opacity .2s;
}
.pd-rel-btn:hover:not(:disabled) { border-color: var(--smt-orange); color: var(--smt-orange); }
.pd-rel-btn:disabled { opacity: .35; cursor: default; }
.pd-rel-track {
    --pd-rel-gap: 16px; --pd-rel-per: 4;
    display: flex; gap: var(--pd-rel-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 4px 2px 14px; margin: -4px -2px 0; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 2px; /* khớp padding ngang: tránh scroll-snap tự cuộn 2px khi tải (làm PageSpeed báo NO_LCP) */
}
.pd-rel-track:focus-visible { outline: 2px solid var(--smt-orange); outline-offset: 2px; }
.pd-rel-item { flex: 0 0 calc((100% - (var(--pd-rel-per) - 1) * var(--pd-rel-gap)) / var(--pd-rel-per)); min-width: 0; scroll-snap-align: start; }
.pd-rel .pd-card:hover { transform: none; }
.pd-card-buy { margin: 10px 0 0; }
.pd-card-add {
    width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px;
    padding: 7px 10px; font-size: .85rem; font-weight: 700; border-radius: 10px;
    border: 1px solid var(--smt-orange); color: var(--smt-orange); background: #fff;
}
.pd-card-buy .pd-card-add { margin-top: 0; }
.pd-card-add:hover, .pd-card-add:focus { background: var(--smt-orange); color: #fff; }
.pd-card-add:disabled { opacity: .6; }
@media (max-width: 1199.98px) { .pd-rel-track { --pd-rel-per: 3; } }
@media (max-width: 767.98px) { .pd-rel-track { --pd-rel-per: 2; --pd-rel-gap: 12px; } }
@media (max-width: 575.98px) {
    .pd-rel-btn { width: 34px; height: 34px; }
    .pd-card-add { font-size: .8rem; padding: 6px 8px; }
}
