/* 详细页公共样式（兼容所有浏览器） */
body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Helvetica Neue", Arial, sans-serif;
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 40px 60px;
    line-height: 1.75;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    background-color: #f4f6f9;
    background-image: -webkit-linear-gradient(top, #f8fafc 0%, #eef2f7 100%);
    background-image: -moz-linear-gradient(top, #f8fafc 0%, #eef2f7 100%);
    background-image: linear-gradient(to bottom, #f8fafc 0%, #eef2f7 100%);
    -webkit-font-smoothing: antialiased
}

h1 {
    font-size: 30px;
    font-weight: 700;
    color: #1a202c;
    margin: 8px 0 16px;
    letter-spacing: -.5px
}

h2 {
    font-size: 20px;
    margin-top: 36px;
    padding: 9px 14px;
    background-color: #e8f0fe;
    background-image: -webkit-linear-gradient(left, #e8f0fe 0%, rgba(232, 240, 254, 0) 100%);
    background-image: -moz-linear-gradient(left, #e8f0fe 0%, rgba(232, 240, 254, 0) 100%);
    background-image: linear-gradient(to right, #e8f0fe 0%, rgba(232, 240, 254, 0) 100%);
    border-left: 4px solid #1a73e8;
    border-radius: 0 8px 8px 0;
    color: #1a202c;
    font-weight: 700
}

h3 {
    font-size: 17px;
    margin-top: 24px;
    color: #1a73e8;
    font-weight: 700
}

p {
    margin: 10px 0
}

a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600
}

a:hover {
    color: #1557b0;
    text-decoration: underline
}

.red {
    color: #e02e2e;
    font-weight: 700
}

pre {
    background-color: #1e293b;
    color: #e2e8f0;
    border: none;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 12px 0;
    overflow-x: auto;
    font-size: 14px;
    font-family: Consolas, "Courier New", monospace;
    white-space: pre-wrap;
    word-break: break-all;
    -webkit-box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    line-height: 1.65
}

.exp {
    margin-top: 10px;
    font-size: 15px;
    color: #7c2d12;
    background-color: #fff7ed;
    border-left: 3px solid #fb923c;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0
}

.tip {
    background-color: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 14px;
    font-size: 15px;
    color: #713f12;
    -webkit-box-shadow: 0 2px 6px rgba(251, 191, 36, .15);
    box-shadow: 0 2px 6px rgba(251, 191, 36, .15)
}

.demo {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    margin-top: 14px;
    font-size: 15px;
    font-weight: 400;
    -webkit-box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, .06)
}

.demo .row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap
}

.demo .row>*+* {
    margin-left: 10px
}
.demo .row + .row {
    margin-top: 10px
}

.btn {
    display: inline-block;
    background: #fff;
    color: #1a73e8;
    border: 1.5px solid #1a73e8;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
    text-decoration: none;
    text-align: center
}

.btn:hover {
    background-color: #fff;
    color: #1a73e8
}

.btn.ghost {
    background: #fff;
    color: #1a73e8;
    border: 1.5px solid #1a73e8;
    box-shadow: none
}

.btn.ghost:hover {
    background-color: #e8f0fe
}

.inp {
    padding: 8px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    outline: none
}

.inp:focus {
    border-color: #1a73e8
}

.out {
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 12px;
    font-size: 14px;
    color: #475569;
    min-height: 24px;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: Consolas, "Courier New", monospace
}

.out.ok {
    background-color: #dcfce7;
    color: #15803d
}

.out.err {
    background-color: #fee2e2;
    color: #b91c1c
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 400;
    border-radius: 10px;
    overflow: hidden;
    -webkit-box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06)
}

th,
td {
    border-bottom: 1px solid #e2e8f0;
    padding: 9px 12px;
    text-align: left
}

th {
    background-color: #f1f5f9;
    font-weight: 700;
    color: #334155
}

tr:hover td {
    background-color: #f8fafc
}

body>p:first-of-type a {
    display: inline-block;
    background-color: #e8f0fe;
    color: #1a73e8;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 14px
}

body>p:first-of-type a:hover {
    background-color: #d2e3fc;
    text-decoration: none
}

@media(max-width:640px) {
    body {
        padding: 20px 16px
    }

    h1 {
        font-size: 24px
    }

    pre {
        font-size: 13px
    }
}

@keyframes ripple {
    to {
        -webkit-transform: scale(4);
        transform: scale(4);
        opacity: 0
    }
}
/* 购物车表格 */
#cartTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}
#cartTable th {
    background: #f1f5f9;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
}
#cartTable td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    text-align: center;
}
.demo .minus, .demo .plus {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1.5px solid #1a73e8;
    background: #fff;
    color: #1a73e8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    padding: 0;
}
#cartTable td .qty-num {
    display: inline-block;
    width: 24px;
    text-align: center;
    font-weight: 600;
}
.demo .del {
    border: 1.5px solid #e02e2e;
    background: #fff;
    color: #e02e2e;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}
.demo .bar {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-top: 14px;
}
.demo .bar > * + * {
    margin-left: 10px;
    margin-top: 6px;
}
.demo .summary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 15px;
    color: #334155;
}
.demo .summary b {
    color: #e02e2e;
    font-size: 17px;
}
.qty-box {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}
.qty-box .qty-num {
    display: inline-block;
    width: 24px;
    text-align: center;
    font-weight: 600;
    margin: 0 6px;
}

.qty-cell { text-align: center !important; }
#cartTable .stock-tip { display: inline-block; margin-left: 8px; font-size: 12px; color: #aaa; }
