/* Site-wide mobile refinements. Loaded after each page's stylesheet. */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }

  #root {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }

  #root .ref-container,
  #root .site-container,
  #root .shell,
  #root .shop-container,
  #root .cd-container,
  #root .cd2-wrap,
  #root .pa-container,
  #root .v3-container,
  #root .news-main,
  #root .contact-page-inner,
  #root .ar-about-wrap,
  #root .alaska-catalog-layout,
  #root .cart-flow-page > .cart-flow-container,
  #root .shop-cart-page > .shop-container {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    margin-right: auto;
    margin-left: auto;
  }

  #root .ref-main,
  #root main,
  #root .ref-container,
  #root .site-container,
  #root .cd2,
  #root .cd2-wrap,
  #root .cd2-hero,
  #root .cd2-gallery,
  #root .cd2-hero-info,
  #root .alaska-catalog-layout,
  #root .alaska-catalog-results,
  #root .cart-flow-page,
  #root .cart-flow-container,
  #root .site-footer-grid {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  #root .ref-main,
  #root main {
    width: 100% !important;
  }

  #root img,
  #root video,
  #root iframe,
  #root svg {
    max-width: 100%;
  }

  #root :where(h1, h2, h3, h4, p, li, label, th, td) {
    overflow-wrap: anywhere;
  }

  #root :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  #root :where(button, input[type="button"], input[type="submit"], .button, .btn, [role="button"]) {
    touch-action: manipulation;
  }

  /* Keep the header compact and preserve the menu and cart controls. */
  #root .ref-header {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  #root .ref-announcement {
    min-height: 32px;
    overflow: hidden;
  }

  #root .ref-announcement-inner {
    box-sizing: border-box;
    width: 100%;
    min-height: 32px;
    padding-inline: 10px;
    overflow: hidden;
  }

  #root .ref-announcement-inner > .ref-announcement-items {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }

  #root .ref-announcement-inner > .ref-announcement-items::-webkit-scrollbar {
    display: none;
  }

  #root .ref-announcement-item {
    flex: 0 0 auto;
    gap: 5px;
    padding-inline: 5px;
    white-space: nowrap;
    font-size: 10px;
  }

  #root .ref-announcement-item svg {
    flex: none;
    width: 16px;
    height: 16px;
  }

  #root .ref-header .ref-announcement {
    display: none !important;
  }

  #root .ref-nav-bar.is-open .ref-nav-inner {
    --ref-menu-header-budget: 118px;
  }

  #root .ref-main-bar {
    position: relative;
  }

  #root .ref-header .ref-main-inner {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 64px;
    padding: 7px 12px;
  }

  #root .ref-logo {
    position: absolute;
    top: 50%;
    left: 12px;
    justify-self: start;
    width: max-content;
    max-width: 100%;
    height: 46px;
    padding-inline: 8px;
    transform: translateY(-50%);
  }

  /* Keep the vertically centered mobile logo in place when touch browsers emulate hover. */
  #root .ref-header .ref-logo:hover {
    transform: translateY(-50%);
  }

  #root .ref-logo-mark {
    flex: none;
    width: 29px;
    height: 33px;
  }

  #root .ref-logo-word b {
    font-size: 14px;
  }

  #root .ref-header .ref-header-actions {
    position: absolute;
    top: 50%;
    right: 58px;
    display: flex;
    justify-self: end;
    gap: 8px;
    transform: translateY(-50%);
  }

  #root .ref-header-actions .ref-hotline,
  #root .ref-header-actions .ref-account {
    display: none;
  }

  #root .ref-header .ref-header-actions .ref-cart-link {
    display: grid;
    width: 38px;
    height: 42px;
    place-items: center;
  }

  #root .ref-header-actions .ref-cart-link > span:last-child {
    display: none;
  }

  #root .ref-cart-icon,
  #root .ref-cart-icon svg {
    width: 25px;
    height: 25px;
  }

  #root .ref-header .ref-mobile-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    display: grid !important;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid #ffffff80;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    transform: translateY(-50%);
    visibility: visible;
    opacity: 1;
    z-index: 5;
  }

  #root .ref-mobile-toggle svg {
    width: 22px;
    height: 22px;
  }

  #root .ref-main-inner > .ref-search {
    position: absolute;
    top: 100%;
    right: 12px;
    left: 12px;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    width: auto;
    height: 42px;
    overflow: hidden;
    border: 1px solid #cbd8e4;
    border-radius: 0 0 5px 5px;
  }

  #root .ref-search select,
  #root .ref-search input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding-inline: 7px;
    font-size: 12px;
  }

  #root .ref-header .ref-search select {
    display: none;
  }

  #root .ref-search button {
    display: grid;
    width: 38px;
    min-width: 38px;
    place-items: center;
  }

  #root .ref-nav-bar {
    height: 42px;
    border: 0;
  }

  #root .ref-nav-inner {
    width: 100%;
    height: 42px;
  }

  #root .ref-nav-inner nav {
    top: 138px;
    right: 0;
    left: auto;
    width: min(340px, 88vw);
    max-height: calc(100dvh - 110px);
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    overflow-y: auto;
    border-radius: 0 0 0 10px;
  }

  #root .ref-nav-bar.is-open::after {
    inset: 138px 0 0;
  }

  #root .ref-category-control {
    top: 0;
    right: 0;
    left: 0;
    height: 0;
  }

  #root .ref-category-control > button {
    display: none;
  }

  #root .ref-nav-bar.is-open .ref-category-control > button {
    position: fixed;
    top: 138px;
    right: min(340px, 88vw);
    left: 0;
    z-index: 3;
    display: flex;
    width: auto;
    min-height: 48px;
    justify-content: flex-start;
    padding-inline: 14px;
  }

  /* Product archive categories use a readable, touch-friendly mobile grid. */
  #root .alaska-catalog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    margin: 16px auto 38px;
  }

  #root .alaska-catalog-sidebar {
    position: static;
    min-width: 0;
    padding: 0;
    overflow: visible;
    border-radius: 12px;
  }

  #root .alaska-catalog-disclosure > summary {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    list-style: none;
    cursor: pointer;
  }

  #root .alaska-catalog-disclosure > summary::-webkit-details-marker {
    display: none;
  }

  #root .alaska-catalog-disclosure > summary h2 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 15px;
    line-height: 1.3;
  }

  #root .alaska-catalog-disclosure > summary h2::after {
    display: none;
  }

  #root .alaska-catalog-disclosure-count {
    flex: 0 0 auto;
    color: #66798a;
    font-size: 11px;
    white-space: nowrap;
  }

  #root .alaska-catalog-disclosure > summary > svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: #064d91;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
  }

  #root .alaska-catalog-disclosure[open] > summary > svg {
    transform: rotate(180deg);
  }

  #root .alaska-catalog-disclosure > nav {
    padding: 0 12px 12px;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-disclosure > nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 8px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-disclosure > nav a {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #dce5ec;
    border-radius: 8px;
    background: #fff;
    text-align: left;
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-disclosure > nav > .alaska-catalog-all {
    grid-column: 1 / -1;
    justify-content: flex-start;
    background: #eef5fb;
    color: #064d91;
    font-weight: 700;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-disclosure > nav > .alaska-catalog-all.is-current {
    border-radius: 8px;
    border-color: #c9dce9;
    background: #eaf3fb;
    color: #07549a;
    box-shadow: inset 3px 0 #07549a;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-category {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce5ec;
    border-radius: 8px;
    background: #fff;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-category > a {
    min-height: 54px;
    align-items: flex-start;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-category > a.is-current {
    background: #eaf3fb;
    color: #07549a;
    font-weight: 700;
    box-shadow: inset 3px 0 #07549a;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-category > a.is-ancestor {
    background: #f5f8fb;
    color: #36566e;
    font-weight: 600;
  }

  #root .alaska-catalog-sidebar nav a span {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  #root .alaska-catalog-sidebar nav a small {
    flex: 0 0 auto;
    min-width: 24px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef3f7;
    color: #546b7b;
    text-align: center;
  }

  #root .alaska-catalog-sidebar nav a.is-current small {
    background: #dceaf6;
    color: #124d7b;
  }

  #root .alaska-catalog-sidebar nav a.is-ancestor small {
    background: #edf2f6;
    color: #5b7181;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-category-children {
    display: grid;
    gap: 0;
    margin: 0;
    border-top: 1px solid #edf1f4;
    border-left: 0;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-category-children a {
    min-height: 42px;
    align-items: flex-start;
    padding: 8px 9px;
    border-bottom: 1px solid #f0f3f5;
    border-radius: 0;
    background: #fff;
    color: #455968;
    font-size: 11px;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-category-children a:last-child {
    border-bottom: 0;
  }

  #root .alaska-catalog-sidebar .alaska-catalog-disclosure > nav a.is-current {
    border-color: #064d91;
  }

  #root .alaska-asado-category-tree {
    margin-top: 8px;
  }

  #root .alaska-asado-category-tree > summary {
    min-height: 40px;
    padding: 10px;
    font-size: 12px;
  }

  #root .alaska-woocommerce-catalog {
    width: 100%;
    min-width: 0;
  }

  #root .alaska-woocommerce-catalog .ref-catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  #root .alaska-woocommerce-catalog .ref-catalog-toolbar :is(h1,h2) {
    font-size: 22px;
    line-height: 1.3;
  }

  #root .alaska-woocommerce-catalog .ref-catalog-search {
    width: 100%;
    min-width: 0;
  }

  #root .alaska-woocommerce-catalog ul.products,
  #root .alaska-woocommerce-catalog .ref-product-grid,
  #root .catalog-redesign .product-grid,
  #root .shop-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
  }

  #root .alaska-woocommerce-catalog ul.products > *,
  #root .alaska-woocommerce-catalog .ref-product-grid > *,
  #root .catalog-redesign .product-grid > *,
  #root .shop-product-grid > *,
  #root .ref-home-intro-grid > *,
  #root .ref-product-grid > *,
  #root .ref-project-grid > *,
  #root .ref-news-grid > *,
  #root .cart-flow-checkout-grid > *,
  #root .site-footer-grid > * {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  #root .alaska-woocommerce-catalog li.product,
  #root .shop-product-card,
  #root .product-card {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    width: 100% !important;
  }

  #root .alaska-woocommerce-catalog li.product img,
  #root .shop-product-card-image img,
  #root .product-card-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }

  #root .shop-product-card h3,
  #root .alaska-woocommerce-catalog li.product .woocommerce-loop-product__title,
  #root .product-card h3 {
    font-size: clamp(13px, 3.7vw, 15px);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  #root .shop-product-price,
  #root .shop-product-price > span,
  #root .shop-product-price del,
  #root .shop-product-price ins,
  #root .shop-product-price .shop-product-discount {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Keep the product hero, information table, and purchase actions inside the viewport. */
  #root .cd2-purchase-template .cd2-wrap {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    margin-right: auto;
    margin-left: auto;
  }

  #root .cd2-purchase-template {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #root .cd2-purchase-template .cd2-breadcrumb {
    width: 100%;
    max-width: 100%;
    padding-inline: 12px;
    margin-bottom: 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  #root .cd2-purchase-template .cd2-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 100%;
  }

  #root .cd2-purchase-template .cd2-hero > *,
  #root .cd2-purchase-template .cd2-product-summary {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  #root .cd2-purchase-template .cd2-gallery,
  #root .cd2-purchase-template .cd2-main-photo,
  #root .cd2-purchase-template .cd2-hero-info {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #root .cd2-purchase-template .cd2-main-photo {
    aspect-ratio: 4 / 3;
  }

  #root .cd2-purchase-template .cd2-thumbs {
    justify-content: flex-start;
    gap: 7px;
    padding-top: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  #root .cd2-purchase-template .cd2-thumbs button {
    flex: 0 0 calc((100% - 21px) / 4);
    width: calc((100% - 21px) / 4);
    min-width: 0;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  #root .cd2-purchase-template .cd2-product-summary {
    min-width: 0;
    padding: 16px 13px 12px;
  }

  #root .cd2-purchase-template .cd2-product-summary h1 {
    font-size: clamp(18px, 5vw, 20px);
    line-height: 1.3;
  }

  #root .cd2-purchase-template .cd2-product-summary .cd2-hero-highlights {
    width: 100%;
    max-width: 100%;
  }

  #root .cd2-purchase-template .cd2-product-summary .cd2-hero-highlights > div {
    grid-template-columns: minmax(82px, 30%) minmax(0, 1fr);
    gap: 8px;
  }

  #root .cd2-purchase-template .cd2-store-buy,
  #root .cd2-purchase-template .cd2-contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #root .cd2-purchase-template .cd2-store-buy button,
  #root .cd2-purchase-template .cd2-contact-actions a {
    min-width: 0;
    min-height: 46px;
    padding-inline: 7px;
    font-size: 12px;
  }

  #root .cd2-purchase-template .cd2-assurance.cd2-reference-assurance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    font-size: 11px;
    line-height: 1.4;
  }

  #root .cd2-purchase-template .cd2-assurance.cd2-reference-assurance > * {
    min-width: 0;
  }

  #root .cd2-product-description,
  #root .cd2-body,
  #root .cd2-overview,
  #root .cd2-spec-layout,
  #root .cd2-comparison-faq,
  #root .cd2-related {
    min-width: 0;
    max-width: 100%;
  }

  #root .cd2-table-scroll,
  #root .cd2-product-description .table-wrap,
  #root .woocommerce table.shop_table_responsive {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  /* Stack cart and checkout columns; let wide order tables scroll within their card. */
  #root .cart-flow-page > .cart-flow-container,
  #root .shop-cart-page > .shop-container,
  #root .cart-flow-container {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    padding-inline: 0;
  }

  #root .cart-flow-checkout-grid,
  #root .cart-flow-cart-layout,
  #root .cart-flow-two-column,
  #root .woocommerce-checkout .col2-set {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  #root .cart-flow-order-summary,
  #root .cart-flow-payment-summary,
  #root .cart-flow-customer-form,
  #root .cart-flow-cart-panel {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-inline: 14px;
  }

  #root .cart-flow-table-wrap,
  #root .woocommerce table.shop_table,
  #root .woocommerce-checkout-review-order-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  #root .cart-flow-page :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
  #root .woocommerce-checkout :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  /* Long form and editorial content should wrap instead of widening the page. */
  #root .contact-page-inner,
  #root .contact-page-layout,
  #root .contact-page-form,
  #root .account-auth-card,
  #root .account-profile,
  #root .account-requests,
  #root .ad-layout,
  #root .pa-detail,
  #root .pa-article-intro,
  #root .ar-about-wrap,
  #root .company-location-card {
    min-width: 0;
    max-width: 100%;
  }

  #root .ad-table-scroll,
  #root .pa-article-table-wrap,
  #root .wp-block-table {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  #root .ad-table-scroll table,
  #root .pa-article-table-wrap table,
  #root .wp-block-table table {
    max-width: none;
  }

  #root .ref-footer,
  #root .site-footer,
  #root .site-footer-grid {
    width: 100%;
    min-width: 0;
  }

  #root .floating.has-zalo,
  #root .floating.has-zalo > a {
    max-width: calc(100% - 16px);
  }
}

/* Keep the mobile navigation usable: the category control belongs inside the full-width drawer. */
@media (max-width: 760px) {
  #root .ref-main > .alaska-woocommerce-content:has(.cd2-purchase-template) {
    width: 100% !important;
    max-width: 100% !important;
  }

  #root .ref-header .ref-nav-bar.is-open::after {
    inset: var(--ref-mobile-menu-top, calc(138px + var(--wp-admin--admin-bar--height, 0px))) 0 0;
  }

  #root .ref-nav-bar.is-open .ref-nav-inner {
    position: fixed;
    top: var(--ref-mobile-menu-top, calc(138px + var(--wp-admin--admin-bar--height, 0px)));
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: 100%;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    box-shadow: 0 8px 18px #0002;
  }

  #root .ref-nav-bar.is-open .ref-category-control {
    position: relative;
    inset: auto;
    z-index: 3;
    flex: 0 0 auto;
    height: auto;
  }

  #root .ref-nav-bar.is-open .ref-category-control > button {
    position: relative;
    inset: auto;
    z-index: auto;
    display: flex;
    width: 100%;
    height: 48px;
    min-height: 48px;
    justify-content: flex-start;
    padding-inline: 14px;
  }

  #root .ref-category-menu {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    width: auto;
    max-height: 55vh;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: none;
  }

  #root .ref-category-menu-category > .ref-category-submenu {
    display: none;
  }

  #root .ref-category-menu-category.is-submenu-open > .ref-category-submenu {
    display: block;
  }

  #root .ref-nav-bar.is-open .ref-nav-inner nav {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    display: flex;
    width: auto;
    height: auto;
    max-height: none;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    visibility: visible;
    transition: none;
  }
}

@media (max-width: 420px) {
  #root .ref-announcement-inner > .ref-announcement-items {
    gap: 3px;
  }

  #root .ref-announcement-item {
    padding-inline: 3px;
    font-size: 9px;
  }

  #root .ref-main-inner {
    gap: 6px;
    padding-inline: 9px;
  }

  #root .ref-logo {
    height: 42px;
    padding-inline: 6px;
  }

  #root .ref-header-actions .ref-cart-link {
    width: 34px;
  }

  #root .ref-mobile-toggle {
    width: 38px;
    height: 38px;
  }

  #root .ref-main-inner > .ref-search {
    right: 9px;
    left: 9px;
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  #root .ref-search button {
    width: 36px;
    min-width: 36px;
  }

  #root .alaska-catalog-layout {
    width: calc(100% - 20px);
  }

  #root .alaska-woocommerce-catalog ul.products,
  #root .alaska-woocommerce-catalog .ref-product-grid,
  #root .catalog-redesign .product-grid,
  #root .shop-product-grid {
    gap: 9px !important;
  }

  #root .cd2-purchase-template .cd2-product-summary .cd2-hero-highlights > div {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 7px;
  }

  #root .cd2-purchase-template .cd2-store-buy button,
  #root .cd2-purchase-template .cd2-contact-actions a {
    font-size: 11px;
  }

  #root .cd2-purchase-template .cd2-assurance.cd2-reference-assurance {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The older phone-bubble tail is green even when the button is red. */
#root .floating.has-zalo .floating-phone::after {
  display: none;
}

/* Correct shared controls after the older mobile and header rules. */
@media (max-width: 760px) {
  #root .ref-header .ref-nav-bar.is-open::after {
    position: absolute;
    inset: 100% 0 auto;
    height: 100dvh;
  }

  #root .ref-nav-bar.is-open .ref-nav-inner {
    position: absolute;
    top: 100%;
    right: 0;
    bottom: auto;
    left: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    max-height: max(0px, calc(100dvh - var(--ref-menu-header-budget, 150px) - var(--wp-admin--admin-bar--height, 0px)));
    margin: 0;
  }

  #root .ref-header .ref-search input,
  #root .ref-header .ref-search select {
    font-size: 16px;
  }

  #root :is(input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea) {
    font-size: 16px !important;
  }

  #root .floating.has-zalo {
    right: 10px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: auto;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #root .floating.has-zalo > a {
    position: relative;
    display: grid;
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px #0003;
  }

  #root .floating.has-zalo > a .floating-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  #root .floating.has-zalo > a .floating-symbol {
    position: static;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    overflow: visible;
    clip: auto;
    border-radius: 50%;
    background: #fff;
    color: #0879cf;
    font-size: 14px;
    font-weight: 900;
  }

  #root .floating.has-zalo > a svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  #root .woocommerce table.woocommerce-checkout-review-order-table {
    display: table;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
    overflow: visible;
  }

  #root .woocommerce-MyAccount-content table.shop_table {
    min-width: 0;
  }

  #root .woocommerce-MyAccount-content table.shop_table_responsive tbody {
    display: block;
    width: 100%;
  }

  #root .woocommerce-MyAccount-content table.shop_table_responsive :is(th, td) {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  #root .woocommerce-MyAccount-content .woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number {
    display: block;
    text-align: right;
  }

  #root .woocommerce-MyAccount-content .woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number::before {
    content: attr(data-title) ": ";
    float: left;
    font-weight: 700;
  }

  #root table.wc-block-cart-items {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #root table.wc-block-cart-items tbody {
    display: block;
    width: 100%;
  }

  #root .wc-block-cart table.wc-block-cart-items tr.wc-block-cart-items__row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas: "image product" ". total";
    gap: 8px 12px;
    width: 100%;
  }

  #root .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image {
    grid-area: image;
    width: 64px;
    padding: 0;
  }

  #root .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__product {
    grid-area: product;
    min-width: 0;
    padding: 0;
  }

  #root .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total {
    grid-area: total;
    min-width: 0;
    justify-content: flex-start;
    padding: 0;
    text-align: left;
  }

  #root .wc-block-cart .wc-block-cart__submit-button,
  #root .wc-block-checkout .wc-block-components-checkout-place-order-button {
    min-height: 48px;
    background: #064b91;
    color: #fff;
  }

  #root .wp-block-woocommerce-empty-cart-block > p a,
  #root .wc-block-grid__product-add-to-cart .wp-block-button__link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 4px;
    background: #064b91;
    color: #fff;
    text-decoration: none;
  }

  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
  }

  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__product {
    display: flex;
    min-width: 0;
    max-width: none;
    flex-direction: column;
    margin: 0;
    padding: 0 0 10px;
    overflow: hidden;
    border: 1px solid #e0e6ec;
    border-radius: 5px;
    background: #fff;
    text-align: left;
  }

  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
  }

  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title,
  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price,
  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart {
    margin-inline: 10px;
  }

  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title {
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart {
    margin-top: auto;
  }

  #root .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link {
    width: 100%;
    padding-inline: 6px;
    font-size: 12px;
    line-height: 1.3;
  }

  body.woocommerce-cart #root .floating.has-zalo,
  body.woocommerce-checkout #root .floating.has-zalo,
  #root:has(form.checkout) .floating.has-zalo {
    display: none;
  }

  #root .woocommerce table.woocommerce-checkout-review-order-table :is(th, td) {
    padding: 10px;
    overflow-wrap: anywhere;
  }

  #root .woocommerce table.woocommerce-checkout-review-order-table :is(th, td):last-child {
    width: 35%;
  }
}

@media (max-width: 350px) {
  #root .ref-nav-bar.is-open .ref-nav-inner {
    --ref-menu-header-budget: 138px;
  }
}

/* Compact the desktop header before the phone layout takes over. */
@media (min-width: 761px) and (max-width: 1000px) {
  #root .ref-header .ref-header-actions .ref-hotline {
    display: none;
  }

  #root .ref-header .ref-search {
    grid-template-columns: 108px minmax(0, 1fr) 42px;
  }

  #root .ref-header .ref-nav-inner {
    grid-template-columns: 165px minmax(0, 1fr);
  }

  #root .ref-header .ref-nav-bar .ref-nav-inner nav {
    justify-content: space-between;
  }

  #root .ref-header .ref-nav-bar .ref-nav-inner nav a {
    padding-inline: 3px;
    font-size: 11.5px;
  }

  #root .ref-header .ref-nav-bar .ref-category-control > button {
    font-size: 12px;
    line-height: 1.2;
  }

  #root .floating.has-zalo > a .floating-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  #root .floating.has-zalo > a .floating-symbol {
    position: static;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    overflow: visible;
    clip: auto;
    border-radius: 50%;
    background: #fff;
    color: #0879cf;
    font-size: 14px;
    font-weight: 900;
  }

  #root .floating.has-zalo > a svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

/* Pages without the page-specific footer polish also use the round desktop icons. */
@media (min-width: 1001px) {
  body:is(.home, .archive, .single, .error404, .woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #root .floating.has-zalo > a .floating-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body:is(.home, .archive, .single, .error404, .woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #root .floating.has-zalo > a .floating-symbol {
    position: static;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    overflow: visible;
    clip: auto;
    border-radius: 50%;
    background: #fff;
    color: #0879cf;
    font-size: 14px;
    font-weight: 900;
  }

  body:is(.home, .archive, .single, .error404, .woocommerce-cart, .woocommerce-checkout, .woocommerce-account) #root .floating.has-zalo > a svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (min-width: 761px) {
  #root .alaska-catalog-disclosure > summary {
    display: block;
    list-style: none;
    cursor: default;
    pointer-events: none;
  }

  #root .alaska-catalog-disclosure > summary::-webkit-details-marker {
    display: none;
  }

  #root .alaska-catalog-disclosure-count,
  #root .alaska-catalog-disclosure > summary > svg {
    display: none;
  }
}
/* Mobile alignment for the About page's purpose, values, and history sections. */
@media (max-width: 680px) {
  #root .als-about-purpose {
    padding: 28px 0 32px;
  }

  #root .als-about-vision {
    min-height: 0;
    margin: 0 auto 20px;
    padding: 20px 16px 18px;
  }

  #root .als-about-vision::before,
  #root .als-about-vision::after {
    display: none;
  }

  #root .als-about-vision > span {
    font-size: clamp(20px, 5vw, 24px);
  }

  #root .als-about-vision > p {
    max-width: 38rem;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: normal;
  }

  #root .als-about-mission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    align-items: stretch;
    gap: 10px;
  }

  #root .als-about-mission-grid > .als-about-mission-1,
  #root .als-about-mission-grid > .als-about-mission-2,
  #root .als-about-mission-grid > .als-about-mission-3,
  #root .als-about-mission-grid > .als-about-mission-4 {
    grid-area: auto;
  }

  #root .als-about-mission-grid > .als-about-mission-center {
    grid-area: 1 / 1 / 2 / 3;
    width: 122px;
    min-height: 42px;
    height: auto;
    aspect-ratio: auto;
    justify-self: center;
    padding: 8px 10px;
    border-radius: 999px;
  }

  #root .als-about-mission-center > b {
    white-space: nowrap;
  }

  #root .als-about-mission-card {
    min-width: 0;
    min-height: 126px;
    padding: 14px 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  #root .als-about-mission-card h3 {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: normal;
    word-break: normal;
  }

  #root .als-about-mission-card p {
    max-width: 30ch;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: normal;
    word-break: normal;
  }

  #root .als-about-values {
    margin-top: 32px;
  }

  #root .als-about-values > h2 {
    margin-bottom: 16px;
    font-size: clamp(25px, 6vw, 30px);
  }

  #root .als-about-values > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 9px;
  }

  #root .als-about-values article {
    min-width: 0;
    min-height: 118px;
    padding: 14px 10px;
  }

  #root .als-about-values article:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 5px);
    justify-self: center;
  }

  #root .als-about-values article h3 {
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: normal;
  }

  #root .als-about-values article p {
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: normal;
  }

  #root .als-about-journey {
    padding: 32px 0 38px;
  }

  #root .als-about-journey h2 {
    margin-bottom: 16px;
  }

  #root .als-about-timeline {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 0;
  }

  #root .als-about-timeline::before {
    top: 20px;
    right: auto;
    bottom: 20px;
    left: 20px;
    width: 2px;
    height: auto;
    display: block;
  }

  #root .als-about-timeline-item {
    min-height: 0;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 8px 10px;
    padding: 0 0 2px;
    border: 0;
  }

  #root .als-about-timeline-item > .als-about-timeline-photo-top,
  #root .als-about-timeline-item > .als-about-timeline-photo-bottom {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 0;
  }

  #root .als-about-timeline-item > .als-about-timeline-detail-top,
  #root .als-about-timeline-item > .als-about-timeline-detail-bottom {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 0;
  }

  #root .als-about-timeline-item > div > img {
    width: 100%;
    height: clamp(135px, 40vw, 180px);
    border-radius: 8px;
    object-fit: cover;
  }

  #root .als-about-timeline-content {
    min-height: 0;
    padding: 14px 13px;
    border: 1px solid #d8e3ed;
    border-radius: 8px;
    background: #fff;
  }

  #root .als-about-timeline-item.is-active .als-about-timeline-content {
    transform: none;
    border-color: #07519c;
    background: #fff;
    box-shadow: 0 9px 22px #123f6520;
  }

  #root .als-about-timeline-marker {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    width: 40px;
    height: 40px;
    margin-top: 12px;
    box-shadow: 0 0 0 4px #f5f9fd;
  }

  #root .als-about-timeline-item h3 {
    margin: 2px 0 5px;
    font-size: 16px;
    line-height: 1.35;
  }

  #root .als-about-timeline-item p {
    max-width: none;
    font-size: 13px;
    line-height: 1.55;
  }
}

/* Keep the desktop catalog category rail at the top while the product grid scrolls. */
@media (min-width: 681px) {
  #root .alaska-catalog-layout > .alaska-catalog-sidebar {
    position: sticky;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 8px);
    align-self: start;
    max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Give the catalog breadcrumb clear spacing under the header and align it to the listing container. */
#root .ref-catalog-page > .ref-catalog-breadcrumb-only {
  display: flex;
  align-items: center;
  width: var(--container-width);
  min-height: 26px;
  margin: 4px auto 0;
}

#root .ref-catalog-page > .alaska-catalog-layout {
  margin-top: 4px;
}

#root .ref-catalog-page .ref-catalog-breadcrumb-inner {
  width: 100%;
  padding: 0;
}

#root .ref-catalog-page > .ref-catalog-breadcrumb-only nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 680px) {
  #root .ref-catalog-page > .ref-catalog-breadcrumb-only {
    min-height: 24px;
    margin-top: 4px;
  }
}

/* Keep the sticky category rail below the reveal-on-scroll header. */
@media (min-width: 761px) {
  #root:not(:has(.ref-header.is-scroll-hidden)) .alaska-catalog-layout > .alaska-catalog-sidebar {
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 142px);
    max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 154px);
  }
}

@media (min-width: 681px) and (max-width: 760px) {
  #root:not(:has(.ref-header.is-scroll-hidden)) .alaska-catalog-layout > .alaska-catalog-sidebar {
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 160px);
    max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 172px);
  }
}

@media (min-width: 681px) {
  body.admin-bar #root .alaska-catalog-layout > .alaska-catalog-sidebar {
    top: calc(var(--wp-admin--admin-bar--height, 32px) + 8px);
    max-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px) - 20px);
  }

  body.admin-bar #root:not(:has(.ref-header.is-scroll-hidden)) .alaska-catalog-layout > .alaska-catalog-sidebar {
    top: calc(var(--wp-admin--admin-bar--height, 32px) + 142px);
    max-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px) - 154px);
  }
}

/* Remove the divider under the homepage project gallery heading. */
#root .ref-home-projects .ref-section-heading {
  border-bottom: 0;
}

/* Compact the product archive controls on phones. */
@media (max-width: 980px) {
  #root .ref-catalog-page > .ref-catalog-breadcrumb-only {
    min-height: 18px;
    margin-top: 0;
    width: var(--container-width);
    margin-right: auto;
    margin-left: auto;
  }

  #root .ref-catalog-page > .alaska-catalog-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    grid-auto-flow: row;
    gap: 12px;
    width: var(--container-width);
    margin-top: 0;
    margin-bottom: 24px;
    padding-top: 0;
  }

  #root .ref-catalog-page .ref-catalog-breadcrumb-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  #root .ref-catalog-page > .ref-catalog-breadcrumb-only nav {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  #root .ref-catalog-page .alaska-catalog-sidebar {
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    padding: 0;
    border-radius: 0;
  }

  #root .ref-catalog-page .alaska-catalog-disclosure > summary {
    display: flex;
    min-height: 42px;
    gap: 6px;
    padding: 6px 10px;
    cursor: pointer;
    pointer-events: auto;
  }

  #root .ref-catalog-page .alaska-catalog-disclosure > summary h2 {
    font-size: 14px;
    line-height: 1.25;
  }

  #root .ref-catalog-page .alaska-catalog-disclosure-count {
    display: block;
    font-size: 10px;
  }

  #root .ref-catalog-page .alaska-catalog-disclosure > summary > svg {
    display: block;
    flex-basis: 14px;
    width: 14px;
    height: 14px;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    padding-bottom: 16px;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog .ref-catalog-toolbar {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog .ref-catalog-search {
    width: 100%;
    height: 40px;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog .ref-catalog-search input,
  #root .ref-catalog-page .alaska-woocommerce-catalog .ref-catalog-search button {
    height: 100%;
    min-height: 0;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 1fr);
    align-items: center;
    column-gap: 10px;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog > .ref-catalog-toolbar,
  #root .ref-catalog-page .alaska-woocommerce-catalog > .woocommerce-notices-wrapper,
  #root .ref-catalog-page .alaska-woocommerce-catalog > ul.products,
  #root .ref-catalog-page .alaska-woocommerce-catalog > .woocommerce-pagination {
    grid-column: 1 / -1;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog > .woocommerce-notices-wrapper:empty {
    display: none;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog > .woocommerce-result-count {
    grid-column: 1;
    float: none;
    min-width: 0;
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog > .woocommerce-ordering {
    grid-column: 2;
    float: none;
    width: 100%;
    margin: 0;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog > .woocommerce-ordering select {
    width: 100%;
    min-height: 40px;
  }

  #root .ref-catalog-page .alaska-woocommerce-catalog > ul.products {
    grid-row: auto;
    clear: none;
    margin-top: 10px !important;
  }

}
