/* Final home-page polish. Loaded after the legacy bundle to keep the cascade predictable. */

body.market-ui[data-page="market-home-page"] main {
  background:
    radial-gradient(circle at 7% 9%, rgba(185,242,100,.11), transparent 23%),
    radial-gradient(circle at 96% 32%, rgba(7,91,87,.08), transparent 24%),
    #f4f7f5;
}

body.market-ui .site-header {
  box-shadow: 0 9px 28px rgba(2,55,52,.14);
}

body.market-ui .header-search-form {
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 10px 25px rgba(0,43,40,.16);
}

body.market-ui .header-search-form:focus-within {
  outline: 3px solid rgba(185,242,100,.36);
  outline-offset: 2px;
}

body.market-ui .header-cta b {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: white;
  background: var(--market-teal-dark);
  border-radius: 50%;
  transition: transform .22s ease, background .22s ease;
}

body.market-ui .header-cta:hover b {
  background: #003f3c;
  transform: translateX(2px);
}

body.market-ui .market-landing {
  padding: 13px 13px 24px;
  border-color: rgba(7,91,87,.12);
  box-shadow: 0 28px 80px rgba(4,72,68,.1);
}

body.market-ui .market-hero {
  min-height: 555px;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

body.market-ui .market-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .28;
  background-image: radial-gradient(rgba(232,248,207,.38) .65px, transparent .65px);
  background-size: 20px 20px;
  mask-image: linear-gradient(90deg, transparent 7%, #000 58%, #000 100%);
}

body.market-ui .market-hero-copy {
  padding-top: 74px;
  padding-bottom: 112px;
}

body.market-ui .market-hero-copy > p {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body.market-ui .market-hero-copy > p::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--market-lime);
}

body.market-ui .market-hero-copy h1 {
  max-width: 680px;
  text-wrap: balance;
}

body.market-ui .market-primary,
body.market-ui .market-secondary {
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

body.market-ui .market-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,43,40,.24);
}

body.market-ui .market-secondary:hover {
  color: var(--market-ink);
  background: white;
  transform: translateY(-2px);
}

body.market-ui .market-hero-visual > img {
  right: -1%;
  bottom: 22px;
  width: min(735px, 99%);
}

body.market-ui .market-hero-visual > a {
  top: 30px;
  right: 30px;
  border: 1px solid rgba(7,91,87,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}

body.market-ui .market-hero-visual > a:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0,40,37,.22);
}

body.market-ui .market-category-rail {
  margin-inline: 24px;
  gap: 11px;
}

body.market-ui .market-category-rail > a {
  min-height: 118px;
  border-color: rgba(7,91,87,.13);
  box-shadow: 0 14px 32px rgba(6,71,67,.09);
}

body.market-ui .market-category-rail > a:nth-child(2) i,
body.market-ui .market-category-rail > a:nth-child(5) i {
  color: #806319;
  background: #f5edc8;
}

body.market-ui .market-category-rail > a:nth-child(3) i {
  color: #a64d2f;
  background: #f9e2d8;
}

body.market-ui .market-category-rail > a:hover i {
  transform: rotate(-5deg) scale(1.05);
}

body.market-ui .market-category-rail i {
  transition: transform .25s ease;
}

.market-proof-bar {
  margin: 22px 24px 0;
  padding: 21px 0 2px;
  border-top: 1px solid var(--market-line);
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  align-items: center;
  gap: 22px;
}

.market-proof-bar > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 11px;
}

.market-proof-bar > span > .icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  color: var(--market-teal);
  background: var(--market-mint);
  border-radius: 50%;
}

.market-proof-bar i {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-style: normal;
}

.market-proof-bar strong {
  font-size: 10px;
}

.market-proof-bar small {
  color: var(--market-muted);
  font-size: 8px;
  line-height: 1.45;
}

.market-proof-bar > a {
  padding-bottom: 4px;
  color: var(--market-teal);
  border-bottom: 1px solid var(--market-teal);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

body.market-ui .market-section {
  padding-block: 104px;
}

body.market-ui .market-section-head {
  position: relative;
  margin-bottom: 42px;
}

body.market-ui .market-section-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 1px;
  background: var(--market-line);
}

body.market-ui .market-section-head h2 {
  text-wrap: balance;
}

body.market-ui .market-product-grid {
  gap: 18px;
}

body.market-ui .market-product-grid .product-card {
  position: relative;
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

body.market-ui .market-product-grid .product-card:hover {
  border-color: rgba(7,91,87,.36);
  transform: translateY(-7px);
  box-shadow: 0 24px 48px rgba(4,71,66,.13);
}

body.market-ui .market-product-grid .product-media {
  height: 285px;
}

body.market-ui .market-product-grid .product-media::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 0;
  border: 1px solid rgba(7,91,87,.07);
  border-radius: 11px;
}

body.market-ui .market-product-grid .product-media > img {
  position: relative;
  z-index: 1;
  padding: 18px;
}

body.market-ui .market-product-grid .product-body {
  padding: 20px 19px 18px;
}

body.market-ui .market-product-grid .product-body h3 {
  min-height: 48px;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

body.market-ui .market-product-grid .product-bottom {
  margin-top: 14px;
}

body.market-ui .market-product-grid .mini-cta {
  color: white;
  background: var(--market-teal);
  border-color: var(--market-teal);
  border-radius: 50%;
}

body.market-ui .market-needs {
  width: min(calc(100% - 24px), 1460px);
  padding: 86px max(30px, calc((100vw - var(--market-max)) / 2 + 24px));
  color: white;
  background: var(--market-teal-dark);
  border-radius: 28px;
}

body.market-ui .market-needs .market-section-head span,
body.market-ui .market-needs .market-section-head h2,
body.market-ui .market-needs .market-section-head > a {
  color: white;
}

body.market-ui .market-needs .market-section-head > p {
  color: #bcd3ce;
}

body.market-ui .market-needs .market-section-head::after {
  background: rgba(255,255,255,.14);
}

body.market-ui .market-need-grid > a {
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 18px 34px rgba(0,33,31,.14);
}

body.market-ui .market-need-grid > a:nth-child(odd) {
  background: #0a625d;
}

body.market-ui .market-need-grid > a:hover {
  transform: translateY(-7px);
}

body.market-ui .market-directory {
  gap: 95px;
}

body.market-ui .market-directory-list > a {
  border-color: rgba(7,91,87,.13);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body.market-ui .market-directory-list > a:hover {
  border-color: rgba(7,91,87,.42);
  transform: translateX(5px);
  box-shadow: 0 12px 28px rgba(4,71,66,.08);
}

body.market-ui .request-desk {
  margin-top: 38px;
  box-shadow: 0 30px 70px rgba(4,65,61,.15);
}

body.market-ui .request-desk-head {
  background-image: radial-gradient(rgba(232,248,207,.18) .7px, transparent .7px);
  background-size: 18px 18px;
}

body.market-ui .request-choice button,
body.market-ui .request-form input,
body.market-ui .request-form textarea,
body.market-ui .request-form .submit-button {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

body.market-ui .request-form input:focus,
body.market-ui .request-form textarea:focus {
  outline: 0;
  border-color: var(--market-teal);
  box-shadow: 0 0 0 3px rgba(7,91,87,.12);
}

body.market-ui .request-form .submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(4,72,68,.2);
}

body.market-ui .market-footer-callout {
  box-shadow: 0 24px 50px rgba(0,38,35,.16);
}

@media (max-width: 1180px) {
  .market-proof-bar {
    grid-template-columns: repeat(3,1fr);
  }

  .market-proof-bar > a {
    grid-column: 1 / -1;
    width: max-content;
  }

  body.market-ui .market-needs {
    width: min(calc(100% - 24px), 1460px);
  }
}

/* Compact desktop / landscape tablet: keep controls in one row and open
   navigation from the menu button instead of letting it fall onto a new row. */
@media (min-width: 901px) and (max-width: 1180px) {
  body.market-ui .market-header-main {
    grid-template-columns: 205px minmax(0, 1fr) 48px;
    gap: 18px;
  }

  body.market-ui .market-header-actions {
    display: none;
  }

  body.market-ui .menu-toggle {
    display: block;
    justify-self: end;
  }

  body.market-ui .market-nav-row {
    min-height: 0;
    padding: 0;
    display: block;
    border: 0;
  }

  body.market-ui .main-nav,
  body.market-ui .market-quick-links {
    display: none;
  }
}

/* Let the hero breathe before the copy and product cutout become cramped. */
@media (max-width: 1100px) {
  body.market-ui .market-hero {
    min-height: 830px;
    grid-template-columns: 1fr;
  }

  body.market-ui .market-hero-copy {
    max-width: 820px;
    padding: 58px 56px 12px;
    justify-content: flex-start;
  }

  body.market-ui .market-hero-copy h1 {
    max-width: 780px;
    font-size: clamp(46px, 6vw, 58px);
  }

  body.market-ui .market-hero-visual {
    min-height: 365px;
  }

  body.market-ui .market-hero-visual > img {
    left: 50%;
    right: auto;
    bottom: 22px;
    width: min(650px, 76%);
    max-height: 430px;
    transform: translateX(-50%);
    animation: none;
  }

  body.market-ui .market-hero-visual > a {
    top: 12px;
    right: 28px;
  }

  body.market-ui .market-orbit.one,
  body.market-ui .market-orbit.two {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  body.market-ui .market-category-rail {
    margin-top: -28px;
  }
}

@media (max-width: 900px) {
  body.market-ui .market-hero {
    min-height: 810px;
  }

  body.market-ui .market-hero-copy {
    padding: 48px 36px 18px;
  }

  body.market-ui .market-hero-copy h1 {
    font-size: clamp(42px, 7vw, 54px);
  }

  body.market-ui .market-hero-visual {
    min-height: 330px;
  }

  body.market-ui .market-hero-visual > img {
    width: min(620px, 88%);
  }

  .market-proof-bar {
    grid-template-columns: 1fr 1fr;
  }

  .market-proof-bar > a {
    grid-column: auto;
  }

  body.market-ui .market-section {
    padding-block: 76px;
  }

  body.market-ui .market-needs {
    padding: 72px 28px;
  }
}

@media (max-width: 620px) {
  body.market-ui[data-page="market-home-page"] main {
    background: #f4f7f5;
  }

  body.market-ui .market-landing {
    padding: 7px 7px 16px;
  }

  body.market-ui .market-hero {
    min-height: 730px;
  }

  body.market-ui .market-hero-copy {
    padding: 38px 22px 12px;
  }

  body.market-ui .market-hero-copy h1 {
    font-size: clamp(36px, 10.2vw, 43px);
    line-height: 1.06;
  }

  body.market-ui .market-hero-copy > span {
    font-size: 13px;
    line-height: 1.65;
  }

  body.market-ui .market-primary,
  body.market-ui .market-secondary {
    min-height: 48px;
  }

  body.market-ui .market-hero-visual {
    min-height: 260px;
  }

  body.market-ui .market-hero-visual > img {
    bottom: 25px;
    width: 106%;
  }

  body.market-ui .market-category-rail {
    margin: -16px 4px 0;
    padding: 2px 1px 12px;
    display: flex;
    gap: 9px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  body.market-ui .market-category-rail::-webkit-scrollbar {
    display: none;
  }

  body.market-ui .market-category-rail > a,
  body.market-ui .market-category-rail .market-see-all {
    flex: 0 0 min(250px, 78vw);
    min-height: 94px;
    scroll-snap-align: start;
  }

  body.market-ui .market-category-rail .market-see-all {
    padding-inline: 20px;
    flex-direction: row;
    justify-content: space-between;
  }

  .market-proof-bar {
    margin: 18px 10px 0;
    padding-top: 18px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .market-proof-bar > a {
    width: max-content;
  }

  body.market-ui .market-section {
    padding-block: 62px;
  }

  body.market-ui .market-section-head {
    margin-bottom: 34px;
  }

  body.market-ui .market-product-grid {
    gap: 10px;
  }

  body.market-ui .market-product-grid .product-media {
    height: 190px;
  }

  body.market-ui .market-product-grid .product-body {
    padding: 14px 13px;
  }

  body.market-ui .market-product-grid .product-body h3 {
    min-height: 58px;
    font-size: 12px;
  }

  body.market-ui .market-needs {
    width: calc(100% - 14px);
    padding: 60px 18px;
    border-radius: 22px;
  }

  body.market-ui .market-directory {
    gap: 42px;
  }
}

@media (max-width: 480px) {
  body.market-ui .market-section-head h2,
  body.market-ui .market-directory-copy h2 {
    font-size: clamp(31px, 9vw, 36px);
  }

  body.market-ui .market-section-head > p,
  body.market-ui .market-directory-copy p {
    font-size: 12px;
    line-height: 1.7;
  }

  body.market-ui .market-product-grid,
  body.market-ui .catalogue-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.market-ui .market-product-grid .product-media,
  body.market-ui .catalogue-grid .product-media {
    height: 265px;
  }

  body.market-ui .market-product-grid .product-body,
  body.market-ui .catalogue-grid .product-body {
    padding: 18px;
  }

  body.market-ui .market-product-grid .product-body h3,
  body.market-ui .catalogue-grid .product-body h3 {
    min-height: 0;
    font-size: 14px;
    line-height: 1.5;
  }

  body.market-ui .market-needs {
    padding: 50px 14px;
  }

  body.market-ui .market-need-grid > a {
    min-height: 220px;
  }

  body.market-ui .market-directory-list > a {
    min-height: 104px;
    padding: 16px;
  }

  body.market-ui .request-desk-head {
    padding: 31px 20px;
  }

  body.market-ui .request-desk-head h2 {
    font-size: 32px;
  }

  body.market-ui .market-footer-callout {
    padding: 28px 22px;
  }

  body.market-ui .market-footer-callout h2 {
    font-size: 31px;
  }
}

/* Compact mobile header: two tidy rows and a short 2-column menu. */
@media (max-width: 760px) {
  body.market-ui .topline {
    display: none;
  }

  body.market-ui .site-header {
    top: 0;
  }

  body.market-ui .market-header-main {
    width: calc(100% - 20px);
    min-height: 0;
    padding: 9px 0 10px;
    grid-template-columns: minmax(0, 1fr) 42px;
    grid-template-rows: 42px 44px;
    column-gap: 12px;
    row-gap: 8px;
  }

  body.market-ui .brand {
    width: max-content;
    min-width: 0;
    gap: 9px;
  }

  body.market-ui .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  body.market-ui .brand-mark img {
    width: 40px;
  }

  body.market-ui .brand-copy strong {
    font-size: 17px;
    line-height: 1;
  }

  body.market-ui .brand-copy small {
    margin-top: 5px;
    font-size: 6px;
    letter-spacing: .14em;
  }

  body.market-ui .menu-toggle {
    width: 42px;
    height: 42px;
    justify-self: end;
    border-radius: 12px;
  }

  body.market-ui .menu-toggle span {
    width: 16px;
    margin-block: 4px;
  }

  body.market-ui .market-header-main .header-search-form {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 44px;
    margin: 0;
    padding-left: 13px;
    grid-template-columns: 18px minmax(0, 1fr) 70px;
    box-shadow: 0 7px 18px rgba(0, 43, 40, .13);
  }

  body.market-ui .header-search-form svg {
    width: 17px;
  }

  body.market-ui .header-search-form input {
    padding-inline: 10px;
    font-size: 12px;
  }

  body.market-ui .header-search-form button {
    width: 70px;
    padding: 0;
    border-width: 4px;
    font-size: 0;
  }

  body.market-ui .header-search-form button::after {
    content: "Tìm";
    font-size: 11px;
    font-weight: 800;
  }

  body.market-ui .market-nav-row {
    width: 100%;
  }

  body.market-ui.menu-open .main-nav {
    inset: 113px 10px auto;
    padding: 8px;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--market-line);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 20px 40px rgba(3, 62, 59, .2);
    transform-origin: top center;
    animation: mobile-menu-in .2s ease-out both;
  }

  body.market-ui.menu-open .main-nav a {
    min-height: 46px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    color: var(--market-ink);
    background: #f4f8f6;
    border: 1px solid var(--market-line);
    border-radius: 10px;
    font-size: 12px;
  }

  body.market-ui.menu-open .main-nav a:last-child {
    grid-column: 1 / -1;
  }

  body.market-ui.menu-open .main-nav a.active {
    color: var(--market-teal-dark) !important;
    background: var(--market-lime-soft) !important;
    border-color: #cbe8a4;
  }
}

@keyframes mobile-menu-in {
  from {
    opacity: 0;
    transform: translateY(-7px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Keep the current desktop route subtle: bright type and a crafted lime underline. */
@media (min-width: 1181px) {
  body.market-ui .main-nav {
    gap: 24px;
  }

  body.market-ui .main-nav a {
    padding: 15px 4px 17px;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    transition: color .22s ease, transform .22s ease;
  }

  body.market-ui .main-nav a::after {
    display: block;
    left: 50%;
    right: auto;
    bottom: 8px;
    width: 0;
    height: 3px;
    opacity: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #d9ff74 0%, var(--market-lime) 52%, #86df78 100%);
    box-shadow: 0 3px 10px rgba(184, 244, 88, .3);
    transform: translateX(-50%);
    transform-origin: center;
    transition: width .28s cubic-bezier(.2, .85, .25, 1), opacity .2s ease;
  }

  body.market-ui .main-nav a:hover {
    color: white;
    transform: translateY(-1px);
  }

  body.market-ui .main-nav a:hover::after {
    width: 22px;
    opacity: .58;
  }

  body.market-ui .main-nav a.active,
  body.market-ui .main-nav a[aria-current="page"] {
    color: white !important;
    font-weight: 800;
  }

  body.market-ui .main-nav a.active::after,
  body.market-ui .main-nav a[aria-current="page"]::after {
    width: calc(100% - 8px);
    opacity: 1;
    animation: nav-underline-in .38s cubic-bezier(.2, .9, .25, 1.08) both;
  }
}

@keyframes nav-underline-in {
  from { width: 0; opacity: 0; }
  to { width: calc(100% - 8px); opacity: 1; }
}

@media (max-width: 520px) {
  body.market-ui .brand-copy small {
    display: none;
  }

  body.market-ui .brand-copy strong {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.market-ui * {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
