/* Global responsive overrides for mobile/tablet */
.mobile-nav-toggle,
.mobile-nav-overlay,
.mobile-nav-drawer,
.product-side-toggle {
  display: none;
}

@media (max-width: 1199px) {
  .site-container,
  .dropdown-products,
  .dropdown-solutions {
    width: 100%;
    max-width: none;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 991px) {
  body {
    padding-top: 60px;
  }

  .site-header {
    border-top: 0;
  }

  .nav-wrap {
    height: 60px;
    justify-content: space-between;
  }

  .logo {
    position: static;
    transform: none;
    width: auto;
    max-width: 72%;
  }

  .logo-img {
    max-width: 180px;
    max-height: 36px;
  }

  .main-nav {
    width: 100%;
  }

  .menu {
    gap: 12px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .menu > li {
    line-height: 60px;
    flex: 0 0 auto;
  }

  .menu > li > a {
    font-size: 15px;
  }

  /* Replace scroller menu with drawer menu */
  .main-nav {
    display: none;
  }

  .lang-switch {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    appearance: none;
    border: 1px solid #d6dce7;
    background: #fff;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .mobile-nav-toggle-bars {
    width: 18px;
    height: 2px;
    background: #1f2c3f;
    position: relative;
    display: block;
  }

  .mobile-nav-toggle-bars::before,
  .mobile-nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #1f2c3f;
  }

  .mobile-nav-toggle-bars::before {
    top: -6px;
  }

  .mobile-nav-toggle-bars::after {
    top: 6px;
  }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1200;
  }

  .mobile-nav-drawer {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(86vw, 360px);
    background: #fff;
    transform: translateX(110%);
    transition: transform 0.22s ease;
    z-index: 1250;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e6edf7;
  }

  body.is-mobile-nav-open {
    overflow: hidden;
  }

  body.is-mobile-nav-open .mobile-nav-overlay {
    opacity: 1;
    visibility: visible;
  }

  body.is-mobile-nav-open .mobile-nav-drawer {
    transform: translateX(0);
  }

  .mobile-nav-head {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: 1px solid #eef3fb;
  }

  .mobile-nav-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }

  .mobile-nav-logo {
    max-height: 34px;
    width: auto;
    height: auto;
  }

  .mobile-nav-close {
    appearance: none;
    border: 1px solid #d6dce7;
    background: #fff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #1f2c3f;
  }

  .mobile-nav-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
  }

  .mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-nav-item {
    border-bottom: 1px solid #f1f5fb;
  }

  .mobile-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
  }

  .mobile-nav-link {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    color: #1f2c3f;
    text-decoration: none;
    font-weight: 600;
  }

  .mobile-nav-expander {
    appearance: none;
    border: 1px solid #d6dce7;
    background: #fff;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .mobile-nav-expander::before,
  .mobile-nav-expander::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #1f2c3f;
    transform: translate(-50%, -50%);
  }

  .mobile-nav-expander::after {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .mobile-nav-item.is-open .mobile-nav-expander::after {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  .mobile-nav-sublist {
    list-style: none;
    margin: 0;
    padding: 0 0 10px;
    display: none;
  }

  .mobile-nav-item.is-open .mobile-nav-sublist {
    display: block;
  }

  .mobile-nav-subitem {
    padding: 0 14px 0 18px;
  }

  .mobile-nav-sublink {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #2b3340;
    background: #f6f9ff;
    font-size: 14px;
  }

  .mobile-nav-sublink:active {
    background: #eef4ff;
  }

  .dropdown {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    box-shadow: none;
    border-top: 1px solid #dfe6ef;
  }

  .dropdown-products,
  .dropdown-solutions {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .products-grid,
  .solution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .dropdown-common {
    position: static;
    transform: none;
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  .common-dropdown-list a {
    line-height: 36px;
    padding: 0 8px;
  }

  .hero-slider,
  .product-banner,
  .news-list-banner {
    min-height: auto;
  }

  .yake-hero-img {
    height: min(600px, 55vw);
  }

  .hero-slider .slider-arrow {
    width: 34px;
    height: 34px;
  }

  .slide-inner {
    display: flex;
    align-items: center;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .slide-copy h1,
  .slide-copy h2 {
    font-size: 26px;
    line-height: 1.25;
  }

  .product-detail-banner .slide-copy h2 {
    font-size: 22px;
  }

  .slide-copy p {
    font-size: 14px;
    line-height: 1.7;
  }

  .slide-copy {
    width: 100%;
    max-width: none;
    padding-left: 14px;
    padding-right: 14px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .about-subnav-inner {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .about-subnav-sep {
    display: none;
  }

  .about-stats-heading,
  .about-history-title,
  .about-honor-title,
  .about-philosophy-title,
  .about-partners-title {
    font-size: 22px;
    line-height: 1.3;
  }

  .about-honor-row--large,
  .about-honor-row--small {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .about-honor-row--small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-honor-frame {
    width: calc(50% - 6px);
    max-width: none;
  }

  .about-honor-frame--gold {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
    border-width: 2px;
  }

  .about-honor-frame--gold img {
    min-height: 0;
    max-height: none;
  }

  .about-history-nav {
    width: 34px;
    height: 34px;
  }

  .about-partners-card {
    min-width: 132px;
  }

  .side-tools {
    display: none;
  }

  /* Home */
  .ptb-70 {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .partner-title,
  .products-title,
  .solutions-title,
  .news-title,
  .product-list-title,
  .solution-list-heading,
  .news-list-heading {
    font-size: 28px;
    line-height: 1.3;
  }

  .partner-title {
    font-size: 20px;
  }

  .partner-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
    height: auto;
  }

  .partner-intro,
  .partner-card {
    min-height: 220px;
  }

  .partner-card-hover {
    padding-top: 20px;
  }

  .partner-card-base {
    display: none;
  }

  .partner-card-hover {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    height: 100%;
  }

  .products-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card {
    min-width: 0;
  }

  .product-name {
    font-size: 14px;
  }

  .solutions-wrap {
    padding-left: 8px;
    padding-right: 8px;
  }

  .solutions-viewport {
    touch-action: pan-y;
  }

  .solutions-section .solutions-arrow {
    z-index: 6;
    width: 28px;
    height: 28px;
  }

  .solutions-section .solutions-arrow.prev {
    left: 6px;
  }

  .solutions-section .solutions-arrow.next {
    right: 6px;
  }

  .solution-card2 {
    width: calc(50% - 8px);
    min-width: calc(50% - 8px);
  }

  .solution-card2 h4 {
    font-size: 15px;
  }

  .news-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .news-left,
  .news-right {
    width: 100%;
  }

  .news-text h4 {
    font-size: 18px;
  }

  /* Product list */
  .product-list-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-side-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    padding: 8px 14px;
    margin: 4px 0 10px;
    border: 1px solid #d7e1ef;
    border-radius: 10px;
    background: #f7faff;
    color: #1f2c3f;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }

  .product-side-toggle::after {
    content: "+";
    font-size: 16px;
    line-height: 1;
  }

  .product-list-page.is-side-open .product-side-toggle::after {
    content: "-";
  }

  .product-side-nav {
    position: static;
    top: auto;
    display: none;
  }

  .product-list-page.is-side-open .product-side-nav {
    display: block;
  }

  .product-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-list-item-title {
    font-size: 14px;
  }

  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-gallery-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-detail-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }

  /* News list */
  .news-list-item {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px;
  }

  .news-detail-inner,
  .solution-detail-inner {
    padding-left: 0;
    padding-right: 0;
  }

  .news-detail-title,
  .solution-detail-title,
  .product-detail-title {
    font-size: 28px;
    line-height: 1.3;
  }

  .cms-content {
    font-size: 15px;
    line-height: 1.75;
  }

  .cms-content table {
    display: block;
    overflow-x: auto;
  }

  /* Solution list */
  .solution-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Contact */
  .contact-form-card {
    padding: 22px 16px;
  }

  .contact-form-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .contact-captcha-row {
    grid-template-columns: 1fr 120px auto;
    gap: 8px;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* ODM service page */
  .odm-hero {
    min-height: 320px;
  }

  .odm-hero-title {
    font-size: 30px;
    line-height: 1.2;
  }

  .odm-service-grid,
  .odm-adv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .odm-process-line {
    padding-left: 20px;
  }

  .odm-hotline-wrap {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .odm-message-row-2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-inner,
  .footer-main,
  .footer-top,
  .footer-middle {
    flex-wrap: wrap;
  }

  .footer-middle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .footer-logo {
    display: none;
  }

  .footer-brand,
  .footer-subscribe {
    width: 100%;
  }

  .footer-brand h3 {
    font-size: 20px;
  }

  .footer-subscribe {
    margin-top: 12px;
  }

  .footer-subscribe input,
  .footer-subscribe button {
    height: 40px;
  }

  .footer-col,
  .footer-main > div {
    width: 100%;
  }

  .footer-col h4 {
    font-size: 17px;
    margin-bottom: 6px;
  }

  .footer-col a,
  .footer-contact p {
    line-height: 1.75;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 767px) {
  .site-container,
  .dropdown-products,
  .dropdown-solutions {
    padding-left: 12px;
    padding-right: 12px;
  }

  .products-grid,
  .solution-grid {
    grid-template-columns: 1fr;
  }

  .product-side-toggle {
    margin-bottom: 8px;
  }

  .footer-middle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ptb-70 {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .slide-copy h1,
  .slide-copy h2 {
    font-size: 22px;
  }

  .products-grid-2,
  .product-list-grid,
  .solution-list-grid,
  .odm-adv-grid {
    grid-template-columns: 1fr;
  }

  .products-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .odm-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solution-card2 {
    width: 100%;
    min-width: 100%;
  }

  .product-gallery-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .news-detail-title,
  .solution-detail-title,
  .product-detail-title {
    font-size: 22px;
  }

  .news-list-item {
    grid-template-columns: 1fr;
  }

  .news-item-thumb {
    aspect-ratio: 16 / 9;
  }

  .contact-captcha-row {
    grid-template-columns: 1fr;
  }

  .contact-captcha-img {
    width: 120px;
    max-width: 100%;
  }

  .odm-hero-title {
    font-size: 24px;
  }

  .odm-hero-points li {
    font-size: 14px;
  }

  .about-honor-frame {
    width: calc(50% - 6px);
  }

  .about-honor-row--small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-honor-frame--gold {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
    border-width: 2px;
  }

  .about-honor-frame--gold img {
    min-height: 0;
    max-height: none;
  }

  .about-stats-grid,
  .about-philosophy-grid {
    grid-template-columns: 1fr;
  }

  .about-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-philosophy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-philosophy-card {
    padding-left: 10px;
    padding-right: 10px;
  }

  .about-stat-icon {
    font-size: 28px;
  }

  .about-stat-value {
    font-size: 20px;
  }

  .about-stats-content {
    font-size: 14px;
  }

  .about-partners-card {
    min-width: 118px;
  }
}
