/* ===== PCmart - giao diện chung ===== */
:root {
  --blue: #0b5ed7;
  --blue-dark: #0a3d91;
  --orange: #ff6a00;
  --red: #e11d48;
  --green: #16a34a;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 18px; padding-bottom: 40px; min-height: 60vh; }

/* ----- Top bar / header ----- */
.topbar { background: #0f172a; color: #cbd5e1; font-size: 13px; }
.topbar .wrap { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar b { color: #fff; }
.demo-tag { color: #fbbf24; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.header { background: var(--blue); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.head-main { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.logo { font-size: 28px; font-weight: 800; letter-spacing: -1px; white-space: nowrap; }
.logo b { color: #ffb86b; }
.logo.light { color: #fff; }
.search { flex: 1; display: flex; min-width: 0; }
.search input { flex: 1; min-width: 0; padding: 11px 14px; border: 0; border-radius: 8px 0 0 8px; font-size: 15px; outline: none; }
.search button { border: 0; background: var(--orange); color: #fff; font-weight: 700; padding: 0 20px; border-radius: 0 8px 8px 0; cursor: pointer; }
.head-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,.14); font-size: 14px; white-space: nowrap; }
.head-btn:hover { background: rgba(255,255,255,.26); }
.head-btn em { font-style: normal; background: var(--orange); border-radius: 99px; padding: 0 8px; font-weight: 700; font-size: 13px; }
.nav { background: var(--blue-dark); }
.nav .wrap { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 10px 14px; font-size: 14px; font-weight: 600; }
.nav a:hover, .nav a.on { background: rgba(255,255,255,.16); }
.catbtn { position: relative; padding: 10px 14px; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--orange); user-select: none; }
.catmenu { display: none; position: absolute; left: 0; top: 100%; background: #fff; color: var(--text); width: 300px; box-shadow: 0 10px 30px rgba(0,0,0,.25); border-radius: 0 0 var(--radius) var(--radius); padding: 6px 0; z-index: 60; }
.catbtn:hover .catmenu, .catbtn.open .catmenu { display: block; }
.catmenu a { display: flex; gap: 8px; padding: 9px 16px; font-weight: 500; color: var(--text); }
.catmenu a:hover { background: #eff6ff; color: var(--blue); }

/* ----- Nút, form ----- */
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--blue); color: #fff; text-align: center; }
.btn:hover { background: var(--blue-dark); }
.btn.orange { background: var(--orange); }
.btn.orange:hover { background: #e55f00; }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn.ghost:hover { background: #eff6ff; }
.btn.danger { background: var(--red); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { background: #cbd5e1; cursor: not-allowed; }
input, select, textarea { font: inherit; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; color: #334155; }
.field input, .field select, .field textarea { padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #93c5fd; border-color: var(--blue); }
.hint { font-size: 12px; color: var(--muted); }

/* ----- Khối chung ----- */
.panel { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.section { margin-top: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head a { color: var(--blue); font-weight: 600; font-size: 14px; }
.section-head.flash { background: linear-gradient(90deg, #dc2626, #f97316); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.section-head.flash a { color: #fff; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--blue); }

/* ----- Lưới + thẻ sản phẩm ----- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,.07); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,23,42,.14); }
.card-img { position: relative; aspect-ratio: 1/1; background: #f8fafc; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.badge { position: absolute; left: 8px; top: 8px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.badge.flash { left: auto; right: 8px; background: var(--orange); }
.card-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sku { font-size: 12px; color: var(--muted); }
.card-name { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.card-name:hover { color: var(--blue); }
.card-spec { font-size: 12px; color: var(--muted); min-height: 16px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.price { color: var(--red); font-weight: 800; font-size: 17px; }
.old { color: #94a3b8; font-size: 13px; }
.card .btn.add { margin-top: 8px; }

/* ----- Trang chủ ----- */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.hero-main { background: linear-gradient(120deg, #0b5ed7, #7c3aed); color: #fff; border-radius: var(--radius); padding: 36px 32px; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 260px; }
.hero-main h1 { margin: 0; font-size: 34px; line-height: 1.15; }
.hero-main p { margin: 0; opacity: .92; max-width: 460px; }
.hero-main .btn { align-self: flex-start; }
.hero-side { display: grid; gap: 14px; }
.hero-side .tile { border-radius: var(--radius); padding: 18px; color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.hero-side .t1 { background: linear-gradient(120deg, #ea580c, #f59e0b); }
.hero-side .t2 { background: linear-gradient(120deg, #0f766e, #14b8a6); }
.hero-side b { font-size: 18px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.cat-tile { background: var(--card); border-radius: var(--radius); padding: 14px 8px; text-align: center; font-size: 13px; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.cat-tile span { display: block; font-size: 30px; margin-bottom: 4px; }
.cat-tile:hover { background: #eff6ff; color: var(--blue); }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.perk { background: var(--card); border-radius: var(--radius); padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.perk span { font-size: 24px; }
.build-banner { background: linear-gradient(120deg, #0f172a, #1e3a8a); color: #fff; border-radius: var(--radius); padding: 26px 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.build-banner h3 { margin: 0 0 4px; font-size: 22px; }

/* ----- Trang danh sách ----- */
.list-layout { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.filter h4 { margin: 14px 0 8px; font-size: 14px; }
.filter h4:first-child { margin-top: 0; }
.filter label { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px; cursor: pointer; }
.filter .catlink { display: block; padding: 5px 8px; border-radius: 6px; font-size: 14px; }
.filter .catlink:hover, .filter .catlink.on { background: #eff6ff; color: var(--blue); font-weight: 600; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }

/* ----- Chi tiết sản phẩm ----- */
.detail { display: grid; grid-template-columns: 420px 1fr; gap: 24px; }
.detail-img { background: #f8fafc; border-radius: var(--radius); aspect-ratio: 1/1; overflow: hidden; }
.detail-img img { width: 100%; height: 100%; object-fit: contain; }
.detail h1 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; }
.detail .price { font-size: 30px; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.stock-ok { color: var(--green); font-weight: 700; }
.stock-out { color: var(--red); font-weight: 700; }
.qty { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.qty button { width: 34px; border: 0; background: #f1f5f9; font-size: 18px; cursor: pointer; }
.qty input { width: 48px; text-align: center; border: 0; font-weight: 700; }
.actions { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; align-items: center; }
table.specs { width: 100%; border-collapse: collapse; }
table.specs td { padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.specs tr:nth-child(odd) { background: #f8fafc; }
table.specs td:first-child { width: 40%; color: var(--muted); font-weight: 600; }

/* ----- Giỏ hàng ----- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.cart-row { display: grid; grid-template-columns: 80px 1fr auto auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-row img { width: 80px; height: 80px; object-fit: contain; background: #f8fafc; border-radius: 8px; }
.cart-row .rm { background: none; border: 0; color: var(--red); cursor: pointer; font-size: 18px; }
.sum-line { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-total { font-size: 22px; font-weight: 800; color: var(--red); }
.success { text-align: center; padding: 50px 16px; }
.success .big { font-size: 56px; }

/* ----- Xây dựng cấu hình ----- */
.build-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.slot { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.slot:last-child { border-bottom: 0; }
.slot-ico { width: 56px; height: 56px; border-radius: 10px; background: #eff6ff; display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.slot-ico img { width: 100%; height: 100%; object-fit: contain; }
.slot-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.slot-label i { color: var(--red); font-style: normal; }
.slot-name { font-weight: 600; font-size: 14px; }
.slot-price { color: var(--red); font-weight: 700; }
.slot-empty { color: #94a3b8; font-style: italic; }
.issue { padding: 8px 10px; border-radius: 8px; font-size: 13px; margin-bottom: 8px; }
.issue.err { background: #fee2e2; color: #991b1b; }
.issue.warn { background: #fef3c7; color: #92400e; }
.issue.ok { background: #dcfce7; color: #166534; }
.sticky { position: sticky; top: 130px; }

/* ----- Hộp thoại (modal) ----- */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: none; align-items: flex-start; justify-content: center; padding: 30px 12px; z-index: 100; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 760px; padding: 18px; }
.modal-box.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; }
.x { background: none; border: 0; font-size: 26px; cursor: pointer; line-height: 1; }
.pick-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 8px; border-bottom: 1px solid var(--line); }
.pick-item:hover { background: #f1f5f9; }
.pick-item img { width: 60px; height: 60px; object-fit: contain; background: #f8fafc; border-radius: 6px; }

/* ----- Quản trị ----- */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { padding: 9px 16px; border-radius: 8px; background: #fff; border: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.tab.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; background: #f1f5f9; padding: 9px 10px; white-space: nowrap; }
table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl img { width: 44px; height: 44px; object-fit: contain; background: #f8fafc; border-radius: 6px; }
.tbl-tools { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.tbl-tools input, .tbl-tools select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.sku-row { display: flex; gap: 8px; }
.sku-row input { flex: 1; }
.img-preview { width: 110px; height: 110px; object-fit: contain; background: #f8fafc; border-radius: 8px; border: 1px dashed #cbd5e1; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e0f2fe; color: #075985; }
.tag.flash { background: #ffedd5; color: #9a3412; }
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.code-item { display: flex; gap: 8px; align-items: center; background: #f8fafc; padding: 8px 10px; border-radius: 8px; }
.code-item span { flex: 1; font-size: 14px; }
.code-item input { width: 58px; text-align: center; text-transform: uppercase; padding: 6px; border: 1px solid #cbd5e1; border-radius: 6px; font-weight: 700; }
.notice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }

/* ----- Chân trang ----- */
.footer { background: #0f172a; color: #cbd5e1; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 24px; padding-top: 28px; padding-bottom: 20px; }
.footer h4 { color: #fff; margin: 0 0 10px; }
.footer a { display: block; padding: 3px 0; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer p { margin: 4px 0; font-size: 14px; }
.newsletter { display: flex; }
.newsletter input { flex: 1; min-width: 0; padding: 9px; border: 0; border-radius: 8px 0 0 8px; }
.newsletter button { border: 0; background: var(--orange); color: #fff; font-weight: 700; padding: 0 14px; border-radius: 0 8px 8px 0; cursor: pointer; }
.copyright { text-align: center; border-top: 1px solid #1e293b; padding: 12px; font-size: 13px; color: #94a3b8; }

/* ----- Thông báo nhỏ ----- */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 99px; opacity: 0; transition: all .25s; z-index: 200; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ----- Điện thoại / máy tính bảng ----- */
@media (max-width: 960px) {
  .hero, .detail, .cart-layout, .build-layout, .list-layout { grid-template-columns: 1fr; }
  .grid.g4 { grid-template-columns: repeat(2, 1fr); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
  .detail-img { max-width: 420px; }
}
@media (max-width: 640px) {
  .head-main { flex-wrap: wrap; }
  .search { order: 5; flex-basis: 100%; }
  .head-btn span { display: none; }
  .hero-main { padding: 24px 18px; min-height: 0; }
  .hero-main h1 { font-size: 26px; }
  .grid, .grid.g4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cart-row { grid-template-columns: 64px 1fr auto; }
  .cart-row img { width: 64px; height: 64px; }
  .form-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .slot { grid-template-columns: 48px 1fr; }
  .slot > :last-child { grid-column: 1 / -1; }
  .topbar .demo-tag { display: none; }
}
@media print {
  .topbar, .header, .footer, .no-print, .btn { display: none !important; }
  body { background: #fff; }
}

/* Ô tích (checkbox) không kéo giãn full chiều rộng */
.field input[type="checkbox"], .filter input[type="checkbox"], .filter input[type="radio"] { width: auto; padding: 0; }
.field label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* ----- Quản trị kho: nhập hàng, serial, phiếu bán ----- */
.tag.st-in_stock { background: #dcfce7; color: #166534; }
.tag.st-sold { background: #dbeafe; color: #1e40af; }
.tag.st-warranty { background: #fef3c7; color: #92400e; }
.tag.st-returned { background: #e2e8f0; color: #475569; }
.chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 6px; background: #f1f5f9; border: 1px solid #e2e8f0; font-size: 12px; font-family: Consolas, monospace; }
.chip.sold { background: #dbeafe; border-color: #bfdbfe; }
.chip.warranty { background: #fef3c7; border-color: #fde68a; }
.chip.returned, .chip.deleted { background: #e2e8f0; color: #64748b; text-decoration: line-through; }
.chip a { color: var(--red); font-weight: 700; margin-left: 4px; text-decoration: none; }
.chips { margin: 6px 0; min-height: 24px; }
.kline { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fafcff; }
.kline-head { display: grid; grid-template-columns: minmax(200px, 1fr) 160px auto; gap: 8px; align-items: center; }
.kline-head.iv { grid-template-columns: minmax(200px, 1fr) 130px 110px 130px auto; }
.kline input, .kline select, .kline textarea, .detail-box input, .row-actions input { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.kline textarea { width: 100%; margin-top: 6px; font-family: Consolas, monospace; font-size: 13px; }
.kline-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.k-amount { text-align: right; }
.total-bar { margin: 14px 0; padding: 10px 14px; background: #f1f5f9; border-radius: 8px; text-align: right; }
.detail-row > td { background: #f8fafc; padding: 0 !important; }
.detail-box { padding: 12px 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.detail-row .detail-box { border: 0; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.kv { display: grid; gap: 6px; }
.kv > div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.kv > div > span { color: var(--muted); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 720px) {
  .kline-head, .kline-head.iv { grid-template-columns: 1fr 1fr; }
  .kline-head .k-prod { grid-column: 1 / -1; }
  .kv > div { grid-template-columns: 1fr; }
}
.kline-head.cols { padding: 0 13px; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.kline-head.cols.iv span:nth-child(4) { text-align: right; }
.kv > div > div { min-width: 0; }
.kv .btn { vertical-align: middle; }
.tabs .tab { padding: 9px 12px; }

/* ===== Nhãn đặc điểm sản phẩm, slider banner, thư viện ảnh ===== */
.flagrow { position: absolute; left: 8px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(100% - 16px); }
.flagrow i { font-style: normal; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: #0f172a; min-height: 260px; }
.slide { display: none; position: relative; min-height: 260px; color: #fff; }
.slide.on { display: block; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-text { position: relative; padding: 36px 32px; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 260px; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 70%); }
.slide.noimg .slide-text { background: linear-gradient(120deg, #0b5ed7, #7c3aed); }
.slide-text h2 { margin: 0; font-size: 32px; line-height: 1.15; max-width: 520px; }
.slide-text p { margin: 0; max-width: 480px; opacity: .95; }
.slide-text .btn { align-self: flex-start; }
.slider .dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 6px; justify-content: center; }
.slider .dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.slider .dots button.on { background: #fff; }
.slider .nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.35); color: #fff; border: 0; width: 34px; height: 44px; font-size: 22px; cursor: pointer; }
.slider .nav.prev { left: 0; border-radius: 0 8px 8px 0; } .slider .nav.next { right: 0; border-radius: 8px 0 0 8px; }
.hero-side a.tile-img { padding: 0; overflow: hidden; position: relative; min-height: 120px; }
.hero-side a.tile-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-side a.tile-img span, .hero-side a.tile-img b { position: relative; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,.6); padding: 0 18px; }
.gallery { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery img { width: 64px; height: 64px; object-fit: contain; background: #f8fafc; border: 2px solid transparent; border-radius: 6px; cursor: pointer; }
.gallery img.on { border-color: var(--blue); }
.detail-img img#main-img { max-width: 100%; }
/* ----- quản trị ----- */
.flagbox { display: flex; flex-direction: column; gap: 2px; font-size: 12px; white-space: nowrap; }
.flagbox label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.tbl input.mini { width: 62px; padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 6px; }
.tbl input.price-in { width: 110px; padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 6px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.pager button { padding: 5px 11px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.pager button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { width: 92px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; text-align: center; font-size: 11px; background: #fff; }
.thumb img { width: 100%; height: 76px; object-fit: contain; background: #f8fafc; border-radius: 4px; }
.thumb.main { border-color: var(--orange); }
.thumb button { border: 0; background: none; cursor: pointer; color: var(--blue); padding: 1px 3px; font-size: 11px; }
.thumb button.del { color: var(--red); }
.bn-item { display: grid; grid-template-columns: 200px 1fr; gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; background: #fff; }
.bn-item img.bn-prev { width: 200px; height: 100px; object-fit: cover; background: #f1f5f9; border-radius: 8px; border: 1px dashed #cbd5e1; }
.bn-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bn-fields input { width: 100%; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 6px; }
.bn-fields .wide { grid-column: 1 / -1; }
.bn-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
@media (max-width: 720px) { .bn-item { grid-template-columns: 1fr; } .bn-fields { grid-template-columns: 1fr; } .slide-text h2 { font-size: 24px; } }

/* ===== Banner hai bên lề: chỉ hiện khi màn hình đủ rộng (>= 1440px) ===== */
.side-banner { display: none; position: fixed; top: 150px; width: min(300px, calc((100vw - 1200px) / 2 - 24px)); z-index: 5; }
.side-banner.left { left: 12px; } .side-banner.right { right: 12px; }
.side-banner img { width: 100%; height: auto; max-height: calc(100vh - 170px); object-fit: contain; border-radius: 8px; display: block; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
@media (min-width: 1440px) { .side-banner { display: block; } }
