/* ============================================================
 * Hero
 * ============================================================ */
.hero {
  position: relative;
  text-align: center;
  /* height: 28.75rem;
  display: flex;
  align-items: flex-end;
  padding:0 0 7.75rem 0;
  overflow: visible;
  z-index: 2; */
}
.hero-bg {
  pointer-events: none;
  width: 100%;
  height: auto;
}

.hero-content{
  position: absolute;
  top: 10%;
  width: 100%;
  text-align: left;
  color: #fff;
  left: 0;
  right: 0;
}

@media (min-width: 900px) {
  .hero-bg--mobile-only { display: none; }
}


.hero-content .search-box {
  margin: 0;
  flex-wrap: nowrap;
  isolation: isolate;
  background: transparent linear-gradient(240deg, #F95D58 0%, #1C77D8 100%) 0% 0% no-repeat padding-box;
}

.hero-content .search-box::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: calc(0.5rem - 1px);
  background: #fff;
  pointer-events: none;
}

.hero-content .search-box:has(.search-box__suggestions) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.hero-content .search-box:has(.search-box__suggestions)::before {
  bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.hero-content .search-box:has(.search-box__suggestions)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  right: 0.5rem;
  z-index: 21;
  border-top: 1px solid #ccc;
  pointer-events: none;
}

.hero-content .search-box__suggestions {
  box-sizing: border-box;
  border: 1px solid transparent;
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(240deg, #F95D58 0%, #1C77D8 100%) border-box;
}

.hero h1 {
  font-size: 3.125rem;
  margin-bottom: 1rem;
  font-weight: 400;
}
.hero-content p {
  margin-bottom: 2.5rem;
}
.home-content{
  padding-bottom: 0 !important;
  padding-top: 0 !important;
}
/* ============================================================
 * Pick a product — mobile category grid
 * (Entry cards that open the picker modal on small screens.)
 * ============================================================ */
.product-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.product-categories .category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #111827;
  text-decoration: none;
}
.product-categories .category-card img {
  height: 116px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}
/* Reserve the image slot so the label stays put when there is no image. */
.product-categories .category-card .picker-img-placeholder {
  width: 120px;
  height: 120px;
  margin-bottom: 0.75rem;
}
.product-categories .category-card p {
  font-size: 0.95rem;
  color: #374151;
  margin: 0;
}
/* Center the last card when the total count is odd. */
.product-categories .category-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* ============================================================
 * Pick a product — desktop category tabs
 * ============================================================ */
.tabs-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem 4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}
.tabs-primary button,
.tabs-primary__all-devices {
  padding-bottom: 0.75rem;
  color: #6b7280;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s;
}
.tabs-primary__all-devices {
  text-decoration: none;
  color: #000;
  font-weight: 400;
}
.tabs-primary button:hover,
.tabs-primary__all-devices:hover {
  color: #1f2937;
}
.tabs-primary__icon {
  stroke: #6b7280;
}
.tabs-primary button:hover .tabs-primary__icon,
.tabs-primary__all-devices:hover .tabs-primary__icon {
  stroke: #000;
}
.tabs-primary .active {
  color: #000;
  border-bottom-color: #005eb1;
  font-weight: 600;
}

/* ============================================================
 * Pick a product — result grid
 * ============================================================ */
.product {
  background: #f8f8f8;
  padding: 1.2rem;
  border-radius: 0.3rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.product-card .img-wrap {
  height: 8.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}
.product-card .img-wrap img {
  height: 100%;
  object-fit: contain;
}
.product-card p {
  font-size: 0.875rem;
  color: #000;
  text-align: center;
}

/* ============================================================
 * Contact cards ("Still need a human?")
 * ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.contact-card {
  background: #f0f2f5;
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.contact-card h3 {
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.contact-card p {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 1.5rem;
  flex: 1;
}
.contact-card button {
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: background 0.2s;
}
.contact-card button:hover {
  background: #e5e7eb;
}
.contact-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
}

/* ============================================================
 * Moto Care banner
 * ============================================================ */
.moto-banner {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 23.75rem;
  overflow: hidden;
}

.moto-banner .text {
  position: absolute;
  padding: 5rem 4rem;
}
.moto-banner .text h2 {
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 3rem;
}
.moto-banner .text p {
  max-width: 500px;
  margin-bottom: 3rem;
}

.moto-banner img {
  height: 100%;
  width: auto;
  object-fit: cover;
}

.product-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 0.75rem;
}

.product-picker__header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  width: 75%
}
.product-picker__search {
  margin: 0 1.25rem 1rem;
}
.product-picker__body {
  overflow-y: auto;
  height: 65vh;
  padding: 0 1.25rem 1.5rem;
  /* grid 布局，一行只放两个 */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 200px;
  gap: 0.75rem;
}
.product-picker__body>a{
  background: #F8F8F8;
}

.product-picker__body>a{
  font-weight:400
}

.product-picker__body> div,.product-picker__body>a{
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #000;
  font-weight: 400;

}
.product-picker__body >div>img,.product-picker__body >a>img{
  height: 116px;
  margin:10px 0
}
.product-picker__body >a>div{
  padding: 0 2px
}
/* Reserve the image slot so the label stays put when there is no image. */
.product-picker__body .picker-img-placeholder{
  height: 70%;
}
.product-picker__list {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.25rem 0;
}
.product-picker__card {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #111827;
}
.product-picker__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
}
.product-picker__card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-picker__card p {
  font-size: 0.9rem;
  line-height: 1.3;
}

.only-mobile { display: none !important; } 
.section-title {
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 2rem;
}

.mobile-panel-header {
  display: none;
}
.mobile-panel-back {
  display: none;
}

@media (max-width: 1200px) {
  .hero{
    height: 28.75rem;
    overflow: hidden;
  }
  .hero-bg{
    height: 100%;
    width: auto;
    object-fit: cover;
    padding-bottom:1rem
  }
  .hero-content{
    bottom: 6%;
    top: auto;
  }
  .hero-content h1{
    font-size: 1.875rem;
    text-align: center;
  }
  .hero-content p {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    text-align: center;
  }
  .hero-content .search-box{
    margin: 0 auto;
  }
}


@media (max-width:899px) {
  .mobile-panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 0.5rem;
    width: 100%;
  }
  .mobile-panel-back {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: #090909;
    color: #fff;
    cursor: pointer;
  }

  .mobile-panel-back svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
  }

  /* Keep the standalone button rule scoped to the icon button. */
  .mobile-panel-header .mobile-panel-back {
    background: transparent;
    background: #090909;
  }
  .section-title {
    font-size: 1.5rem;
  }

  .product-grid{
     grid-template-columns: repeat(3, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .only-desktop { display: none !important; } 
  .only-mobile { display: block !important; } 

  .moto-banner{
    position: relative;
    overflow: hidden;
    height: 28.125rem;
  }
  .moto-banner .text {
    position: absolute;
    bottom: 1.5rem;
    padding: 0 3.5rem;
    left:0;
    right: 0;
    text-align: center;
    z-index: 1;
  }
  .moto-banner .text h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
  }
  .moto-banner .text p {
    max-width: 500px;
    margin: 0 auto;
    margin-bottom: 1rem;
  }
}

@media (max-width: 599px) {
  .hero-bg {
    pointer-events: none;
    width: 100%;
    height: auto;
  }
  .moto-banner img{
    pointer-events: none;
    width: 100%;
    height: auto;
  }
}