:root {
  --nen: #f5f6f8; --the: #fff; --chu: #1d2330; --phu: #5c6370; --vien: #e2e5ea;
  --do: #e3000f; --do-dam: #b8000c; --xanh: #0a7d3c; --cam: #b45f06;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--nen); color: var(--chu); }
a { color: inherit; }
.khung { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

.dau { background: var(--the); border-bottom: 1px solid var(--vien); position: sticky; top: 0; z-index: 5; }
.dau-trong { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 700; font-size: 1.1rem; text-decoration: none; display: flex; gap: 8px; align-items: center; }
.the { background: var(--do); color: #fff; padding: 2px 8px; border-radius: 4px; letter-spacing: .5px; }
.gio { text-decoration: none; border: 1px solid var(--vien); border-radius: 20px; padding: 6px 14px; font-size: .95rem; }
.gio b { background: var(--do); color: #fff; border-radius: 10px; padding: 0 7px; margin-left: 4px; font-size: .85rem; }

.tim { margin: 20px 0 12px; }
.tim input { width: 100%; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--vien); border-radius: 8px; background: var(--the); }
.tim input:focus { outline: 2px solid var(--do); border-color: transparent; }

.nhom { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.nhom button { flex: none; border: 1px solid var(--vien); background: var(--the); border-radius: 20px; padding: 7px 14px; cursor: pointer; font-size: .92rem; }
.nhom button[aria-pressed="true"] { background: var(--chu); color: #fff; border-color: var(--chu); }

.dem { color: var(--phu); font-size: .9rem; margin: 12px 0; min-height: 1.2em; }

.luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sp { background: var(--the); border: 1px solid var(--vien); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.sp .anh { aspect-ratio: 4/3; background: #eef0f3; border-radius: 6px; display: grid; place-items: center; color: #9aa1ab; font-size: .8rem; overflow: hidden; }
.sp .anh img { width: 100%; height: 100%; object-fit: contain; }
.sp .nhan { font-size: .75rem; color: var(--phu); text-transform: uppercase; letter-spacing: .4px; }
.sp h3 { font-size: 1rem; margin: 0; line-height: 1.35; }
.sp .ma { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; color: var(--phu); }
.sp .mo-ta { font-size: .85rem; color: var(--phu); }
.sp .gia { font-size: 1.15rem; font-weight: 700; color: var(--do); margin-top: auto; }
.sp .gia small { font-weight: 400; color: var(--phu); font-size: .8rem; }
.tt { font-size: .8rem; font-weight: 600; }
.tt.con_hang { color: var(--xanh); }
.tt.dat_hang { color: var(--cam); }
.sp button { margin-top: 6px; background: var(--do); color: #fff; border: 0; border-radius: 6px; padding: 10px; font-size: .92rem; font-weight: 600; cursor: pointer; }
.sp button:hover { background: var(--do-dam); }
.sp button.da-chon { background: var(--chu); }

.trang { display: flex; justify-content: center; gap: 6px; margin: 24px 0; flex-wrap: wrap; }
.trang button { min-width: 38px; padding: 7px 10px; border: 1px solid var(--vien); background: var(--the); border-radius: 6px; cursor: pointer; }
.trang button[aria-current="page"] { background: var(--chu); color: #fff; }

.trong { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--phu); }
.chan { color: var(--phu); font-size: .85rem; padding-top: 12px; padding-bottom: 32px; }

.thong-bao { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--chu); color: #fff; padding: 10px 18px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100% - 32px); }
.thong-bao.hien { opacity: 1; }
.sp .gia-cu { font-size: .85rem; font-weight: 400; color: var(--phu); margin-top: 2px; }
.sp .giam { background: #fde7e9; color: var(--do-dam); font-weight: 700; border-radius: 4px; padding: 0 5px; }
.sp .gia.lien-he { color: var(--chu); }

/* Liên kết trong thẻ sản phẩm */
.sp a.anh { text-decoration: none; }
.sp h3 a { text-decoration: none; }
.sp h3 a:hover { color: var(--do); }

/* Trang chi tiết */
.ct-duong { font-size: .85rem; color: var(--phu); margin: 16px 0; }
.ct-duong a { color: var(--phu); }
.ct { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; background: var(--the); border: 1px solid var(--vien); border-radius: 12px; padding: 20px; }
.ct-anh { aspect-ratio: 1; background: #fff; border-radius: 8px; display: grid; place-items: center; overflow: hidden; color: #9aa1ab; }
.ct-anh img { width: 100%; height: 100%; object-fit: contain; }
.ct h1 { font-size: 1.4rem; margin: 0 0 12px; line-height: 1.35; }
.ct dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 16px; font-size: .92rem; }
.ct dt { color: var(--phu); }
.ct dd { margin: 0; }
.ct dd.ma { font-family: ui-monospace, Consolas, monospace; }
.ct-gia { font-size: 1.8rem; font-weight: 700; color: var(--do); }
.ct-gia small { font-size: .9rem; font-weight: 400; color: var(--phu); }
.ct-gia.lien-he { font-size: 1.3rem; color: var(--chu); }
.ct .gia-cu { color: var(--phu); margin-top: 4px; }
.ct-mua { display: flex; gap: 10px; align-items: end; margin: 18px 0 10px; flex-wrap: wrap; }
.ct-mua label { font-size: .85rem; color: var(--phu); display: flex; flex-direction: column; gap: 4px; }
.ct-mua input { width: 96px; padding: 10px; font-size: 1rem; border: 1px solid var(--vien); border-radius: 6px; }
.ct-mua button { flex: 1; min-width: 180px; background: var(--do); color: #fff; border: 0; border-radius: 8px; padding: 13px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.ct-mua button:hover { background: var(--do-dam); }
.ct-gui { display: inline-block; margin: 4px 0 12px; font-weight: 600; color: var(--do); }
.ct-cam-ket { padding-left: 18px; color: var(--phu); font-size: .88rem; line-height: 1.7; }
.ct-thong-so { background: var(--the); border: 1px solid var(--vien); border-radius: 12px; padding: 16px 20px; margin: 16px 0 32px; }
.ct-thong-so h2 { font-size: 1.1rem; margin: 0 0 10px; }
.ct-thong-so ul { margin: 0; padding-left: 18px; line-height: 1.8; }
@media (max-width: 720px) { .ct { grid-template-columns: 1fr; padding: 14px; gap: 16px; } .ct h1 { font-size: 1.2rem; } }

/* Trang gửi yêu cầu báo giá */
.bg { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin: 20px 0 40px; align-items: start; }
.bg h1 { font-size: 1.3rem; margin: 20px 0 0; }
.hop { background: var(--the); border: 1px solid var(--vien); border-radius: 12px; padding: 16px; }
.dong { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--vien); }
.dong:last-child { border-bottom: 0; }
.dong img, .dong .khong-anh { width: 56px; height: 56px; object-fit: contain; background: #f1f2f4; border-radius: 6px; }
.dong .ten { font-size: .92rem; font-weight: 600; }
.dong .ten a { text-decoration: none; }
.dong .phu { font-size: .82rem; color: var(--phu); }
.dong .sl { display: flex; align-items: center; gap: 6px; }
.dong .sl input { width: 64px; padding: 6px; border: 1px solid var(--vien); border-radius: 6px; text-align: center; }
.dong .bo { background: none; border: 0; color: var(--phu); cursor: pointer; font-size: 1.1rem; }
.tong { display: flex; justify-content: space-between; padding-top: 12px; font-weight: 700; }
.tong small { font-weight: 400; color: var(--phu); display: block; }
.form label { display: block; font-size: .88rem; font-weight: 600; margin: 12px 0 4px; }
.form label span { font-weight: 400; color: var(--phu); }
.form input, .form textarea { width: 100%; padding: 11px 12px; font-size: 1rem; border: 1px solid var(--vien); border-radius: 8px; font-family: inherit; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--do); border-color: transparent; }
.form .loi { color: var(--do-dam); font-size: .85rem; margin-top: 4px; min-height: 1em; }
.form button[type=submit] { width: 100%; margin-top: 16px; background: var(--do); color: #fff; border: 0; border-radius: 8px; padding: 14px; font-size: 1.05rem; font-weight: 700; cursor: pointer; }
.form button[disabled] { opacity: .6; cursor: wait; }
.an-kin { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.xong { text-align: center; padding: 32px 16px; }
.xong .so { font-size: 1.6rem; font-weight: 700; letter-spacing: 1px; margin: 8px 0; }
.xong button.phu { background: none; border: 1px solid var(--vien); border-radius: 6px; padding: 8px 14px; cursor: pointer; }
@media (max-width: 820px) { .bg { grid-template-columns: 1fr; } }
