/* Màn chi tiết sản phẩm (detail.js). Màu theo biến của phiên live: --theme / --theme2 (nút, dải màu), --theme-ink (chữ trên nền màu), --theme-soft (nền nhạt). */
.pd-open,.pd-open body{overflow:hidden}
.pd-view{position:fixed;inset:0;z-index:40;overflow-y:auto;overscroll-behavior:contain;background:var(--theme-soft);color:#1f2937;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-overflow-scrolling:touch}
.pd-view[hidden]{display:none}
.pd-view svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.pd-view button{font:inherit;cursor:pointer}
.pd-view button:disabled{cursor:not-allowed}
.pd-view :focus-visible{outline:3px solid var(--theme);outline-offset:2px}
.pd-top{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:12px;padding:10px max(16px,calc((100vw - 1200px)/2));background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border-bottom:1px solid #e5e7eb}
.pd-top strong{flex:1;font-size:16px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pd-back{display:flex;align-items:center;gap:4px;border:0;background:none;padding:8px 6px;font-weight:700;color:#374151}
.pd-cart{display:flex;align-items:center;gap:8px;border:0;border-radius:999px;padding:9px 14px;background:linear-gradient(135deg,var(--theme),var(--theme2));color:var(--theme-ink);font-weight:800}
.pd-cart b{min-width:22px;height:22px;line-height:22px;border-radius:999px;background:#fff;color:#1f2937;font-size:12px;text-align:center;padding:0 6px}
.pd-wrap{max-width:1200px;margin:0 auto;padding:14px 16px 40px}
.pd-crumb{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:13px;color:#6b7280;margin-bottom:12px}
.pd-crumb button{border:0;background:none;padding:0;color:#6b7280}.pd-crumb button:hover{color:#111827;text-decoration:underline}
.pd-crumb svg{width:14px;height:14px}.pd-crumb [aria-current]{color:#111827;font-weight:600}
.pd-dealbar{display:flex;align-items:center;gap:12px;width:100%;border:0;border-radius:12px;padding:9px 14px;background:linear-gradient(135deg,var(--theme),var(--theme2));color:var(--theme-ink);text-align:left}
.pd-dealtag{flex:none;border-radius:6px;padding:5px 8px;background:rgba(0,0,0,.28);color:#fff;font-size:11px;font-weight:900;letter-spacing:.6px}
.pd-dealname{flex:1;font-weight:800;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pd-dealgo{display:flex;align-items:center;gap:4px;font-weight:800;font-size:13px;white-space:nowrap}
.pd-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:36px;margin-top:22px;align-items:start}
.pd-gallery{position:relative;border:1px solid #e5e7eb;border-radius:18px;background:#fff;padding:14px;box-shadow:0 4px 18px rgba(15,23,42,.06)}
.pd-gallery img{display:block;width:100%;aspect-ratio:3/2;object-fit:cover;border-radius:12px;background:#f3f4f6}
.pd-livenote{position:absolute;left:24px;top:24px;max-width:70%;border-radius:8px;padding:6px 10px;background:rgba(17,24,39,.78);color:#fff;font-size:12px;font-weight:800}
.pd-zoom-btn{position:absolute;right:24px;bottom:24px;display:flex;align-items:center;gap:6px;border:1px solid #e5e7eb;border-radius:999px;padding:7px 12px;background:rgba(255,255,255,.95);color:#374151;font-size:13px;font-weight:600}
.pd-brandline{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;color:#4b5563}
.pd-chip{display:inline-block;border-radius:6px;padding:3px 8px;background:#ffedd5;color:#c2410c;font-size:11px;font-weight:800;letter-spacing:.4px}
.pd-chip-soft{background:var(--theme-soft);color:#1f2937;border:1px solid rgba(0,0,0,.06)}
.pd-info h1{margin:10px 0 14px;font-size:32px;line-height:1.2;font-weight:850;letter-spacing:-.4px;color:#111827}
.pd-pricebox{border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;padding:14px 0}
.pd-pricebox small{font-size:12px;font-weight:800;letter-spacing:.6px;color:#6b7280}
.pd-priceline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:4px}
.pd-priceline b{font-size:32px;font-weight:900;color:#f45119;line-height:1.1}
.pd-priceline s{font-size:15px;color:#9ca3af}
.pd-pct{border-radius:6px;padding:3px 7px;background:linear-gradient(135deg,var(--theme),var(--theme2));color:var(--theme-ink);font-size:12px;font-weight:900}
.pd-pricebox p{margin:6px 0 0;font-size:14px;color:#4b5563}.pd-pricebox p b{color:#111827}
.pd-perks{display:flex;flex-wrap:wrap;gap:8px 18px;list-style:none;margin:14px 0 0;padding:0;font-size:14px;color:#4b5563}
.pd-perks li{display:flex;align-items:center;gap:6px}
.pd-quota{border-radius:999px;padding:3px 10px;background:#dcfce7;color:#166534;font-weight:700}.pd-quota.off{background:#fee2e2;color:#991b1b}
.pd-limit{margin:12px 0 0;font-size:14px;font-weight:600;color:#374151}.pd-limit::first-letter{color:#f59e0b}
.pd-small{margin:6px 0 0;font-size:13px;color:#6b7280}
.pd-buy{margin-top:18px}
.pd-qty-wrap{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:700;color:#374151}
.pd-qty{display:inline-flex;align-items:center;width:max-content;border:1px solid #d1d5db;border-radius:12px;background:#fff;overflow:hidden}
.pd-qty button{display:grid;place-items:center;width:42px;height:44px;border:0;background:none;color:#374151}.pd-qty button:disabled{color:#d1d5db}
.pd-qty output{min-width:34px;text-align:center;font-weight:800;font-size:16px}
.pd-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.pd-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;border-radius:12px;padding:0 16px;font-size:15px;font-weight:800}
.pd-btn-line{border:1.5px solid #1f2937;background:#fff;color:#1f2937}
.pd-btn-main{border:0;background:linear-gradient(135deg,var(--theme),var(--theme2));color:var(--theme-ink);box-shadow:0 6px 16px rgba(0,0,0,.14)}
.pd-btn:disabled{opacity:.5;box-shadow:none}
.pd-tabs{margin-top:40px}
.pd-tablist{display:flex;gap:26px;border-bottom:1px solid #d1d5db}
.pd-tablist button{border:0;border-bottom:3px solid transparent;background:none;padding:12px 0;margin-bottom:-1px;font-weight:700;color:#6b7280}
.pd-tablist button[aria-selected=true]{border-color:var(--theme);color:#111827}
.pd-tabgrid{display:grid;grid-template-columns:1fr 1fr;gap:40px;margin-top:26px}
.pd-eyebrow{display:block;font-size:12px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:#6b7280}
.pd-view h2{margin:6px 0 16px;font-size:24px;font-weight:850;letter-spacing:-.3px;color:#111827}
.pd-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px;margin:0}
.pd-facts>div{border-bottom:1px solid #e5e7eb;padding:10px 0}.pd-facts dt{font-size:13px;color:#6b7280}.pd-facts dd{margin:4px 0 0;font-weight:700;font-size:14px}
.pd-points{margin:16px 0 0;padding-left:20px;line-height:1.65;font-size:15px;color:#374151}
.pd-intro{margin-top:18px;border:1px solid #e5e7eb;border-radius:14px;padding:14px 16px;background:#fff}
.pd-intro h3{margin:0;font-size:16px}.pd-intro h3 span{margin-left:6px;border-radius:999px;padding:2px 8px;background:var(--theme-soft);font-size:12px;font-weight:700}
.pd-intro ul{margin:8px 0 0;padding-left:20px;line-height:1.6;font-size:14px;color:#4b5563}
.pd-faq{border-bottom:1px solid #d1d5db}
.pd-faq summary{display:flex;justify-content:space-between;gap:12px;padding:14px 0;font-weight:700;cursor:pointer;list-style:none}
.pd-faq summary::-webkit-details-marker{display:none}
.pd-faq summary::after{content:"+";font-size:22px;line-height:1;color:#6b7280}.pd-faq[open] summary::after{content:"−"}
.pd-faq p{margin:0 0 14px;color:#4b5563;line-height:1.6;font-size:14px}
.pd-promo{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);margin-top:44px;border-radius:18px;overflow:hidden;background:#fff;border:1px solid #e5e7eb}
.pd-promo img{width:100%;height:100%;min-height:180px;object-fit:cover;display:block}
.pd-promo>div{padding:26px 28px;align-self:center}.pd-promo p{margin:0 0 14px;color:#4b5563;line-height:1.55}
.pd-link{display:inline-flex;align-items:center;gap:6px;border:0;background:none;padding:0;color:#111827;font-weight:800;text-decoration:underline;text-underline-offset:4px}
.pd-related{margin-top:40px}
.pd-related-head{display:flex;align-items:end;justify-content:space-between;gap:12px}.pd-related-head>span{color:#6b7280;font-size:13px;margin-bottom:18px}
.pd-rel-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.pd-rel{display:flex;flex-direction:column;border:1px solid #e5e7eb;border-radius:16px;background:#fff;overflow:hidden}
.pd-rel-img{border:0;padding:0;background:#f3f4f6}.pd-rel-img img{display:block;width:100%;aspect-ratio:3/2;object-fit:cover}
.pd-rel-body{display:flex;flex-direction:column;flex:1;gap:6px;padding:12px 14px 14px}.pd-rel-body .pd-chip{align-self:flex-start}
.pd-rel-title{border:0;background:none;padding:0;text-align:left;font-weight:750;font-size:15px;line-height:1.35;color:#111827}
.pd-rel-body small{color:#6b7280;font-size:12px;line-height:1.4}
.pd-rel-price{display:flex;align-items:baseline;gap:8px;margin-top:auto;padding-top:4px}.pd-rel-price b{font-size:18px;color:#f45119}.pd-rel-price s{font-size:12px;color:#9ca3af}
.pd-rel-foot{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #f3f4f6;padding-top:10px;margin-top:4px}
.pd-round{display:grid;place-items:center;width:38px;height:38px;border-radius:999px;border:1px solid #d1d5db;background:var(--theme-soft);color:#111827}.pd-round:disabled{opacity:.4}
.pd-foot{display:flex;align-items:center;gap:6px 18px;flex-wrap:wrap;padding:26px max(16px,calc((100vw - 1200px)/2)) 30px;background:#111827;color:#e5e7eb}
.pd-foot b{font-size:17px;color:#fff}.pd-foot span{flex:1;color:#9ca3af}.pd-foot .pd-link{color:#fff}
.pd-sticky{display:none}
.pd-zoom{width:min(1100px,96vw);max-width:none;padding:0;border:0;background:transparent;box-shadow:none}
.pd-zoom::backdrop{background:rgba(0,0,0,.82)}
.pd-zoom img{display:block;width:100%;max-height:90vh;object-fit:contain;border-radius:10px}
.pd-zoom button{position:fixed;right:16px;top:16px;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:999px;background:#fff;cursor:pointer}
.pd-zoom svg{width:22px;height:22px;fill:none;stroke:#111827;stroke-width:2}
.product-image-wrap,.product-title{cursor:pointer}
@media (max-width:900px){
  .pd-main,.pd-tabgrid{grid-template-columns:1fr;gap:22px}
  .pd-rel-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .pd-promo{grid-template-columns:1fr}
}
@media (max-width:640px){
  .pd-top{padding:8px 12px}.pd-cart span{display:none}.pd-back span{display:none}
  .pd-wrap{padding:10px 12px 110px}
  .pd-dealgo{display:none}
  .pd-gallery{padding:8px;border-radius:14px}.pd-zoom-btn{right:14px;bottom:14px}.pd-livenote{left:14px;top:14px}
  .pd-info h1{font-size:25px}.pd-priceline b{font-size:28px}
  .pd-buy{display:none}
  .pd-view h2{font-size:21px}
  .pd-facts{grid-template-columns:1fr 1fr}
  .pd-rel-grid{grid-template-columns:1fr}
  .pd-rel{flex-direction:row}.pd-rel-img{width:40%;flex:none}.pd-rel-img img{height:100%;aspect-ratio:auto}
  .pd-foot{padding-bottom:110px}
  .pd-sticky{position:fixed;left:0;right:0;bottom:0;z-index:6;display:flex;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -6px 20px rgba(0,0,0,.12)}
  .pd-sticky .pd-qty button{width:36px}
  .pd-sticky .pd-btn{flex:1;min-height:48px;justify-content:space-between;font-size:14px}
  .pd-sticky .pd-btn b{display:block;font-size:15px}
}
/* Phân loại (vd chọn vị) */
.pd-options{margin-top:16px;border-radius:14px;padding:2px 0}
.pd-opt-label{display:block;font-size:14px;font-weight:700;color:#374151;margin-bottom:8px}.pd-opt-label b{color:#111827}
.pd-opt-list{display:flex;flex-wrap:wrap;gap:8px}
.pd-opt-list button{min-height:42px;border:1.5px solid #d1d5db;border-radius:12px;padding:0 16px;background:#fff;color:#1f2937;font-weight:700;font-size:14px}
.pd-opt-list button[aria-checked=true]{border-color:var(--theme);background:var(--theme-soft);box-shadow:inset 0 0 0 1px var(--theme)}
.pd-opt-list button:disabled{opacity:.5}
.pd-options.need .pd-opt-list button{border-color:#f87171}
.pd-opt-hint{margin:8px 0 0;color:#b91c1c;font-size:13px;font-weight:600}
/* Lựa chọn trong giỏ hàng */
.cart-option{display:block;margin:2px 0;font-style:normal;font-size:12px;font-weight:700;color:#374151}
/* Tìm kiếm + lọc nhãn hàng trên trang chính */
.shop-tools{position:sticky;top:0;z-index:12;display:grid;gap:10px;margin:0 0 14px;padding:12px;border:1px solid rgba(0,0,0,.06);border-radius:14px;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);box-shadow:0 4px 14px rgba(15,23,42,.06)}
.shop-search{display:flex;align-items:center;gap:8px;height:46px;padding:0 12px;border:1.5px solid #d1d5db;border-radius:12px;background:#fff}
.shop-search:focus-within{border-color:var(--theme);box-shadow:0 0 0 3px var(--theme-soft)}
.shop-search svg{width:20px;height:20px;flex:none;fill:none;stroke:#6b7280;stroke-width:2;stroke-linecap:round}
.shop-search input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;font:inherit;font-size:16px;color:#111827}
.shop-search input::-webkit-search-cancel-button{display:none}
.shop-search-clear[hidden]{display:none}
.shop-search-clear{display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:999px;background:#f3f4f6;color:#374151;font-size:18px;line-height:1;cursor:pointer}
.shop-brands{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}.shop-brands::-webkit-scrollbar{display:none}
.shop-brands button{flex:none;display:flex;align-items:center;gap:6px;min-height:38px;border:1.5px solid #d1d5db;border-radius:999px;padding:0 14px;background:#fff;color:#1f2937;font:inherit;font-size:13px;font-weight:800;letter-spacing:.2px;cursor:pointer;white-space:nowrap}
.shop-brands button span{min-width:22px;border-radius:999px;padding:1px 7px;background:#f3f4f6;color:#4b5563;font-size:11px;text-align:center}
.shop-brands button[aria-pressed=true]{border-color:transparent;background:linear-gradient(135deg,var(--theme),var(--theme2));color:var(--theme-ink)}
.shop-brands button[aria-pressed=true] span{background:rgba(255,255,255,.25);color:inherit}
.shop-result{margin:0;font-size:13px;font-weight:600;color:#4b5563}.shop-result[hidden]{display:none}
.product-card[hidden]{display:none!important}
.shop-empty{display:grid;justify-items:center;gap:6px;margin:8px 0 20px;padding:36px 16px;border:1.5px dashed #d1d5db;border-radius:14px;background:#fff;text-align:center;color:#4b5563}
.shop-empty[hidden]{display:none}.shop-empty b{font-size:16px;color:#111827}
.shop-empty button{margin-top:8px;border:0;border-radius:10px;padding:10px 16px;background:linear-gradient(135deg,var(--theme),var(--theme2));color:var(--theme-ink);font:inherit;font-weight:800;cursor:pointer}
@media (max-width:640px){.shop-tools{margin:0 0 10px;padding:10px;border-radius:12px}}
/* "Khám phá thêm" hơn 4 sản phẩm → slider ngang, tự trượt (detail.js → startSlider) */
.pd-rel-foot{justify-content:flex-end}
.pd-round svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pd-rel-grid.pd-rel-slider{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc((100% - 48px) / 4);overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;padding-bottom:2px}
.pd-rel-slider::-webkit-scrollbar{display:none}
.pd-rel-slider>.pd-rel{scroll-snap-align:start}
@media (max-width:900px){.pd-rel-grid.pd-rel-slider{grid-auto-columns:calc((100% - 12px) / 2)}}
@media (max-width:640px){
  .pd-rel-grid.pd-rel-slider{grid-auto-columns:72%}
  .pd-rel-slider>.pd-rel{flex-direction:column}.pd-rel-slider .pd-rel-img{width:auto}.pd-rel-slider .pd-rel-img img{height:auto;aspect-ratio:3/2}
}
