:root {
    --shx-mobile-nav-height: calc(60px + env(safe-area-inset-bottom));
}
html { scroll-padding-bottom: var(--shx-mobile-nav-height); }
body:has(.shx-header .wp-block-navigation) .wp-site-blocks {
    padding-bottom: var(--shx-mobile-nav-height);
}

.shx-header { padding: 6px 12px; }
.shx-header .shx-header-inner { gap: 8px !important; min-height: 48px; }
.shx-header .shx-brand { min-width: 0; }
.shx-header .shx-brand > a { display: flex; align-items: center; min-height: 48px; }
.shx-header .shx-brand .shx-custom-logo { width: clamp(78px, 24vw, 112px); }
.shx-header .shx-header-cta,
.shx-header .shx-header-phone,
.shx-header .wp-block-navigation__responsive-container-open,
.shx-header .wp-block-navigation__responsive-container-close,
.shx-header .shx-mega-toggle { display: none !important; }
.shx-header .shx-search {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0 !important;
}
.shx-header .shx-search .wp-block-search__inside-wrapper { padding: 0 2px 0 10px; }
.shx-header .shx-search input[type="search"] {
    max-width: none;
    min-height: 46px;
    padding: 0;
    font-size: 16px;
}
.shx-header .shx-search button {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    margin: 0;
}
.shx-header .shx-cart-link {
    display: flex;
    flex: 0 0 auto;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    gap: 2px;
    font-size: 0;
}
.shx-header .shx-cart-link [data-shx-count] { font-size: 11px; }

.shx-header .wp-block-navigation {
    display: block;
    position: fixed !important;
    inset: auto 0 0;
    margin: 0 !important;
    padding: 0 max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
    border-top: 1px solid #dcebe0;
    background: #fff;
    box-shadow: 0 -6px 24px #18452712;
}
.shx-header .wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: block !important;
    position: static;
    overflow: visible;
}
.shx-header .wp-block-navigation :is(.wp-block-navigation__responsive-close, .wp-block-navigation__responsive-dialog, .wp-block-navigation__responsive-container-content) {
    position: static !important;
    padding: 0;
}
.shx-header .wp-block-navigation .wp-block-navigation__container {
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    gap: 0 !important;
    width: 100%;
}
.shx-header .wp-block-navigation__container > .wp-block-navigation-item {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    position: static;
}
.shx-header .wp-block-navigation__container > .wp-block-navigation-item > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-height: 58px;
    padding: 4px 1px;
    text-align: center;
    color: #385e47;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
}
.shx-header .wp-block-navigation__container > .wp-block-navigation-item > a::before {
    content: "";
    width: 21px;
    height: 21px;
    background: currentColor;
    mask: var(--shx-tab-icon, url("../images/footer-home.svg")) center / contain no-repeat;
}
.shx-header .wp-block-navigation-item > a[href*="/gioi-thieu"] { --shx-tab-icon: url("../images/stat-business.svg"); }
.shx-header .wp-block-navigation-item > a[href*="/lien-he"] { --shx-tab-icon: url("../images/footer-headset.svg"); }
.shx-header .shx-mega-item > a { --shx-tab-icon: url("../images/footer-box.svg"); }
.shx-header .wp-block-navigation__container > :is(.current-menu-item, .is-mega-open) > a,
.shx-header .wp-block-navigation__container > .wp-block-navigation-item > a[aria-current="page"] {
    background: #eaf7ed;
    color: #146c36;
    border-radius: 10px;
}
.shx-header .wp-block-navigation__container > .wp-block-navigation-item > a:focus-visible {
    outline-offset: -3px;
}

.shx-header .shx-mega-item > .shx-mega-panel {
    position: absolute;
    inset: auto 8px calc(100% + 6px);
    width: auto;
    max-width: none;
    margin: 0;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 0 0 100vmax #123a2440, 0 -8px 24px #123a2420;
}
.shx-header .shx-mega-heading {
    flex-direction: row;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 4px;
}
.shx-header .shx-mega-heading span,
.shx-header .shx-mega-note { display: none; }
.shx-header .shx-mega-heading a { display: flex; align-items: center; min-height: 48px; font-size: 12px; }
.shx-header .shx-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.shx-header .shx-mega-category { min-height: 56px; padding: 5px; gap: 5px; font-size: 12px !important; }
.shx-header .shx-mega-category > span:last-child { display: none; }
.shx-header .shx-mega-visual { width: 28px; height: 28px; flex-basis: 28px; }

.shx-hero .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; }
.shx-rail-controls button,
.shx-filter-open,
.shx-checkout .shx-button,
.shx-detail-shell .shx-detail-nav a { min-height: 48px; }
.shx-rail-controls button { min-width: 48px; }
.shx-card-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-align: center;
}
.shx-product-card .shx-card-body h3 { font-size: 13px !important; line-height: 1.4; }
.shx-catalog-layout :is(input[type="number"], input[type="search"], select),
.shx-checkout :is(input:not([type="checkbox"]), select, textarea) { font-size: 16px; }
.shx-checkout :is(input:not([type="checkbox"]), select) { min-height: 48px; }
.shx-filter-sidebar fieldset > label { min-height: 44px; }
.shx-detail-shell .shx-detail-nav a { display: grid; place-items: center; }

/* Keep the featured product and its primary action in one compact mobile banner. */
.home .shx-hero.alignfull {
    width: 100% !important;
    margin: 0 !important;
    padding: 18px 14px !important;
    min-height: 244px;
    display: flex;
    align-items: center;
    border: 0;
    border-radius: 0;
    background: #eef8ef;
}
.home .shx-hero::after { content: none; }
.home .shx-hero .shx-hero-image {
    inset: 0 0 0 auto !important;
    width: 62%;
    height: 100% !important;
    mask-image: linear-gradient(to right, transparent, #000 28%);
}
.home .shx-hero .shx-hero-image img { object-position: 84% center; }
.home .shx-hero .shx-hero-copy {
    width: 100%;
    margin: 0;
}
.home .shx-hero-copy .shx-eyebrow {
    max-width: 54% !important;
    margin: 0 !important;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: .035em;
}
.home .shx-hero-copy h1 {
    max-width: none !important;
    margin: 7px 0 10px !important;
    font-size: clamp(13px, 4vw, 22px);
    line-height: 1.12;
    letter-spacing: -.03em;
    white-space: nowrap;
}
.home .shx-hero-copy > p:not(.shx-eyebrow),
.home .shx-hero .wp-block-buttons > .is-style-outline { display: none; }
.home .shx-hero .wp-block-buttons { margin: 0 !important; }
.home .shx-hero .wp-block-button__link {
    padding: 6px 11px;
    min-height: 44px;
    font-size: 11px;
    border-radius: 10px;
}

/* Compact homepage rows and secondary sections. */
body.home .shx-section-heading {
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 44px;
    margin-bottom: 10px;
}
body.home .shx-section-heading > div:first-child { flex: 1 1 0; }
body.home .shx-section-heading h2 {
    padding: 0;
    font-size: 14px !important;
    line-height: 1.25;
    letter-spacing: -.015em;
    color: #174226;
    background: none;
    -webkit-text-fill-color: currentColor;
}
body.home .shx-section-heading h2::before { content: none; }
body.home .shx-section-heading > a {
    order: 2;
    justify-content: center;
    min-height: 44px;
    max-width: none;
    padding: 0 3px;
    border: 0;
    font-size: 11px;
    white-space: nowrap;
}
body.home .shx-section-heading .shx-rail-controls {
    order: 3;
    gap: 0;
    margin: 0 !important;
}
body.home .shx-section-heading .shx-rail-controls button {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    line-height: 1;
}

body.home .shx-benefits.shx-benefits-strip {
    padding: 12px 8px !important;
    border-radius: 14px;
}
body.home .shx-benefits-strip .shx-benefit-items,
body.home .shx-solutions-section .shx-project-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 10px 6px !important;
}
body.home .shx-benefit-items > *,
body.home .shx-project-cards > * { grid-column: span 2; }
body.home .shx-project-cards > :nth-child(3n + 1):nth-last-child(2) {
    grid-column: 2 / span 2;
}
body.home .shx-benefits-strip .shx-benefit-item {
    flex-direction: column;
    gap: 5px;
    text-align: center;
}
body.home .shx-benefits-strip .shx-benefit-item .shx-benefit-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
}
body.home .shx-benefits-strip .shx-benefit-icon img { width: 21px; height: 21px; }
body.home .shx-benefits-strip .shx-benefit-item strong {
    font-size: 11px !important;
    white-space: normal;
}
body.home .shx-benefits-strip .shx-benefit-item p { font-size: 11px !important; }
body.home .shx-solutions-section > h2 {
    display: block;
    padding: 0;
    margin: 0 0 10px !important;
    font-size: 14px !important;
    line-height: 1.3;
}
body.home .shx-solutions-section > h2::before { content: none; }
body.home .shx-solutions-section .shx-project-layout { gap: 10px; }
body.home .shx-solutions-section .shx-project-cards img { aspect-ratio: 1.75; }
body.home .shx-solutions-section .shx-project-cards figure { margin-bottom: 3px !important; }
body.home .shx-solutions-section .shx-project-name {
    margin-top: 0 !important;
    font-size: 11px !important;
    text-align: center;
}
body.home .shx-solutions-section .shx-project-banner {
    min-height: 0;
    padding: 10px 12px !important;
}
body.home .shx-solutions-section .shx-project-banner h3 {
    margin-bottom: 8px !important;
    font-size: 12px !important;
}
body.home .shx-solutions-section .shx-project-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
    gap: 6px;
}
body.home .shx-solutions-section .shx-project-stat { gap: 4px; align-items: flex-start; }
body.home .shx-solutions-section .shx-project-stat figure { width: 15px; flex-basis: 15px; }
body.home .shx-solutions-section .shx-project-stat img { width: 15px; height: 18px; }
body.home .shx-solutions-section .shx-project-stat strong { font-size: 13px; }

body.home .shx-section-heading {
    padding: 0;
}
body.home .shx-section-heading h2 {
    box-sizing: border-box;
    max-width: 100%;
    padding: 8px 10px 8px 12px;
    border-radius: 18px 12px 12px 0;
    background: linear-gradient(105deg, #eaf9ee, #dff2e5);
    font-size: clamp(9.5px, 2.95vw, 14px) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shx-hero-scroll:not([hidden]) {
    display: grid;
    place-items: center;
    grid-column: 1 / -1;
    justify-self: center;
    width: 44px;
    height: 44px;
    margin: 0 auto !important;
    color: #146c36;
    border-radius: 50%;
}
.shx-hero-scroll::before {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
body.home #danh-muc { scroll-margin-top: 0; }
body.home .wp-block-post-content:has(> .shx-sales-main) > :is(
    .shx-section, .shx-sales-main, .shx-promo-section, .shx-benefits,
    .shx-solutions-section, .shx-reviews-section, .shx-brands-section
) {
    margin-block: 8px !important;
}
body.home .wp-block-post-content .shx-product-showcase .shx-rail {
    padding-bottom: 6px;
}
body.home .shx-section-heading .shx-rail-controls { gap: 5px; }
body.home .shx-section-heading .shx-rail-controls button {
    position: relative;
    flex-basis: 34px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    font-size: 15px;
    border-color: #d4e9d9;
}
body.home .shx-section-heading .shx-rail-controls button::after {
    content: "";
    position: absolute;
    inset: -5px -2px;
}
.shx-product-card .shx-card-body h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.8em;
    max-height: 2.8em;
}
body.home .shx-benefits-strip .shx-benefit-item strong {
    font-size: clamp(9px, 2.5vw, 11px) !important;
    white-space: nowrap;
}
body.home .shx-benefits-strip .shx-benefit-item {
    grid-column: span 3;
}
body.home .shx-benefits-strip .shx-benefit-item:last-child:nth-child(odd) {
    grid-column: 2 / span 4;
}
.shx-brand-grid.shx-brand-logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.shx-mobile-contact[hidden] { display: none; }
.shx-mobile-contact {
    position: absolute;
    inset: auto max(12px, env(safe-area-inset-right)) calc(100% + 12px) auto;
    display: grid;
    gap: 8px;
}
.shx-mobile-contact .shx-contact-option {
    display: grid;
    place-items: center;
    width: 48px;
    min-height: 48px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #208449, #104824);
    color: #fff;
    box-shadow: 0 3px 14px #123a2433;
    text-decoration: none;
}
.shx-contact-option::before {
    content: "";
    width: 20px;
    height: 20px;
    background: currentColor;
    mask: url("../images/footer-headset.svg") center / contain no-repeat;
}
.shx-contact-option--zalo::before { content: none; }
.shx-mobile-contact .shx-contact-option--zalo { background: linear-gradient(145deg, #087fe7, #004cad); }
.shx-contact-option--zalo span { font-size: 13px; font-weight: 750; color: #fff; }
.shx-contact-option--messenger::before {
    mask-image: url("../images/messenger.svg");
}
.shx-mobile-contact .shx-contact-option--messenger { background: linear-gradient(145deg, #0866ff, #5344df 62%, #823ab9); }
.shx-contact-option--phone::before { mask-image: url("../images/contact-phone.svg"); }
.shx-mobile-contact .shx-contact-option--page { background: linear-gradient(145deg, #138479, #07524c); }
.shx-contact-option--page::before { mask-image: url("../images/footer-pin.svg"); }
.shx-mobile-contact span.shx-contact-option { opacity: .7; }

.shx-contact-invitation {
    position: absolute;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(100% + 14px);
    width: min(250px, calc(100vw - 24px));
    padding: 9px 12px;
    border: 1px solid #dcebe0;
    border-radius: 14px 14px 4px 14px;
    background: #fff;
    color: #174226;
    box-shadow: 0 4px 16px #123a2426;
    font-size: 13px;
    line-height: 1.45;
    pointer-events: none;
}
.shx-contact-invitation[hidden] { display: none; }
