/* Yuto.Shop H5 — layout & chrome (requires shop-theme.css) */
.shop-h5 { padding-bottom: 0; }

.shop-h5 > .shop-h5-body {
    min-height: calc(100vh - var(--shop-tabbar-h));
    padding-bottom: calc(72px + var(--shop-safe-bottom));
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* 手机端内容满宽，仅保留 --shop-page-pad-x 统一左右留白 */
.shop-h5 .shop-home-page,
.shop-h5 .shop-page-shell,
.shop-h5 .shop-pl-page,
.shop-h5 .shop-cart-page,
.shop-h5 .shop-checkout-page,
.shop-h5 .shop-orders-page,
.shop-h5 .shop-order-detail-page,
.shop-h5 .shop-pd-page,
.shop-h5 .shop-product-page,
.shop-h5 .shop-category-page,
.shop-h5 .shop-user-page,
.shop-h5 .shop-pay-result-page,
.shop-h5 .shop-addr-page,
.shop-h5 .shop-addr-edit-page,
.shop-h5 .shop-invite-page {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (min-width: 721px) {
    .shop-h5 .shop-home-page,
    .shop-h5 .shop-page-shell,
    .shop-h5 .shop-pl-page,
    .shop-h5 .shop-cart-page,
    .shop-h5 .shop-checkout-page,
    .shop-h5 .shop-orders-page,
    .shop-h5 .shop-order-detail-page,
    .shop-h5 .shop-pd-page,
    .shop-h5 .shop-product-page,
    .shop-h5 .shop-category-page,
    .shop-h5 .shop-user-page,
    .shop-h5 .shop-pay-result-page,
    .shop-h5 .shop-addr-page,
    .shop-h5 .shop-addr-edit-page,
    .shop-h5 .shop-invite-page {
        max-width: var(--shop-page-max);
    }
}

/* Tabbar */
.shop-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: none;
    padding-bottom: var(--shop-safe-bottom);
    min-height: var(--shop-tabbar-h);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

@media (min-width: 721px) {
    .shop-tabbar {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: var(--shop-page-max);
        border-radius: 16px 16px 0 0;
    }
}

/* 商品/购物车/结算等底栏 — 宽度与 Tab 栏对齐 */
.shop-h5 .shop-pd-bar,
.shop-h5 .shop-cart-footer,
.shop-h5 .shop-checkout-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 721px) {
    .shop-h5 .shop-pd-bar,
    .shop-h5 .shop-cart-footer,
    .shop-h5 .shop-checkout-bar {
        max-width: var(--shop-page-max);
    }
}

.shop-tab {
    flex: 1;
    text-align: center;
    padding: 6px 0 8px;
    color: var(--shop-text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: color 0.15s ease;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.shop-tab:hover,
.shop-tab:focus,
.shop-tab:focus-visible,
.shop-tab:active {
    text-decoration: none;
    outline: none;
    box-shadow: none;
    border: none;
    border-top: none;
    border-bottom: none;
}

.shop-tab:active {
    background: rgba(0, 0, 0, 0.03);
}

.shop-tab .ti,
.shop-tab span {
    text-decoration: none;
}

.shop-tab .ti {
    display: block;
    font-size: 23px;
    line-height: 1;
    transition: transform 0.15s ease;
}

.shop-tab:active .ti {
    transform: scale(0.92);
}

.shop-tab.is-active,
.shop-page-home .shop-tabbar a[href="/shop"],
.shop-page-category .shop-tabbar a[href="/shop/category"],
.shop-page-cart .shop-tabbar a[href="/shop/cart"],
.shop-page-user .shop-tabbar a[href="/shop/user"] {
    color: var(--shop-brand);
}

.shop-tab-icon-wrap {
    position: relative;
    display: inline-block;
    line-height: 1;
}

.shop-tab-badge {
    position: absolute;
    top: -5px;
    right: -11px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--shop-brand);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
    box-sizing: border-box;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 6px rgba(var(--shop-brand-rgb), 0.35);
}

.shop-tab-badge.is-hidden { display: none; }

/* Legacy product card (Tabler grid) */
.shop-product-card {
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    border: none;
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow-sm);
    background: var(--shop-bg-elevated);
}

.shop-product-card .card-img-top {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f5f5f5;
}

/* Toast */
.shop-toast {
    position: fixed;
    left: 50%;
    bottom: calc(120px + var(--shop-safe-bottom));
    transform: translateX(-50%);
    background: rgba(51, 51, 51, 0.92);
    color: #fff;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    box-shadow: var(--shop-shadow-lg);
    max-width: calc(100vw - 48px);
    text-align: center;
}

.shop-toast.show { opacity: 1; }

.min-w-0 { min-width: 0; }
.product-desc img { max-width: 100%; height: auto; border-radius: 8px; }

.shop-checkout-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
}

#shop-checkout-submit:disabled { opacity: 0.6; }

/* uo.core.js 全局 loading（H5 不加载完整 yuto.css） */
.yuto-loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
.yuto-loading.yuto-loading-visible {
    opacity: 1;
    visibility: visible;
}
.yuto-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--shop-brand, #e93323);
    border-radius: 50%;
    animation: shop-h5-spin 0.7s linear infinite;
}
.yuto-loading-text {
    margin-top: 10px;
    font-size: 14px;
    color: #374151;
}
@keyframes shop-h5-spin {
    to { transform: rotate(360deg); }
}
