:root {
  --bg: #fbf3ec;
  --surface: #ffffff;
  --ink: #4a332a;
  --ink-soft: #9b8377;
  --brand: #6b4a3a;
  --brand-dark: #4a332a;
  --accent: #de8b87;
  --accent-soft: #fbe0dc;
  --line: #efddd3;
  --success: #7a9e7e;
  --warn: #d9a05b;
  --danger: #c97064;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  line-height: 1.5;
}
h1,
h2,
h3,
.brand-name {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  line-height: 1.2;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
}
button,
select,
input,
textarea {
  font-family: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.hidden {
  display: none !important;
}

/* ---------- Header (trang khách hàng) ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 243, 236, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand img {
  height: 40px;
  width: 40px;
  object-fit: contain;
}
.brand-name {
  font-weight: 700;
  font-size: 18px;
}
.brand-name span {
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 26px;
  font-size: 14.5px;
  flex: 1;
}
.nav-links button {
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links button.active {
  color: var(--ink);
  border-color: var(--accent);
}

.search-box {
  flex: 1;
  max-width: 380px;
  position: relative;
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 30px;
  padding: 4px 6px;
  border: 1.5px solid transparent;
  transition: all 0.25s ease;
}

.search-box:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(255, 87, 34, 0.12);
}

.search-box svg {
  position: absolute;
  left: 16px;
  color: #6b7280;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 8px 16px 8px 42px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn:hover {
  background: var(--accent-soft, #fff2e8);
  color: var(--brand, #ff5722);
  border-color: #ffd591;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.15);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8px;
  transition: transform 0.2s ease;
}

.icon-btn:hover svg {
  transform: scale(1.08);
}

.icon-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger, #ff4d4f);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(255, 77, 79, 0.3);
  transform: scale(1);
  transition: transform 0.2s ease;
}

.icon-btn .badge:not(:empty) {
  animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
  0% {
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.page-head {
  padding: 40px 0 8px;
}
.page-head h1 {
  font-size: 28px;
  font-weight: 600;
}
.page-head p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-top: 6px;
}

.filter-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 20px 0 28px;
}
.chip {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 60px;
}
@media (max-width: 920px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.product-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.product-thumb {
  aspect-ratio: 1/1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.product-thumb svg {
  width: 42%;
  height: 42%;
  color: var(--brand);
  opacity: 0.85;
}
.wish-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wish-btn svg {
  width: 16px;
  height: 16px;
  color: var(--ink-soft);
}
.wish-btn.active svg {
  color: var(--accent);
  fill: var(--accent);
}
.product-info {
  padding: 14px 16px 18px;
}
.product-info .tag {
  font-size: 12px;
  color: var(--ink-soft);
}
.product-info h3 {
  font-size: 15px;
  font-weight: 500;
  margin-top: 3px;
  cursor: pointer;
}
.product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.price {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--brand-dark);
}
.add-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.add-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.add-btn svg {
  width: 15px;
  height: 15px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
}
.btn-primary:hover {
  background: var(--brand-dark);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
}

.pd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  padding: 36px 0 70px;
}
@media (max-width: 820px) {
  .pd-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
.pd-image {
  aspect-ratio: 1/1;
  background: var(--accent-soft);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-image svg {
  width: 38%;
  height: 38%;
  color: var(--brand);
}
.pd-tag {
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
}
.pd-title {
  font-size: 28px;
  font-weight: 700;
  margin-top: 10px;
}
.pd-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-top: 14px;
}
.pd-desc {
  color: var(--ink-soft);
  font-size: 15px;
  margin-top: 16px;
  max-width: 46ch;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.qty-control button {
  width: 36px;
  height: 40px;
  font-size: 16px;
}
.qty-control span {
  width: 36px;
  text-align: center;
  font-weight: 600;
}
.pd-ctas {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  padding: 36px 0 70px;
  align-items: start;
}
@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}
.cart-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.cart-thumb svg {
  width: 55%;
  height: 55%;
  color: var(--brand);
}
.cart-item-info {
  flex: 1;
}
.cart-item-info h4 {
  font-size: 14.5px;
  font-weight: 500;
}
.cart-item-info .tag {
  font-size: 12px;
  color: var(--ink-soft);
}
.cart-item-price {
  font-weight: 700;
  font-size: 14.5px;
  width: 90px;
  text-align: right;
}
.remove-btn {
  width: 28px;
  height: 28px;
  color: var(--ink-soft);
}
.remove-btn svg {
  width: 16px;
  height: 16px;
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
  margin-bottom: 12px;
  color: var(--ink-soft);
}
.summary-row.total {
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 6px;
}
.empty-note {
  color: var(--ink-soft);
  font-size: 14.5px;
  padding: 40px 0;
  text-align: center;
}
.form-error {
  color: var(--danger);
  font-size: 13.5px;
  margin-top: 10px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  padding: 36px 0 70px;
  align-items: start;
}
@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}
.form-row {
  margin-bottom: 16px;
}
.form-row label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
}
.pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  cursor: pointer;
}
.pay-option input {
  width: auto;
}

.success-box {
  text-align: center;
  padding: 80px 0;
}
.success-box svg {
  width: 56px;
  height: 56px;
  color: var(--success);
  margin: 0 auto 20px;
}
.success-box h2 {
  font-size: 24px;
  font-weight: 600;
}
.success-box p {
  color: var(--ink-soft);
  margin-top: 8px;
}

.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  padding: 36px 0 70px;
}
@media (max-width: 820px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
}
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.account-nav button {
  text-align: left;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink-soft);
  font-weight: 500;
}
.account-nav button.active {
  background: var(--accent-soft);
  color: var(--ink);
}
.account-sub {
  display: none;
}
.account-sub.active {
  display: block;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 520px;
}
.order-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
  background: var(--surface);
}
.order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.order-head strong {
  font-size: 15px;
}
.status-pill {
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  display: inline-block;
}
.status-processing {
  background: #f3e4d0;
  color: var(--warn);
}
.status-shipping {
  background: #ddeae0;
  color: var(--success);
}
.status-done {
  background: #e4efe6;
  color: var(--success);
}
.step-row {
  display: flex;
  align-items: center;
  margin-top: 10px;
}
.step {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-soft);
  position: relative;
}
.step .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  margin: 0 auto 6px;
}
.step.done .dot {
  background: var(--success);
}
.step-line {
  position: absolute;
  top: 5px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: -1;
}
.step.done .step-line {
  background: var(--success);
}
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 820px) {
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13.5px;
}

/* ---------- Admin layout ---------- */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--brand-dark);
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  margin-bottom: 36px;
  padding: 0 6px;
}
.sidebar .brand img {
  border-radius: 6px;
  background: #fff;
}
.sidebar .brand-name {
  color: #fff;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.side-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #e6d6cc;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
}
.side-nav button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.side-nav button.active,
.side-nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.side-foot {
  font-size: 12.5px;
  color: #c9b3a6;
  padding: 14px 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 12px;
}

.main {
  padding: 32px 40px;
  overflow-x: auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.topbar h1 {
  font-size: 24px;
  font-weight: 600;
}
.admin-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 16px 6px 6px;
}
.admin-chip .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--brand-dark);
  font-size: 13px;
}
.admin-chip span {
  font-size: 13.5px;
  font-weight: 500;
}
.admin-chip button {
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: underline;
}

.page {
  display: none;
}
.page.active {
  display: block;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
@media (max-width: 1000px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}
.stat-card .label {
  font-size: 13px;
  color: var(--ink-soft);
}
.stat-card .value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 8px;
  font-family: "Space Grotesk";
}
.stat-card .delta {
  font-size: 12.5px;
  margin-top: 6px;
  font-weight: 600;
}
.delta.up {
  color: var(--success);
}
.delta.down {
  color: var(--danger);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}
.panel h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 18px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 160px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.bar {
  width: 100%;
  max-width: 34px;
  background: var(--brand);
  border-radius: 6px 6px 0 0;
  min-height: 2px;
}
.bar-col span {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: none;
}
.row-actions {
  display: flex;
  gap: 8px;
}
.icon-sm {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}
.icon-sm:hover {
  background: var(--accent-soft);
  color: var(--brand-dark);
}
.icon-sm svg {
  width: 15px;
  height: 15px;
}
.status-inStock {
  background: #e4efe6;
  color: var(--success);
}
.status-lowStock {
  background: #f6e9d3;
  color: var(--warn);
}
.status-outStock {
  background: #f5e1de;
  color: var(--danger);
}
select.status-select {
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(74, 51, 42, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-bg.active {
  display: flex;
}
.modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  width: 420px;
  max-width: 90vw;
}
.modal h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 18px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  width: 360px;
  max-width: 90vw;
}
.login-card .brand {
  justify-content: center;
  margin-bottom: 22px;
}
.login-card h2 {
  font-size: 19px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 22px;
}

.pd-desc {
  white-space: pre-line;
  line-height: 1.6;
  font-size: 15px;
  color: #333;
}

/* =======================================================
   ĐỊNH DẠNG HUY HIỆU GIẢM GIÁ & CỤM HIỂN THỊ GIÁ SẢN PHẨM
   ======================================================= */
.product-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: linear-gradient(135deg, #ff4d4f 0%, #f5222d 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(245, 34, 45, 0.35);
  line-height: 1.2;
  pointer-events: none;
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.price-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.price-group .price-new,
.price-group .price {
  color: #ff4d4f;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.price-group .price-old {
  color: #8c8c8c;
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
  line-height: 1.2;
}

.pd-price-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 12px 0 16px;
}

.pd-price-group .pd-price {
  color: #ff4d4f;
  font-size: 24px;
  font-weight: 700;
}

.pd-price-group .pd-price-old {
  color: #8c8c8c;
  font-size: 16px;
  font-weight: 400;
  text-decoration: line-through;
}

/* ===================================================
   MON STORE - GIAO DIỆN HEADER, HERO SLIDER & FOOTER
   =================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.brand img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  border-radius: 50%;
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1f1f1f;
  letter-spacing: -0.5px;
}

.brand-name span {
  color: #ff5722;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-link {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: #333;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.menu-link:hover,
.menu-link.active {
  color: #ff5722;
  background: #fff2e8;
}

.menu-link.track-link {
  color: #ff5722;
}

/* --- BANNER SLIDER --- */
.hero-slider-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
}

.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 450;
  max-height: 450px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  background: #f5f5f7;
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide-item {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 60px;
  color: #fff;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}
.slide-item.no-overlay::before {
  display: none !important;
}

.slide-item.slide-bg-1 {
  background-image: url("https://images.unsplash.com/photo-1548767797-d8c844163c4c?auto=format&fit=crop&w=1400&q=80");
}

.slide-item.slide-bg-2 {
  background-image: url("https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?auto=format&fit=crop&w=1400&q=80");
}

.slide-item.slide-bg-3 {
  background-image: url("https://images.unsplash.com/photo-1583511655857-d19b40a7a54e?auto=format&fit=crop&w=1400&q=80");
}

.slide-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
  z-index: 1;
}

.slide-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: 20px;
}

.slide-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.slide-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.slide-desc {
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand, #ff5722);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 87, 34, 0.35);
  transition: all 0.25s ease;
}

.slide-btn:hover {
  background: #f4511e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.45);
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

.slider-nav-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.slider-prev {
  left: 16px;
}

.slider-next {
  right: 16px;
}

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: 0.3s;
}

.dot.active {
  width: 28px;
  border-radius: 10px;
  background: #ff5722;
}

/* --- TIỆN ÍCH CAM KẾT --- */
.features-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 10px;
  padding: 0 16px;
  box-sizing: border-box;
}

.feature-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.feature-icon {
  font-size: 26px;
}

.feature-info h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: #1f1f1f;
}

.feature-info p {
  margin: 0;
  font-size: 12px;
  color: #777;
}

/* =======================================================
   ✨ CSS CHO BESTSELLER TOP 1, 2, 3
   ======================================================= */
.best-seller-section {
  padding: 24px 0 10px;
}

.section-heading-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}

.bestseller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.rank-card-wrap {
  position: relative;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.rank-1 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid #fef08a;
}

.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  border: 1px solid #e2e8f0;
}

.rank-3 {
  background: linear-gradient(135deg, #f97316, #c2410c);
  border: 1px solid #fed7aa;
}

.sold-count-tag {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =======================================================
   ✨ THƯƠNG HIỆU TIÊU BIỂU DẠNG HỘP HÌNH ẢNH (BOX IMAGE CARD)
   ======================================================= */
.featured-brands-section {
  padding: 40px 0 50px;
  background: #f8fafc;
  margin-top: 30px;
  border-top: 1px solid #edf2f7;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand-card-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.brand-card-box:hover {
  border-color: #ff7a45;
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(255, 87, 34, 0.12);
}

.brand-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.brand-card-box:hover .brand-img-wrap img {
  transform: scale(1.08);
}

.brand-name-overlay {
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  letter-spacing: 0.3px;
  width: 100%;
  background: #ffffff;
  transition: color 0.2s ease;
}

.brand-card-box:hover .brand-name-overlay {
  color: #ff5722;
}

@media (max-width: 768px) {
  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* --- FOOTER CĂN THẲNG HÀNG, BỎ GẠCH CAM --- */
footer {
  background: #18191f;
  color: #d1d5db;
  margin-top: 60px;
  padding: 46px 0 24px;
  font-size: 14px;
}

.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
  align-items: flex-start;
  box-sizing: border-box;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  height: 32px;
  margin-bottom: 20px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
}

.footer-brand .brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  margin: 0;
}

.footer-brand .brand-name span {
  color: #ff5722;
}

.footer-title {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  height: 32px;
  line-height: 32px;
  margin: 0 0 20px 0;
  padding: 0;
}

.footer-title::after {
  display: none !important;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #9ca3af;
}

.footer-contact-item .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  display: inline-block;
}

.footer-contact-item strong {
  color: #ff5722;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.footer-links a .icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  display: inline-block;
}

.footer-links a:hover {
  color: #ff5722;
  transform: translateX(4px);
}

.payment-section {
  width: 100%;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.payment-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
  text-align: left;
}

.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.payment-badge {
  background: #23242c;
  color: #f3f4f6;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #323544;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 36px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid #272935;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

@media (max-width: 820px) {
  .footer-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* --- DROPDOWN HOVER DANH MỤC TRÊN HEADER --- */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 250px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #f0f0f0;
  padding: 8px;
  z-index: 1001;
  animation: popIn 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dropdown-menu a:hover {
  background: #fff2e8;
  color: #ff5722;
  padding-left: 18px;
}

/* --- NÚT XEM THÊM DANH MỤC CON --- */
.load-more-wrap {
  text-align: center;
  margin-top: 36px;
  margin-bottom: 20px;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: #ffffff;
  color: #ff5722;
  font-weight: 700;
  font-size: 14.5px;
  border: 2px solid #ff5722;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.1);
}

.btn-load-more:hover {
  background: #ff5722;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.3);
}

/* ===================================================
   FLOATING CONTACT CHAT WIDGET (ZALO, MESSENGER, CALL)
   =================================================== */
.floating-contact-widget {
  position: fixed;
  bottom: 26px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.contact-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  color: #fff;
}

.contact-btn:hover {
  transform: scale(1.12);
}

.contact-btn.zalo-btn {
  background: #0068ff;
}

.contact-btn.zalo-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.contact-btn.messenger-btn {
  background: linear-gradient(135deg, #00b2fe, #006aff, #9b00e8);
}

.contact-btn.messenger-btn svg {
  width: 26px;
  height: 26px;
}

.contact-btn.phone-btn {
  background: #ff5722;
  font-size: 22px;
}

.phone-ring {
  display: inline-block;
  animation: phoneShake 1.8s infinite ease-in-out;
}

.contact-btn .tooltip {
  position: absolute;
  right: 60px;
  background: rgba(30, 30, 36, 0.92);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-btn .tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  border-width: 5px 0 5px 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(30, 30, 36, 0.92);
}

.contact-btn:hover .tooltip {
  opacity: 1;
  transform: translateX(0);
}

@keyframes phoneShake {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  10%,
  30%,
  50% {
    transform: rotate(-16deg) scale(1.1);
  }
  20%,
  40% {
    transform: rotate(16deg) scale(1.1);
  }
  60% {
    transform: rotate(0deg) scale(1);
  }
}

@media (max-width: 600px) {
  .floating-contact-widget {
    bottom: 18px;
    right: 16px;
    gap: 10px;
  }
  .contact-btn {
    width: 44px;
    height: 44px;
  }
}

/* --- CÁC CLASS TIỆN ÍCH & TRẠNG THÁI --- */
.full-width {
  width: 100%;
}

.full-width-mt {
  width: 100%;
  margin-top: 8px;
}

.col-span-2 {
  grid-column: 1/3;
}

.related-title {
  font-size: 22px;
}

.related-grid-pad {
  padding-bottom: 70px;
}

.btn-save-profile {
  margin-top: 8px;
}

.success-icon-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f6ffed;
  color: #52c41a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 14px;
  border: 2px solid #b7eb8f;
}

.qr-payment-box {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #fafafa;
  border: 1px dashed #ff5722;
  border-radius: 12px;
  text-align: center;
}

.qr-title {
  margin: 0 0 8px;
  color: #d4380d;
  font-size: 17px;
}

.payment-countdown-wrap {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  background: #fff2e8;
  border: 1px solid #ffbb96;
  border-radius: 20px;
  font-size: 13px;
  color: #d4380d;
  font-weight: 600;
}

.qr-instruction {
  font-size: 13.5px;
  color: #555;
  margin-bottom: 14px;
}

.qr-amount-text {
  color: #ff5722;
}

.qr-code-wrap {
  display: inline-block;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.qr-code-img {
  width: 240px;
  height: 240px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.qr-transfer-info {
  margin-top: 14px;
  font-size: 13.5px;
  color: #666;
  line-height: 1.6;
}

.qr-receiver-text {
  color: #111;
}

.qr-transfer-text {
  color: #096dd9;
  font-size: 15px;
}

.confirm-paid-wrap {
  margin-top: 18px;
}

.btn-confirm-paid {
  background: #ff5722;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.25);
  transition: 0.2s;
}

.btn-track-order {
  margin-top: 24px;
}

/* --- MODAL GIỚI THIỆU & LIÊN HỆ --- */
.custom-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10002;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.custom-modal-card {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.custom-modal-card.max-460 {
  max-width: 460px;
}

.custom-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.custom-modal-head.mb-14 {
  margin-bottom: 14px;
}

.custom-modal-title {
  margin: 0;
  font-size: 18px;
  color: #1f1f1f;
}

.custom-modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

.about-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 14px;
}

.about-note {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 16px;
}

.contact-info-list {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* --- MODAL HỦY ĐƠN --- */
.cancel-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cancel-modal-card {
  background: #fff;
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  animation: modalPop 0.2s ease;
}

.cancel-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cancel-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.cancel-modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

.cancel-modal-desc {
  font-size: 13.5px;
  color: #666;
  margin: 0 0 14px;
  line-height: 1.5;
}

.cancel-modal-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: none;
  margin-bottom: 16px;
}

.cancel-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-cancel-keep {
  padding: 9px 18px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  color: #555;
}

.btn-cancel-confirm {
  padding: 9px 18px;
  border: none;
  background: #ff4d4f;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* --- ANIMATIONS & RESPONSIVE --- */
@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 900px) {
  .main-menu {
    display: none;
  }
  .footer-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    height: 260px;
  }
  .slide-item {
    padding: 0 24px;
  }
  .slide-title {
    font-size: 22px;
  }
  .slide-desc {
    font-size: 13px;
    margin-bottom: 14px;
  }
  .features-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .footer-wrap {
    grid-template-columns: 1fr;
  }
}

/* --- TỐI ƯU HÓA MENU DI ĐỘNG & BANNER RESPONSIVE --- */
.mobile-menu-btn,
.mobile-menu-close {
  display: none;
}

@media (max-width: 768px) {
  .hero-slider-wrap {
    height: 220px !important;
    margin: 10px auto;
  }

  .hero-slider {
    height: 220px !important;
  }

  .slide-item {
    background-size: cover !important;
    background-position: center !important;
    padding: 0 20px !important;
  }

  .slide-content {
    max-width: 100% !important;
  }

  .slide-title {
    font-size: 18px !important;
    margin-bottom: 6px !important;
  }

  .slide-desc {
    font-size: 12px !important;
    margin-bottom: 10px !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .slide-btn {
    padding: 6px 14px !important;
    font-size: 12px !important;
  }

  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 8px;
    flex: 0 0 auto;
  }

  .mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #4a332a;
    border-radius: 2px;
  }

  .main-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 60px 20px 20px 20px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: left 0.3s ease;
    gap: 12px;
    display: flex !important;
  }

  .main-menu.active {
    left: 0;
  }

  .mobile-menu-close {
    display: block;
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
  }

  .main-menu .menu-link {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .main-menu .nav-dropdown {
    width: 100%;
  }

  .main-menu .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: #fafafa;
    padding-left: 12px;
    margin-top: 6px;
    min-width: 100%;
  }

  .features-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .footer-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* --- THANH LỌC THƯƠNG HIỆU ĐỒNG BỘ, HIỆN ĐẠI --- */
.brand-filter-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
  margin: -10px 0 24px 0;
  box-shadow: none;
  overflow-x: auto;
}

.brand-filter-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-filter-label::before {
  content: "🏷️";
  font-size: 13px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 !important;
  margin: 0 !important;
  overflow-x: auto;
  flex: 1;
}

.brand-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.brand-chip:hover {
  background: var(--accent-soft);
  color: var(--brand);
  border-color: var(--accent);
}

.brand-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(107, 74, 58, 0.2);
}

/* =======================================================
   TỐI ƯU GIAO DIỆN MOBILE: SỬA LỖI HEADER & THU GỌN BANNER
   ======================================================= */
@media (max-width: 768px) {
  .nav-container {
    padding: 10px 10px !important;
    gap: 6px !important;
  }

  .brand img {
    height: 34px !important;
    width: 34px !important;
  }

  .brand-name {
    font-size: 15px !important;
  }

  .search-box {
    max-width: 120px !important;
  }

  .search-box input {
    padding: 6px 8px 6px 30px !important;
    font-size: 11.5px !important;
  }

  .search-box svg {
    left: 8px !important;
    width: 14px !important;
    height: 14px !important;
  }

  .nav-actions {
    gap: 6px !important;
  }

  .icon-btn {
    width: 34px !important;
    height: 34px !important;
  }

  .icon-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .hero-slider-wrap {
    height: 180px !important;
    margin: 8px auto 0 !important;
    padding: 0 10px !important;
  }

  .hero-slider {
    height: 180px !important;
    border-radius: 12px !important;
  }

  .slide-item {
    padding: 0 16px !important;
    background-size: cover !important;
    background-position: center !important;
  }

  .slide-desc {
    display: none !important;
  }

  .slide-tag {
    font-size: 9.5px !important;
    padding: 2px 6px !important;
    margin-bottom: 4px !important;
  }

  .slide-title {
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
  }

  .slide-btn {
    padding: 5px 12px !important;
    font-size: 11px !important;
    border-radius: 20px !important;
  }

  .slider-nav-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }

  .slider-prev {
    left: 6px !important;
  }
  .slider-next {
    right: 6px !important;
  }
}
#view-wishlist.view.active {
  display: block !important;
}

/* =======================================================
   TỐI ƯU GIAO DIỆN TRANG ADMIN TRÊN MOBILE
   ======================================================= */
.admin-mobile-menu-btn {
  display: none;
  background: var(--brand, #6b4a3a);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

/* Tin tức */
.news-item img,
.news-thumb img,
#newsListContainer img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 400px;
  background: #fcfcfc;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.news-item-row {
  display: flex;
  gap: 20px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line, #eee);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.news-item-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border-color: var(--brand, #ff7a45);
}

.news-item-thumb {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f9f9f9;
  border: 1px solid #f0f0f0;
}

.news-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-item-date {
  font-size: 12px;
  color: var(--ink-soft, #888);
}

.news-item-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink, #222);
  line-height: 1.4;
  margin: 0;
}

.news-item-summary {
  font-size: 13.5px;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.news-detail-container {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.news-back-btn {
  background: none;
  border: 1px solid var(--line, #ddd);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 600px) {
  .news-item-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .news-item-thumb {
    width: 100%;
    height: 180px;
  }
}

.page-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line, #ddd);
  color: var(--ink, #333);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 12px;
}

.page-back-btn:hover {
  background: #f9f9f9;
  border-color: var(--brand, #ff7a45);
  color: var(--brand, #ff7a45);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: start;
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  margin-bottom: 30px;
}

.pd-gallery-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-main-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  background: #f9f9f9;
  border: 1px solid var(--line, #eee);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-main-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pd-thumb-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 10px;
}

.pd-thumb-item {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: #f9f9f9;
}

.pd-thumb-item.active {
  border-color: var(--brand, #ff7a45);
}

.pd-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-info-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pd-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: #fafafa;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  font-size: 13.5px;
}

.pd-meta-item span {
  color: var(--ink-soft, #777);
}

.pd-meta-item strong {
  color: var(--ink, #222);
}

.product-description-section {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  margin-top: 24px;
}

.product-description-section h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--ink, #222);
  border-bottom: 2px solid var(--line, #eee);
  padding-bottom: 8px;
}

.pd-extra-media {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-extra-media img,
.pd-extra-media video {
  max-width: 100%;
  border-radius: 12px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

@media (max-width: 768px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
  }
}

html {
  scroll-behavior: smooth;
}

/* =======================================================
   BỔ SUNG QUY TẮC HIỆN ĐẠI CHO ADMIN TRÊN MOBILE & SHOW PASS
   ======================================================= */
.pass-wrap {
  position: relative;
  width: 100%;
}
.pass-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 42px !important;
}
.toggle-pass-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #888;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-pass-btn:hover {
  color: var(--brand, #6b4a3a);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998 !important;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
  display: block !important;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
}

@media (max-width: 992px) {
  .app {
    display: block !important;
    position: relative !important;
    width: 100% !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -320px !important;
    width: 275px !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #ffffff !important;
    color: var(--ink) !important;
    z-index: 9999 !important;
    box-shadow: 6px 0 25px rgba(0, 0, 0, 0.25) !important;
    transition: left 0.3s ease-in-out !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .sidebar .brand {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .sidebar .brand-name {
    color: var(--ink) !important;
  }

  .sidebar .side-nav button {
    color: #4b5563 !important;
  }

  .sidebar .side-nav button.active,
  .sidebar .side-nav button:hover {
    background: var(--accent-soft, #fbe0dc) !important;
    color: var(--brand, #6b4a3a) !important;
  }

  .sidebar.mobile-open {
    left: 0 !important;
  }

  .sidebar-close-btn {
    display: inline-block !important;
  }

  .admin-mobile-menu-btn {
    display: inline-flex !important;
  }

  .main {
    margin-left: 0 !important;
    padding: 12px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .topbar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .topbar h1 {
    font-size: 18px !important;
    margin: 0 !important;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .stat-card {
    padding: 12px !important;
  }

  .stat-card .value {
    font-size: 18px !important;
  }

  .panel {
    padding: 12px !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
  }

  table {
    min-width: 540px !important;
  }

  .modal {
    width: 94vw !important;
    padding: 16px !important;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr !important;
  }
  .topbar h1 {
    display: none !important;
  }
}

/* --- MENU THU GỌN THEO CẤP TRÊN SIDEBAR --- */
.nav-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

.nav-group-toggle {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100%;
  padding: 10px 12px !important;
  color: #e6d6cc !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.nav-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-group-label svg {
  width: 17px;
  height: 17px;
}

.nav-arrow {
  font-size: 11px;
  transition: transform 0.25s ease;
  opacity: 0.8;
}

.nav-group.open .nav-arrow {
  transform: rotate(180deg);
}

.nav-sub-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 28px;
  margin-top: 2px;
  margin-bottom: 6px;
}

.nav-group.open .nav-sub-menu {
  display: flex;
}

.sub-nav-item {
  display: block !important;
  text-align: left;
  padding: 7px 10px !important;
  font-size: 13px !important;
  color: #c9b3a6 !important;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-nav-item:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding-left: 14px !important;
}

.sub-nav-item.active {
  color: #fff !important;
  background: var(--brand, #ff5722) !important;
  font-weight: 600 !important;
}
@media (max-width: 992px) {
  .footer-wrap {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }
}
@media (max-width: 600px) {
  .footer-wrap {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}
