@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Lora:wght@600;700&display=swap');

:root {
  --mgl-red: #681414;
  --mgl-red-dark: #511010;
  --mgl-red-soft: #7d2625;
  --mgl-cream: #f4efe3;
  --mgl-surface: #ece6d8;
  --mgl-accent: #d7ccb6;
  --mgl-ink: #4a3b35;
  --mgl-muted: #80675b;
  --mgl-line: rgba(104, 20, 20, .14);
  --mgl-shadow: 0 30px 66px -34px rgba(104, 20, 20, .55);
}

html {
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--mgl-cream) !important;
}

a,
button,
[onClick] {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[onClick]:focus-visible {
  outline: 3px solid rgba(215, 204, 182, .7) !important;
  outline-offset: 3px !important;
}

nav[data-nav] {
  background: rgba(81, 16, 16, .96) !important;
  border-bottom: 1px solid rgba(215, 204, 182, .18) !important;
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, .72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

nav[data-nav] a {
  text-underline-offset: 4px;
}

.mgl-brand-lockup {
  align-items: center !important;
}

.mgl-brand-lockup span:first-child {
  font-family: "Cormorant Garamond", "Lora", "Playfair Display", Georgia, serif !important;
  font-weight: 700 !important;
  letter-spacing: .01em !important;
}

.mgl-brand-lockup span:last-child {
  font-family: "Be Vietnam Pro", Arial, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}

.mgl-brand-mark-slot {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: 0 16px 28px -22px rgba(0, 0, 0, .7);
  overflow: visible !important;
}

.mgl-brand-mark-slot img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

footer .mgl-brand-mark-slot,
section .mgl-brand-mark-slot {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
}

.mgl-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

nav[data-nav] a.mgl-cart-nav {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border: 1px solid rgba(215, 204, 182, .36) !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #f0ebde !important;
  background: rgba(215, 204, 182, .06) !important;
}

nav[data-nav] a.mgl-cart-nav:hover {
  background: #d7ccb6 !important;
  color: #681414 !important;
  transform: translateY(-1px);
}

nav[data-nav] > div:first-child,
nav[data-nav] > a:first-child {
  min-width: 238px !important;
  flex-shrink: 0 !important;
}

nav[data-nav] > div:first-child > div:first-child,
nav[data-nav] > a:first-child > div:first-child {
  flex: 0 0 auto !important;
}

nav[data-nav] > div:first-child > div:last-child,
nav[data-nav] > a:first-child > div:last-child {
  min-width: 0 !important;
  gap: 3px !important;
  line-height: 1.18 !important;
}

nav[data-nav] > div:first-child span:first-child,
nav[data-nav] > a:first-child span:first-child {
  display: block !important;
  color: #f0ebde !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

nav[data-nav] > div:first-child span:last-child,
nav[data-nav] > a:first-child span:last-child {
  display: block !important;
  color: #d7ccb6 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  letter-spacing: .08em !important;
}

.mgl-footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 2px;
}

.mgl-footer-contact a {
  color: #d7ccb6;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid rgba(215, 204, 182, .22);
}

.mgl-footer-contact a:hover {
  color: #f0ebde;
  border-bottom-color: #d7ccb6;
}

.mgl-menu-toggle {
  display: none;
  cursor: pointer;
  border: 1px solid rgba(215, 204, 182, .46);
  border-radius: 10px;
  background: transparent;
  color: #f4efe3;
  font: 700 13px "Be Vietnam Pro", sans-serif;
  padding: 10px 14px;
}

.mgl-page-tabs {
  display: none !important;
  position: sticky;
  top: 64px;
  z-index: 45;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(244, 239, 227, .86);
  border-bottom: 1px solid rgba(104, 20, 20, .1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mgl-page-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(104, 20, 20, .16);
  border-radius: 999px;
  background: rgba(236, 230, 216, .75);
  color: var(--mgl-red);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.mgl-page-tabs a:hover,
.mgl-page-tabs a.is-active {
  transform: translateY(-1px);
  background: var(--mgl-red);
  color: var(--mgl-cream);
}

div[style*="border-radius:18px"],
div[style*="border-radius:20px"],
a[style*="border-radius:18px"],
a[style*="border-radius:20px"] {
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

div[style*="border-radius:18px"]:hover,
div[style*="border-radius:20px"]:hover,
a[style*="border-radius:18px"]:hover,
a[style*="border-radius:20px"]:hover {
  border-color: rgba(104, 20, 20, .22) !important;
}

img {
  image-rendering: auto;
}

.mgl-media {
  position: relative;
  overflow: hidden;
  background: #f2ecdd;
}

.mgl-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.012);
  transition: transform .65s cubic-bezier(.16, .8, .3, 1), filter .35s ease;
}

.mgl-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .1), transparent 34%, rgba(81, 16, 16, .08));
}

a:hover .mgl-media img,
.mgl-media:hover img {
  transform: scale(1.06);
  filter: saturate(1.04) contrast(1.03);
}

.mgl-media--burgundy {
  background: #681414;
  border: 1px solid rgba(215, 204, 182, .35);
  box-shadow: 0 30px 70px -38px rgba(0, 0, 0, .7);
}

input,
select,
textarea {
  min-height: 44px;
}

table {
  overflow: hidden;
}

.mgl-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(215, 204, 182, .32);
  border-radius: 14px;
  background: rgba(81, 16, 16, .94);
  color: #f4efe3;
  box-shadow: 0 24px 54px -28px rgba(0, 0, 0, .75);
  font: 600 13px/1.5 "Be Vietnam Pro", sans-serif;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.mgl-toast.is-visible {
  opacity: 1;
  transform: none;
}

.mgl-legal-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 204, 182, .25);
}

.mgl-legal-link:hover {
  color: #f0ebde;
  border-bottom-color: #d7ccb6;
}

.mgl-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.mgl-trust-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(104, 20, 20, .14);
  border-radius: 14px;
  background: rgba(236, 230, 216, .72);
  color: var(--mgl-ink);
  font-size: 13px;
  font-weight: 700;
}

.mgl-partner-proof {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #f4efe3 0%, #ece6d8 100%);
  padding: 36px 40px;
}

.mgl-partner-proof__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 28px;
  align-items: center;
  padding: 30px;
  border: 1px solid rgba(104, 20, 20, .16);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #efe7d8 0%, #f7f1e6 58%, #ece1cf 100%);
  box-shadow: 0 34px 78px -46px rgba(104, 20, 20, .72);
}

.mgl-partner-proof__brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.mgl-ms-mark {
  width: 64px;
  height: 64px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 10px;
  border-radius: 18px;
  background: #fffaf0;
  border: 1px solid rgba(104, 20, 20, .14);
  box-shadow: 0 22px 42px -30px rgba(81, 16, 16, .9);
}

.mgl-ms-mark span {
  display: block;
  border-radius: 4px;
}

.mgl-ms-mark span:nth-child(1) { background: #f25022; }
.mgl-ms-mark span:nth-child(2) { background: #7fba00; }
.mgl-ms-mark span:nth-child(3) { background: #00a4ef; }
.mgl-ms-mark span:nth-child(4) { background: #ffb900; }

.mgl-partner-proof__eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--mgl-red);
  font: 800 12px/1.2 "Be Vietnam Pro", sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.mgl-partner-proof h2 {
  margin: 0;
  max-width: 560px;
  color: var(--mgl-red);
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: 0 !important;
}

.mgl-partner-proof__content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mgl-partner-proof__content p {
  margin: 0;
  color: var(--mgl-ink);
  font-size: 15.5px;
  line-height: 1.75;
}

.mgl-partner-proof__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.mgl-partner-proof__badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(104, 20, 20, .14);
  border-radius: 999px;
  background: rgba(255, 250, 240, .72);
  color: var(--mgl-red);
  font-size: 12.5px;
  font-weight: 800;
}

.mgl-partner-proof__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mgl-partner-proof__actions a,
.mgl-partner-proof__actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 17px;
  border-radius: 12px;
  font: 800 13.5px/1.2 "Be Vietnam Pro", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.mgl-partner-proof__actions a {
  border: 1px solid var(--mgl-red);
  background: var(--mgl-red);
  color: #f4efe3;
  box-shadow: 0 18px 36px -26px rgba(104, 20, 20, .9);
}

.mgl-partner-proof__actions button {
  border: 1px solid rgba(104, 20, 20, .22);
  background: rgba(255, 250, 240, .7);
  color: var(--mgl-red);
}

.mgl-section-kicker {
  display: inline-flex;
  color: var(--mgl-red);
  font: 800 11.5px/1.2 "Be Vietnam Pro", sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.mgl-case-studies,
.mgl-product-decision {
  background: #f4efe3;
  padding: 64px 40px;
}

.mgl-case-studies__inner,
.mgl-product-decision__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.mgl-case-studies__head,
.mgl-product-decision__inner > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mgl-case-studies h2,
.mgl-product-decision h2 {
  margin: 0;
  color: var(--mgl-red);
  font-family: "Playfair Display", serif;
  font-size: clamp(31px, 4vw, 44px);
  line-height: 1.08;
}

.mgl-case-studies p,
.mgl-product-decision p,
.mgl-product-decision li {
  margin: 0;
  color: var(--mgl-ink);
  font-size: 14.5px;
  line-height: 1.65;
}

.mgl-case-studies article,
.mgl-product-decision article {
  border: 1px solid rgba(104, 20, 20, .13);
  border-radius: 18px;
  background: #ece6d8;
  padding: 20px;
}

.mgl-case-studies {
  background: #ece6d8;
}

.mgl-case-studies__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mgl-case-studies__head {
  max-width: 740px;
}

.mgl-case-studies__grid,
.mgl-product-decision__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mgl-case-studies article,
.mgl-product-decision article {
  background: #f4efe3;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mgl-case-studies article span {
  color: #a07c5e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mgl-case-studies h3,
.mgl-product-decision h3 {
  margin: 0;
  color: var(--mgl-red);
  font-family: "Playfair Display", serif;
  font-size: 21px;
}

.mgl-case-studies strong {
  color: var(--mgl-red);
  font-size: 13px;
  line-height: 1.55;
}

.mgl-product-decision {
  background: #ece6d8;
}

.mgl-product-decision__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mgl-product-decision ul {
  margin: 0;
  padding-left: 18px;
}

#mgl-home > header:first-of-type {
  margin-top: 0 !important;
  padding-top: 72px !important;
}

@media (max-width: 980px) {
  nav[data-nav] {
    flex-wrap: wrap !important;
    gap: 12px !important;
    padding: 14px 18px !important;
    background: rgba(81, 16, 16, .94) !important;
  }

  nav[data-nav] > div:first-child,
  nav[data-nav] > a:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  nav[data-nav] > div:nth-child(2) {
    display: none !important;
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding-top: 8px !important;
  }

  nav[data-nav].mgl-menu-open > div:nth-child(2) {
    display: flex !important;
  }

  nav[data-nav] > div:nth-child(2) a {
    justify-content: center !important;
    text-align: center !important;
    min-height: 42px !important;
    padding: 11px 12px !important;
    border-radius: 10px !important;
  }

  .mgl-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mgl-page-tabs {
    top: 65px;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .mgl-partner-proof {
    padding: 26px 20px;
  }

  .mgl-partner-proof__inner {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .mgl-case-studies,
  .mgl-product-decision {
    padding: 48px 20px;
  }

  .mgl-case-studies__grid,
  .mgl-product-decision__grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(38px, 11vw, 52px) !important;
  }

  h2 {
    font-size: clamp(29px, 8.8vw, 40px) !important;
  }

  section,
  header,
  footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  div[style*="display:flex;gap:12px"],
  div[style*="display:flex;gap:13px"] {
    row-gap: 10px !important;
  }

  div[style*="position:sticky;top:96px"] {
    position: static !important;
  }

  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns:1.1fr .9fr"],
  div[style*="grid-template-columns:1.05fr .95fr"],
  div[style*="grid-template-columns:1.04fr .96fr"],
  div[style*="grid-template-columns:.75fr 1.25fr"],
  div[style*="grid-template-columns:1.25fr .75fr"],
  div[style*="grid-template-columns:236px 1fr"],
  section[style*="grid-template-columns:1fr 1fr"],
  section[style*="grid-template-columns:1.1fr .9fr"],
  section[style*="grid-template-columns:1.25fr .75fr"] {
    grid-template-columns: 1fr !important;
  }

  aside[style*="position:sticky"],
  div[style*="position:sticky"] {
    position: static !important;
  }

  div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  [data-price-table] {
    overflow-x: auto !important;
  }

  [data-price-table] table {
    min-width: 720px;
  }

  .mgl-trust-page header > div[style*="display:grid"],
  .mgl-trust-page main section > div[style*="display:grid"],
  .mgl-trust-page section[style*="display:grid"] {
    grid-template-columns: 1fr !important;
  }

  .mgl-trust-page .mgl-media {
    width: 100% !important;
  }
}

@media (max-width: 620px) {
  .mgl-page-tabs {
    display: none;
  }

  .mgl-trust-strip {
    grid-template-columns: 1fr;
  }

  .mgl-partner-proof__brand {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mgl-ms-mark {
    width: 56px;
    height: 56px;
  }

  .mgl-partner-proof__inner {
    gap: 18px;
    padding: 20px;
    border-radius: 18px;
  }

  .mgl-partner-proof h2 {
    font-size: 30px !important;
  }

  .mgl-partner-proof__content {
    gap: 14px;
  }

  .mgl-partner-proof__content p {
    font-size: 14.5px !important;
    line-height: 1.62;
  }

  .mgl-partner-proof__actions a,
  .mgl-partner-proof__actions button {
    width: 100%;
  }

  .mgl-toast {
    left: 16px;
    right: 16px;
    bottom: 82px;
  }

  h1 {
    letter-spacing: 0 !important;
  }

  p {
    font-size: 14.5px !important;
  }

  div[style*="grid-template-columns:repeat(4,1fr)"],
  div[style*="grid-template-columns:repeat(3,1fr)"],
  div[style*="grid-template-columns:repeat(2,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  .mgl-trust-page header {
    padding-top: 48px !important;
    padding-bottom: 52px !important;
  }

  .mgl-trust-page h1 {
    font-size: clamp(38px, 12vw, 48px) !important;
  }

  .mgl-trust-page div[style*="grid-template-columns:1fr 1fr"],
  .mgl-trust-page div[style*="grid-template-columns:.9fr 1.1fr"],
  .mgl-trust-page div[style*="grid-template-columns:.9fr 1.1fr"],
  .mgl-trust-page div[style*="grid-template-columns:repeat(2,1fr)"],
  .mgl-trust-page div[style*="grid-template-columns:repeat(4,1fr)"],
  .mgl-trust-page div[style*="grid-template-columns:repeat(2,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  .mgl-trust-page header > div[style*="position:absolute"] {
    display: none !important;
  }

  a[style*="position:fixed"][href*="zalo.me"],
  a[style*="position:fixed"][href="#"] {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    justify-content: center !important;
    border-radius: 14px !important;
  }

  a,
  button {
    min-height: 42px;
  }

  div[style*="padding:64px 48px"],
  div[style*="padding:56px 48px"],
  div[style*="padding:56px"] {
    padding: 34px 22px !important;
  }
}

/* Wordmark "Mạc Gia GROUP" ở header (thay icon + chữ cũ) */
.mgl-brand-lockup.mgl-wordmark .mgl-brand-mark-slot {
  width: auto !important;
  min-width: 0 !important;
  height: 46px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.mgl-brand-lockup.mgl-wordmark .mgl-brand-mark-slot img {
  width: auto !important;
  height: 100% !important;
  object-fit: contain !important;
}
/* Ẩn chữ cũ trong lockup wordmark (chỉ để lại SVG wordmark) */
.mgl-brand-lockup.mgl-wordmark span { display: none !important; }
/* Ẩn nguyên khối chữ cạnh wordmark (specificity cao hơn) */
.mgl-brand-lockup.mgl-wordmark > div:not(.mgl-brand-mark-slot) { display: none !important; }
