/* page-home — mirrors ceoacc's logged-in home (client_home): announcement card,
 * orbit search box, category filter card and one product table per category.
 * Values measured on the reference at 1518x784 (zoom .86); all scoped to #page-home. */

/* ---------- Announcement card (ceoacc .alert.alert-primary on home) ---------- */
#page-home .home-hero {
  margin: 0 0 16px; padding: 20px;
  color: #212529; font-size: 14px; line-height: 1.55;
  background: linear-gradient(155deg, var(--cg-surface) 65%, var(--cg-soft));
  border: 1px solid var(--cg-line); border-radius: 24px;
  box-shadow: var(--cg-shadow);
  overflow-wrap: anywhere;
}
#page-home .home-hero-head { margin-bottom: 16px; text-align: center; }
#page-home .home-hero-title {
  margin: 0 0 8px;
  font-family: "Plus Jakarta Sans", sans-serif; font-size: 31.248px; font-weight: 600; line-height: 1.45;
  color: #213446;
}
#page-home .home-hero-brand, #page-home .home-hero-tag { color: var(--cg-text); font-weight: 900; }
#page-home .home-hero-brand { font-size: 24px; }
#page-home .home-hero-tag { font-size: 18px; }
#page-home .home-hero-desc { margin: 0; padding: 0; color: var(--cg-muted); font-size: 13px; line-height: 1.4; }
#page-home .home-hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 15px; }
#page-home .home-hero-link {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  padding: 10px 18px; border: 1px solid var(--cg-line); border-radius: 12px;
  background: var(--cg-blue-soft); color: var(--cg-blue);
  font-size: 13px; font-weight: 500; line-height: 1.55; white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: all .15s;
}
#page-home .home-hero-link.is-wide { max-width: 200px; padding: 10px 25px; font-size: 14px; white-space: normal; }
#page-home .home-hero-link:hover { text-decoration: none; }
#page-home .home-hero-divider { display: flex; align-items: center; gap: 15px; margin: 15px 0; }
#page-home .home-hero-divider > div { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #94a3b8, transparent); }
#page-home .home-hero-divider > span { color: #94a3b8; font-size: 14px; }
#page-home .home-hero-notice-wrap { display: flex; justify-content: center; margin: 0 0 15px; }
#page-home .home-hero-notice {
  width: 100%; max-width: 100%; padding: 16px 20px;
  background: var(--cg-soft); color: var(--cg-text);
  border: 1px solid var(--cg-line); border-radius: 12px;
  font-size: 14px; font-weight: 500; line-height: 1.5; text-align: center;
}
#page-home .home-hero-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 15px; }
#page-home .home-hero-box {
  padding: 14px; background: var(--cg-soft); color: var(--cg-text);
  border: 1px solid var(--cg-line); border-radius: 12px;
  font-size: 13px; line-height: 1.4; text-align: center;
}
#page-home .home-hero-box.is-danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.cg-dark #page-home .home-hero-box.is-danger { background: #382731; border-color: #62404a; color: #ffafb6; }

/* ---------- Search box with rotating "orbit" border (ceoacc .search-wrapper.ceo-search-orbit) ---------- */
@property --home-search-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
#page-home .home-search {
  position: relative; isolation: isolate;
  display: flex; align-items: center;
  height: 45px; margin: 0 0 20px; padding: 2px 2px 2px 18px;
  background: var(--cg-surface); border: 1.5px solid var(--cg-line); border-radius: 20px;
  box-shadow: var(--cg-shadow);
  transition: all .3s cubic-bezier(.25,.46,.45,.94);
}
#page-home .home-search::before {
  content: ""; position: absolute; inset: -1.5px; z-index: 3; pointer-events: none;
  padding: 1.6px; border-radius: inherit;
  background: conic-gradient(from var(--home-search-angle), transparent 0deg, transparent 200deg, rgba(56,164,246,.18) 230deg, #45b7f2 255deg, #4277ed 285deg, #7474ee 315deg, #aaa0f7 340deg, rgba(66,119,237,.12) 355deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: home-search-orbit 7s linear infinite;
}
#page-home .home-search:focus-within {
  border-color: rgba(64,113,216,.22);
  box-shadow: 0 0 0 3px rgba(64,113,216,.06), 0 3px 16px rgba(64,113,216,.10);
}
#page-home .home-search:focus-within::before { filter: brightness(1.08) saturate(1.15); }
@keyframes home-search-orbit { to { --home-search-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { #page-home .home-search::before { animation: none; --home-search-angle: 285deg; } }
#page-home .home-search-icon {
  flex: 0 0 auto; margin-right: 8px;
  color: var(--cg-muted); font-size: 16px; line-height: 1; transition: color .3s;
}
#page-home .home-search-input {
  flex: 1; min-width: 0; height: 100%; padding: 8px 0;
  border: none; outline: none; box-shadow: none; background: transparent;
  color: var(--cg-text); font-family: inherit; font-size: 14px; font-weight: 450; line-height: 1.55;
}
#page-home .home-search-input:focus { outline: none; box-shadow: none; }
#page-home .home-search-input::placeholder { color: var(--cg-muted); font-size: 13px; font-weight: 400; opacity: .8; }
#page-home .home-search .search-clear,
#page-home .home-search .search-submit {
  font-family: inherit; line-height: 1.55;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 1px 6px; border: none; border-radius: 50%;
  cursor: pointer; transition: all .2s ease;
}
#page-home .home-search .search-clear { margin-right: 2px; background: transparent; color: var(--cg-muted); font-size: 17.6px; }
#page-home .home-search .search-clear:hover { background: #f1f5f9; }
.cg-dark #page-home .home-search .search-clear:hover { background: var(--cg-soft); color: var(--cg-text); }
#page-home .home-search .search-clear:active { transform: scale(.92); }
#page-home .home-search .search-submit { margin-left: 2px; background: #2465bd; color: #fff; font-size: 14px; box-shadow: none; }
#page-home .home-search .search-submit:hover { transform: scale(1.04); }
#page-home .home-search .search-submit:active { transform: scale(.94); }

/* ---------- Category filter card (ceoacc #pills-tab-1.shop-account-category-tabs) ---------- */
#page-home .home-cats {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px;
  margin: 0 0 .3125rem; padding: 16px; list-style: none;
  color: var(--cg-text);
  background: linear-gradient(155deg, var(--cg-surface) 65%, var(--cg-soft));
  border: 1px solid var(--cg-line); border-radius: 24px;
  box-shadow: var(--cg-shadow);
}
#page-home .home-cats > li { display: flex; flex: 1 1 auto; width: auto; min-width: 0; max-width: 100%; margin: 0; text-align: center; }
#page-home .home-cat {
  display: flex; flex: 1 1 auto; align-items: center; justify-content: center;
  width: 100%; min-height: 42px; margin: 0; padding: 8px 13px;
  color: var(--cg-muted); background: var(--cg-surface);
  border: 1px solid var(--cg-line); border-radius: 20px; box-shadow: none;
  font-size: 13px; font-weight: 500; line-height: 1.2; text-align: center;
  white-space: normal; overflow-wrap: anywhere; text-decoration: none; cursor: pointer;
}
#page-home .home-cat:hover { text-decoration: none; }
#page-home .home-cat.active { color: var(--cg-primary); background: var(--cg-blue-soft); border-color: var(--cg-primary); }
#page-home .home-cat > i { flex: 0 0 auto; width: 20px; margin-right: 7px; font-size: 16px; line-height: 16px; text-align: center; }
#page-home .home-cat > .bi { --bi: 22px; margin-right: 7px; }

/* ---------- Catalogue tables (ceoacc #showProduct .table-responsive > table) ---------- */
#page-home .home-catalog { display: flex; flex-direction: column; }
#page-home .home-cat-block {
  margin: 20px 0 16px; overflow-x: auto;
  color: var(--cg-text); background: var(--cg-surface);
  border: 1px solid var(--cg-line); border-radius: 24px; box-shadow: var(--cg-shadow);
  scrollbar-width: thin; scrollbar-color: #d4dfed transparent;
}
#page-home .home-cat-block[hidden], #page-home .home-table tr[hidden] { display: none; }
#page-home .home-empty { margin: 20px 0 16px; padding: 32px 16px; text-align: center; color: var(--cg-muted); }
#page-home .home-empty[hidden] { display: none; }
#page-home .home-table {
  width: 100%; margin: 0; border-collapse: collapse;
  color: var(--cg-text); font-size: 13px; line-height: 1.55;
}
#page-home .home-table th {
  height: 46px; padding: 7px 12px; vertical-align: middle;
  background: var(--cg-soft); color: var(--cg-muted);
  border: 2px solid var(--cg-line);
  font-size: 12px; font-weight: 600; line-height: 1.2; text-align: left;
}
#page-home .home-table thead { background: #12214e; color: #fff; }
#page-home .home-table th > .bi { --bi: 28px; margin-right: .625rem; }
#page-home .home-table th.col-num, #page-home .home-table td.col-num { width: 10%; text-align: center; }
#page-home .home-table td { padding: 8px 12px; vertical-align: middle; border: 1px solid var(--cg-line); }
/* Text colour sits on the row so the hovered row's #1c2736 reaches the cells (as on ceoacc). */
#page-home .home-table tbody > tr { color: #000; }
.cg-dark #page-home .home-table tbody > tr { color: var(--cg-text); }
#page-home .home-table tbody > tr:nth-of-type(odd) { background-color: var(--cg-soft); }
#page-home .home-table tbody > tr:hover { color: var(--cg-text); background-color: var(--cg-blue-soft); }
#page-home .home-table tr.is-gold > td { background: #fdf9ee; }
#page-home .home-table tr.is-gold > td:first-child { box-shadow: inset 3px 0 0 #d6ad5b; }
.cg-dark #page-home .home-table tr.is-gold > td { background: #29271f; }
.cg-dark #page-home .home-table tr.is-gold > td:first-child { box-shadow: inset 3px 0 0 #aa863f; }

/* Product name cell: 40px icon box + title (15px/600, phông tiêu đề) + description (13px muted) */
#page-home .product-name { display: flex; align-items: center; gap: 0; font-size: 13px; font-weight: 400; color: inherit; }
#page-home .prod-ico {
  flex: 0 0 40px; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-right: 5px; padding: 2px; border-radius: 10px;
}
#page-home .prod-ico > .bi { --bi: 34px; }
#page-home .prod-ico > .bi-bell { font-size: 28px; }
#page-home .prod-text { flex: 0 1 auto; min-width: 0; margin-left: 10px; font-size: 15px; line-height: 1.55; }
#page-home .prod-title {
  margin: 0; color: var(--cg-text);
  font-family: "Plus Jakarta Sans", sans-serif; font-size: 15px; font-weight: 600; line-height: 30px;
}
#page-home tr.is-gold .prod-title { color: #8a4b08; }
.cg-dark #page-home tr.is-gold .prod-title { color: #f3d28e; }
#page-home .prod-desc { color: var(--cg-muted); font-size: 13px; line-height: 1.6; white-space: pre-line; }

/* Feature badges (ceoacc .product-feature-badge*) */
#page-home .pfb-wrap { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: 6px; vertical-align: middle; user-select: none; }
#page-home .pfb {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 20px; padding: 3px 8px; border-radius: 999px;
  font-family: "Plus Jakarta Sans", sans-serif; font-size: 10px; font-weight: 900; line-height: 1.15; letter-spacing: .02em;
  white-space: nowrap; color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.8);
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  animation: home-badge-glow 2.8s ease-in-out infinite;
}
#page-home .pfb-multi { background: #2563eb; border: 1px solid #1e40af; }
#page-home .pfb-select { background: #ea580c; border: 1px solid #9a3412; animation-delay: .35s; }
#page-home .pfb-manual { color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; text-shadow: none; box-shadow: none; animation: none; }
#page-home .pfb-hot { color: #78350f; background: #fbbf24; border: 1px solid #d97706; text-shadow: none; box-shadow: none; animation: home-badge-pulse 2.4s ease-in-out infinite; }
@keyframes home-badge-glow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
@keyframes home-badge-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .78; } }
@media (prefers-reduced-motion: reduce) { #page-home .pfb { animation: none; } }

/* Stock / price chips (ceoacc .btn-sm.btn-outline-info / -danger) and Mua button (.btn-primary.btn-block) */
#page-home .stock-badge, #page-home .price-badge {
  display: inline-block; margin: 0 0 .3125rem; padding: .25rem .5rem;
  border-radius: 10px; background: transparent; color: #324253;
  font-family: "Plus Jakarta Sans", sans-serif; font-size: 12px; font-weight: 500; line-height: 18px;
  white-space: nowrap; vertical-align: middle; cursor: pointer; user-select: none;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}
#page-home .stock-badge { border: 1px solid #19b3b3; }
#page-home .price-badge { border: 1px solid #f42b3d; }
#page-home .stock-badge b, #page-home .price-badge b { font-weight: 700; }
#page-home .price-badge > i { display: inline-block; margin-right: .3125rem; font-size: 12px; line-height: 12px; }
#page-home .stock-badge:hover { color: #fff; background: #19b3b3; }
#page-home .price-badge:hover { color: #fff; background: #f42b3d; }
/* ceoacc keeps #324253 text in dark mode (unreadable); use the theme text colour instead. */
.cg-dark #page-home .stock-badge, .cg-dark #page-home .price-badge { color: var(--cg-text); }
#page-home .btn-buy {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-width: 0; height: 30px; padding: 3px 7px; gap: 0;
  border: 1px solid #2465bd; border-radius: 10px; background: #2465bd; color: #fff;
  font-family: inherit; font-size: 13.12px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 4px 8px rgba(255,255,255,.05); cursor: pointer; text-decoration: none;
}
/* Measured on ceoacc: the glass skin cancels Bootstrap's hover, so "Mua" only changes while pressed. */
#page-home .btn-buy:hover { background: #2465bd; border-color: #2465bd; color: #fff; text-decoration: none; }
#page-home .btn-buy:focus-visible { box-shadow: none; }
#page-home .btn-buy:active { background: #0056ff; border-color: #0052f2; box-shadow: none; }
#page-home .btn-buy > i, #page-home .btn-select-purchase > i { margin-right: 5px; font-size: 13.12px; line-height: 1; }
.cg-dark #page-home .btn-buy { background: #2465bd; }
/* "Mua tự chọn" (ceoacc .btn-warning.btn-select-purchase): orange, under "Mua", 3px gap. */
#page-home .btn-select-purchase {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-width: 0; height: 30px; margin-top: 3px; padding: 3px 7px;
  border: 1px solid #db7e06; border-radius: 10px; background: #db7e06; color: #fff;
  font-family: inherit; font-size: 13.12px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 4px 8px rgba(255,255,255,.05); cursor: pointer;
}
#page-home .btn-select-purchase:hover, #page-home .btn-select-purchase:focus-visible { background: #b66905; border-color: #a96105; color: #fff; }
#page-home .btn-select-purchase:focus-visible { box-shadow: none; }
#page-home .btn-select-purchase:active { background: #a96105; border-color: #9d5a04; box-shadow: none; }

/* Proxy shortcut row (ceoacc [data-product-navigation]) */
#page-home .home-table tr.is-nav > td { padding: 0; }
#page-home .proxy-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  min-width: 0; padding: 8px 12px; border-left: 3px solid #d6ad5b; background: #fdf9ee;
}
.cg-dark #page-home .proxy-nav { border-left-color: #aa863f; background: #29271f; }
#page-home .home-table tr.is-nav > td:first-child { box-shadow: none; }
#page-home .proxy-nav-main { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 320px; min-width: 0; }
#page-home .proxy-nav-main .prod-ico { margin-right: 0; }
#page-home .proxy-nav .prod-title { flex: 1; min-width: 0; color: #8a4b08; overflow-wrap: anywhere; }
.cg-dark #page-home .proxy-nav .prod-title { color: #fcd34d; }
#page-home .proxy-nav-action { flex: 0 0 auto; width: max(100px, calc(10% - 24px)); }
/* ceoacc draws the proxy shortcut button in the heading face (DM Sans there, Plus Jakarta Sans here). */
#page-home .proxy-nav-link { font-family: "Plus Jakarta Sans", sans-serif; }

/* Mobile copy of stock/price/buy under the title (ceoacc .d-none-more-than-601: mt-2 rows, plain btn-sm buttons) */
#page-home .prod-mobile { display: none; }
#page-home .prod-mobile > div { margin-top: .625rem; }
/* Under 768px ceoacc drops the compact 30px catalogue buttons and uses plain .btn-sm (12px/18px, .25rem .5rem). */
@media (max-width: 767.98px) {
  #page-home :is(.btn-buy, .btn-select-purchase) { height: auto; padding: .25rem .5rem; font-size: 12px; line-height: 18px; }
  #page-home .btn-select-purchase { margin-top: .3125rem; }
  #page-home :is(.btn-buy, .btn-select-purchase) > i { margin-right: .3125rem; font-size: 12px; }
}

/* ---------- SEO block (ceoacc section.col-12.mt-3.mb-2 > .border-top.pt-3.pb-2) ---------- */
#page-home .home-seo { margin: 1.25rem 0 .625rem; padding: 0 15px; }
#page-home .home-seo-inner { padding: 1.25rem 0 .625rem; border-top: 1px solid #f1f1f1; }
.cg-dark #page-home .home-seo-inner { border-top-color: var(--cg-line); }
#page-home .home-seo-title {
  margin: 0 0 .3125rem; color: #213446;
  font-family: "Plus Jakarta Sans", sans-serif; font-size: 1rem; font-weight: 600; line-height: 1.2;
}
.cg-dark #page-home .home-seo-title { color: var(--cg-text); }
#page-home .home-seo-desc { margin: 0 0 .625rem; color: var(--cg-muted); font-size: 80%; line-height: 1.55; }
#page-home .home-seo-links, #page-home .home-seo-cats { display: flex; flex-wrap: wrap; align-items: center; font-size: 80%; line-height: 1.55; }
#page-home .home-seo-links { gap: .35rem .8rem; margin-bottom: .3125rem; }
#page-home .home-seo-cats { gap: .25rem .65rem; }
#page-home .home-seo-cats > span, #page-home .home-seo-cats > a { color: var(--cg-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) { #page-home .home-hero-title { font-size: calc(21.125px + .8436vw); } }
@media (max-width: 767.98px) {
  #page-home .home-hero-title { font-size: calc(20.465px + .8436vw); }
  #page-home .home-cats > li { flex: 1 1 calc(50% - 4px); }
  #page-home .home-cat { padding: 9px 8px; }
  #page-home .home-cat > .bi { --bi: 21px; }
  #page-home .home-cat-block { margin-top: 0; }
  #page-home .home-table td { padding-top: 15px; padding-bottom: 15px; }
}
@media (max-width: 600px) {
  #page-home .home-table .col-num { display: none; }
  /* ceoacc responsive.css: icon top-aligned with a 2px/8px offset, text flush to it */
  #page-home .product-name { align-items: flex-start; }
  #page-home .prod-ico { margin: 2px 8px 0 0; }
  #page-home .prod-text { margin-left: 0; overflow-wrap: anywhere; }
  #page-home .prod-mobile { display: block; }
  #page-home .home-table th { height: 44px; padding: 6px 8px; }
  #page-home .home-table th > .bi { --bi: 26px; }
}
@media (max-width: 600px) {
  #page-home .home-hero { padding: 16px; border-radius: 20px; }
  #page-home .home-cats { padding: 12px; border-radius: 20px; }
  #page-home .home-cat { min-height: 44px; border-radius: 16px; font-size: 12px; }
  #page-home .home-cat-block { border-radius: 20px; }
  #page-home .home-table td { padding-left: 9px; padding-right: 9px; }
  #page-home .proxy-nav { flex-direction: column; align-items: stretch; gap: 8px; }
  #page-home .proxy-nav-main { flex: initial; }
  #page-home .proxy-nav-action { width: 100%; }
}
@media (max-width: 575.98px) {
  #page-home .prod-ico { flex-basis: 34px; width: 34px; height: 34px; }
  #page-home .prod-ico > .bi { --bi: 29px; }
  #page-home .pfb-wrap { gap: 3px; margin-left: 4px; }
  #page-home .pfb { min-height: 18px; padding: 2px 6px; font-size: 9px; }
}
@media (max-width: 576px) {
  #page-home .home-search { height: 38px; padding: 2px 2px 2px 14px; }
  #page-home .home-search-input { padding: 6px 0; font-size: 16px; }
  #page-home .home-search .search-clear, #page-home .home-search .search-submit { width: 32px; height: 32px; }
  #page-home .home-search .search-clear { font-size: 17.05px; }
  #page-home .home-search .search-submit { font-size: 13.175px; }
  #page-home .home-search-icon { margin-right: 6px; font-size: 13.175px; }
}
