:root {
  --unit: min(4.2666667vw, 22px);
  --page-width: calc(23.4375 * var(--unit));
  --ink: #333;
  color: var(--ink);
  background: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid #333; outline-offset: 2px; }
.storefront { width: var(--page-width); margin-inline: auto; position: relative; }
.store-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 44px;
  background: #fff;
  display: grid;
  place-items: center;
}
.home .store-nav {
  position: fixed;
  left: 50%;
  width: var(--page-width);
  transform: translateX(-50%);
  background: transparent;
}
.home .store-nav.scrolled { background: #fff; }
.desktop-brand { display: none; }
.nav-title { font-size: calc(1.125 * var(--unit)); line-height: 1.5; font-weight: 600; }
.nav-verify { position: absolute; right: 8px; color: #000; font-size: var(--unit); text-decoration: underline; text-underline-offset: 3px; }
.nav-back,.nav-search { position: absolute; left: 0; width: calc(3 * var(--unit)); height: 44px; }
.nav-back::before {
  content: "";
  position: absolute;
  left: calc(1.1 * var(--unit));
  top: 17px;
  width: 8px;
  height: 8px;
  border: solid #333;
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(45deg);
  opacity: 0;
}
.nav-back:focus-visible::before { opacity: 1; }
.nav-search::before,.search-button::before {
  content: "";
  display: block;
  width: calc(1.25 * var(--unit));
  height: calc(1.25 * var(--unit));
  background: url("./mengkou/search_icon.svg") center / contain no-repeat;
}
.nav-search::before { margin: calc((44px - 1.25 * var(--unit)) / 2) 0 0 var(--unit); }
.scrolled .nav-search::before,.search-button::before { background-image: url("./mengkou/search_icon2.svg"); }
.gallery { position: relative; }
.gallery-detail,.gallery-banner { height: calc(37.5 * var(--unit)); }
.gallery-track {
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline-offset: -2px; }
.gallery-slide { flex: 0 0 100%; display: block; overflow: hidden; scroll-snap-align: start; }
.gallery-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-dots {
  position: absolute;
  display: flex;
  justify-content: center;
  left: 50%;
  bottom: calc(.8125 * var(--unit));
  transform: translateX(-50%);
  gap: calc(.25 * var(--unit));
}
.gallery-dot {
  position: relative;
  padding: 0;
  border: 0;
  background: #999;
  width: calc(1.875 * var(--unit));
  height: calc(.125 * var(--unit));
}
.gallery-dot::before { content: ""; position: absolute; inset: -10px 0; }
.gallery-dot[aria-pressed="true"] { background: #000; }
.gallery-banner .gallery-dots { bottom: calc(.3125 * var(--unit)); }
.gallery-banner .gallery-dot[aria-pressed="true"],.gallery-card .gallery-dot[aria-pressed="true"] { background: white; }
.home-title,.detail-title { font-size: var(--unit); font-weight: 600; line-height: calc(1.1875 * var(--unit)); text-align: center; }
.home-title { margin-top: calc(2 * var(--unit)); scroll-margin-top: 48px; }
.categories { display: flex; width: calc(21.4375 * var(--unit)); margin: var(--unit) auto; justify-content: center; }
.category {
  background: white;
  border: 0;
  border-bottom: calc(.125 * var(--unit)) solid #ddd;
  height: calc(2.5 * var(--unit));
  font-size: var(--unit);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 calc(1.25 * var(--unit));
}
.category[aria-pressed="true"] { border-bottom-color: #333; }
.product-grid { display: grid; grid-template-columns: repeat(2, calc(11.65625 * var(--unit))); justify-content: space-between; padding-bottom: calc(3.125 * var(--unit)); }
.product-card { min-width: 0; height: calc(23.28125 * var(--unit)); border: .5px solid white; background: #f8f8f8; color: #000; }
.gallery-card { height: calc(18.75 * var(--unit)); }
.gallery-card .gallery-dot { width: calc(1.25 * var(--unit)); height: calc(.0625 * var(--unit)); }
.gallery-card .gallery-dots { bottom: calc(.75 * var(--unit)); }
.card-info { display: block; padding-inline: calc(.25 * var(--unit)); }
.card-name,.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.card-name { margin-top: calc(.5 * var(--unit)); height: calc(2.125 * var(--unit)); font-size: calc(.8125 * var(--unit)); line-height: calc(1.0625 * var(--unit)); }
.prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: calc(.25 * var(--unit)); margin-top: var(--unit); line-height: calc(1.1875 * var(--unit)); white-space: nowrap; }
.price { font-size: calc(1.5 * var(--unit)); font-weight: 600; }
.old-price { color: #999; font-size: calc(.75 * var(--unit)); font-weight: 500; }
.card-info .price { font-size: calc(.875 * var(--unit)); }
.card-info .old-price { font-size: calc(.625 * var(--unit)); }
.product-summary { padding: calc(.75 * var(--unit)); }
.product-name { height: calc(2.375 * var(--unit)); font-size: calc(.875 * var(--unit)); line-height: calc(1.1875 * var(--unit)); }
.product-details { margin-top: var(--unit); text-align: center; }
.product-details img { width: 100%; height: auto; display: block; margin-top: calc(.75 * var(--unit)); }
.detail-description { margin-top: calc(1.65 * var(--unit)); padding: var(--unit); font-size: calc(.71875 * var(--unit)); line-height: calc(1.225 * var(--unit)); white-space: pre-wrap; overflow-wrap: anywhere; }
.purchase { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--unit); margin-bottom: var(--unit); border: 1px solid #333; }
.demo-image { position: absolute; bottom: calc(2 * var(--unit)); left: var(--unit); font-size: 12px; background: #fff; }
.search-box { display: flex; align-items: center; height: 44px; position: sticky; top: 44px; z-index: 1; background: white; padding: 0 var(--unit); }
.search-box:after { content: ""; position: absolute; bottom: 4px; left: var(--unit); right: var(--unit); border-bottom: 1px solid #333; }
.search-box input { min-width: 0; flex: 1; border: none; background: transparent; font-size: var(--unit); }
.search-button { height: 40px; border: 0; background: none; }
.empty-results,#shop-error { padding: calc(1.5 * var(--unit)); }

@media (min-width: 768px) {
  .storefront {
    --unit: 16px;
    --page-width: min(1440px, calc(100% - clamp(48px, 7vw, 112px)));
    --nav-height: 64px;
  }
  .store-nav,.home .store-nav {
    position: sticky;
    top: 0;
    left: auto;
    width: 100%;
    height: var(--nav-height);
    transform: none;
    background: #fff;
    border-bottom: 1px solid #eee;
  }
  .desktop-brand {
    display: block;
    position: absolute;
    left: 0;
    font-size: 24px;
    color: #111;
    letter-spacing: .025em;
  }
  .nav-search,.nav-back,.nav-verify { display: grid; place-items: center; min-height: 44px; }
  .nav-search { left: auto; right: 0; }
  .nav-search::before { margin: 0; background-image: url("./mengkou/search_icon2.svg"); }
  .nav-back::before { opacity: 1; }
  .nav-verify { right: 0; }
  .gallery-banner { height: clamp(330px, 36vw, 510px); }
  .gallery-banner .gallery-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 4px;
    overflow: hidden;
  }
  .gallery-banner .gallery-slide img { object-position: center 29%; }
  .gallery-banner .gallery-dots { display: none; }
  .home-title {
    margin-top: 42px;
    font-size: 23px;
    line-height: 1.4;
    scroll-margin-top: calc(var(--nav-height) + 22px);
  }
  .categories { width: min(100%, 510px); margin: 12px auto 28px; }
  .category {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    min-height: 46px;
    padding: 6px 10px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 56px;
  }
  .product-card {
    height: auto;
    min-width: 0;
    border: 1px solid #ececec;
    background: #fff;
  }
  .gallery-card { height: auto; aspect-ratio: 1 / 1.1; }
  .gallery-card .gallery-dot[aria-pressed="true"] { background: #333; }
  .card-info { padding: 12px 14px 16px; border-top: 1px solid #f0f0f0; }
  .card-info:hover .card-name { text-decoration: underline; text-underline-offset: 3px; }
  .card-name { height: 2.7em; margin-top: 0; font-size: 15px; line-height: 1.35; overflow-wrap: normal; }
  .card-info .prices { margin-top: 8px; }
  .card-info .price { font-size: 17px; }
  .card-info .old-price { font-size: 12px; }
  .product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 88px);
    align-items: start;
    max-width: 1180px;
    margin: 24px auto 56px;
  }
  .gallery-detail {
    height: clamp(440px, 48vw, 620px);
    border: 1px solid #eee;
  }
  .gallery-detail img { object-fit: contain; }
  .gallery-detail img[src*="/mengkou/"] { transform: scale(1.5); }
  .gallery-detail .gallery-dots { bottom: 20px; }
  .product-information { min-width: 0; padding-top: clamp(24px, 7vw, 110px); }
  .product-summary { padding: 0 0 26px; }
  .product-name {
    display: block;
    height: auto;
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.25;
  }
  .product-summary .prices { margin-top: 23px; }
  .product-summary .price { font-size: 30px; }
  .product-summary .old-price { font-size: 15px; }
  .product-details { margin-top: 0; border-top: 1px solid #ddd; padding-top: 22px; text-align: left; }
  .detail-title { font-size: 18px; text-align: left; }
  .detail-description { margin-top: 12px; padding: 0; font-size: 15px; line-height: 1.65; }
  .purchase { margin-top: 18px; }
  .search-box { top: var(--nav-height); margin-bottom: 22px; max-width: 620px; padding-inline: 0; }
  .search-box::after { left: 0; right: 0; }
}

@media (min-width: 1120px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

