
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #fff9f2; color: #444; }
a { text-decoration: none; color: inherit; }
img { display: block; }


.topbar { background: linear-gradient(90deg, #ff6b9d, #ffb347, #ffde59, #7ed957, #6ec6ff); padding: 12px 0; }
.topbar .inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-size: 24px; font-weight: 800; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.15); letter-spacing: 1px; }
.logo .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #fff; margin: 0 2px; animation: bounce 1.2s infinite; }
.logo .dot:nth-child(2) { animation-delay: .15s; }
.logo .dot:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.nav { display: flex; gap: 4px; }
.nav a { color: #fff; padding: 6px 14px; border-radius: 20px; font-weight: 700; font-size: 14px; background: rgba(255,255,255,.22); }
.nav a:hover, .nav a.on { background: #fff; color: #ff6b9d; }
.cart-btn { background: #fff !important; color: #ff6b9d !important; position: relative; }
.cart-badge { position: absolute; top: -8px; right: -6px; background: #ff4757; color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 10px; display: none; align-items: center; justify-content: center; padding: 0 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 20px 16px; }


.banner { position: relative; border-radius: 18px; overflow: hidden; height: 300px; background: linear-gradient(135deg, #ff9a9e, #fecfef); display: flex; align-items: center; justify-content: center; }
.banner .slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; font-weight: 800; text-shadow: 3px 3px 0 rgba(0,0,0,.18); opacity: 0; transition: opacity .5s; }
.banner .slide.on { opacity: 1; }
.banner .slide small { display: block; font-size: 15px; font-weight: 400; margin-top: 8px; text-align: center; }
.banner-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.banner-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer; }
.banner-dots i.on { background: #fff; transform: scale(1.3); }


.section { margin-top: 26px; }
.section h2 { font-size: 20px; font-weight: 800; color: #ff6b9d; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section h2::before { content: ""; width: 8px; height: 22px; border-radius: 4px; background: linear-gradient(#ff6b9d, #ffde59); }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.cat-card { background: #fff; border: 2px solid #ffe0ec; border-radius: 16px; padding: 14px 10px; text-align: center; transition: .2s; }
.cat-card:hover { transform: translateY(-4px) rotate(-1deg); border-color: #ff6b9d; box-shadow: 0 6px 16px rgba(255,107,157,.18); }
.cat-card .ci { font-size: 30px; }
.cat-card .cn { font-size: 14px; font-weight: 700; color: #555; margin-top: 6px; }


.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: #fff; border-radius: 16px; overflow: hidden; border: 2px solid #fff0f5; transition: .2s; }
.card:hover { transform: translateY(-5px); border-color: #ffde59; box-shadow: 0 10px 20px rgba(255,180,60,.2); }
.card .pic { width: 100%; height: 200px; object-fit: cover; background: #fff5f8; }
.card .info { padding: 12px; }
.card .name { font-size: 13px; height: 40px; line-height: 1.5; overflow: hidden; color: #555; }
.card .price { color: #ff4757; font-size: 18px; font-weight: 800; margin-top: 6px; }
.card .price small { font-size: 12px; }
.card .orig { color: #bbb; font-size: 12px; text-decoration: line-through; margin-left: 6px; }
.card .sales { font-size: 12px; color: #aaa; margin-top: 4px; }
.card .add { margin-top: 8px; width: 100%; border: 0; border-radius: 22px; padding: 8px; background: linear-gradient(90deg, #ff6b9d, #ffb347); color: #fff; font-weight: 700; cursor: pointer; }
.card .add:hover { filter: brightness(1.05); }


.toolbar { background: #fff; border-radius: 16px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; border: 2px solid #fff0f5; }
.toolbar .tag { padding: 6px 14px; border-radius: 18px; background: #fff5f8; color: #666; cursor: pointer; font-size: 13px; border: 2px solid transparent; }
.toolbar .tag.on { background: #ff6b9d; color: #fff; }
.toolbar input[type=text] { flex: 1; min-width: 160px; padding: 8px 12px; border: 2px solid #ffe0ec; border-radius: 18px; outline: none; }
.result { font-size: 13px; color: #999; margin-bottom: 12px; }
.result b { color: #ff6b9d; }


.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; background: #fff; border-radius: 18px; padding: 24px; border: 2px solid #fff0f5; }
.detail .main { border-radius: 14px; overflow: hidden; }
.detail .main img { width: 100%; height: 420px; object-fit: cover; }
.detail .dt { font-size: 20px; font-weight: 800; color: #333; }
.detail .dp { font-size: 28px; color: #ff4757; font-weight: 800; margin: 12px 0; }
.detail .dp small { font-size: 14px; }
.detail .dorig { color: #bbb; font-size: 13px; text-decoration: line-through; }
.detail .dsales { color: #999; font-size: 13px; margin-bottom: 14px; }
.detail .dl { margin: 12px 0 6px; font-weight: 700; color: #666; font-size: 14px; }
.specs { display: flex; flex-wrap: wrap; gap: 8px; }
.spec { padding: 8px 16px; border-radius: 18px; border: 2px solid #ffe0ec; cursor: pointer; font-size: 13px; background: #fff; }
.spec.on { border-color: #ff6b9d; background: #fff0f6; color: #ff6b9d; font-weight: 700; }
.qty { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #ffe0ec; background: #fff; font-size: 18px; cursor: pointer; color: #ff6b9d; }
.qty b { min-width: 30px; text-align: center; font-size: 16px; }
.dbtn { display: flex; gap: 12px; margin-top: 8px; }
.dbtn button { flex: 1; padding: 13px; border: 0; border-radius: 26px; font-size: 16px; font-weight: 800; cursor: pointer; color: #fff; }
.btn-cart { background: linear-gradient(90deg, #ffb347, #ff6b9d); }
.btn-buy { background: linear-gradient(90deg, #ff6b9d, #c44569); }


.cart-item { display: flex; gap: 14px; background: #fff; border: 2px solid #fff0f5; border-radius: 14px; padding: 12px; margin-bottom: 12px; align-items: center; }
.cart-item img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; }
.ci-name { flex: 1; font-size: 14px; color: #555; }
.ci-spec { font-size: 12px; color: #999; margin-top: 4px; }
.ci-price { color: #ff4757; font-weight: 800; min-width: 70px; text-align: right; }
.ci-qty { display: flex; align-items: center; gap: 8px; }
.ci-qty button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #ffe0ec; background: #fff; cursor: pointer; color: #ff6b9d; }
.ci-del { border: 0; background: none; color: #ccc; font-size: 20px; cursor: pointer; }
.cart-sum { background: #fff; border: 2px solid #fff0f5; border-radius: 14px; padding: 16px; display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.cart-sum .t { font-size: 16px; }
.cart-sum .t b { color: #ff4757; font-size: 24px; }
.cart-sum a { background: linear-gradient(90deg, #ff6b9d, #ffb347); color: #fff; padding: 12px 28px; border-radius: 26px; font-weight: 800; }
.empty { text-align: center; padding: 60px 0; color: #bbb; font-size: 16px; }
.empty a { color: #ff6b9d; font-weight: 700; }


.co { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.co .card { padding: 20px; border: 2px solid #fff0f5; border-radius: 16px; background: #fff; }
.co .card h3 { margin-bottom: 14px; color: #ff6b9d; font-size: 17px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; font-weight: 700; }
.form-row input, .form-row textarea { width: 100%; padding: 10px 12px; border: 2px solid #ffe0ec; border-radius: 12px; outline: none; font-size: 14px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus { border-color: #ff6b9d; }
.form-row .err { color: #ff4757; font-size: 12px; margin-top: 4px; display: none; }
.co-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #ffe0ec; align-items: center; }
.co-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.co-item .n { flex: 1; font-size: 13px; }
.co-item .p { color: #ff4757; font-weight: 700; }
.co-total { display: flex; justify-content: space-between; padding: 14px 0; font-size: 16px; border-top: 2px solid #ffe0ec; margin-top: 10px; }
.co-total b { color: #ff4757; font-size: 24px; }

.pay-badge { display: flex; align-items: center; gap: 10px; border: 2px solid #ffe0ec; border-radius: 12px; padding: 12px; margin: 10px 0; cursor: pointer; }
.pay-badge.on { border-color: #1677ff; background: #f0f7ff; }
.pay-logo { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #1677ff, #0aa9ff); color: #fff; font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; font-family: serif; }
.pay-name { flex: 1; font-weight: 700; color: #333; }
.pay-choice { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #ccc; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.pay-badge.on .pay-choice { background: #1677ff; border-color: #1677ff; }
.co-submit { width: 100%; padding: 14px; border: 0; border-radius: 26px; background: linear-gradient(90deg, #1677ff, #0aa9ff); color: #fff; font-size: 17px; font-weight: 800; cursor: pointer; margin-top: 10px; }
.co-submit:hover { filter: brightness(1.05); }


.ok { text-align: center; background: #fff; border-radius: 18px; padding: 50px 20px; border: 2px solid #7ed957; }
.ok .emoji { font-size: 60px; animation: bounce 1s infinite; }
.ok h2 { color: #7ed957; margin: 10px 0; }
.ok .info { color: #888; font-size: 14px; line-height: 2; margin-bottom: 20px; }
.ok .info b { color: #333; }
.ok a { display: inline-block; background: linear-gradient(90deg, #ff6b9d, #ffb347); color: #fff; padding: 12px 30px; border-radius: 26px; font-weight: 800; }


.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: rgba(255,71,87,.95); color: #fff; padding: 12px 26px; border-radius: 26px; font-size: 14px; z-index: 999; opacity: 0; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; }


.footer { text-align: center; padding: 24px; color: #bbb; font-size: 13px; margin-top: 30px; }

@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; }
  .co { grid-template-columns: 1fr; }
  .banner { height: 180px; }
  .banner .slide { font-size: 22px; }
}


.auth-wrap { margin-left: 14px; font-size: 13px; color: #666; white-space: nowrap; }
.auth-entry { color: #ff7a45; font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-wrap.user-chip { color: #333; font-weight: 600; }
.auth-wrap.user-chip b { color: #ff7a45; }
.auth-quit { margin-left: 6px; color: #999; text-decoration: underline; cursor: pointer; font-weight: normal; }
.auth-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; }
.auth-modal.show { display: flex; }
.auth-mask { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.auth-box { position: relative; width: 360px; max-width: 92vw; background: #fff; border-radius: 14px; padding: 26px 24px 20px; box-shadow: 0 16px 50px rgba(0,0,0,.3); }
.auth-close { position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 22px; color: #999; cursor: pointer; line-height: 1; }
.auth-box h4 { margin: 0 0 4px; font-size: 20px; color: #333; }
.auth-sub { margin: 0 0 12px; font-size: 12px; color: #999; }
.auth-box label { display: block; margin: 12px 0 4px; font-size: 13px; color: #555; }
.auth-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; }
.auth-input:focus { border-color: #ff7a45; }
.auth-err { min-height: 18px; margin-top: 8px; font-size: 12px; color: #e5484d; }
.auth-submit { width: 100%; padding: 11px 0; border: none; border-radius: 8px; background: #ff7a45; color: #fff; font-size: 15px; cursor: pointer; }
.auth-submit:hover { opacity: .9; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 13px; }
.auth-switch a { color: #ff7a45; text-decoration: none; }
