/* ==========================================================
   Hoàng Gia – wp.css
   Phần riêng khi chạy trong WordPress (thanh quản trị, nội dung soạn trong admin…).
   Nạp sau cùng.
   ========================================================== */

/* Thanh quản trị WordPress khi đang đăng nhập: đẩy menu dính xuống dưới thanh */
body.admin-bar .hg-nav.r-sticky{top:32px !important}
body.admin-bar .hg-mobile.r-sticky{top:46px !important}
@media (max-width: 782px){
  body.admin-bar .hg-nav.r-sticky{top:46px !important}
}
@media (max-width: 600px){
  /* WordPress cho thanh quản trị cuộn theo trang ở màn hình nhỏ */
  body.admin-bar .hg-mobile.r-sticky{top:0 !important}
}

/* Ảnh không có ảnh đại diện */
.hg-ui img[src$="no-image.png"]{object-fit:contain}

/* Cột danh mục dính khi cuộn (mọi trang có cột bên) */
body.hg-ui .hg-side{position:-webkit-sticky;position:sticky;top:76px;align-self:start}
body.admin-bar.hg-ui .hg-side{top:108px}

/* Nội dung soạn trong admin (bài viết, mô tả sản phẩm, trang) */
.hg-entry{display:flex;flex-direction:column;gap:16px;font-size:17px;line-height:1.8;color:#3E4958;min-width:0;overflow-wrap:break-word}
.hg-entry>*{margin:0}
.hg-entry h2{margin:10px 0 0;font-size:26px;line-height:1.3;font-weight:800;color:#0C4A6E}
.hg-entry h3{margin:6px 0 0;font-size:21px;line-height:1.35;font-weight:800;color:#0C4A6E}
.hg-entry h4{font-size:18px;font-weight:700;color:#0C4A6E}
.hg-entry a{color:#C8102E;font-weight:600;text-decoration:underline}
.hg-entry ul,.hg-entry ol{padding:18px 22px 18px 42px;background:#F2F7FB;border-radius:14px;display:flex;flex-direction:column;gap:6px}
.hg-entry img{max-width:100%;height:auto;border-radius:12px}
.hg-entry figure{margin:0;max-width:100%}
.hg-entry figcaption,.hg-entry .wp-caption-text{font-size:14px;color:#5A6576;text-align:center;padding-top:6px}
.hg-entry .wp-caption{max-width:100%}
.hg-entry .aligncenter{display:block;margin-left:auto;margin-right:auto}
.hg-entry table{width:100%;border-collapse:collapse;font-size:15px;display:block;overflow-x:auto}
.hg-entry th,.hg-entry td{border:1px solid #E3E7EE;padding:10px 14px;text-align:left}
.hg-entry th{background:#F2F7FB;color:#0C4A6E}
.hg-entry blockquote{padding:14px 20px;border-left:4px solid #C8102E;background:#FFF1F2;border-radius:0 12px 12px 0}
.hg-entry iframe{max-width:100%}
.hg-short>*{margin:0 0 10px}
.hg-short>*:last-child{margin-bottom:0}

/* Phân trang */
.hg-pager .page-numbers{min-width:44px;height:44px;padding:0 12px;border-radius:10px;border:1.5px solid #C5D3E0;background:#ffffff;color:#0C4A6E;font-weight:700;font-size:15px;display:flex;align-items:center;justify-content:center}
.hg-pager .page-numbers.current{background:#0C4A6E;border-color:#0C4A6E;color:#ffffff}
.hg-pager a.page-numbers:hover{border-color:#C8102E;color:#C8102E}
.hg-pager .page-numbers.dots{border:0;background:transparent;min-width:24px}

/* Copyright: link trong dòng bản quyền */
.hg-copy a{color:#D6EAF7}

/* ==========================================================
   Form Contact Form 7 trong giao diện mới (.hg-cf7)
   light: popup báo giá (nền trắng) · dark: form chân trang, form đăng ký tư vấn (nền xanh)
   ========================================================== */
.hg-cf7 .wpcf7{margin:0}
.hg-cf7 form.hg-f-form{margin:0}
.hg-cf7 .hg-f{display:flex;flex-direction:column;gap:16px}
.hg-cf7 .hg-f-row{display:flex;flex-direction:column;gap:6px;margin:0}
.hg-cf7 .hg-f-lb{font-size:14px;font-weight:600;color:#0C4A6E}
.hg-cf7 .hg-f-req{color:#C8102E}
.hg-cf7 .wpcf7-form-control-wrap{display:block;width:100%}
.hg-cf7 input.wpcf7-text,.hg-cf7 input.wpcf7-tel,.hg-cf7 input.wpcf7-email,.hg-cf7 select.wpcf7-select{height:48px;width:100%;box-sizing:border-box;padding:0 14px;border:1.5px solid #CBD5E1;border-radius:10px;font-family:inherit;font-size:15px;color:#1E2633;background:#ffffff}
.hg-cf7 textarea.wpcf7-textarea{width:100%;box-sizing:border-box;padding:12px 14px;border:1.5px solid #CBD5E1;border-radius:10px;font-family:inherit;font-size:15px;line-height:1.5;color:#1E2633;background:#ffffff;resize:vertical;min-height:96px}
.hg-cf7 input:focus,.hg-cf7 textarea:focus,.hg-cf7 select:focus{outline:2px solid #0284C7;outline-offset:1px;border-color:#0284C7}
.hg-cf7 .hg-f-prod{display:flex;gap:10px;align-items:center}
.hg-cf7 .hg-f-prod .wpcf7-form-control-wrap{flex:1 1 auto;min-width:0}
.hg-cf7 .hg-f-pic{width:48px;height:48px;flex:0 0 48px;border-radius:10px;border:1px solid #E3E7EE;object-fit:contain;background:#ffffff}
.hg-cf7 .hg-f-pic[hidden]{display:none}
/* Ô chọn "Tôi muốn được" dạng nút */
.hg-cf7 .wpcf7-checkbox{display:flex;gap:10px;flex-wrap:wrap}
.hg-cf7 .wpcf7-checkbox .wpcf7-list-item{margin:0;flex:1 1 0;min-width:120px}
.hg-cf7 .wpcf7-checkbox label{display:flex;gap:10px;align-items:center;min-height:48px;padding:0 14px;border:1.5px solid #CBD5E1;border-radius:10px;font-size:15px;font-weight:600;color:#0C4A6E;cursor:pointer;box-sizing:border-box}
.hg-cf7 .wpcf7-checkbox input{width:18px;height:18px;margin:0;accent-color:#C8102E}
.hg-cf7 .hg-f-btn,.hg-cf7 input.wpcf7-submit{width:100%;height:54px;border:0;border-radius:12px;background:linear-gradient(180deg,#DC292F 0%,#CB1920 50%,#B7131C 100%);color:#ffffff;font-family:inherit;font-size:16px;font-weight:700;cursor:pointer;box-shadow:0 10px 24px rgba(200,16,46,0.35)}
.hg-cf7 .hg-f-btn:disabled{opacity:.7}
.hg-cf7 .hg-f-submit{position:relative}
.hg-cf7 .wpcf7-spinner{position:absolute;right:14px;top:50%;margin:-12px 0 0}
.hg-cf7 .wpcf7-not-valid{border-color:#C8102E !important}
.hg-cf7 .wpcf7-not-valid-tip{font-size:13px;color:#C8102E;font-weight:500;margin-top:4px}
.hg-cf7 .wpcf7-response-output{margin:12px 0 0 !important;padding:10px 14px !important;border-radius:10px;font-size:14px;line-height:1.5}
.hg-cf7 .wpcf7 form.init .wpcf7-response-output,.hg-cf7 .wpcf7 form.sent .wpcf7-response-output{display:none}
.hg-cf7 .hg-f-hot{display:block;margin-top:12px;font-size:13px;color:#5A6576;text-align:center}
.hg-cf7 .hg-f-hot a{color:#C8102E;font-weight:700}
/* Popup: khoảng đệm giống thiết kế */
.hg-cf7-q,.hg-cf7-mb-q{padding:28px 32px 32px}
.hg-cf7-mb-q{padding:20px}
/* Nền xanh */
.hg-cf7-dark .hg-f{gap:10px}
.hg-cf7-dark .hg-f-row{gap:4px}
.hg-cf7-dark .hg-f-lb{font-size:13px;color:#B9D8EC}
.hg-cf7-dark .hg-f-req{color:#FF8A94}
.hg-cf7-dark input.wpcf7-text,.hg-cf7-dark input.wpcf7-tel,.hg-cf7-dark textarea.wpcf7-textarea{border-color:transparent;height:46px;padding:0 12px}
.hg-cf7-dark textarea.wpcf7-textarea{height:auto;padding:10px 12px;min-height:84px}
.hg-cf7-dark .wpcf7-checkbox label{min-height:44px;border:0;background:rgba(255,255,255,0.08);color:#ffffff;font-size:14px;padding:0 12px}
.hg-cf7-dark .hg-f-btn{height:50px;border-radius:10px;font-weight:800;box-shadow:none;margin-top:6px}
.hg-cf7-dark .wpcf7-not-valid-tip,.hg-cf7-dark .hg-f-req{color:#FF8A94}
.hg-cf7-dark .wpcf7-response-output{color:#ffffff}
/* Form chân trang: gọn – bỏ ô sản phẩm, ghi chú */
.hg-cf7-ff .hg-f-product,.hg-cf7-ff .hg-f-note{display:none}
.hg-cf7-ff input.wpcf7-text,.hg-cf7-ff input.wpcf7-tel{height:44px;font-size:14px}
.hg-cf7-ff .hg-f-btn{height:48px;font-size:15px}

/* Mô tả danh mục sản phẩm (soạn bằng trình soạn thảo) */
.hg-cat-desc{font-size:16px;line-height:1.7;color:#4A5565;gap:12px}
.hg-cat-desc h2{font-size:22px}
.hg-cat-desc h3{font-size:19px}

/* Điện thoại & máy tính bảng: danh sách sản phẩm / nội dung lên trước, cột "Danh mục sản phẩm" + "Chưa biết chọn loại nào?" xuống sau */
@container (max-width: 1023.98px){
  .hg-desktop .r-layout > .hg-side{order:2}
}
