@media(min-width:640px){
  .container{padding-inline:1.4rem}.section{padding-block:5rem}.product-grid{grid-template-columns:repeat(2,1fr)}
  .problem-grid,.solution-grid,.reason-grid,.article-grid{grid-template-columns:repeat(2,1fr)}
  .category-grid{grid-template-columns:repeat(3,1fr)}.category-card p{display:block}.category-card{min-height:220px}
  .form-grid{grid-template-columns:1fr 1fr}.field--full{grid-column:1/-1}.modal__panel{padding:1.6rem}
  .footer-grid{grid-template-columns:1.4fr 1fr 1fr}.footer-brand{grid-column:1/-1}
}
@media(min-width:900px){
  body{padding-bottom:0}.topbar__item--extra{display:flex}.header-main{grid-template-columns:auto minmax(260px,1fr) auto auto}.header-search{display:block}.header-contact{align-items:center;display:flex;gap:.55rem}.menu-toggle{display:none}.desktop-cta{display:inline-flex}
  .main-nav{border-top:1px solid var(--color-line);display:block;inset:auto;overflow:visible;padding:0;position:static}.nav-list{align-items:stretch;display:flex;gap:.05rem;justify-content:center}.nav-item{position:relative}.nav-item__row{height:100%}.nav-link{font-size:.86rem;min-height:auto;padding:.72rem .62rem}.nav-submenu-toggle{background:transparent;height:auto;margin-left:-.45rem;padding:.1rem;width:1.6rem}.nav-submenu{background:#fff;border:1px solid var(--color-line);border-radius:.8rem;box-shadow:var(--shadow-md);left:0;min-width:220px;padding:.45rem;position:absolute;top:calc(100% - .1rem);z-index:130}.nav-item:hover>.nav-submenu,.nav-item:focus-within>.nav-submenu,.nav-submenu.is-open{display:grid}.nav-submenu a{border:0;border-radius:.55rem;color:var(--color-ink);padding:.65rem .7rem;white-space:nowrap}.nav-submenu a:hover,.nav-submenu a[aria-current="page"]{background:var(--color-bg);color:var(--color-primary)}
  .mobile-nav-actions{display:none}.hero{padding:4.5rem 0}.hero__grid{align-items:stretch;grid-template-columns:1.02fr .98fr}.hero__visual{min-height:490px}.hero__content{padding-block:1rem}.commitment-grid{grid-template-columns:repeat(4,1fr)}.commitment{border-bottom:0;border-right:1px solid var(--color-line)!important;padding:1.15rem}.commitment:last-child{border-right:0!important}.commitment span{display:block}
  .product-grid{grid-template-columns:repeat(4,1fr)}.finder{grid-template-columns:.85fr 1.4fr 1fr;padding:2rem}.finder__controls{grid-template-columns:repeat(2,1fr)}.finder__controls .btn{grid-column:1/-1}.problem-grid{grid-template-columns:repeat(4,1fr)}.solution-grid{grid-template-columns:repeat(3,1fr)}.reason-grid{grid-template-columns:repeat(2,1fr)}
  .process{grid-template-columns:repeat(4,1fr)}.process__item{display:block}.process__item:not(:last-child)::after{background:#b9dbe4;content:"";height:2px;left:2.8rem;position:absolute;right:-1rem;top:1.35rem}.process__number{position:relative;z-index:1}.process__content{padding-top:.8rem}
  .project-feature{grid-template-columns:1.1fr .9fr}.project-feature__media{min-height:480px}.consultation{grid-template-columns:.85fr 1.15fr}.consultation__info,.consultation-form{padding:2rem}.article-grid{grid-template-columns:repeat(3,1fr)}.footer-grid{grid-template-columns:1.5fr repeat(3,1fr)}.footer-brand{grid-column:auto}.site-footer{padding-bottom:2rem}.mobile-cta{display:none}.back-to-top{bottom:1rem}.toast{bottom:1rem}
  .catalog-layout{grid-template-columns:240px 1fr}.catalog-sidebar{align-self:start;position:sticky;top:8.8rem}.catalog-main .product-grid{grid-template-columns:repeat(3,1fr)}.product-detail{grid-template-columns:1.03fr .97fr}.product-info{align-content:start}.category-overview{grid-template-columns:repeat(3,1fr)}.content-grid{grid-template-columns:repeat(3,1fr)}.contact-layout{grid-template-columns:.8fr 1.2fr}.article-layout{grid-template-columns:minmax(0,1fr) 280px}.article-aside{position:sticky;top:9rem}
}

/* Tablet portrait: keep the primary consultation action visible without
   crowding the logo or turning the contact dock into a full-width bar. */
@media(min-width:600px) and (max-width:899px){
  .header-main{gap:.6rem;grid-template-columns:auto minmax(0,1fr) auto auto}
  .desktop-cta{display:inline-flex;font-size:.82rem;grid-column:3;grid-row:1;min-height:44px;padding:.58rem .85rem;white-space:nowrap}
  .menu-toggle{grid-column:4;grid-row:1}
  .mobile-cta{border:1px solid var(--color-line);border-radius:.9rem;bottom:calc(.75rem + env(safe-area-inset-bottom,0px));box-shadow:var(--shadow-md);column-gap:.45rem;left:50%;padding:.4rem;right:auto;transform:translateX(-50%);width:min(calc(100% - 2rem),34rem)}
  .mobile-cta a,.mobile-cta button{border-radius:.65rem;font-size:.95rem;height:48px;line-height:1;min-height:48px;padding:0 1rem;white-space:nowrap}
  .mobile-cta__zalo{margin-left:0}
  .site-footer{padding-bottom:6rem}
  .back-to-top{bottom:5.4rem}
  .toast{bottom:5.6rem}
}

/* Tablet and compact landscape screens: give each CTA a predictable area,
   prevent label wrapping and avoid overly wide single buttons. */
@media(min-width:600px) and (max-width:1179px){
  .hero__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:34rem;width:100%}
  .hero__actions .btn{min-width:0;white-space:nowrap;width:100%}
  .product-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .product-actions .btn{min-width:0;width:100%}
  .product-actions [data-open-consultation]{grid-column:1/-1}
  .project-feature__content>.btn{justify-self:start;max-width:20rem;width:100%}
}

@media(min-width:640px) and (max-width:1179px){
  .product-card__actions{grid-template-columns:1fr}
  .product-card__actions .btn{width:100%}
}

/* Tablet landscape: reduce card density and compact the header CTA before
   the full laptop layout takes over. */
@media(min-width:900px) and (max-width:1179px){
  .header-main{gap:.55rem;grid-template-columns:auto minmax(190px,1fr) auto auto}
  .desktop-cta{font-size:.82rem;padding-inline:.85rem;white-space:nowrap}
  .product-grid{grid-template-columns:repeat(3,1fr)}
  .catalog-main .product-grid{grid-template-columns:repeat(2,1fr)}
}

@media(min-width:1180px){.nav-link{font-size:.9rem;padding-inline:.82rem}.header-main{grid-template-columns:auto minmax(330px,1fr) auto auto}.container{padding-inline:0}}
@media(max-width:899px){.topbar__item--extra{display:none}.site-header{top:0}.page-hero{padding-top:1.1rem}}
@media(max-width:420px){.logo__text{font-size:.92rem}.logo__mark{height:2.45rem;width:2.45rem}.hero h1{font-size:2.15rem}.hero__actions .btn{width:100%}.key-specs{grid-template-columns:1fr}.product-card__actions{grid-template-columns:1fr}.category-card{padding:.85rem}.category-card h3{font-size:.92rem}}

/* Bộ lọc sản phẩm dạng ngang */
@media (min-width:640px){
  .catalog-filters{grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
  .catalog-filters .btn{min-height:46px;width:100%}
}
@media (min-width:900px){
  .catalog-layout{grid-template-columns:minmax(0,1fr)}
  .catalog-sidebar{position:static}
}

/* Trang dựng theo khối */
@media(min-width:640px){
  .page-block__inner{padding-inline:1.4rem}
  .builder-slider{height:var(--builder-slider-height-tablet,520px)}
  .builder-slide__inner{padding-inline:2.5rem}
  .builder-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .builder-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
  .builder-testimonials{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:900px){
  .builder-slider{height:var(--builder-slider-height-desktop,620px)}
  .builder-slide__inner{padding-inline:4.5rem}
  .builder-hero{grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr)}
  .builder-hero--center{grid-template-columns:minmax(0,920px);justify-content:center}
  .builder-split{grid-template-columns:repeat(2,minmax(0,1fr));gap:2.5rem}
  .builder-split--image-left .builder-split__media{grid-column:1;grid-row:1}
  .builder-split--image-left .builder-split__content{grid-column:2;grid-row:1}
  .builder-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .builder-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}
  .builder-process{grid-template-columns:repeat(4,minmax(0,1fr))}
  .builder-testimonials{grid-template-columns:repeat(3,minmax(0,1fr))}
  .builder-cta{grid-template-columns:minmax(0,1fr) auto}
  .builder-consultation{grid-template-columns:.85fr 1.15fr;gap:2rem}
}
@media(max-width:639px){
  .builder-slider__arrow{height:38px;width:38px}
  .builder-slider__arrow--prev{left:.5rem}
  .builder-slider__arrow--next{right:.5rem}
  .builder-slide__content{max-width:calc(100% - 2.6rem)}
}

/* V1.3.4 logo polish: centered mobile logo with matching side columns.
   The image scales to its intrinsic ratio; never distort a portrait logo. */
@media(max-width:639px){
  .header-main{gap:.35rem;grid-template-columns:44px minmax(0,1fr) 44px;min-height:92px;padding-block:8px}
  .header-main>.menu-toggle{grid-column:1;grid-row:1;justify-self:start;position:relative;z-index:1}
  .header-main>.logo{grid-column:2;grid-row:1;justify-self:center;min-width:0;max-width:100%;gap:.4rem}
  .header-main>.logo .logo__mark{flex:0 0 2.3rem;height:2.3rem;width:2.3rem}
  .header-main>.logo .logo__text{font-size:clamp(.7rem,2.9vw,.95rem);letter-spacing:-.035em;min-width:0;white-space:nowrap}
  .header-main>.logo .logo__text small{font-size:.55em;letter-spacing:.1em;white-space:nowrap}
  .header-main>.logo.logo--custom .logo__image--wordmark{
    display:block;width:auto;height:auto;max-width:180px;max-height:76px;object-position:center center;
  }
  .header-main>.desktop-cta{display:none}
}
/* Small phone screens: retain a usable menu tap target and side symmetry. */
@media(max-width:359px){
  .header-main>.logo.logo--custom .logo__image--wordmark{max-width:148px;max-height:68px}
}
/* Tablet/mobile landscape: avoid crowding the search and contact controls. */
@media(min-width:640px) and (max-width:899px){
  .header-main>.logo.logo--custom .logo__image--wordmark{max-width:130px;max-height:60px}
}
@media(min-width:900px) and (max-width:1179px){
  .header-main>.logo.logo--custom .logo__image--wordmark{max-width:150px;max-height:64px}
}
@media(min-width:1180px){
  .header-main>.logo.logo--custom .logo__image--wordmark{max-width:220px;max-height:78px}
}
