*{
    box-sizing: border-box;
    margin:0;
    padding:0;
    font-family:system-ui, sans-serif;
}
body{
    background:#ffffff;
    padding:0;
    color:#1e293b;
}
.main{
    max-width:720px;
    margin:0 auto;
    padding:16px;
}
.header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:16px;
}
.header-left{
    display:flex;
    align-items:center;
    gap:10px;
}
.shop-img{
    height:36px;
    border-radius:8px;
}
.shop-title{
    font-size:22px;
    color:#2563eb;
    font-weight:600;
}
.header-right{
    display:flex;
    gap:10px;
}
.btn-service{
    border:1px solid #2563eb;
    color:#2563eb;
    padding:7px 12px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
}
.btn-secondary{
    background:#2563eb;
    color:#fff;
    padding:7px 12px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
}
.notice-section{
    display:flex;
    align-items:center;
    gap:8px;
    background:#eff6ff;
    padding:12px 14px;
    border-radius:10px;
    margin-bottom:16px;
}
.notice-dot{
    width:8px;
    height:8px;
    background:#2563eb;
    border-radius:50%;
}
.notice-text{
    font-size:14px;
    color:#1e40af;
}
.banner-wrap{
    border-radius:16px;
    overflow:hidden;
    margin-bottom:20px;
}
.banner-slider{
    position:relative;
    overflow:hidden;
}
.banner-track{
    display:flex;
    transition:transform 0.4s ease;
}
.banner-slide{
    flex:0 0 100%;
}
.banner-slide img{
    width:100%;
    display:block;
}
.banner-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:32px;
    height:32px;
    border-radius:50%;
    border:none;
    background:rgba(255,255,255,0.7);
    color:#2563eb;
    font-size:16px;
    cursor:pointer;
}
.banner-arrow-prev{
    left:10px;
}
.banner-arrow-next{
    right:10px;
}
.banner-dots{
    position:absolute;
    bottom:10px;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    gap:6px;
}
.dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:rgba(255,255,255,0.5);
    cursor:pointer;
}
.dot.active{
    background:#2563eb;
}
.featured-section{
    position:relative;
    margin-bottom:20px;
}
.featured-badge{
    position:absolute;
    top:-8px;
    left:12px;
    background:#2563eb;
    color:#fff;
    font-size:12px;
    padding:3px 10px;
    border-radius:99px;
    z-index:2;
}
.product-wrapper{
    margin-bottom:14px;
}
.product-card{
    background:#fff;
    border:1px solid #2563eb;
    border-radius:16px;
    padding:14px;
    display:flex;
    align-items:center;
    gap:12px;
    cursor:pointer;
    transition:0.2s;
    animation: breatheBorder 3s infinite ease-in-out;
}
.product-card.active{
    border-color:#2563eb;
}
@keyframes breatheBorder {
    0% {
        box-shadow: 0 0 8px rgba(37, 99, 235, 0.2);
    }
    50% {
        box-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
    }
    100% {
        box-shadow: 0 0 8px rgba(37, 99, 235, 0.2);
    }
}
.product-image{
    width:70px;
    height:70px;
    border-radius:10px;
    object-fit:cover;
}
.product-info{
    flex:1;
}
.product-title{
    font-size:16px;
    font-weight:600;
    margin-bottom:6px;
}
.product-meta{
    display:flex;
    flex-wrap:wrap;
    gap:6px 10px;
    align-items:center;
}
.product-price{
    font-size:18px;
    font-weight:bold;
    color:#2563eb;
    flex-shrink:0;
}
.product-original-price{
    font-size:13px;
    color:#94a3b8;
    text-decoration:line-through;
    flex-shrink:0;
}
.product-sold{
    font-size:12px;
    color:#64748b;
}
.product-stock{
    font-size:12px;
    color:#64748b;
    margin-left:auto;
    white-space:nowrap;
}
.stock-limited{
    color:#f59e0b;
}
.stock-out{
    color:#ef4444;
}
.chevron{
    flex-shrink:0;
}
.buy-panel{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:0 0 16px 16px;
    padding:0 14px;
    margin-top:-4px;
    display:none;
}
.buy-panel.open{
    display:block;
    padding:14px;
}
.panel-group{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-bottom:14px;
}
.panel-row{
    display:flex;
    flex-direction:column;
    gap:6px;
}
.panel-label{
    font-size:14px;
    color:#334155;
}
.required{
    color:#ef4444;
}
.quantity-control{
    display:flex;
}
.quantity-btn{
    width:36px;
    height:36px;
    border:1px solid #cbd5e1;
    background:#f8fafc;
    font-size:18px;
    cursor:pointer;
}
.quantity-input{
    width:60px;
    text-align:center;
    border:1px solid #cbd5e1;
}
.quantity-btn,.quantity-input{
    padding:6px;
}
.contact-input{
    border:1px solid #cbd5e1;
    padding:10px;
    border-radius:8px;
    font-size:15px;
    outline:none;
}
.contact-input:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,0.15);
}
.payment-options{
    display:flex;
    gap:10px;
}
.payment-option{
    flex:1;
    border:1px solid #cbd5e1;
    border-radius:8px;
    padding:8px;
    text-align:center;
    cursor:pointer;
}
.payment-option input{
    margin-right:4px;
}
.panel-hint{
    font-size:12px;
    color:#ef4444;
    margin-bottom:12px;
}
.panel-submit{
    width:100%;
    background:#2563eb;
    color:#fff;
    border:none;
    padding:12px;
    border-radius:10px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
}
.panel-submit.pulse{
    animation: pulse 2.2s infinite;
}
@keyframes pulse{
    0%{box-shadow:0 0 0 0 rgba(37,99,235,0.4);}
    70%{box-shadow:0 0 0 8px rgba(37,99,235,0);}
    100%{box-shadow:0 0 0 0 rgba(37,99,235,0);}
}
.section-divider{
    text-align:center;
    margin:24px 0;
    color:#2563eb;
}
.empty-state{
    text-align:center;
    padding:40px 20px;
    color:#64748b;
}
.footer{
    margin-top:40px;
    padding:20px 0;
    text-align:center;
    font-size:13px;
    color:#94a3b8;
}
.footer-divider{
    width:60px;
    height:1px;
    background:#cbd5e1;
    margin:0 auto 16px;
}
/* ===== 全设备自适应：iPhone / iPad / Android / 桌面 ===== */
@media (max-width: 1024px) {
    .main { max-width: 100%; padding: 16px 20px; }
}
@media (max-width: 768px) {
    .main { padding: 12px 14px; }
    .header { flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
    .header-left { min-width: 0; max-width: 100%; }
    .shop-img { height: 34px; flex: none; }
    .shop-title { font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
    .header-right { width: 100%; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
    .header-right a { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; font-size: 13px; }
    .notice-section { padding: 10px 12px; margin-bottom: 12px; align-items: flex-start; }
    .notice-text { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.55; overflow-wrap: anywhere; }
    .banner-wrap { border-radius: 12px; margin-bottom: 14px; }
    .banner-arrow { width: 34px; height: 34px; }
    .cat-nav { overflow-x: auto; flex-wrap: nowrap; padding: 8px 2px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .cat-nav::-webkit-scrollbar { display: none; }
    .cat-item { padding: 7px 13px; font-size: 13px; }
    .product-card { align-items: flex-start; padding: 12px; gap: 10px; border-radius: 13px; }
    .product-image { width: 64px; height: 64px; flex: none; }
    .product-info { min-width: 0; }
    .product-title { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
    .product-meta { gap: 6px 8px; }
    .product-price { font-size: 17px; }
    .product-stock { margin-left: 0; white-space: normal; }
    .chevron { display: none; }
    .detail-wrap { padding: 4px 0 0; }
    .detail-image-card { padding: 22px 16px; border-radius: 16px; }
    .detail-img { max-width: 112px; max-height: 112px; }
    .detail-block { margin-top: 12px; padding: 14px; border-radius: 12px; }
    .detail-title { font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
    .detail-desc { max-height: none; overflow: visible; line-height: 1.75; }
    .detail-desc img { max-width: 100%; }
    .payment-options { flex-wrap: wrap; }
    .payment-option { flex: 1 1 calc(50% - 5px); min-width: 120px; box-sizing: border-box; }
    .contact-input { font-size: 16px; min-height: 44px; }
    .quantity-btn { width: 40px; height: 40px; }
    .quantity-input { width: 64px; height: 40px; }
    .panel-submit { min-height: 48px; font-size: 16px; }
    .footer { padding: 24px 10px; margin-top: 26px; }
    .back-top { right: 12px; bottom: 18px; width: 42px; height: 42px; }
}
@media (max-width: 480px) {
    .main { padding: 10px 10px calc(26px + env(safe-area-inset-bottom)); }
    .header-right a { flex: 1 1 0; min-width: 0; }
    .product-image { width: 56px; height: 56px; border-radius: 9px; }
    .product-price { font-size: 16px; }
    .featured-badge { left: 8px; font-size: 11px; }
    .banner-slide { aspect-ratio: 16 / 10; }
    .detail-image-card { padding: 18px 12px; }
    .detail-img { max-width: 96px; max-height: 96px; }
    .detail-block { padding: 12px; }
    .detail-title { font-size: 17px; }
    .payment-option { flex-basis: 100%; }
    .empty-state { padding: 30px 12px; }
}
