/* Phone layout refinements; desktop styles stay unchanged. */
@media (max-width: 600px) {
  body.wp-theme-xc-dongxin .site-main .section,
  body.wp-theme-xc-dongxin .site-main .reference-section {padding:32px 20px!important;margin-top:0!important}
  body.wp-theme-xc-dongxin .site-main .section-heading {margin-bottom:20px!important}
  body.wp-theme-xc-dongxin .site-main .section-heading h2 {font-size:26px!important;line-height:1.3!important;margin:6px 0 0!important}
  body.wp-theme-xc-dongxin .site-main .section-heading .eyebrow {font-size:11px!important;letter-spacing:.12em!important}
  body.home .product-section .catalog-grid,
  body.home .workshop-section .workshop-grid {display:flex!important;flex-wrap:nowrap!important;gap:14px!important;overflow-x:auto!important;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding:0 0 12px!important;max-width:100%}
  body.home .product-section .catalog-card {flex:0 0 82%!important;min-width:0!important;scroll-snap-align:start}
  body.home .workshop-section .workshop-card {flex:0 0 84%!important;min-width:0!important;scroll-snap-align:start}
  body.home .workshop-section .workshop-card img {display:block;width:100%!important;height:auto!important;aspect-ratio:4/3;object-fit:cover;border-radius:10px}
  body.home .workshop-section {padding-bottom:26px!important}
  body.home .factory-section .wp-block-columns,
  body.home .reference-section > .wp-block-columns {gap:20px!important;margin-top:20px!important}
  body.home .capability-grid {gap:12px!important;margin-top:20px!important}
  body.home .reference-section .step-card {padding:14px 0!important}
  body.home .reference-section .step-card p {margin:5px 0!important}
  body.wp-theme-xc-dongxin .site-footer .footer-inner {padding:30px 20px 20px!important}
  body.wp-theme-xc-dongxin .site-footer .footer-inner > .wp-block-columns {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:22px 16px!important}
  body.wp-theme-xc-dongxin .site-footer .footer-inner > .wp-block-columns > .wp-block-column {min-width:0;margin:0!important}
  body.wp-theme-xc-dongxin .site-footer .footer-inner > .wp-block-columns > .wp-block-column:first-child,
  body.wp-theme-xc-dongxin .site-footer .footer-inner > .wp-block-columns > .wp-block-column:last-child {grid-column:1/-1}
  body.wp-theme-xc-dongxin .site-footer h3 {font-size:17px!important;margin:0 0 10px!important}
  body.wp-theme-xc-dongxin .site-footer p {margin:0!important;line-height:1.7!important;overflow-wrap:anywhere}
  body.wp-theme-xc-dongxin .site-footer .copyright {margin-top:20px!important;padding-top:16px!important}
  body.wp-theme-xc-dongxin .page-heading {padding:28px 20px!important}
  body.wp-theme-xc-dongxin .page-heading h1 {font-size:28px!important;line-height:1.3!important}
}
@media (max-width:600px) {
 body.home .product-section .catalog-grid,body.home .workshop-section .workshop-grid {scrollbar-width:none}
 body.home .product-section .catalog-grid::-webkit-scrollbar,body.home .workshop-section .workshop-grid::-webkit-scrollbar {display:none}
 body.home .workshop-section .workshop-card img {object-fit:contain}
}
/* Tighter lower-home composition on phones. */
@media (max-width:600px) {
 body.home .feature-section {padding:26px 20px!important;margin:0!important}
 body.home .feature-section > .wp-block-columns {gap:18px!important;margin:0!important}
 body.home .feature-section .feature-media {margin:0!important}
 body.home .feature-section .feature-media img {display:block;width:100%!important;height:auto!important;aspect-ratio:3/2!important;object-fit:contain!important}
 body.home .feature-section .feature-copy {padding:0!important}
 body.home .feature-section .feature-copy h2 {font-size:26px!important;line-height:1.3!important;margin:5px 0 10px!important}
 body.home .feature-section .feature-copy p {margin:0 0 12px!important}
 body.home .feature-section .feature-copy .wp-block-buttons {margin-top:14px!important}
 body.home .reference-section .wp-block-columns:has(.category-card) {display:flex!important;flex-wrap:nowrap!important;gap:14px!important;overflow-x:auto!important;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;margin:20px 0 0!important;padding-bottom:8px!important}
 body.home .reference-section .wp-block-columns:has(.category-card)::-webkit-scrollbar {display:none}
 body.home .reference-section .wp-block-columns:has(.category-card) > .wp-block-column {flex:0 0 84%!important;min-width:0!important;margin:0!important;scroll-snap-align:start}
 body.home .reference-section .category-card {height:100%;padding:0!important;text-align:center}
 body.home .reference-section .category-card figure {margin:0 0 12px!important;width:100%!important}
 body.home .reference-section .category-card img {display:block;width:100%!important;height:auto!important;aspect-ratio:4/3!important;object-fit:contain!important;border-radius:10px}
 body.home .reference-section .category-card h3 {font-size:19px!important;margin:8px 0 0!important}
 body.home .reference-section .wp-block-columns:has(.info-card) {display:grid!important;grid-template-columns:1fr!important;gap:12px!important;margin:20px 0!important}
 body.home .reference-section .wp-block-columns:has(.info-card) > .wp-block-column {margin:0!important;min-width:0!important}
 body.home .reference-section .wp-block-columns:has(.info-card) .info-card {display:grid!important;grid-template-columns:42px 1fr!important;column-gap:12px!important;row-gap:2px!important;align-items:start;height:auto!important;padding:16px!important;border-radius:12px}
 body.home .reference-section .wp-block-columns:has(.info-card) .step-number {grid-row:1/3!important;font-size:26px!important;line-height:1.3!important;margin:0!important}
 body.home .reference-section .wp-block-columns:has(.info-card) h3 {grid-column:2!important;font-size:18px!important;line-height:1.3!important;margin:0!important}
 body.home .reference-section .wp-block-columns:has(.info-card) p:not(.step-number) {grid-column:2!important;font-size:14px!important;line-height:1.5!important;margin:0!important}
}
@media (max-width:600px) {
 body.home .site-main > .wp-block-post-content > .reference-section:has(.news-grid) {padding-top:12px!important;padding-bottom:12px!important}
 body.home .inquiry-section {padding:28px 20px!important}
 body.home .inquiry-section .inquiry-inner {gap:18px!important}
 body.home .inquiry-section .inquiry-preview {gap:12px!important}
 body.home .inquiry-section .inquiry-inner h2 {font-size:26px!important;line-height:1.3!important;margin:6px 0 10px!important}
}
/* Show all homepage image cards at once on phones. */
@media (max-width:600px) {
 body.home .product-section .catalog-grid {display:grid!important;grid-template-columns:1fr!important;gap:18px!important;overflow:visible!important;scroll-snap-type:none!important;padding:0!important}
 body.home .product-section .catalog-card {flex:none!important;width:100%!important;max-width:none!important}
 body.home .workshop-section .workshop-grid {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;overflow:visible!important;scroll-snap-type:none!important;padding:0!important}
 body.home .workshop-section .workshop-card {flex:none!important;width:100%!important;max-width:none!important;min-width:0!important}
 body.home .workshop-section .workshop-card img {width:100%!important;height:auto!important;aspect-ratio:4/3!important;object-fit:contain!important}
 body.home .reference-section .wp-block-columns:has(.category-card) {display:grid!important;grid-template-columns:1fr!important;gap:20px!important;overflow:visible!important;scroll-snap-type:none!important;padding:0!important}
 body.home .reference-section .wp-block-columns:has(.category-card) > .wp-block-column {flex:none!important;width:100%!important;max-width:none!important}
}
/* Keep the primary site navigation visible at the top on phones. */
@media (max-width: 600px) {
  .wp-site-blocks .reference-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 0 !important;
    padding: 10px 16px 0 !important;
    min-height: 0 !important;
  }
  .reference-header .brand-wrap { grid-column: 1 !important; grid-row: 1 !important; }
  .reference-header .wp-block-search { grid-column: 2 !important; grid-row: 1 !important; }
  .reference-header .reference-nav {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: stretch !important;
    width: 100% !important;
    padding: 5px 0 8px !important;
    margin: 0 !important;
  }
  .reference-header .reference-nav .wp-block-navigation { display: block !important; width: 100% !important; }
  .reference-header .reference-nav .wp-block-navigation__responsive-container-open,
  .reference-header .reference-nav .wp-block-navigation__responsive-container-close { display: none !important; }
  .reference-header .reference-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: block !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    overflow: visible !important;
  }
  .reference-header .reference-nav .wp-block-navigation__responsive-close,
  .reference-header .reference-nav .wp-block-navigation__responsive-dialog,
  .reference-header .reference-nav .wp-block-navigation__responsive-container-content { display: block !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
  .reference-header .reference-nav .wp-block-navigation__container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    column-gap: 14px !important;
    row-gap: 0 !important;
    width: 100% !important;
  }
  .reference-header .reference-nav .wp-block-navigation-item__content {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    padding: 8px 0 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }
  .reference-header .reference-nav .wp-block-navigation__submenu-container {
    min-width: 160px !important;
    max-height: 55vh !important;
    overflow-y: auto !important;
  }
}
/* Phone audit: show the complete customization artwork without a side-scroll lane. */
@media (max-width: 600px) {
  .dx-custom-image-section .dx-custom-detail-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .dx-custom-image-section .dx-custom-detail-image a,
  .dx-custom-image-section .dx-custom-detail-image img {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }
  .dx-custom-image-section .dx-custom-scroll-hint { display: none !important; }
  .dx-custom-image-section .dx-custom-image-tools { justify-content: flex-end !important; }
}
