/*
 * AILIWEI mobile compatibility layer v3.8.5
 * Loaded after style.css. Every visual override is limited to tablet/phone widths
 * so the desktop layout remains unchanged.
 */

@media (max-width: 1023px) {
  html {
    min-width: 320px;
    scroll-padding-top: calc(84px + env(safe-area-inset-top));
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    min-width: 320px;
    max-width: 100%;
    overflow-x: clip;
    -webkit-tap-highlight-color: transparent;
  }

  body.menu-open,
  body.modal-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

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

  p,
  h1,
  h2,
  h3,
  a,
  button,
  dt,
  dd,
  td,
  th {
    overflow-wrap: anywhere;
  }

  button,
  a,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .container,
  .refined-catalog .container,
  .compact-products-heading,
  .compact-catalog,
  .product-detail-workspace,
  .product-detail-workspace-v30 {
    width: min(100% - 32px, 1200px);
  }

  .section {
    padding: 72px 0;
  }

  .section-heading,
  .section-heading.split {
    margin-bottom: 36px;
  }

  .btn,
  .menu-toggle,
  .primary-nav > a,
  .language-switch a,
  .product-flat-lightbox-card button,
  .catalog-image-lightbox-card button,
  .footer-qr-modal-close,
  .wechat-modal-close {
    min-width: 44px;
    min-height: 44px;
  }

  /* Fixed header and full-screen mobile navigation, including iPhone safe areas. */
  .site-header,
  .site-header.scrolled,
  body:not(:has(.home-hero)) .site-header,
  .about-page .site-header:not(.scrolled),
  .contact-page .site-header:not(.scrolled) {
    height: calc(74px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    background: rgba(245, 240, 232, .98);
    color: var(--brown);
    box-shadow: 0 1px 0 rgba(74,66,56,.12);
    backdrop-filter: none;
  }

  .site-header .nav-wrap {
    width: min(100% - 24px, 1200px);
    height: 74px;
    padding-top: 0;
    gap: 10px;
  }

  .site-header .brand {
    min-width: 0;
    max-width: calc(100% - 58px);
    gap: 9px;
    transform: none;
  }

  .site-header .brand-image,
  .site-header .brand-mark {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
  }

  .site-header .brand-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .site-header .brand-copy {
    min-width: 0;
  }

  .site-header .brand-copy strong,
  .site-header .brand-copy small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-toggle {
    position: relative;
    z-index: 103;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 12px;
    border-radius: 50%;
  }

  .menu-toggle:focus-visible {
    outline: 2px solid var(--gold-dark);
    outline-offset: 2px;
  }

  .primary-nav,
  .site-header .primary-nav {
    inset: 0;
    min-height: 100vh;
    min-height: calc(var(--mobile-vh, 1vh) * 100);
    min-height: 100dvh;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
    padding:
      calc(92px + env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      calc(28px + env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f7f3ed;
  }

  .primary-nav > a:not(.btn),
  .site-header .primary-nav > a:not(.btn),
  .site-header:not(.scrolled) .primary-nav > a:not(.btn) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(74,66,56,.1);
    color: var(--brown);
    font-size: clamp(22px, 7vw, 29px);
    line-height: 1.2;
    text-align: center;
  }

  .primary-nav > a:not(.btn)::after {
    display: none;
  }

  .primary-nav .language-switch {
    align-self: center;
    margin: 10px 0 4px;
  }

  .primary-nav .nav-cta {
    width: 100%;
    margin-top: 10px;
  }

  /* Heroes */
  .home-page .home-hero,
  .home-hero {
    min-height: calc((var(--mobile-vh, 1vh) * 100) - 74px - env(safe-area-inset-top));
    min-height: calc(100svh - 74px - env(safe-area-inset-top));
    margin-top: calc(74px + env(safe-area-inset-top));
    background-position: 58% center;
  }

  .home-page .hero-content,
  .hero-content {
    width: min(100% - 32px, 1200px);
    padding-top: 42px;
    padding-bottom: calc(42px + env(safe-area-inset-bottom));
  }

  .hero-content h1,
  .hero-title {
    max-width: 100%;
    font-size: clamp(2.45rem, 12vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: .015em;
  }

  .hero-lead,
  .page-hero-lead {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.8;
  }

  .hero-actions,
  .page-hero-actions,
  .detail-actions,
  .cta-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .page-hero-actions .btn,
  .detail-actions .btn,
  .cta-actions .btn {
    width: 100%;
  }

  .hero-side-index,
  .hero-corner-note,
  .home-cursor-glow,
  .advantages-scroll-marker {
    display: none !important;
  }

  .page-hero,
  .cinematic-page-hero,
  .factory-hero {
    min-height: auto;
    padding:
      calc(126px + env(safe-area-inset-top))
      0
      64px;
  }

  .page-hero-content,
  .factory-hero-content {
    width: min(100% - 32px, 1200px);
  }

  .page-hero h1,
  .factory-hero-content h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 11vw, 4.6rem);
    line-height: 1.03;
  }

  .page-hero-meta,
  .factory-hero-facts {
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  /* Main page layouts */
  .trust-grid,
  .advantage-grid,
  .process-grid,
  .product-grid,
  .home-product-grid,
  .application-cards,
  .stat-grid,
  .contact-grid,
  .two-column,
  .certificate-layout,
  .home-factory-grid,
  .factory-intro-grid,
  .factory-quality-grid,
  .factory-video-layout,
  .archive-cta .container,
  .story-band,
  .image-stat-band {
    grid-template-columns: 1fr;
  }

  .story-content,
  .stat-panel,
  .cta-card {
    padding: 44px 24px;
  }

  .home-factory-image,
  .story-image,
  .factory-visual {
    min-height: 340px;
  }

  .factory-video-meta {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .factory-video-meta span {
    min-width: 0;
    padding-right: 7px;
  }

  .factory-equipment-grid,
  .factory-process-list,
  .factory-mosaic {
    grid-template-columns: 1fr 1fr;
  }

  .factory-equipment-card,
  .factory-mosaic-item,
  .process-card,
  .product-card,
  .feature-card {
    min-width: 0;
  }

  /* Product archive */
  .compact-products-page {
    padding-top: calc(94px + env(safe-area-inset-top));
  }

  .compact-products-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .compact-products-intro {
    padding-left: 0;
    border-left: 0;
  }

  .compact-catalog .filter-bar,
  .filter-bar {
    grid-template-columns: 1fr 1fr;
    padding: 16px;
  }

  .compact-filter-reset,
  .filter-bar .btn {
    width: 100%;
  }

  .compact-product-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
  }

  .compact-product-grid .catalog-product-image,
  .compact-product-grid .product-image {
    min-height: 0;
  }

  .catalog-image-zoom,
  .product-flat-zoom {
    opacity: 1;
    transform: none;
  }

  /* Product detail */
  .product-detail-v29,
  .product-detail-v30 {
    min-height: auto;
    padding-top: calc(92px + env(safe-area-inset-top));
  }

  .product-detail-workspace,
  .product-detail-workspace-v30 {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .product-flat-gallery-head {
    align-items: flex-start;
  }

  .detail-panel-v29,
  .detail-panel-v30 {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .detail-highlight-row,
  .detail-spec-grid,
  .detail-panel-actions {
    grid-template-columns: 1fr;
  }

  .detail-panel-actions .btn {
    width: 100%;
  }

  .detail-service-chips {
    flex-wrap: wrap;
  }

  /* Forms and contact details */
  .contact-grid {
    gap: 28px;
  }

  .contact-sidebar,
  .contact-form-card {
    min-width: 0;
  }

  .contact-item strong,
  .contact-item a {
    word-break: break-word;
  }

  .contact-form-card {
    padding: 28px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .field input,
  .field select,
  .field textarea,
  .admin-login-card input,
  .setup-form input {
    width: 100%;
    min-height: 48px;
  }

  .textarea-field textarea {
    min-height: 150px;
  }

  .privacy-check {
    align-items: flex-start;
  }

  .privacy-check input {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
  }

  .map-section {
    padding-inline: 16px;
  }

  .map-placeholder {
    min-height: 300px;
  }

  .map-placeholder > div {
    width: min(100%, 460px);
    padding: 24px 18px;
  }

  /* Footer and floating QR entry */
  .site-footer {
    padding-top: 64px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }

  .footer-bottom {
    margin-top: 40px;
    flex-wrap: wrap;
  }

  .wechat-float {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    min-width: 52px;
    min-height: 52px;
    padding: 6px;
    border-radius: 50%;
  }

  .wechat-float-text {
    display: none;
  }

  .wechat-float-icon {
    width: 40px;
    height: 40px;
  }

  .wechat-modal,
  .footer-qr-modal,
  .product-flat-lightbox,
  .catalog-image-lightbox,
  .factory-lightbox {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .wechat-modal-card,
  .footer-qr-modal-card {
    width: 100%;
    max-height: calc((var(--mobile-vh, 1vh) * 100) - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  .social-wechat-preview {
    display: none !important;
  }

  /* Product/catalog image viewers */
  .product-flat-lightbox-card,
  .catalog-image-lightbox-card {
    width: 100%;
    height: calc((var(--mobile-vh, 1vh) * 100) - 20px);
    height: calc(100dvh - 20px);
    max-height: 100%;
  }

  .product-flat-lightbox-card > header,
  .catalog-image-lightbox-card > header {
    padding: 9px 10px;
  }

  .product-flat-lightbox-card > header > div,
  .catalog-image-lightbox-card > header > div {
    min-width: 0;
    gap: 8px;
  }

  .product-flat-lightbox-card > header span,
  .catalog-image-lightbox-card > header span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-flat-lightbox-stage,
  .catalog-image-lightbox-stage {
    padding: 8px;
  }

  .product-flat-lightbox-card > footer,
  .catalog-image-lightbox-card > footer {
    padding-bottom: max(9px, env(safe-area-inset-bottom));
  }

  .factory-lightbox section {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 20px);
    overflow: auto;
  }

  /* Backend and installer remain usable on phones. */
  .admin-login,
  .setup-shell {
    min-height: 100svh;
    padding:
      max(18px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .admin-login-card,
  .setup-card {
    width: 100%;
  }

  .admin-sidebar {
    width: min(86vw, 300px);
    padding-top: calc(22px + env(safe-area-inset-top));
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .admin-topbar {
    min-height: calc(70px + env(safe-area-inset-top));
    height: auto;
    padding-top: env(safe-area-inset-top);
  }

  .admin-content {
    width: min(100% - 24px, 1440px);
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  .admin-table-wrap,
  .admin-content-tabs {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table,
  .admin-table-modern {
    min-width: 760px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: calc(80px + env(safe-area-inset-top));
  }

  .container,
  .refined-catalog .container,
  .compact-products-heading,
  .compact-catalog,
  .product-detail-workspace,
  .product-detail-workspace-v30 {
    width: min(100% - 24px, 1200px);
  }

  .section {
    padding: 58px 0;
  }

  h1 {
    font-size: clamp(2.15rem, 11vw, 3.2rem);
  }

  h2 {
    font-size: clamp(1.75rem, 8vw, 2.55rem);
  }

  .site-header,
  .site-header.scrolled,
  body:not(:has(.home-hero)) .site-header,
  .about-page .site-header:not(.scrolled),
  .contact-page .site-header:not(.scrolled) {
    height: calc(70px + env(safe-area-inset-top));
  }

  .site-header .nav-wrap {
    width: calc(100% - 20px);
    height: 70px;
  }

  .site-header .brand-copy strong {
    font-size: 15px;
    letter-spacing: .04em;
  }

  .site-header .brand-copy small {
    margin-top: 3px;
    font-size: 7px;
    letter-spacing: .12em;
  }

  .primary-nav,
  .site-header .primary-nav {
    padding-top: calc(86px + env(safe-area-inset-top));
  }

  .home-page .home-hero,
  .home-hero {
    min-height: calc((var(--mobile-vh, 1vh) * 100) - 70px - env(safe-area-inset-top));
    min-height: calc(100svh - 70px - env(safe-area-inset-top));
    margin-top: calc(70px + env(safe-area-inset-top));
  }

  .home-page .hero-content,
  .hero-content,
  .page-hero-content,
  .factory-hero-content {
    width: calc(100% - 24px);
  }

  .hero-content h1,
  .hero-title {
    font-size: clamp(2.35rem, 13vw, 3.55rem);
  }

  .hero-motion-layer {
    opacity: .45;
  }

  .page-hero,
  .cinematic-page-hero,
  .factory-hero {
    padding-top: calc(112px + env(safe-area-inset-top));
    padding-bottom: 52px;
  }

  .page-hero-meta {
    display: none;
  }

  .story-content,
  .stat-panel,
  .cta-card {
    padding: 36px 18px;
  }

  .home-factory-image,
  .story-image,
  .factory-visual {
    min-height: 280px;
  }

  .factory-equipment-grid,
  .factory-process-list,
  .factory-mosaic {
    grid-template-columns: 1fr;
  }

  .factory-video-copy h2 {
    font-size: clamp(2.1rem, 10vw, 3.4rem);
  }

  .factory-video-meta strong {
    font-size: 15px;
  }

  .factory-video-meta span {
    font-size: 9px;
  }

  .compact-products-page {
    padding-top: calc(82px + env(safe-area-inset-top));
  }

  .compact-catalog .filter-bar,
  .filter-bar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .compact-product-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .product-detail-v29,
  .product-detail-v30 {
    padding-top: calc(80px + env(safe-area-inset-top));
  }

  .product-flat-gallery-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }

  .product-flat-gallery-head > div {
    min-width: 0;
  }

  .product-flat-gallery-head h2 {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  .product-detail-v30 .product-flat-grid,
  .product-flat-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }

  .detail-panel-v29,
  .detail-panel-v30 {
    padding: 22px 16px;
  }

  .detail-panel-header h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .contact-form-card {
    padding: 24px 16px;
  }

  .social-action-row,
  .home-footer-platforms {
    width: 100%;
    max-width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .admin-login-card {
    padding: 30px 18px;
  }

  .setup-card {
    padding: 28px 16px;
  }

  .admin-topbar {
    padding-inline: 12px;
  }

  .admin-content {
    width: calc(100% - 20px);
  }

  .admin-form-panel > label,
  .admin-form-grid label,
  .admin-upload-grid label,
  .admin-form-grid label:nth-child(even),
  .admin-form-grid .full {
    margin-inline: 14px !important;
  }

  .admin-form-actions {
    padding-inline: 14px;
  }

  .admin-form-actions .btn,
  .admin-title .btn {
    width: 100%;
  }

  .admin-title {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 374px) {
  .site-header .brand-copy small {
    display: none;
  }

  .site-header .brand-copy strong {
    font-size: 14px;
  }

  .hero-content h1,
  .hero-title {
    font-size: clamp(2.15rem, 12.5vw, 3rem);
  }

  .product-detail-v30 .product-flat-grid,
  .product-flat-grid {
    grid-template-columns: 1fr;
  }

  .social-action-row,
  .home-footer-platforms {
    grid-template-columns: 1fr;
  }

  .social-action-row .social-action,
  .home-footer-platform,
  .home-footer-wechat {
    min-height: 82px !important;
    height: 82px !important;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .primary-nav,
  .site-header .primary-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    align-content: start;
  }

  .primary-nav .language-switch,
  .primary-nav .nav-cta {
    grid-column: 1 / -1;
  }

  .home-page .home-hero,
  .home-hero {
    min-height: 620px;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 1023px) {
  .motion-card,
  .product-card,
  .feature-card,
  .product-flat-item,
  .social-action,
  .btn {
    transform: none !important;
  }

  .home-cursor-glow,
  .social-wechat-preview {
    display: none !important;
  }

  .catalog-image-zoom,
  .product-flat-zoom {
    opacity: 1;
    transform: none;
  }

  .site-header,
  .primary-nav,
  .wechat-modal-backdrop,
  .footer-qr-modal-backdrop,
  .product-flat-lightbox-backdrop,
  .catalog-image-lightbox-backdrop,
  .factory-lightbox-backdrop {
    backdrop-filter: none !important;
  }
}

/* v3.8.8 — product-center Hero on Android/iPhone */
@media (max-width: 1023px) {
  .products-v29-page .products-collection-hero {
    min-height: clamp(360px, 56svh, 520px);
    margin-top: calc(74px + env(safe-area-inset-top));
  }

  .products-collection-hero-media {
    background-position: center;
    animation: none;
  }

  .products-collection-hero-content {
    width: min(100% - 32px, 1200px);
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .products-collection-hero-index {
    display: none;
  }

  .products-collection-hero-content h1 {
    max-width: 760px;
    font-size: clamp(2.45rem, 9vw, 4rem);
  }

  .products-v29-page .compact-products-page {
    padding-top: 70px;
  }
}

@media (max-width: 640px) {
  .products-v29-page .products-collection-hero {
    min-height: clamp(330px, 52svh, 440px);
    margin-top: calc(70px + env(safe-area-inset-top));
  }

  .products-collection-hero-content {
    width: calc(100% - 24px);
    padding-top: 38px;
    padding-bottom: 40px;
  }

  .products-collection-hero-content h1 {
    margin-bottom: 15px;
    font-size: clamp(2.05rem, 10vw, 3rem);
    line-height: 1.08;
  }

  .products-collection-hero-content > div:last-child > p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1.75;
  }

  .products-hero-scroll {
    margin-top: 18px;
  }

  .products-v29-page .compact-products-page {
    padding-top: 56px;
  }
}


/* v3.9.0 — bring products into view sooner on phones */
@media (max-width: 640px) {
  .home-page .trust-strip {
    padding: 0;
  }

  .home-page .trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
  }

  .home-page .trust-grid > div {
    min-width: 0;
    padding: 14px 5px 13px;
    border-right: 1px solid rgba(255,255,255,.1);
    border-bottom: 0;
    text-align: center;
  }

  .home-page .trust-grid > div:last-child { border-right: 0; }
  .home-page .trust-grid strong { font-size: clamp(16px,5vw,22px); line-height: 1.1; }
  .home-page .trust-grid span { margin-top: 5px; font-size: 8px; line-height: 1.35; letter-spacing: .02em; }

  .home-page .home-advantages {
    padding: 34px 0 38px;
  }

  .home-page .home-advantages .section-heading {
    margin-bottom: 18px;
    text-align: left;
  }

  .home-page .home-advantages .section-heading .eyebrow { margin-bottom: 7px; }
  .home-page .home-advantages .section-heading h2 { margin-bottom: 8px; font-size: clamp(1.55rem,7vw,2rem); }
  .home-page .home-advantages .section-heading > p:last-child {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.65;
  }

  .home-page .advantage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
  }

  .home-page .feature-card {
    min-height: 0;
    padding: 15px 13px 14px;
  }

  .home-page .feature-card .line-icon { margin-bottom: 11px; font-size: 18px; }
  .home-page .feature-card .motion-card-index { top: 10px; right: 10px; font-size: 9px; }
  .home-page .feature-card h3 { margin-bottom: 5px; font-size: 15px; }
  .home-page .feature-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 11px;
    line-height: 1.55;
  }

  .home-page .home-products-section {
    padding-top: 42px;
    padding-bottom: 48px;
  }

  .home-page .home-products-section .section-heading {
    margin-bottom: 22px;
  }

  .home-page .home-products-section .section-heading.split > div:last-child > p {
    display: none;
  }

  .home-page .home-product-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
  }

  .home-page .home-product-grid > .product-card:nth-child(n+5) {
    display: none;
  }

  .home-page .home-product-grid .product-image {
    aspect-ratio: 1 / 1;
  }

  .home-page .home-product-grid .product-image img { padding: 10px; }
  .home-page .home-product-grid .product-image::before { inset: 6px; }
  .home-page .home-product-grid .product-category { left: 7px; bottom: 7px; max-width: calc(100% - 14px); padding: 4px 6px; font-size: 8px; }
  .home-page .home-product-grid .product-number { top: 7px; right: 7px; font-size: 10px; }
  .home-page .home-product-grid .product-body { padding: 12px 10px 11px; }
  .home-page .home-product-grid .product-body h3 { margin-bottom: 4px; font-size: 14px; line-height: 1.35; }
  .home-page .home-product-grid .product-body > p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.9em;
    margin-bottom: 8px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 10px;
    line-height: 1.45;
  }
  .home-page .home-product-grid .card-links { display: block; }
  .home-page .home-product-grid .card-links a:first-child { display: inline-flex; font-size: 10px; }
  .home-page .home-product-grid .card-links a:last-child { display: none; }

  .home-page .home-factory-preview { padding-top: 48px; padding-bottom: 48px; }
  .home-page .home-factory-grid { gap: 24px; min-height: 0; }
  .home-page .home-factory-copy { padding: 0; }
  .home-page .home-factory-image {
    min-height: 0;
    aspect-ratio: 4 / 3;
    padding: 18px;
    background-color: #e9e1d6;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }
}

/* v3.9.2 mobile factory flow: environment first, then a compact process overview */
@media (max-width: 640px) {
  .factory-page .factory-gallery-section {
    padding-bottom: 38px;
  }

  .factory-page .factory-process-band {
    padding: 42px 0 38px;
  }

  .factory-page .factory-process-band .section-heading {
    margin-bottom: 0;
  }

  .factory-page .factory-process-band .section-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.8rem, 8vw, 2.45rem);
  }

  .factory-page .factory-process-list {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 24px;
    border-top: 1px solid rgba(255,255,255,.14);
    border-left: 1px solid rgba(255,255,255,.14);
  }

  .factory-page .factory-process-list li {
    min-height: 0;
    padding: 18px 14px 16px;
    border: 0;
    border-right: 1px solid rgba(255,255,255,.14);
    border-bottom: 1px solid rgba(255,255,255,.14);
  }

  .factory-page .factory-process-list li > span {
    display: block;
    font-size: 24px;
    line-height: 1;
  }

  .factory-page .factory-process-list h3 {
    margin: 10px 0 6px;
    font-size: 15px;
    line-height: 1.35;
  }

  .factory-page .factory-process-list p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 11px;
    line-height: 1.55;
  }

  .factory-page .factory-process-list i {
    display: none !important;
  }

  .factory-page .factory-equipment-section {
    padding-top: 50px;
  }
}

/* v3.9.5 mobile footer refinement */
@media (max-width: 640px) {
  .site-footer {
    padding-top: 46px;
  }

  .site-footer .footer-grid {
    gap: 26px;
  }

  .site-footer .footer-brand-block .brand {
    margin-bottom: 0;
  }

  .site-footer .footer-brand-slogan {
    margin-top: 10px;
    font-size: 15px !important;
    line-height: 1.5;
    letter-spacing: .07em;
  }

  .site-footer .footer-brand-slogan::before {
    width: 34px;
    margin-bottom: 9px;
  }

  .site-footer .footer-quick-nav {
    display: none;
  }

  .site-footer .footer-contact {
    padding: 20px 18px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(255,255,255,.035);
  }

  .site-footer .footer-contact h3 {
    margin-bottom: 14px;
    font-size: 15px;
  }

  .site-footer .footer-contact p,
  .site-footer .footer-contact a {
    margin: 0;
  }

  .site-footer .footer-contact p + p {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.09);
  }

  .site-footer .footer-contact-company {
    color: rgba(255,255,255,.9);
    font-size: 14px;
    font-weight: 600;
  }

  .site-footer .footer-contact-address,
  .site-footer .footer-contact-phone,
  .site-footer .footer-contact-email,
  .site-footer .footer-contact-phone a,
  .site-footer .footer-contact-email a {
    color: rgba(255,255,255,.72);
    font-size: 13px;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }

  .site-footer .footer-cooperation {
    padding-top: 2px;
  }

  .site-footer .footer-cooperation h3 {
    margin-bottom: 10px;
  }

  .site-footer .footer-cooperation > p {
    margin-bottom: 14px;
    line-height: 1.65;
  }

  .site-footer .footer-cooperation-cta {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.48);
    border-radius: 8px;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600;
    letter-spacing: .08em;
    background: rgba(255,255,255,.055);
  }

  .site-footer .footer-cooperation-cta span:last-child {
    font-size: 18px;
    line-height: 1;
  }

  .site-footer .footer-bottom {
    margin-top: 30px;
  }
}


/* v3.9.6 — customer-first mobile product center */
@media (max-width: 640px) {
  .products-v29-page .products-collection-hero {
    min-height: 250px;
    height: 34svh;
    max-height: 310px;
    margin-top: calc(70px + env(safe-area-inset-top));
  }

  .products-v29-page .products-collection-hero-content {
    align-content: center;
    width: calc(100% - 28px);
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .products-v29-page .products-collection-hero-content .eyebrow {
    margin-bottom: 8px;
    font-size: 9px;
  }

  .products-v29-page .products-collection-hero-content h1 {
    margin-bottom: 9px;
    font-size: clamp(1.95rem, 9vw, 2.55rem);
  }

  .products-v29-page .products-collection-hero-content > div:last-child > p:not(.eyebrow) {
    display: -webkit-box;
    overflow: hidden;
    max-width: 31em;
    margin-bottom: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.55;
  }

  .products-v29-page .products-hero-scroll {
    margin-top: 13px;
    font-size: 12px;
  }

  .products-v29-page .compact-products-page {
    padding-top: 32px;
    padding-bottom: 48px;
  }

  .products-v29-page .compact-products-heading {
    gap: 10px;
    margin-bottom: 18px;
  }

  .products-v29-page .compact-products-heading h2 {
    margin-top: 6px;
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.2;
  }

  .products-v29-page .compact-products-intro p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.6;
  }

  .products-v29-page .compact-products-intro > span {
    display: none;
  }

  .products-v29-page .mobile-category-chips {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    padding: 2px 0 7px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .products-v29-page .mobile-category-chips::-webkit-scrollbar { display: none; }

  .products-v29-page .mobile-category-chips button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .products-v29-page .mobile-category-chips button.active {
    border-color: #3b3028;
    background: #3b3028;
    color: #fff;
  }

  .products-v29-page .compact-catalog .filter-bar {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 10px;
    padding: 12px;
  }

  .products-v29-page .filter-group label {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .products-v29-page .filter-group input,
  .products-v29-page .filter-group select {
    min-height: 42px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 12px;
  }

  .products-v29-page .filter-group:nth-child(3) {
    grid-column: 1 / -1;
  }

  .products-v29-page .compact-filter-reset {
    grid-column: 1 / -1;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 11px;
  }

  .products-v29-page .catalog-summary {
    margin: 12px 0 10px;
    font-size: 11px;
  }

  .products-v29-page .compact-product-grid,
  .products-v29-page .catalog-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px 10px;
  }

  .products-v29-page .compact-product-grid .product-card {
    border-radius: 2px;
  }

  .products-v29-page .compact-product-grid .catalog-product-image,
  .products-v29-page .compact-product-grid .product-image {
    aspect-ratio: 1 / 1;
  }

  .products-v29-page .compact-product-grid .catalog-product-image img {
    padding: 8px;
  }

  .products-v29-page .compact-product-grid .product-category {
    left: 7px;
    bottom: 7px;
    max-width: calc(100% - 14px);
    padding: 4px 6px;
    font-size: 8px;
  }

  .products-v29-page .compact-product-grid .product-number {
    top: 7px;
    right: 7px;
    font-size: 10px;
  }

  .products-v29-page .compact-product-grid .product-body {
    padding: 11px 9px 10px;
  }

  .products-v29-page .compact-product-grid .product-body h2 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 38px;
    margin-bottom: 5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.4;
  }

  .products-v29-page .compact-product-grid .product-body > p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 31px;
    margin-bottom: 8px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 10px;
    line-height: 1.5;
  }

  .products-v29-page .compact-product-grid .card-links {
    display: block;
  }

  .products-v29-page .compact-product-grid .card-links a:first-child {
    display: inline-flex;
    font-size: 10px;
  }

  .products-v29-page .compact-product-grid .card-links a:last-child {
    display: none;
  }
}


/* v5.3.9.11 targeted mobile contact and home hero refinements */
@media (max-width: 767px) {
  .home-page .hero-content {
    transform: translateY(-30px);
  }

  .mobile-home-scroll-hint {
    display: flex;
    width: max-content;
    margin: 18px auto 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.88);
    font-size: 10px;
    letter-spacing: .16em;
    text-decoration: none;
  }

  .mobile-home-scroll-hint i {
    position: relative;
    display: block;
    width: 22px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 14px;
  }

  .mobile-home-scroll-hint i::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 3px;
    background: #fff;
    animation: mobileScrollHint 1.7s ease-in-out infinite;
  }

  .contact-page .contact-section {
    padding-top: 34px;
  }

  .contact-page .contact-grid {
    display: block;
  }

  .contact-page .contact-sidebar {
    display: none !important;
  }

  .contact-page .contact-form-card {
    width: 100%;
  }
}

@keyframes mobileScrollHint {
  0% { transform: translate(-50%, 0); opacity: .35; }
  55% { opacity: 1; }
  100% { transform: translate(-50%, 12px); opacity: 0; }
}

@media (min-width: 768px) {
  .mobile-home-scroll-hint { display: none !important; }
}


/* v5.3.9.12 mobile story navigation and customer-oriented layout */
.nav-label-mobile,
.story-link-mobile,
.about-mobile-journey,
.about-mobile-product-entry { display: none; }

@media (max-width: 767px) {
  .primary-nav .nav-label-desktop { display: none; }
  .primary-nav .nav-label-mobile { display: inline; }
  .home-story-link .story-link-desktop { display: none; }
  .home-story-link .story-link-mobile { display: inline; }

  .about-page .cinematic-page-hero {
    min-height: 76svh;
    padding-bottom: 54px;
  }

  .about-page .page-hero-content {
    padding-top: 28px;
  }

  .about-page .page-hero-lead {
    max-width: 31em;
    font-size: 14px;
    line-height: 1.8;
  }

  .about-page .page-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .about-mobile-journey {
    position: sticky;
    top: calc(64px + env(safe-area-inset-top));
    z-index: 18;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px;
    background: rgba(248,245,239,.94);
    border-bottom: 1px solid rgba(83,66,49,.10);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }

  .about-mobile-journey::-webkit-scrollbar { display: none; }
  .about-mobile-journey a {
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid rgba(83,66,49,.16);
    border-radius: 999px;
    color: #564637;
    background: #fff;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
  }

  .about-story-section {
    padding: 48px 0 34px;
  }

  .about-story-section .story-intro {
    display: block;
  }

  .about-story-section .section-heading {
    margin-bottom: 20px;
  }

  .about-story-section .section-heading h2 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.18;
  }

  .about-story-section .prose {
    padding: 22px 20px;
    border-radius: 20px;
    background: #f7f2eb;
    box-shadow: inset 0 0 0 1px rgba(83,66,49,.07);
  }

  .about-story-section .prose p {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
  }

  .about-story-section .prose p + p {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(83,66,49,.10);
  }

  .about-mobile-product-entry {
    display: block;
    padding: 0 0 42px;
  }

  .about-product-entry-card {
    position: relative;
    display: flex;
    min-height: 228px;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 26px 24px;
    border-radius: 24px;
    color: #fff;
    background:
      linear-gradient(145deg, rgba(49,39,31,.96), rgba(91,69,48,.82)),
      url('../images/products-hero.svg') center/cover;
    text-decoration: none;
    box-shadow: 0 18px 44px rgba(55,42,30,.18);
  }

  .about-product-entry-card::after {
    content: '01';
    position: absolute;
    top: 18px;
    right: 22px;
    color: rgba(255,255,255,.24);
    font-family: Georgia, serif;
    font-size: 46px;
  }

  .about-entry-kicker {
    margin-bottom: 12px;
    color: #e9d7a6;
    font-size: 10px;
    letter-spacing: .18em;
  }

  .about-product-entry-card strong {
    max-width: 12em;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 27px;
    line-height: 1.25;
  }

  .about-product-entry-card small {
    max-width: 30em;
    margin-top: 12px;
    color: rgba(255,255,255,.76);
    font-size: 12px;
    line-height: 1.7;
  }

  .about-product-entry-card em {
    margin-top: 18px;
    color: #fff;
    font-size: 13px;
    font-style: normal;
  }

  .about-capability-section {
    display: flex;
    flex-direction: column;
  }

  .about-capability-section .factory-visual {
    order: 1;
    min-height: 52vw;
  }

  .about-capability-section .stat-panel {
    order: 2;
    padding: 38px 20px 42px;
  }

  .about-capability-section .stat-panel h2 {
    font-size: 30px;
  }

  .about-capability-section .stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
  }

  .about-capability-section .stat-grid > div {
    min-height: 116px;
    padding: 16px 14px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 16px;
    background: rgba(255,255,255,.05);
  }

  .about-capability-section .stat-grid strong {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
  }

  .about-quality-section {
    padding: 48px 0;
  }

  .about-quality-section .section-heading.centered {
    text-align: left;
  }

  .about-quality-section .process-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 10px;
    overflow: visible;
    margin-right: 0;
    padding-right: 0;
    scroll-snap-type: none;
  }

  .about-quality-section .process-card {
    display: flex;
    min-width: 0;
    min-height: 214px;
    padding: 18px 14px 16px;
    flex-direction: column;
    border: 1px solid rgba(83,66,49,.10);
    border-radius: 16px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 24px rgba(74,66,56,.06);
    scroll-snap-align: none;
  }

  .about-quality-section .process-card > span {
    font-size: 24px;
    line-height: 1;
  }

  .about-quality-section .process-card h3 {
    margin: 14px 0 9px;
    font-size: 16px;
    line-height: 1.35;
  }

  .about-quality-section .process-card p {
    font-size: 12px;
    line-height: 1.72;
  }

  .about-credentials-section {
    padding: 48px 0 56px;
  }

  .about-credentials-section .certificate-layout {
    display: flex;
    flex-direction: column;
  }

  .about-credentials-section .section-heading {
    order: 1;
    margin-bottom: 22px;
  }

  .about-credentials-section .certificate-gallery {
    order: 2;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin-right: -16px;
    padding-right: 16px;
    scrollbar-width: none;
  }

  .about-credentials-section .certificate-gallery::-webkit-scrollbar { display: none; }
  .about-credentials-section .certificate-gallery figure {
    flex: 0 0 72vw;
    margin: 0;
  }

  .about-credentials-section .certificate-gallery img {
    width: 100%;
    border-radius: 16px;
  }
}


/* v5.3.9.13 mobile report gallery */
@media (max-width: 767px) {
  .about-credentials-section .credentials-heading { display:block; margin-bottom:20px; }
  .about-credentials-section .credentials-count { margin-top:14px; }
  .about-credentials-section .credentials-count strong { font-size:42px; }
  .about-credentials-section .certificate-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; overflow:visible; margin-right:0; padding-right:0; }
  .about-credentials-section .certificate-gallery figure { min-width:0; padding:5px; border-radius:14px; }
  .about-credentials-section .certificate-gallery img { aspect-ratio:3/4; object-fit:contain; border-radius:10px; }
  .about-credentials-section .certificate-index { top:8px; left:8px; width:30px; height:30px; font-size:10px; }
  .about-credentials-section .certificate-caption { position:static; display:block; padding:9px 6px 7px; background:none; color:var(--brown); text-align:center; transform:none; font-size:10px; }
  .about-credentials-section .credentials-action { margin-top:24px; }
}


/* v5.3.9.15 mobile social icon centering */
@media (max-width: 767px) {
  .contact-page .social-action-row .social-action {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .contact-page .social-action-row .social-icon {
    display: grid;
    margin-inline: auto;
    place-items: center;
  }

  .contact-page .social-action-row .social-icon img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
  }

  .contact-page .social-action-row .social-action > span:nth-child(2) {
    width: 100%;
    text-align: center;
  }
}
