:root {
  --gradient-hero: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.18),
    rgba(255, 255, 255, 0.6)
  );
  --gradient-card: linear-gradient(
    135deg,
    var(--primary, #ffb400),
    var(--primary1, #ff7b00)
  );
  --gradient-card-alt: linear-gradient(135deg, #2d9cdb, #845ef7);
  --gradient-surface: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.12),
    rgba(255, 255, 255, 0.78)
  );
  --surface: #ffffff;
  --text-strong: #1f2d3d;
  --text-muted: #5f6b7a;
  --radius-lg: 18px;
  --shadow-soft: 0 12px 40px rgba(17, 38, 146, 0.12);
}

/* =========================================================
   Blog pages refresh (list + detail)
   - Hero with soft gradient
   - Modern cards, sidebar, and toolbar
   ========================================================= */
.blog-hero {
  position: relative;
  padding: 32px 0 18px;
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.16),
    rgba(45, 156, 219, 0.1)
  );
  border-bottom: 1px solid #e8ecf2;
  overflow: hidden;
  margin-bottom: 6px;
}
.blog-hero .container {
  display: flex;
  justify-content: center;
}
.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.55),
    rgba(15, 23, 42, 0.22)
  );
  pointer-events: none;
}
.blog-hero__content {
  position: relative;
  max-width: 820px;
  color: #ffffff;
  text-align: center;
}
.blog-hero__content h2 {
  font-weight: 850;
  color: #ffffff;
  margin-bottom: 10px;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}
.blog-hero__content .subtext {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  margin-bottom: 0;
}
.blog-hero__content .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 36px;
  color: #ffe08a;
  margin-bottom: 6px;
}
.blog-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #5f6b7a;
  font-weight: 600;
  flex-wrap: wrap;
}
.blog-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.blog-meta i {
  color: #e17c00;
}
.blog-meta--hero {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.92);
}
.blog-meta--hero i {
  color: #ffe08a;
}

.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e8ecf2;
  border-radius: 14px;
  padding: 14px 20px;
  box-shadow: 0 10px 28px rgba(17, 38, 146, 0.08);
  margin-bottom: 18px;
}
.blog-toolbar__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.blog-toolbar__controls .filter-label {
  font-weight: 800;
  color: #1f2d3d;
  margin-right: 6px;
}
.blog-toolbar__controls .filter-show,
.blog-toolbar__controls .filter-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.blog-toolbar__search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  justify-content: flex-end;
}
.blog-search-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f9fafb;
  border: 1px solid #e6e9f0;
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 260px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.blog-search-input i {
  color: #e17c00;
}
.blog-search-input input {
  border: none;
  outline: none;
  background: transparent;
  font-weight: 700;
  color: #1f2d3d;
  width: 100%;
}
.blog-search-btn,
.blog-search-clear {
  border-radius: 12px;
  font-weight: 750;
  padding: 10px 14px;
  border: 1px solid #e6e9f0;
}
.blog-search-btn {
  background: linear-gradient(135deg, #ffb400, #ff8800);
  border: none;
  color: #1f2d3d;
  box-shadow: 0 10px 22px rgba(255, 152, 0, 0.25);
}
.blog-search-btn:hover {
  filter: brightness(0.95);
}
.blog-search-clear {
  background: #ffffff;
  color: #e03131;
  border-color: #f2d6d6;
}

.blog-page {
  background: transparent;
  padding-top: 10px;
  margin-top: -6px;
}

.blog-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(17, 38, 146, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(17, 38, 146, 0.12);
}
.blog-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f2f5fb;
}
.blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 750;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.blog-content {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.blog-title a {
  color: #1f2d3d;
  font-weight: 850;
  font-size: 18px;
  line-height: 1.35;
}
.blog-title a:hover {
  color: #e17c00;
}
.blog-desc {
  color: #5f6b7a;
  font-weight: 500;
  line-height: 1.55;
  margin: 0;
}
.blog-actions {
  margin-top: auto;
}
.blog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f5f7fb;
  color: #1f2d3d;
  font-weight: 750;
  border: 1px solid #e9edf3;
}
.blog-btn i {
  color: #e17c00;
}
.blog-btn:hover {
  background: linear-gradient(135deg, #ffb400, #ff8800);
  border-color: transparent;
  color: #1f2d3d;
  box-shadow: 0 10px 22px rgba(255, 152, 0, 0.22);
}

/* =========================================================
   Mail checker tool (tool-read-mail.php)
   ========================================================= */
.mailtool-page {
  padding-top: 8px;
}
/* Ẩn header cấp 1 (hc-top) khi ở trang tool-read-mail */
body:has(.mailtool-page) .header-compact .hc-top {
  display: none !important;
}
/* Ẩn mobile header cấp 1 khi ở trang tool-read-mail */
body:has(.mailtool-page) .mobile-header:first-of-type {
  display: none !important;
}
.mailtool-hero-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffe08a;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.6);
}
.mailtool-hero-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
  margin-bottom: 4px;
  text-shadow: 0 6px 18px rgba(15, 23, 42, 0.7);
}
.mailtool-hero-meta .fa-phone,
.mailtool-hero-meta .fa-envelope {
  font-size: 14px;
}
.mailtool-card {
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #eef2f7;
}
.mailtool-label {
  font-size: 14px;
  font-weight: 700;
  color: #1f2d3d;
}
.mailtool-mode-selector {
  margin-top: 4px;
}
.mailtool-mode-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.mailtool-mode-option input {
  display: none;
}
.mailtool-mode-option > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e4e7f0;
  font-size: 13px;
  font-weight: 600;
  color: #1f2d3d;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: background 160ms ease, box-shadow 160ms ease,
    border-color 160ms ease, transform 120ms ease;
}
.mailtool-mode-option i {
  color: var(--primary, #ffb400);
}
.mailtool-mode-option input:checked + span {
  background: linear-gradient(
    135deg,
    var(--primary, #ffb400),
    var(--primary1, #ff7b00)
  );
  color: #1f2d3d;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(255, 152, 0, 0.35);
}
.mailtool-mode-option input:checked + span i {
  color: #1f2d3d;
}
.mailtool-mode-option:hover > span {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.mailtool-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.mailtool-submit {
  border-radius: 999px;
}
.mailtool-result {
  margin-top: 10px;
}
.mailtool-result-header {
  border-bottom: 1px solid #edf0f6;
  padding-bottom: 10px;
  margin-bottom: 8px;
}
.mailtool-result-body {
  padding-top: 2px;
}
.mailtool-account-header {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e9f3;
  cursor: pointer;
}
.mailtool-account + .mailtool-account {
  margin-top: 6px;
}
.mailtool-toggle-icon {
  transition: transform 160ms ease;
}
.mailtool-toggle-icon.rotated {
  transform: rotate(180deg);
}
.mailtool-empty {
  color: #64748b;
}
.mailtool-table {
  margin-bottom: 0;
}
.mailtool-row-hidden {
  display: none;
}
.mailtool-table th {
  text-align: center;
  vertical-align: middle;
}
.mailtool-subject {
  font-weight: 600;
  color: #111827;
}
.mailtool-from {
  font-size: 13px;
  color: #4b5563;
}
.mailtool-code {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 12px;
  color: #0f172a;
}
.mailtool-copy {
  color: var(--primary, #ffb400);
}
.mailtool-copy:hover {
  color: var(--primary1, #ff7b00);
}
.mailtool-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: var(--primary, #ffb400);
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  min-width: 80px;
}
.mailtool-view-btn:hover {
  background: linear-gradient(
    135deg,
    var(--primary, #ffb400),
    var(--primary1, #ff7b00)
  );
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 180, 0, 0.3);
  transform: translateY(-1px);
}
.mailtool-view-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 180, 0, 0.25);
}
.mailtool-view-btn i {
  font-size: 14px;
}

/* Layout nâng cấp để khối form lớn, giống ảnh tham chiếu */
.mailtool-panel {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
  background: #ffffff;
  border: 1px solid #e6ebf5;
}
.mailtool-panel__head {
  background: linear-gradient(
    135deg,
    var(--primary, #ffb400),
    var(--primary1, #ff7b00)
  );
  padding: 12px 18px;
}
.mailtool-panel__head i {
  color: #fff;
}
.mailtool-panel__body {
  padding: 18px;
  background: #ffffff;
}
.mailtool-textarea {
  min-height: 200px;
  height: 200px;
  background: #ffffff !important;
  border-radius: 14px;
  font-weight: 650;
  border: 1px solid #d6deee;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.mailtool-textarea::placeholder {
  color: #9aa3b5;
  font-weight: 500;
}
.mailtool-textarea:focus {
  border-color: rgba(45, 156, 219, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(45, 156, 219, 0.12),
    0 10px 24px rgba(15, 23, 42, 0.08);
}
.mailtool-mode-option.pill-lg > span {
  padding: 10px 16px;
  font-size: 14px;
}
.mailtool-submit-lg {
  height: 52px;
  border-radius: 12px;
  font-size: 16px;
  letter-spacing: 0.2px;
  box-shadow: 0 14px 30px rgba(63, 81, 247, 0.28);
}

@media (max-width: 767.98px) {
  .mailtool-panel__body {
    padding: 14px;
  }
  .mailtool-panel__head {
    padding: 12px 14px;
  }
  .mailtool-textarea {
    min-height: 220px;
  }
}
@media (max-width: 767.98px) {
  .mailtool-card {
    border-radius: 14px;
  }
  .mailtool-account-header {
    padding: 10px;
  }
  .mailtool-table {
    font-size: 13px;
  }
}

.card-soft {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(17, 38, 146, 0.08);
  padding: 14px 16px 16px;
}

.blog-widget {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.blog-widget-title {
  font-weight: 850;
  font-size: 18px;
  margin-bottom: 14px;
  color: #1f2d3d;
}
.blog-widget-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.blog-widget-feed li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid #eef2f6;
  background: #ffffff;
  transition: background 140ms ease, transform 140ms ease,
    border-color 140ms ease;
}
.blog-widget-feed li:hover {
  background: #f8fafc;
  border-color: #e5e9f0;
  transform: translateX(2px);
}
.blog-widget-media {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #f2f5fb;
}
.blog-widget-media img {
  width: 100%;
  height: 68px;
  object-fit: cover;
}
.blog-widget-info {
  display: grid;
  gap: 4px;
}
.blog-widget-text a {
  color: #1f2d3d;
  font-weight: 750;
}
.blog-widget-text a:hover {
  color: #e17c00;
}
.blog-widget-meta {
  color: #5f6b7a;
  font-weight: 600;
  font-size: 13px;
}
.blog-widget-category {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blog-widget-category a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a !important;
  font-weight: 800;
  border: 1px solid #eef2f6;
  box-shadow: 0 10px 24px rgba(17, 38, 146, 0.06);
  transition: background 140ms ease, transform 140ms ease,
    border-color 140ms ease;
}
.blog-widget-category a:hover {
  background: #fff5e6;
  border-color: #f6d15f;
  transform: translateX(2px);
}
.blog-widget-category a span:first-child {
  color: #0f172a !important;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}
.blog-widget-category .badge.count {
  background: #ffe08a;
  color: #8a5500;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #f6d15f;
}

.blog-widget-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f9fafb;
  border: 1px solid #e6e9f0;
  border-radius: 12px;
  padding: 10px 12px;
}
.blog-widget-search i {
  color: #e17c00;
}
.blog-widget-search input {
  border: none;
  outline: none;
  background: transparent;
  font-weight: 700;
  color: #1f2d3d;
  width: 100%;
}
.blog-widget-search .btn {
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 750;
}

.blog-article {
  padding: 18px 18px 12px;
  line-height: 1.65;
  color: #1f2d3d;
}
.blog-article img {
  max-width: 100%;
  border-radius: 12px;
  margin: 12px 0;
}

@media (max-width: 991px) {
  .blog-toolbar__controls {
    width: 100%;
  }
  .blog-toolbar__search {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .blog-search-input {
    flex: 1;
  }
  .blog-search-btn,
  .blog-search-clear {
    padding: 9px 12px;
  }
}
@media (max-width: 575px) {
  .blog-toolbar {
    padding: 12px 12px;
  }
  .blog-toolbar__controls {
    flex-direction: column;
    align-items: flex-start;
  }
  .blog-toolbar__controls .filter-show,
  .blog-toolbar__controls .filter-action {
    width: 100%;
  }
  .blog-search-input {
    min-width: 100%;
  }
}
body {
  background: #f6f7fb;
  color: var(--text-strong);
}

/* ==============================
   Client filter (table pages)
   - Make inputs/selects look enabled (white background)
   - Make Search / Clear buttons visually distinct
   - Keep selects consistent with homepage "pill" style
   ============================== */
.account-card .form-control,
.account-card .form-select,
.account-card .js-flatpickr.form-control {
  background: #ffffff !important;
  color: var(--text-strong) !important;
  border: 1px solid #e5e8ee !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.account-card .form-control::placeholder {
  color: #9aa3b2 !important;
}
.account-card .form-control:focus,
.account-card .form-select:focus {
  border-color: rgba(45, 156, 219, 0.55) !important;
  box-shadow: 0 0 0 0.2rem rgba(45, 156, 219, 0.12) !important;
}

/* Old template sets filter selects to transparent => looks disabled */
.top-filter .filter-select {
  background: #ffffff !important;
  border: 1px solid #e5e8ee !important;
  border-radius: 10px !important;
  height: 42px !important;
  padding: 0 12px !important;
  font-weight: 700 !important;
  color: #1f2d3d !important;
}

/* NiceSelect: make filter selects match header dropdown (pill + white menu) */
.top-filter .nice-select.filter-select,
.top-filter .nice-select {
  height: 42px !important;
  line-height: 40px !important;
  background: #ffffff !important;
  border: 1px solid #e5e8ee !important;
  border-radius: 12px !important;
  padding-left: 12px !important;
  padding-right: 36px !important;
  font-weight: 800 !important;
  color: #1f2d3d !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}
.top-filter .nice-select::after {
  border-bottom: 2px solid #e17c00 !important;
  border-right: 2px solid #e17c00 !important;
  height: 7px !important;
  width: 7px !important;
  right: 14px !important;
  margin-top: -5px !important;
}
.top-filter .nice-select .current {
  font-weight: 800 !important;
}
.top-filter .nice-select .list {
  border-radius: 14px !important;
  border: 1px solid #e5e8ee !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18) !important;
  padding: 6px !important;
}
.top-filter .nice-select .option {
  border-radius: 10px !important;
  font-weight: 700 !important;
  min-height: 38px !important;
  line-height: 38px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}
.top-filter .nice-select .option.selected,
.top-filter .nice-select .option.selected.focus,
.top-filter .nice-select .option.focus,
.top-filter .nice-select .option:hover {
  background: rgba(45, 156, 219, 0.1) !important;
}

/* Buttons in filter row */
.shop-widget-btn {
  border: 1px solid #e5e8ee !important;
  background: #ffffff !important;
  color: #1f2d3d !important;
}
.shop-widget-btn.shop-widget-btn--primary {
  background: #2d9cdb !important;
  border-color: #2d9cdb !important;
  color: #ffffff !important;
}
.shop-widget-btn.shop-widget-btn--primary:hover {
  background: #2188c4 !important;
  border-color: #2188c4 !important;
  color: #ffffff !important;
}
.shop-widget-btn.shop-widget-btn--danger {
  background: #e03131 !important;
  border-color: #e03131 !important;
  color: #ffffff !important;
}
.shop-widget-btn.shop-widget-btn--danger:hover {
  background: #c92a2a !important;
  border-color: #c92a2a !important;
  color: #ffffff !important;
}
.shop-widget-btn.shop-widget-btn--primary i,
.shop-widget-btn.shop-widget-btn--danger i {
  color: currentColor !important;
}

/* Header/Home dropdown arrow smooth rotation (match nice-select feel) */
.hc-pill .fa-chevron-down,
.hc-nav-btn .fa-chevron-down {
  transition: transform 180ms ease, color 180ms ease;
  transform-origin: 50% 50%;
}
.hc-nav-dropdown.is-open .fa-chevron-down,
.hc-user.is-open .fa-chevron-down {
  transform: rotate(180deg);
}

/* Product toolbar */
.product-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}
.product-toolbar .pt-left {
  flex: 1;
}
.product-toolbar .pt-search {
  min-width: 100%;
}
.product-toolbar .pt-search input:disabled {
  background: #f8fafc;
  color: #9ca3af;
}

@media (max-width: 767px) {
  .product-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .product-toolbar .pt-left {
    display: none;
  }
  .product-toolbar .pt-right {
    width: 100%;
  }
  .product-toolbar .pt-sort {
    width: 100%;
    justify-content: space-between;
  }
  .product-toolbar .hc-nav-dropdown.pt-sort-dd {
    width: 100%;
  }
  .product-toolbar .hc-mini-pill {
    width: 100%;
    justify-content: space-between;
  }
}

/* Sticky search pill (mobile) */
.product-search-sticky {
  display: none;
}
.ps-trigger {
  width: 100%;
  border: 1px solid #e5e8ee;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 26px rgba(17, 38, 146, 0.08);
  font-weight: 750;
  color: #1f2d3d;
}
.ps-trigger i {
  color: #e17c00;
}
.ps-panel {
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #e5e8ee;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 14px 32px rgba(17, 38, 146, 0.12);
  display: none;
}
.ps-panel.show {
  display: block;
}
.ps-input {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-input input {
  flex: 1;
  border: none;
  outline: none;
  font-weight: 700;
  color: #1f2d3d;
}
.ps-clear,
.ps-close {
  border: none;
  background: #f4f6fb;
  color: #6b7280;
  border-radius: 10px;
  padding: 8px 10px;
}
.ps-clear i,
.ps-close i {
  color: inherit;
}

@media (min-width: 992px) {
  .custom-button-list .btn-category-home {
    width: auto;
  }
}
.pt-search,
.pt-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e5e8ee;
  border-radius: 12px;
  padding: 6px 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.pt-search {
  min-width: 420px;
  min-height: 46px;
}
.pt-search input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  background: transparent;
}

/* Compact toolbar on small screens to reduce scroll */
@media (max-width: 575px) {
  .pt-search,
  .pt-sort {
    padding: 7px 9px;
    border-radius: 12px;
  }
  .pt-search input {
    font-size: 14px;
    font-weight: 650;
  }
  .pt-sort .hc-mini-pill {
    padding: 7px 9px;
    border-radius: 12px;
  }
}
.pt-clear {
  border: none;
  background: #f4f6fb;
  color: #6b7280;
  padding: 7px 9px;
  border-radius: 10px;
}
.pt-sort select {
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 700;
  background: transparent;
  color: var(--text-strong);
}

/* Sort dropdown should look like Recharge dropdown (not native select) */
.pt-sort .hc-nav-dropdown {
  position: relative;
}

/* ---------- API docs & product tabs fixes ---------- */
.account-card .api-key-wrap {
  flex-wrap: wrap;
  gap: 8px;
}
.account-card .api-key-text,
.product-details-frame .copy,
.product-details-frame #api_key_form {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.account-card .input-group,
.product-details-frame .input-group {
  flex-wrap: wrap;
}
.account-card .input-group input,
.product-details-frame .input-group input {
  min-width: 0;
  flex: 1 1 220px;
}
.api-key-inline {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.product-tabs li {
  flex: 1 1 auto;
}
.product-tabs .tab-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e8ee;
  font-weight: 800;
  color: var(--text-strong);
}
.product-tabs .tab-link.active {
  background: linear-gradient(120deg, #ffd54f, #ff9800);
  color: #0f172a;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(255, 152, 0, 0.18);
}
.product-tab-content .tab-pane {
  width: 100%;
  overflow: hidden;
}
.pt-sort .hc-mini-pill {
  padding: 8px 11px;
  background: #ffffff;
  color: #1f2d3d;
  font-weight: 700;
  border: 1px solid #e5e8ee;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  gap: 8px;
}
.pt-sort .hc-mini-pill i {
  color: #e17c00;
  font-size: 14px;
}
.pt-sort .hc-nav-menu {
  min-width: 240px;
  right: 0;
  left: auto;
}
.pt-sort .hc-mini-pill:hover,
.pt-sort .hc-mini-pill:focus {
  background: #f6f8fb;
  border-color: #d8dde6;
  text-decoration: none;
}

@media (max-width: 991px) {
  .product-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .pt-search {
    min-width: 100%;
  }
}

/* Empty state */
.empty-state {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.empty-state .empty-icon {
  font-size: 28px;
  color: #9ca3af;
  margin-bottom: 8px;
}
.empty-state .empty-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-strong);
}
.empty-state .empty-sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Skeleton rows (LIST-friendly) */
.skeleton-container .skeleton-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 120px 140px 140px;
  column-gap: 16px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #f1f2f6;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.skeleton-container .sk {
  border-radius: 10px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease-in-out infinite;
}
.skeleton-container .sk-id {
  height: 16px;
  width: 50px;
}
.skeleton-container .sk-info .sk-title {
  height: 16px;
  width: 40%;
  margin-bottom: 8px;
}
.skeleton-container .sk-info .sk-text {
  height: 14px;
  width: 70%;
}
.skeleton-container .sk-stock {
  height: 16px;
  width: 60px;
}
.skeleton-container .sk-price {
  height: 16px;
  width: 80px;
}
.skeleton-container .sk-btn {
  height: 34px;
  width: 90px;
  justify-self: end;
  border-radius: 999px;
}

@keyframes sk {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* Override global font to match reference layout */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.header-part,
.navbar-part {
  display: none !important;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 1110;
  background: #f5f7fb;
  padding: 8px 0px 0px;
  display: none;
  overflow: visible;
}

/* Ẩn header cấp 1 mobile (.mh-row-selects) khi scroll */
.mobile-header .mh-row-selects {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s ease-in-out;
}

.mobile-header .mh-row-selects.header-top-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  margin-bottom: 0;
  height: 0;
  overflow: hidden;
}

/* Sidebar overlay above mobile header */
.nav-sidebar {
  z-index: 1300 !important;
  top: 0 !important;
}
.backdrop {
  z-index: 1290 !important;
}

/* Transparent overlay riêng cho sidebar mobile (sản phẩm / nạp tiền) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1390;
  background: transparent;
  display: none;
}
.sidebar-overlay.show {
  display: block;
}
.mobile-header .mh-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mh-row-selects {
  margin-bottom: 6px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.mh-row-selects .hc-nav-dropdown {
  flex: 1;
  min-width: 46%;
}
.mh-row-selects .hc-mini-pill {
  width: 100%;
  justify-content: space-between;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid #e9eef5;
  box-shadow: 0 10px 26px rgba(17, 38, 146, 0.08);
}
.mh-row-main {
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1120;
  background: #f5f7fb;
  padding: 6px 10px 8px;
  box-shadow: 0 8px 22px rgba(17, 38, 146, 0.08);
}
.mh-menu-btn {
  border: none;
  background: #ffe08a;
  color: #8a5500;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 8px 22px rgba(255, 193, 7, 0.28);
}
.mh-search-btn {
  border: none;
  background: #f5f7fb;
  color: #1f2d3d;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 8px 18px rgba(17, 38, 146, 0.08);
}
.mh-search-btn i {
  color: #e17c00;
}
.mh-search-btn.is-open {
  background: #ffe08a;
  color: #8a5500;
}
.mh-search-btn.is-open i {
  color: #8a5500;
}
.mh-logo img {
  height: 42px;
}
.mh-spacer {
  width: 44px;
}

.mh-search-panel {
  margin-top: 10px;
  display: none;
}
.mh-search-panel.show {
  display: block;
}
.mh-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 2px solid #3b82f6;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 12px 28px rgba(17, 38, 146, 0.12);
}
.mh-search-inner input {
  flex: 1;
  border: none;
  outline: none;
  font-weight: 700;
  color: #1f2d3d;
}
.mh-search-clear {
  border: none;
  background: transparent;
  color: #6b7280;
}
.mh-search-close {
  border: none;
  background: transparent;
  color: #6b7280;
}
.mh-search-inner i {
  color: #3b82f6;
}

.header-compact {
  position: sticky;
  top: 0;
  z-index: 1040;
  background: #f5f7fb;
  padding: 8px 0 0px;
  margin-bottom: 12px;
  border-radius: 14px;
  transition: padding-top 0.3s ease-in-out;
}

/* Khi header cấp 1 ẩn, giảm padding-top và điều chỉnh border-radius để header cấp 2 sát lề trên */
.header-compact:has(.hc-top.header-top-hidden) {
  padding-top: 0;
  border-radius: 14px 14px 14px 14px;
}

/* Ẩn header cấp 1 (.hc-top) khi scroll */
.hc-top {
  transition: transform 0.25s ease-out, opacity 0.25s ease-out, margin 0.25s ease-out;
  will-change: transform, opacity; /* Tối ưu performance */
}

.hc-top.header-top-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  margin-bottom: 0;
  height: 0;
  overflow: hidden;
}
.hc-top {
  border-radius: 18px;
}
.hc-nav {
  border-radius: 14px;
}

/* Language/Currency selects in header */
.hc-selects .hc-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e9eef5;
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 10px 26px rgba(17, 38, 146, 0.08);
}
.hc-selects .hc-select i {
  color: #e17c00;
}
.hc-selects select.select {
  border: none;
  background: transparent;
  font-weight: 700;
  color: #1f2d3d;
  padding-right: 6px;
}

/* Make header language/currency consistent with other dropdowns (like Recharge) */
.hc-mini .hc-mini-pill {
  padding: 7px 10px;
  background: #ffffff;
  color: #1f2d3d;
  font-weight: 800;
  border: 1px solid #e9eef5;
  box-shadow: 0 10px 26px rgba(17, 38, 146, 0.08);
}
.hc-mini .hc-mini-pill i {
  color: #e17c00;
}
.hc-mini .hc-nav-menu {
  min-width: 180px;
}
.hc-hidden-select {
  position: absolute !important;
  left: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.hc-top {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 6px 18px;
  /* Tạo stacking context riêng cho header top để dropdown nằm trên thanh nav bên dưới */
  position: relative;
  z-index: 2;
}
.hc-logo img {
  height: 48px;
}
.hc-center .hc-pill,
.hc-right .hc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #ffe08a;
  border-radius: 14px;
  color: #8a5500;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(255, 193, 7, 0.35);
}

/* Ensure language/currency pills stay WHITE (not yellow) */
.hc-right .hc-mini .hc-mini-pill {
  background: #ffffff !important;
  color: #1f2d3d !important;
  border: 1px solid #e9eef5 !important;
  box-shadow: 0 10px 26px rgba(17, 38, 146, 0.08) !important;
}
.hc-right .hc-mini .hc-mini-pill i {
  color: #e17c00 !important;
}
.hc-center .hc-pill i,
.hc-right .hc-pill i {
  color: #8a5500;
}
.hc-balance {
  font-weight: 700;
  color: var(--text-strong);
}
.hc-nav {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin-top: 10px;
  padding: 6px 8px;
  transition: margin-top 0.3s ease-in-out, border-radius 0.3s ease-in-out;
  /* Đảm bảo nav thứ 2 luôn nằm dưới dropdown của header top */
  position: relative;
  z-index: 1;
}

/* Khi header cấp 1 ẩn, header cấp 2 sát lề trên */
.header-compact:has(.hc-top.header-top-hidden) .hc-nav {
  margin-top: 0;
  border-radius: 14px 14px 14px 14px;
}
.hc-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e17c00;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
}
.hc-nav-item:hover {
  background: #ffe08a;
  color: #8a5500;
  text-decoration: none;
}
.hc-nav-item:hover i {
  color: #8a5500;
}
.hc-nav-btn:hover {
  background: #ffe08a;
  color: #8a5500;
}
.hc-nav-btn:hover i {
  color: #8a5500;
}

.hc-nav-dropdown {
  position: relative;
}
.hc-nav-menu {
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
  padding: 8px;
  /* Animate like nice-select: don't use display none/block */
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease,
    visibility 0ms linear 180ms;
  z-index: 1060;
}
.hc-nav-menu.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease,
    visibility 0ms linear 0ms;
}
.hc-nav-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-strong);
  font-weight: 600;
}
.hc-nav-menu a:hover {
  background: #f8fbff;
  text-decoration: none;
}
.hc-nav-btn {
  border: none;
  background: transparent;
}

/* Mobile stacking for compact header */
@media (max-width: 768px) {
  .mobile-header {
    display: block;
  }
  .header-compact {
    display: none;
  }
}

/* Product overlay */
.po-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.po-backdrop.show {
  opacity: 1;
  pointer-events: all;
}
.po-panel {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 94vw);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.po-head {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f2f6;
  background: #fffaf0;
}
.po-close {
  border: none;
  background: transparent;
  font-size: 20px;
}
.po-body {
  padding: 16px 18px 22px;
  max-height: 70vh;
  overflow-y: auto;
}
.po-grid .row {
  margin: 0;
}
.po-grid .col-4 {
  margin-bottom: 16px;
}
.po-grid .megamenu-wrap {
  background: #f8fbff;
  border-radius: 14px;
  padding: 12px;
  height: 100%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef2f7;
}
.po-grid .megamenu-title {
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 10px;
  font-size: 16px;
}
.po-grid .megamenu-list li {
  margin-bottom: 8px;
}
.po-grid .megamenu-list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-weight: 600;
}
.po-grid .megamenu-list img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.po-skeleton {
  padding: 12px 4px;
}
.po-skeleton-line {
  height: 12px;
  background: #eceff4;
  border-radius: 6px;
  margin-bottom: 10px;
}
.po-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.po-skeleton-box {
  height: 90px;
  background: #f3f5f9;
  border-radius: 10px;
}
.po-lock {
  overflow: hidden;
}

.header-top {
  display: none;
}

.header-part {
  padding: 12px 0;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border-radius: 16px;
  margin: 16px auto;
}

.header-content {
  align-items: center;
  gap: 12px;
}

.header-logo img {
  max-height: 58px;
}

.header-form {
  flex: 1;
  background: #f4f6fb;
  border-radius: 14px;
  padding: 0 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.header-form input {
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--text-strong);
}

.header-form button {
  background: var(--gradient-card);
  border: none;
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.header-widget-group .header-widget,
.header-widget-group .header-cart {
  background: #f4f6fb;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.navbar-part {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin-top: 6px;
}

.navbar-content {
  align-items: center;
}

.navbar-list .navbar-link {
  font-weight: 600;
  padding: 14px 16px;
}

.navbar-link.dropdown-arrow::after {
  opacity: 0.5;
}

.hero-banner {
  margin-top: 8px;
  padding: 24px;
  background: var(--gradient-hero);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  right: 40px;
  bottom: -30px;
  width: 220px;
  height: 220px;
  background: var(--gradient-card);
  filter: blur(60px);
  opacity: 0.45;
}

.hero-text h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-strong);
}

.hero-text p {
  color: var(--text-muted);
  font-size: 16px;
  margin: 14px 0 22px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient-card);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(255, 193, 7, 0.3);
  font-weight: 700;
}

.hero-illus img {
  max-width: 360px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

.all-product-main .box-product-main {
  border-radius: 18px;
  padding: 18px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
}

.box-text-style div:first-child {
  font-size: 18px;
  font-weight: 800;
}

.custom-button-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  padding: 0;
  width: 100%;
}

.custom-button-list .btn-category-home {
  border-radius: 12px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--text-strong);
  border: 1px solid #e9eef5;
  box-shadow: 0 10px 26px rgba(17, 38, 146, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease,
    color 0.12s ease;
  width: 100%;
}

.custom-button-list .btn-category-home.active {
  background: var(--gradient-card);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.custom-button-list .btn-category-home:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(17, 38, 146, 0.12);
  border-color: rgba(0, 0, 0, 0.02);
}

.custom-button-list .btn-category-home img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 6px;
  background: #f4f6fb;
  padding: 2px;
}

.custom-button-list .btn-category-home.active img {
  background: rgba(255, 255, 255, 0.22);
}

/* Category bar container (nổi bật hơn) */
#home-categories-container {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.55)
  );
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 6px 12px;
  box-shadow: 0 16px 40px rgba(17, 38, 146, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@media (max-width: 768px) {
  .ul.custom-button-list {
    padding: 0 !important;
  }
  #home-categories-container {
    padding: 0 !important;
  }
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 18px;
  box-shadow: var(--shadow-soft);
}

/* Product card (mobile tidy) */
.product-card__top .product-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e5e8ee;
  border-radius: 12px;
  padding: 6px 10px;
  font-weight: 700;
  color: #1f2d3d;
}
.product-card__price .price-old {
  color: #9ca3af;
  font-weight: 600;
  font-size: 14px;
}
.product-card__price .price-new {
  color: #15803d;
  font-weight: 800;
  font-size: 18px;
}
.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 600;
  color: #475569;
}
.product-card__meta .off {
  color: #e03131;
  font-weight: 800;
}
.product-card__actions .product-card__id {
  color: #64748b;
  font-weight: 700;
}

.feature-name a {
  color: var(--text-strong);
  font-weight: 800;
}

.feature-desc {
  color: var(--text-muted);
  margin: 4px 0 10px;
}

.card-price-product-list h5 {
  color: #e53935;
  font-weight: 800;
}
.card-price-product-list .feature-price span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid rgba(236, 72, 153, 0.35);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.btn-buy {
  width: 100%;
  margin-top: 10px;
  background: var(--gradient-card);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255, 193, 7, 0.28);
}

/* Nút chi tiết trong card sản phẩm – canh hàng với MUA NGAY */
.btn-more {
  width: 100%;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-weight: 700;
  color: var(--text-strong);
}
.btn-more span {
  display: block;
  text-align: center;
}

/* LIST layout - bảng sản phẩm dạng hàng */
.product-list-table {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  padding: 0;
}

/* Mobile LIST: keep desktop table unchanged, but show a clean "category title + cards" on mobile */
.plt-mobile-head {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--plt-head-bg, linear-gradient(120deg, #6aaef5, #7dd3fc));
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(17, 38, 146, 0.14);
  margin: 8px 0 10px;
  color: #0f172a;
  font-weight: 900;
}
.plt-mobile-head .plt-mobile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}
.plt-mobile-head .plt-mobile-title {
  color: #0f172a;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-list-table .plt-meta-mobile {
  display: none;
  margin-top: 8px;
  color: #475569;
  font-weight: 650;
  gap: 10px;
  flex-wrap: wrap;
}
.product-list-table .plt-meta-mobile b {
  color: #0f172a;
  font-weight: 900;
}
.product-list-table .plt-meta-mobile .label-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 800;
}
.product-list-table .plt-meta-mobile .label-text.feat {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid #2563eb;
  color: #0b1f52;
}
.product-list-table .plt-meta-mobile .label-text.rate {
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid #d97706;
  color: #5c2d00;
}

@media (max-width: 991px) {
  .plt-mobile-head {
    display: flex;
  }
  .product-list-table {
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  .product-list-table .plt-header {
    display: none;
  }
  .product-list-table .plt-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
    border-radius: 16px;
    margin: 10px 0;
    border: 1px solid #eef2f6;
    box-shadow: 0 12px 28px rgba(17, 38, 146, 0.08);
    padding: 14px 14px;
  }
  .product-list-table .plt-id,
  .product-list-table .plt-stock {
    display: none;
  }
  .product-list-table .plt-desc {
    display: none;
  }
  .product-list-table .plt-meta-mobile {
    display: flex;
  }
  .product-list-table .plt-price {
    text-align: center;
  }
  .product-list-table .plt-price span {
    font-size: 18px;
    width: 100%;
    justify-content: center;
  }
  .product-list-table .plt-action .btn {
    width: 100%;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
  }
}
.product-list-table .plt-header {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 120px 140px 140px;
  background: linear-gradient(120deg, #ffc107, #ff9800);
  color: #3b3b3b;
  font-weight: 800;
  font-size: 17px;
  padding: 6px 22px;
  align-items: center;
  column-gap: 16px;
  position: sticky;
  z-index: 6;
}
.product-list-table .plt-header .plt-info {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.product-list-table .plt-header .plt-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}
.product-list-table .plt-header .plt-cat-name {
  font-weight: 800;
  color: #1f2d3d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-list-table .plt-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 120px 140px 140px;
  padding: 12px 22px;
  column-gap: 16px;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #f1f2f5;
}
.product-list-table .plt-row:nth-child(even) {
  background: #fafbff;
}
.product-list-table .plt-cell {
  font-size: 17px;
  line-height: 1.45;
}
.product-list-table .plt-id {
  font-weight: 700;
}
.product-list-table .plt-info .plt-name a {
  font-weight: 700;
  color: var(--text-strong);
  font-size: 16px;
  line-height: 1.4;
  display: block;
  margin-bottom: 4px;
}
.product-list-table .plt-info .plt-name a:hover {
  color: #e17c00;
  text-decoration: none;
}
.product-list-table .plt-info .plt-desc {
  color: #6b7280;
  margin-top: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  /* Giới hạn 1 dòng với ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.product-list-table .plt-stock {
  font-weight: 700;
  font-size: 18px;
  color: #6b21a8;
  background: #e9d5ff;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  min-width: 80px;
  text-align: center;
}

/* Trên mobile: ẩn hoàn toàn hàng kho (ô tím) trong layout LIST */
@media (max-width: 991px) {
  .product-list-table .plt-stock {
    display: none !important;
  }
}
.product-list-table .plt-price {
  font-weight: 600;
  color: #0f5132;
  letter-spacing: 0.05px;
  font-variant-numeric: tabular-nums;
}
.product-list-table .plt-price del {
  display: none;
}
.product-list-table .plt-price span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  background: linear-gradient(120deg, #34d399, #16a34a);
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.1;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.22);
  border: 1px solid rgba(6, 95, 70, 0.15);
}
.product-list-table .plt-price .discount-badge {
  display: none;
}

/* Hover & focus để UX rõ ràng hơn */
.product-list-table .plt-row:hover {
  background: linear-gradient(90deg, #ffffff, #fdf4ff);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

/* Tools cards polish */
.all-product-main .box-product-main {
  border-radius: 16px;
  padding: 18px 18px;
  min-height: 92px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  background-size: cover;
  background-position: center;
}
.all-product-main .box-product-main:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14) !important;
}
.all-product-main .box-img-product {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  flex: 0 0 auto;
}
.all-product-main .box-text-style div:first-child {
  letter-spacing: 0.1px;
}
.product-list-table .plt-action {
  text-align: right;
}
.product-list-table .plt-action .btn {
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  padding: 8px 24px;
  background: #ffc107;
  border-color: #ffc107;
  color: #4b2d00;
  box-shadow: 0 6px 16px rgba(255, 193, 7, 0.45);
}

@media (max-width: 991px) {
  .product-list-table .plt-header {
    display: none;
  }
  .product-list-table .plt-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
    border-radius: 16px;
    margin: 10px 0;
    border: 1px solid #eef2f6;
    box-shadow: 0 12px 28px rgba(17, 38, 146, 0.08);
    padding: 14px 14px;
  }
  .product-list-table .plt-cell {
    text-align: left;
  }
  .product-list-table .plt-action {
    text-align: left;
  }
  .product-list-table .plt-id {
    order: 1;
    font-weight: 800;
    color: #64748b;
    font-size: 14px;
  }
  .product-list-table .plt-info {
    order: 2;
  }
  .product-list-table .plt-info .plt-cat {
    margin-bottom: 6px;
  }
  .product-list-table .plt-info .plt-cat .plt-cat-pill {
    background: #f8fafc;
    border: 1px solid #e5e8ee;
    color: #1f2d3d;
    font-weight: 800;
  }
  .product-list-table .plt-stock {
    order: 3;
    font-weight: 700;
    color: #6b21a8;
    background: #e9d5ff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 16px;
  }
  .product-list-table .plt-price {
    order: 4;
  }
  .product-list-table .plt-action {
    order: 5;
  }
  .product-list-table .plt-action .btn {
    width: 100%;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
  }
}

.home-heading h3 {
  font-weight: 800;
  color: var(--text-strong);
}

.account-card.card-wallet-home {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.wallet-card {
  background: #f9fafc;
  border-radius: 12px;
  padding: 12px;
}

.mobile-menu {
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
  border-radius: 16px 16px 0 0;
}

@media (max-width: 991px) {
  .hero-banner {
    text-align: center;
  }
  .hero-illus {
    margin-top: 18px;
  }
  .header-part {
    padding: 10px 0;
  }
}

/* Modern modal */
.modal-backdrop.show {
  opacity: 0.35 !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-dialog {
  width: min(1040px, 96vw);
  max-width: 1040px;
  margin: 26px auto;
}
.modal-content {
  background: #ffffff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  /* allow close button to sit inside without being clipped */
  overflow: hidden;
  position: relative;
}
/* Ensure close button is visible (was clipped by rounded modal) */
.modal-close {
  top: 10px !important;
  right: 10px !important;
  z-index: 20 !important;
}
.modal-close:hover {
  background: var(--primary) !important;
}

/* Modal product view polish (giữ layout gốc nhưng gọn & hiện đại hơn) */
.product-view {
  border-radius: 16px;
  overflow: hidden;
}
.product-view .view-details {
  margin: 18px !important;
}
.product-view .table {
  border-radius: 12px;
  overflow: hidden;
}
.product-view .table td {
  vertical-align: middle;
}

/* Money emphasis: mọi số tiền trong modal phải nổi bật */
.product-view .view-price span {
  font-size: 28px;
  font-weight: 900;
  color: #16a34a !important;
}
.product-view .view-price del {
  font-size: 16px;
  font-weight: 800;
  color: #ef4444;
}
.product-view .text-wallet,
.product-view #into_money,
.product-view #into_price_vat,
.product-view #into_pay {
  font-size: 18px;
  font-weight: 900;
}
.product-view #into_pay {
  font-size: 20px;
}
.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f2f6;
  align-items: center;
}
.modal-title {
  font-weight: 800;
  color: var(--text-strong);
  font-size: 18px;
}
.modal-body {
  padding: 16px 18px 14px;
  color: var(--text-muted);
  line-height: 1.55;
  font-weight: 500;
}
.modal-body strong {
  color: var(--text-strong);
}
.modal-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid #f1f2f6;
  gap: 8px;
}
.modal-footer .btn {
  border-radius: 10px;
  font-weight: 700;
  padding: 10px 14px;
}
.modal-footer .btn-primary {
  background: linear-gradient(135deg, #ffb400, #ff8800);
  border: none;
  box-shadow: 0 8px 20px rgba(255, 152, 0, 0.35);
}
.modal-footer .btn-secondary,
.modal-footer .btn-outline-secondary {
  background: #f4f6fb;
  color: var(--text-strong);
  border: 1px solid #e8ecf2;
}
.btn-close {
  filter: invert(50%);
  opacity: 0.6;
}
.btn-close:hover {
  opacity: 1;
}

/* Footer clean layout */
.footer-modern {
  background: #f5f7fb;
  margin-top: 32px;
  border-top: 1px solid #e2e6ed;
  padding: 24px 0;
}
.footer-modern .footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}
.footer-modern .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: flex-start;
}
.footer-modern .footer-logo img {
  height: 68px;
  width: auto;
  max-width: 100%;
  margin-bottom: 12px;
}
.footer-modern .footer-desc {
  color: #5f6b7a;
  font-size: 14px;
  line-height: 1.55;
}
.footer-modern .footer-title {
  font-size: 16px;
  font-weight: 800;
  color: #1f2d3d;
  margin-bottom: 12px;
}
.footer-modern .footer-contact li,
.footer-modern .footer-links li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5f6b7a;
  font-size: 14px;
  margin-bottom: 8px;
}
.footer-modern .footer-contact i {
  color: #e17c00;
  width: 18px;
  text-align: center;
}
.footer-modern .footer-links a {
  color: #5f6b7a;
  font-weight: 600;
}
.footer-modern .footer-links a:hover {
  color: #e17c00;
}
/* override default grid gap for footer links */
.footer-modern .footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 4px;
}

@media (max-width: 576px) {
  .footer-modern {
    padding: 20px 0;
  }
  .footer-modern .footer-inner {
    padding: 0 12px;
  }
}
