/* H5 only: reserve the fixed navigation and the device's bottom safe area.
 * The older body.mall-body rule removes padding on narrow screens. Keep the
 * page reserve and navigation height in sync without changing PC templates.
 */
body.mall-body.mall-channel-h5 {
    --mall-bottom-nav-height: 66px;
    --mall-safe-area-bottom: env(safe-area-inset-bottom, 0px);
    padding-bottom: calc(var(--mall-bottom-nav-height) + var(--mall-safe-area-bottom) + 12px);
}

.mall-channel-h5 .mall-mobile-nav {
    height: calc(var(--mall-bottom-nav-height) + var(--mall-safe-area-bottom));
    padding-bottom: var(--mall-safe-area-bottom);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mall-channel-h5 .mall-mobile-nav a {
    position: relative;
    gap: 4px;
    padding: 0 2px;
    white-space: nowrap;
}

.mall-channel-h5 .mall-mobile-nav__icon { display: inline-flex; width: 13px; height: 13px; align-items: center; justify-content: center; }
.mall-channel-h5 .mall-mobile-nav__icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.mall-channel-h5 .mall-mobile-nav__count {
    display: inline-flex;
    min-width: 15px;
    height: 15px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 999px;
    background: #b64b42;
    color: #fff;
    font-size: 9px;
    line-height: 1;
}

.mall-channel-h5 .mall-mobile-nav__count[hidden] {
    display: none !important;
}

.mall-channel-h5 .mall-toast {
    bottom: calc(var(--mall-bottom-nav-height) + var(--mall-safe-area-bottom) + 18px);
}

/* Form layout rules must not reveal controls marked as hidden. */
.mall-channel-h5 .mall-cart [hidden] {
    display: none !important;
}

/* One shared two-line footer, matching the category page. */
.mall-channel-h5 .mall-mobile-slogan {
    display: flex;
    min-height: clamp(88px, 22vw, 154px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    border-top: 1px solid #e8e7e3;
    background: #fff;
    color: #11110f;
    text-align: center;
}
.mall-channel-h5 .mall-mobile-slogan p {
    margin: 0;
    font-family: "PingFang SC", "Helvetica Neue", sans-serif;
    font-size: clamp(13px, 3.3vw, 22px);
    line-height: 1.6;
}
.mall-channel-h5 .mall-mobile-slogan span {
    margin-top: 2px;
    font-size: clamp(13px, 3.3vw, 22px);
    line-height: 1.5;
}
