/* CPS TOYS mobile/tablet shell — desktop (>1024px) layout unchanged.
   SEO inject body hijack undo (desktop-safe). */
body {
  background: #fff;
  color: var(--fontcolor, #111);
  font-family: var(--fontfamily, "Lato", "Open Sans", Arial, sans-serif);
  line-height: 1.6;
}

/* Category entry — ok on desktop */
.home-cat-entry {
  padding: 28px 0 8px;
  background: linear-gradient(180deg, #f5f7fb 0%, #fff 100%);
}
.home-cat-entry .home-title { margin-bottom: 8px; }
.home-cat-entry__lead {
  text-align: center;
  color: #555;
  margin: 0 auto 18px;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.6;
  padding: 0 12px;
}
.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0 0 10px;
}
.home-cat-grid a {
  display: block;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.home-cat-grid a:hover {
  border-color: #5f60a5;
  box-shadow: 0 8px 18px rgba(95, 96, 165, .12);
  transform: translateY(-2px);
}
.home-cat-grid__img {
  aspect-ratio: 1 / 1;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.home-cat-grid__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.home-cat-grid__name {
  display: block;
  text-align: center;
  padding: 12px 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #5f60a5;
  line-height: 1.3;
}
.home-cat-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0 18px;
}
.home-cat-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.home-cat-cta__primary { background: #5f60a5; color: #fff; }
.home-cat-cta__secondary { background: #fff; color: #5f60a5; border: 1px solid #5f60a5; }

.cps-m-only { display: none !important; }
.cps-mobile-seo-toggle,
.cps-mobile-cat-toggle { display: none; }

@media (max-width: 1200px) {
  .home-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== Phone + small tablet shell ===== */
@media (max-width: 1024px) {
  /* Kill vw-based rem scaling that blows up spacing on phones */
  html { font-size: 16px !important; }

  /* Kill ScrollReveal / fly-in animations — they make the page feel slow */
  .fadeUp,
  .fadeDown,
  .fadeLeft,
  .fadeRight,
  .scalebig,
  .opacityin,
  [data-sr-id],
  .sr--copy {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  img,
  .hotpro-list li img,
  .products-list-img img {
    transition: none !important;
  }

  :root {
    --m-pad: 14px;
    --m-gap: 10px;
    --m-title: 20px;
    --m-body: 14px;
  }

  body {
    background: #fff !important;
    font-family: "Lato", "Open Sans", Arial, sans-serif !important;
    font-size: 14px !important;
    overflow-x: hidden;
  }

  .cps-m-only { display: block !important; }
  .csv-seo-header,
  .csv-seo-footer,
  .open-launch-featured,
  .floatwindow,
  #jljw_IM_GdImBox,
  .floatwindow_im,
  [class*="floatwindow"] {
    display: none !important;
  }

  /* Fixed compact header */
  header { height: 54px !important; }
  .head-t,
  .logo { height: 54px !important; }
  .head-t {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fff !important;
    border-bottom: 1px solid #eee;
  }
  .head-t .container {
    height: 54px;
    padding: 0 var(--m-pad) !important;
    align-items: center;
  }
  .head-t-contact,
  .lang { display: none !important; }
  .logo { max-width: 42% !important; }
  .logo img { max-height: 40px !important; }
  .mob-menu {
    display: block !important;
    width: 28px !important;
    height: 20px !important;
  }
  .head-b { top: 54px !important; }
  .mobhead .head-b { height: calc(100% - 54px) !important; }

  main,
  .innerpage,
  .home-page,
  .productsType-page,
  .prodetails-page {
    padding-top: 54px !important;
  }

  .container,
  .container-s {
    padding-left: var(--m-pad) !important;
    padding-right: var(--m-pad) !important;
  }

  /* Homepage: product-first order */
  main.home-page {
    display: flex !important;
    flex-direction: column !important;
  }
  main.home-page > #swiper-banner { order: 1; }
  main.home-page > .home-cat-entry { order: 2; }
  main.home-page > .hotproduct { order: 3; }
  main.home-page > .about { order: 4; }
  main.home-page > .news { order: 5; }
  main.home-page > .our,
  main.home-page > .case {
    display: none !important;
  }

  /* Banner: short crop */
  #swiper-banner {
    max-height: 160px;
    overflow: hidden;
    margin: 0;
  }
  #swiper-banner .swiper-slide,
  #swiper-banner .swiper-slide a {
    display: block;
    height: 160px;
  }
  #swiper-banner img {
    width: 100% !important;
    height: 160px !important;
    max-height: 160px !important;
    object-fit: cover !important;
    object-position: center center;
  }
  #swiper-banner .swiper-button-next,
  #swiper-banner .swiper-button-prev,
  #swiper-banner .swiper-pagination {
    display: none !important;
  }

  /* Categories */
  .home-cat-entry {
    padding: 16px 0 4px !important;
    background: #fff !important;
  }
  .home-cat-entry .home-title {
    font-size: 18px !important;
    margin-bottom: 4px !important;
  }
  .home-cat-entry__lead {
    font-size: 12px !important;
    margin-bottom: 12px !important;
    color: #666;
  }
  .home-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--m-gap) !important;
  }
  .home-cat-grid a {
    border-radius: 12px;
    border-color: #e6e9f0;
  }
  .home-cat-grid__img {
    aspect-ratio: 4 / 3;
    background: #f7f8fb;
  }
  .home-cat-grid__name {
    font-size: 13px !important;
    padding: 10px 8px 12px !important;
  }
  .home-cat-cta {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 0 8px;
  }
  .home-cat-cta a {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
  }

  .cps-m-trust {
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0 8px;
    margin: 0;
  }
  .cps-m-trust span {
    font-size: 11px;
    color: #4f51a6;
    background: #f0f1fa;
    border-radius: 999px;
    padding: 5px 10px;
  }

  /* About: drop circles; 2-line company blurb only */
  .about {
    padding: 8px 0 4px !important;
    background: #fff !important;
  }
  #swiper-about,
  .about .aboutbtn,
  .about .home-title {
    display: none !important;
  }
  .about-b {
    padding: 0 !important;
  }
  .about-b-cont {
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #555 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 !important;
  }
  .about-b-cont.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .about .viewmore {
    display: none !important;
  }

  .home-title {
    font-size: var(--m-title) !important;
    margin-bottom: 10px !important;
  }

  /* Hot products */
  .hotproduct {
    padding: 10px 0 18px !important;
    margin: 0 !important;
    background: #fff !important;
  }
  .hotpro-list {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: var(--m-gap) !important;
    justify-content: stretch !important;
  }
  .hotpro-list li {
    width: auto !important;
    margin: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04) !important;
  }
  .hotpro-title {
    white-space: normal !important;
    max-height: none !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .hotpro-box {
    padding: 8px 10px !important;
  }
  .hotpro-box-r { display: none !important; }
  .hotproduct .viewmore {
    width: 100%;
    max-width: 220px;
    height: 42px;
    margin: 14px auto 0;
    border-radius: 10px;
  }

  /* News / guides: compact 2 cards */
  .news {
    padding: 4px 0 12px !important;
    background: #fff !important;
  }
  .news-list li {
    margin-bottom: 8px !important;
    padding: 12px !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    border: 1px solid #eef0f5 !important;
  }
  .news-list li:nth-child(n + 3) { display: none !important; }
  .news-list.is-expanded li:nth-child(n + 3) { display: list-item !important; }
  .news-date,
  .news-box > .icon,
  .news-more { display: none !important; }
  .news-cont { width: 100% !important; }
  .news-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    text-transform: none !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
  }
  .news-text {
    font-size: 12px !important;
    -webkit-line-clamp: 2 !important;
    margin-top: 4px;
  }

  /* Hub: one compact strip */
  .tiktok-hub-entry {
    padding: 14px 0 !important;
    margin: 4px 0 0 !important;
  }
  .tiktok-hub-entry .container {
    padding-left: var(--m-pad) !important;
    padding-right: var(--m-pad) !important;
  }
  .tiktok-hub-entry h1 {
    font-size: 16px !important;
    line-height: 1.3 !important;
    margin: 0 0 6px !important;
  }
  .tiktok-hub-entry p {
    font-size: 12px !important;
    line-height: 1.45 !important;
    margin: 0 0 10px !important;
  }
  .tiktok-hub-entry a {
    display: inline-flex !important;
    min-height: 40px;
    align-items: center;
    padding: 0 14px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
  }

  /* ===== SEO: fully hidden on phone/tablet until toggled ===== */
  .cps-csv-seo-block,
  .csv-seo-section,
  .cps-csv-seo,
  .cps-seo-engine-block,
  section.cps-seo-section,
  .cps-seo-page {
    display: none !important;
  }
  body.cps-seo-open .cps-csv-seo-block,
  body.cps-seo-open .csv-seo-section,
  body.cps-seo-open .cps-csv-seo,
  body.cps-seo-open .cps-seo-engine-block,
  body.cps-seo-open section.cps-seo-section {
    display: block !important;
    margin: 10px var(--m-pad) !important;
    padding: 14px !important;
    border-radius: 10px;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
  .cps-csv-keywords,
  .csv-seo-keywords,
  .cps-seo-tags { display: none !important; }

  .cps-mobile-seo-toggle {
    display: block !important;
    width: calc(100% - 28px);
    margin: 8px 14px 18px;
    padding: 12px 14px;
    border: 1px solid #d9dce8;
    border-radius: 10px;
    background: #f6f7fc;
    color: #5f60a5;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
  }

  /* ===== Category / product listing ===== */
  .productsType-page .inner-banner {
    min-height: 0 !important;
    height: auto !important;
    background: #fff !important;
  }
  .productsType-page .inner-banner img { display: none !important; }
  .productsType-page .crumbs {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    padding: 10px 0 0 !important;
    justify-content: flex-start !important;
    font-size: 12px !important;
    text-align: left !important;
  }
  .productsType-page .page-box { padding-top: 6px !important; }
  .productsType-page .page-r { display: none !important; }
  .productsType-page .page-l { width: 100% !important; }

  .productsType-page .page-l {
    display: flex !important;
    flex-direction: column !important;
  }
  .productsType-page .page-tit { order: 1; margin-bottom: 8px !important; }
  .productsType-page .page-tit h1 {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }
  .productsType-page .products-ninelist-1,
  .productsType-page .products-ninelist-0 { order: 2; }
  .productsType-page .pages-turn { order: 3; }
  .productsType-page .geo-category-fit,
  .productsType-page .prolist-content,
  .productsType-page .prolist-bottom,
  .productsType-page .prohome-content {
    order: 40;
    display: none !important;
  }
  body.cps-cat-intro-open .productsType-page .geo-category-fit,
  body.cps-cat-intro-open .productsType-page .prolist-content,
  body.cps-cat-intro-open .productsType-page .prolist-bottom,
  body.cps-cat-intro-open .productsType-page .prohome-content {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
  .cps-mobile-cat-toggle {
    display: block !important;
    order: 35;
    width: 100%;
    margin: 10px 0 16px;
    padding: 11px 12px;
    border: 1px solid #d9dce8;
    border-radius: 10px;
    background: #f6f7fc;
    color: #5f60a5;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
  }

  .products-ninelist-1,
  .products-ninelist-0 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: var(--m-gap) !important;
  }
  .products-ninelist-1 li,
  .products-ninelist-0 > li {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
  }
  .products-ninelist-1 .products-list-tit,
  .products-ninelist-0 .products-list-tit {
    -webkit-line-clamp: 2 !important;
    max-height: none !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
  .products-ninelist-1 .products-list-text {
    display: -webkit-box !important;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 11px !important;
  }
  .products-ninelist-1 .products-list-box {
    padding: 8px 34px 8px 8px !important;
  }
  .products-add-inquirl {
    width: 30px !important;
    height: 30px !important;
  }

  .geo-category-fit {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 12px !important;
    margin: 0 0 12px !important;
  }

  /* Product detail */
  .prodetails-page .page-r { display: none !important; }
  .prodetails-page .page-l { width: 100% !important; }
  .pdshow-l,
  .pdshow-r,
  .geo-product-gallery {
    width: 100% !important;
  }
  .geo-product-content table,
  .prodetails-bref table,
  .csv-seo-table,
  .cps-seo-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .pdshow-r h1 {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  /* Footer compact */
  .writetous {
    padding: 18px 0 !important;
  }
  .writetous .container {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
  }
  .writetous h3 { font-size: 20px !important; width: 100% !important; }
  .write-text {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 13px !important;
    margin: 0 0 8px !important;
  }
  .foot-t { padding: 18px 0 !important; }
  .foottit { font-size: 16px !important; }
  footer { padding-bottom: 70px !important; }
  .mobile-bottom {
    display: flex !important;
  }
  .mobile-bottom-item {
    width: 20% !important;
    font-size: 10px !important;
  }
  .gotop { display: none !important; }
  .mobile-bottom .gotop { display: flex !important; }
}

@media (max-width: 420px) {
  .home-cat-grid__name { font-size: 12px !important; }
  .hotpro-title { font-size: 11px !important; }
}
