/* EbizPos — stylesheet tự chứa cho bản Astro static (vàng-đen-trắng).
   Tokens: --brand #FFB800, --ink #141414, --paper #FFFFFF. */
:root {
  --brand: #FFB800;
  --brand-deep: #D99A00;
  --ink: #141414;
  --ink-soft: #3a3a3a;
  --paper: #FFFFFF;
  --soft: #FFF7E0;
  --line: #EEEEEE;
  --muted: #6B6B6B;
  --radius: 12px;
  --wrap: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 1.2vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
[id] { scroll-margin-top: 84px; }

/* Khung chung */
.content-wrap, .container { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.page-main, .section, main.page-main { display: block; padding-bottom: 56px; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-deep); margin: 32px 0 8px;
}

/* Nút + link */
.button-primary, .add-button {
  display: inline-block; background: var(--brand); color: var(--ink) !important;
  font-weight: 700; padding: 12px 24px; border-radius: var(--radius);
  text-decoration: none; border: none; cursor: pointer;
}
.button-primary:hover, .add-button:hover { background: var(--brand-deep); }
.button-outline {
  display: inline-block; border: 2px solid var(--ink); color: var(--ink);
  padding: 10px 22px; border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
.button-text {
  display: inline-block; font-weight: 700; color: var(--ink);
  text-decoration: none; border-bottom: 2px solid var(--brand); padding-bottom: 2px;
}
.text-link { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--brand); }
.text-link:hover, .button-text:hover { background: var(--brand); }

/* Header đen */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 100; }
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 4px 10px; }
.brand-wordmark { height: 36px; width: auto; }
.desktop-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.desktop-nav > a, .nav-dropdown > a {
  color: #fff; text-decoration: none; padding: 10px 14px; font-weight: 500;
  border-bottom: 3px solid transparent;
}
.desktop-nav > a:hover, .desktop-nav > a.active,
.nav-dropdown > a:hover, .nav-dropdown > a.active { color: var(--brand); border-bottom-color: var(--brand); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--ink); border: 1px solid #333; border-radius: 8px;
  padding: 8px 0; box-shadow: 0 12px 32px rgba(0,0,0,0.4); z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; color: #fff; text-decoration: none; padding: 9px 18px; font-size: 0.95rem; }
.nav-dropdown-menu a:hover { background: var(--brand); color: var(--ink); }
.nav-group { padding: 4px 0 6px; border-bottom: 1px solid #2a2a2a; }
.nav-group:last-child { border-bottom: none; }
.nav-group-title { display: block; color: var(--brand); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 18px 2px; }
.mobile-subgroup { border-bottom: 1px solid #2a2a2a; }
.mobile-subgroup summary { color: var(--brand); padding: 10px 4px 10px 12px; cursor: pointer; font-weight: 600; font-size: 0.95rem; list-style: none; }
.mobile-subgroup a { padding: 7px 4px 7px 28px; }
.mobile-trigger { display: none; margin-left: auto; background: none; border: 1px solid #444; border-radius: 8px; color: #fff; padding: 8px 10px; cursor: pointer; }
.mobile-nav { background: #1d1d1d; padding: 8px 16px 16px; }
.mobile-nav[hidden] { display: none; }
.mobile-nav > a { display: block; color: #fff; text-decoration: none; padding: 12px 4px; border-bottom: 1px solid #333; }
.mobile-groups { border-bottom: 1px solid #333; }
.mobile-groups summary { color: #fff; padding: 12px 4px; cursor: pointer; font-weight: 600; list-style: none; }
.mobile-groups summary::after { content: " ▾"; color: var(--brand); }
.mobile-groups a { display: block; color: #ddd; text-decoration: none; padding: 8px 4px 8px 16px; }
.mobile-groups a:hover { color: var(--brand); }

/* Hero */
.hero-section { background: var(--ink); color: #fff; padding: 56px 0 64px; }
.hero-grid { display: block; }
.hero-copy .eyebrow { color: var(--brand); margin-top: 0; }
.hero-copy h1 { color: #fff; max-width: 20ch; }
.hero-copy h1 em { font-style: normal; color: var(--brand); }
.hero-copy p { color: #ddd; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 24px; }
.hero-actions .button-text { color: #fff; }

/* Lưới card */
.product-grid, .article-grid, .bucket-grid {
  display: grid; gap: 20px; margin: 24px 0 32px;
  grid-template-columns: repeat(4, 1fr);
}
.product-card, .article-card, .bucket-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.product-card:hover, .article-card:hover, .bucket-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.10); border-color: var(--brand);
}
.product-image, .article-image { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--soft); position: relative; }
.product-image img, .article-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image span {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--brand); color: var(--ink); font-weight: 700; font-size: 0.8rem;
  padding: 4px 10px; border-radius: 999px;
}
.product-copy, .article-copy { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-copy p:first-child, .product-brand, .article-tag {
  margin: 0; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--brand-deep);
}
.product-card { position: relative; }
.product-image { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--soft); position: relative; }
.product-card h3 { margin: 8px 0 4px; }
.product-copy { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-copy .price { margin-top: auto; }
.product-image span { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--brand); color: var(--ink); font-weight: 700; font-size: 0.8rem; padding: 4px 10px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.product-copy h3, .article-copy h2 { margin: 0; font-size: 1.05rem; }
.product-copy h3 a, .article-copy h2 a { text-decoration: none; }
.product-copy h3 a:hover, .article-copy h2 a:hover { color: var(--brand-deep); }
.article-copy p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.price { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.price strong { font-size: 1.15rem; }
.price del, .price s { color: var(--muted); }
.bucket-card { padding: 20px; text-decoration: none; }
.bucket-card h3 { margin: 0 0 8px; }
.bucket-card p { color: var(--muted); font-size: 0.95rem; margin: 0 0 12px; }

/* Trang bài viết */
.post-article { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.post-head { padding: 32px 0 8px; }
.post-head .eyebrow { margin-top: 0; }
.post-meta { color: var(--muted); font-size: 0.9rem; margin: 8px 0 20px; }
.post-content { line-height: 1.8; }
.post-content p, .post-content li { line-height: 1.8; }
.post-content img { border-radius: var(--radius); margin: 16px auto; }
.post-content h2 { margin-top: 1.8em; padding-bottom: 0.3em; border-bottom: 2px solid var(--brand); }
.post-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post-content thead th, .post-content tr:first-child th { background: var(--ink); color: #fff; }
.post-content tbody tr:nth-child(even) td { background: var(--soft); }
.post-content blockquote { border-left: 4px solid var(--brand); margin: 20px 0; padding: 12px 20px; background: var(--soft); border-radius: 0 var(--radius) var(--radius) 0; }
.post-content details { border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; padding: 12px 16px; }
.post-content summary { cursor: pointer; font-weight: 600; }
.post-content summary::marker { color: var(--brand-deep); }

/* Related */
.article-related { background: var(--soft); border-radius: var(--radius); padding: 24px; margin: 32px 0; }
.article-related h2 { margin-top: 0; }
.article-related ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.article-related a { text-decoration: none; font-weight: 500; }
.article-related a:hover { color: var(--brand-deep); text-decoration: underline; }

/* Trang danh mục / phân trang */
.page-heading { padding: 32px 0 0; }
.archive-count { color: var(--muted); font-size: 0.9rem; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 40px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; text-decoration: none; padding: 0 12px;
}
.pagination a:hover { border-color: var(--brand); background: var(--soft); }
.pagination a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Trang sản phẩm */
.detail-product:not(section) { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; padding: 32px 16px; }
.detail-image img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.detail-copy h1 { margin-top: 0; }
.detail-price { font-size: 1.6rem; font-weight: 800; }
.detail-price del { color: var(--muted); font-size: 1.1rem; font-weight: 400; margin-right: 10px; }
.detail-actions { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.detail-description { background: var(--soft); border-radius: var(--radius); padding: 20px 24px; margin-top: 24px; }
.store-products { margin-top: 8px; }
.archive-product-content { padding: 32px 0 0; }

/* Footer */
.site-footer { background: var(--ink); color: #ddd; margin-top: 0; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr 1fr 1fr; padding: 48px 16px 32px; }
.site-footer h2, .site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 12px; }
.site-footer p { font-size: 0.92rem; margin: 0 0 8px; }
.site-footer a { display: block; color: #ddd; text-decoration: none; padding: 4px 0; font-size: 0.92rem; }
.site-footer a:hover { color: var(--brand); }
.footer-about img { background: #fff; border-radius: 8px; padding: 4px 8px; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid #333; padding: 16px 0; font-size: 0.85rem; color: #999; }
.zalo-button {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 16px 6px 6px; text-decoration: none; font-weight: 700; font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.zalo-button small { display: block; font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.zalo-button img { border-radius: 50%; }

/* Mobile */
@media (max-width: 1024px) {
  .product-grid, .article-grid, .bucket-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .desktop-nav { display: none; }
  .mobile-trigger { display: inline-block; }
  .detail-product:not(section) { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .product-grid, .article-grid, .bucket-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-section { padding: 40px 0 48px; }
}
