/* 氧您无忧 H5 公共样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: #f2f6fa;
    color: #26323c;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 顶部栏 */
.yq-header {
    position: sticky; top: 0; z-index: 100;
    background: linear-gradient(135deg, #35a6ff 0%, #1677e3 100%);
    color: #fff;
    padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(22, 119, 227, .25);
}
.yq-header .h-title { font-size: 17px; font-weight: 600; }
.yq-header .h-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.yq-header .h-right { text-align: right; }
.yq-header .h-quota { font-size: 12px; opacity: .9; }
.yq-header .h-quota b { font-size: 16px; }

/* 卡片/容器 */
.yq-wrap { max-width: 640px; margin: 0 auto; padding-bottom: 84px; }
.yq-card {
    background: #fff; border-radius: 12px; margin: 12px;
    padding: 14px; box-shadow: 0 1px 4px rgba(38, 50, 60, .06);
}

/* 表单 */
.yq-form { padding: 4px 0; }
.yq-form .f-item { margin-bottom: 16px; }
.yq-form label { display: block; font-size: 14px; color: #51606e; margin-bottom: 6px; }
.yq-form label .req { color: #f35; margin-left: 2px; }
.yq-form input[type=text], .yq-form input[type=tel], .yq-form textarea {
    width: 100%; border: 1px solid #dde6ee; border-radius: 10px;
    padding: 12px 14px; font-size: 15px; outline: none; background: #fafcfe;
    transition: border .2s;
}
.yq-form input:focus, .yq-form textarea:focus { border-color: #35a6ff; background: #fff; }
.yq-form textarea { min-height: 80px; resize: none; }

/* 按钮 */
.yq-btn {
    display: block; width: 100%; border: none; border-radius: 24px;
    background: linear-gradient(135deg, #35a6ff, #1677e3);
    color: #fff; font-size: 16px; padding: 13px 0; font-weight: 600;
    box-shadow: 0 4px 12px rgba(22, 119, 227, .3); cursor: pointer;
}
.yq-btn:active { opacity: .85; }
.yq-btn[disabled] { opacity: .55; }
.yq-btn.ghost {
    background: #fff; color: #1677e3; border: 1px solid #1677e3; box-shadow: none;
}

/* 产品网格(两列) */
.goods-grid {
    display: flex; flex-wrap: wrap; justify-content: space-between;
    padding: 12px;
}
.goods-card {
    width: calc(50% - 6px); background: #fff; border-radius: 12px;
    overflow: hidden; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(38,50,60,.06);
    display: flex; flex-direction: column;
}
.goods-img { position: relative; width: 100%; padding-top: 100%; background: #e8f2fb; }
.goods-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.goods-img .no-img { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 38px; color: #b9d3ec; }
.goods-body { padding: 10px 10px 12px; flex: 1; display: flex; flex-direction: column; }
.goods-name { font-size: 14px; line-height: 1.35; height: 2.7em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-sold { font-size: 11px; color: #93a4b3; margin-top: 4px; }
.goods-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px; }
.goods-price { color: #ff5b3c; font-weight: 700; }
.goods-price em { font-style: normal; font-size: 11px; }
.goods-price .p { font-size: 17px; }
.goods-price .op { font-size: 11px; color: #a9b6c2; text-decoration: line-through; font-weight: 400; margin-left: 4px; }

/* +按钮 */
.btn-add {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #35a6ff, #1677e3); color: #fff;
    font-size: 20px; line-height: 26px; text-align: center; font-weight: 700;
    box-shadow: 0 2px 6px rgba(22,119,227,.35); cursor: pointer;
}
.btn-add:active { transform: scale(.92); }

/* 底部购物条 */
.yq-cartbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    max-width: 640px; margin: 0 auto;
    background: #fff; border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 16px rgba(38,50,60,.1);
    padding: 10px 14px calc(10px + constant(safe-area-inset-bottom));
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 12px;
}
.cart-icon {
    position: relative; width: 46px; height: 46px; border-radius: 50%;
    background: linear-gradient(135deg, #35a6ff, #1677e3);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px; flex-shrink: 0;
}
.cart-badge {
    position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px;
    background: #ff5b3c; color: #fff; font-size: 11px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.cart-info { flex: 1; line-height: 1.3; }
.cart-info .t { font-size: 15px; font-weight: 700; color: #ff5b3c; }
.cart-info .s { font-size: 11px; color: #93a4b3; }
.cartbar-btn {
    border: none; border-radius: 22px; padding: 11px 22px; font-size: 15px; font-weight: 600;
    background: linear-gradient(135deg, #35a6ff, #1677e3); color: #fff; cursor: pointer;
}
.cartbar-btn[disabled] { opacity: .55; }

/* 清单行 */
.cart-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0f4f8; }
.cart-item:last-child { border-bottom: none; }
.cart-item .ci-img { width: 68px; height: 68px; border-radius: 10px; overflow: hidden; background: #e8f2fb; flex-shrink: 0; }
.cart-item .ci-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .ci-img .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #b9d3ec; }
.ci-body { flex: 1; min-width: 0; }
.ci-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-price { font-size: 13px; color: #ff5b3c; font-weight: 600; margin-top: 4px; }
.ci-price .sub { color: #93a4b3; font-weight: 400; }
.ci-del { color: #a9b6c2; font-size: 13px; padding: 4px; cursor: pointer; }

/* 数量步进器 */
.stepper { display: inline-flex; align-items: center; border: 1px solid #dde6ee; border-radius: 8px; overflow: hidden; }
.stepper button {
    width: 30px; height: 30px; border: none; background: #f4f8fc; color: #1677e3;
    font-size: 16px; cursor: pointer; font-weight: 700;
}
.stepper button:disabled { color: #c5d2dd; }
.stepper input {
    width: 40px; height: 30px; border: none; text-align: center; font-size: 14px;
    outline: none; background: #fff; font-weight: 600;
}

/* 汇总条 */
.sum-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; font-size: 14px; }
.sum-bar b { color: #ff5b3c; font-size: 18px; }
.over-tip { background: #fff2f0; color: #e0342c; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 6px 0; }

/* 详情页 */
.dt-img { position: relative; width: 100%; padding-top: 100%; background: #e8f2fb; }
.dt-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dt-img .no-img { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; color: #b9d3ec; }
.dt-name { font-size: 17px; font-weight: 600; line-height: 1.4; }
.dt-meta { display: flex; gap: 12px; color: #93a4b3; font-size: 12px; margin-top: 6px; }
.dt-content { padding: 4px 2px; font-size: 14px; line-height: 1.7; color: #42525f; word-break: break-all; }
.dt-content img { max-width: 100%; margin: 6px auto; }
.dt-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    max-width: 640px; margin: 0 auto; background: #fff;
    border-radius: 16px 16px 0 0; box-shadow: 0 -4px 16px rgba(38,50,60,.1);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 12px;
}
.dt-bar .stepper { flex-shrink: 0; }
.dt-bar .btn-add-big {
    flex: 1; border: none; border-radius: 22px; padding: 12px 0; font-size: 15px; font-weight: 600;
    background: linear-gradient(135deg, #35a6ff, #1677e3); color: #fff; cursor: pointer;
}
.dt-bar .btn-add-big:active { opacity: .85; }

/* 确认页信息 */
.info-list { font-size: 14px; }
.info-list .row { display: flex; padding: 7px 0; border-bottom: 1px dashed #eef3f8; }
.info-list .row:last-child { border-bottom: none; }
.info-list .k { width: 90px; color: #8296a6; flex-shrink: 0; }
.info-list .v { flex: 1; word-break: break-all; }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: #93a4b3; }
.empty .ico { font-size: 52px; margin-bottom: 12px; }
.empty p { margin-bottom: 20px; }

/* toast */
.yq-toast {
    position: fixed; left: 50%; bottom: 130px; transform: translateX(-50%) translateY(10px);
    background: rgba(28, 38, 48, .88); color: #fff; padding: 10px 20px; border-radius: 22px;
    font-size: 14px; max-width: 80%; opacity: 0; transition: all .25s; z-index: 999; pointer-events: none;
}
.yq-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 加载更多 */
.load-tip { text-align: center; color: #93a4b3; font-size: 13px; padding: 10px 0 20px; }

/* 成功页 */
.done-box { text-align: center; padding: 60px 24px 20px; }
.done-ico {
    width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
    background: linear-gradient(135deg, #4cd98a, #12b76a); color: #fff; font-size: 44px;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.done-no { font-size: 13px; color: #8296a6; margin-top: 8px; }
