/* Illustrated classroom storefront. */
.shop-head { display:grid; grid-template-columns:126px minmax(0,1fr) 370px; align-items:center; gap:25px; padding:28px 30px; border:1px solid #e1eaf5; border-radius:24px; background:#f0f5fc; margin-bottom:31px; }
.shop-head-art { width:126px; height:126px; object-fit:cover; border-radius:22px; }
.shop-head-copy { min-width:0; }
.shop-head .section-kicker { font-size:9px; font-weight:700; color:#7e91a9; letter-spacing:1.7px; }
.shop-head h1 { font-size:29px; font-weight:800; line-height:1.5; letter-spacing:-.6px; color:#35506f; margin:5px 0 9px; }
.shop-head p { font-size:12px; color:#71849d; line-height:1.8; }
.shop-head .shop-tip { margin-top:7px; font-size:11px; color:#7b8da4; }
.shop-redeem { min-width:0; padding:17px 18px; border:1px solid #e1e8f1; background:#ffffffed; border-radius:15px; }
.shop-redeem label { display:block; font-size:13px; font-weight:700; color:#536b89; margin-bottom:9px; }
.shop-redeem-row { display:flex; gap:8px; }
.shop-redeem .home-input { width:100%; min-width:0; height:41px; font-size:12px; background:#f9fbff; border-radius:9px; }
.shop-redeem .home-btn { flex-shrink:0; height:41px; padding:0 17px; font-size:12px; border-radius:9px; }
.shop-group { margin-bottom:31px; }
.shop-group-head { display:flex; align-items:center; gap:12px; margin-bottom:17px; }
.shop-group-art { width:44px; height:44px; border-radius:12px; object-fit:cover; }
.shop-group-head h2 { font-size:21px; font-weight:750; color:#3b506c; }
.shop-group-head small { font-size:11px; color:#7f8ea3; }
.shop-group-head .home-btn { margin-left:auto; height:35px; font-size:11px; padding:0 14px; border-radius:9px; }
.shop-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(186px,1fr)); gap:16px; }
.shop-item { min-width:0; border:1px solid #e4eaf3; border-radius:16px; background:#fff; overflow:hidden; transition:transform .2s,border-color .2s,box-shadow .2s; }
.shop-item:hover { border-color:#c4d5ed; box-shadow:0 10px 24px #274d8a0c; }
.shop-item-picture { position:relative; width:100%; aspect-ratio:4/3; overflow:hidden; }
.shop-item-art { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.shop-item-kind { position:absolute; left:10px; top:10px; padding:4px 8px; border-radius:7px; color:#716d78; background:#fffffff0; font-size:9px; font-weight:650; }
.shop-item-body { padding:12px 14px 12px; }
.shop-item-body h3 { font-size:15px; font-weight:750; color:#3e4e67; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shop-item-body p { font-size:11px; color:#748298; line-height:1.6; margin-top:2px; min-height:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shop-item-bottom { display:flex; justify-content:space-between; gap:8px; align-items:center; padding-top:10px; margin-top:10px; border-top:1px solid #edf0f6; }
.shop-item-bottom>span { color:#7b8a9e; font-size:10px; white-space:nowrap; }
.shop-item-bottom>span:first-child { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.shop-item-bottom>.shop-price { font-size:16px; color:#e5484d; }
.shop-item-bottom>span i { margin-right:4px; }
.shop-item-btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:30px; padding:0 10px; white-space:nowrap; border-radius:8px; background:#edf3fd; color:#4974b6; font-size:11px; font-weight:650; }
.shop-item-btn:hover { color:#fff; background:#4974b6; }
.shop-item-btn:focus-visible { outline:3px solid #83a8e7; outline-offset:3px; }
.shop-coming { padding:13px 16px; font-size:11px; line-height:1.8; color:#8896aa; background:#f7f9fc; border-radius:12px; }
.shop-coming i { margin-right:5px; }
.shop-head~.hg-empty h2 { font-size:24px; color:#526d8c; margin:15px 0 10px; }
.shop-head~.hg-empty p { margin-bottom:20px; }
@media(max-width:1100px) {
  .shop-head { grid-template-columns:100px minmax(0,1fr); padding:24px; gap:20px; }
  .shop-head-art { width:100px; height:100px; border-radius:18px; }
  .shop-head h1 { font-size:29px; }
  .shop-redeem { grid-column:1/-1; }
  .shop-redeem-row .home-input { font-size:16px; }
  .shop-item-bottom>span { font-size:9px; }
}
@media(max-width:700px) {
  .shop-head { grid-template-columns:70px minmax(0,1fr); padding:20px; gap:15px; border-radius:20px; margin-bottom:24px; }
  .shop-head-art { width:70px; height:70px; border-radius:15px; }
  .shop-head h1 { font-size:23px; letter-spacing:-.4px; margin:4px 0 7px; }
  .shop-head .section-kicker { font-size:7px; letter-spacing:1px; }
  .shop-head p { font-size:11px; }
  .shop-head .shop-tip { font-size:10px; }
  .shop-redeem { padding:14px; }
  .shop-redeem label { font-size:12px; }
  .shop-group-head { gap:9px; flex-wrap:wrap; }
  .shop-group-head h2 { font-size:19px; }
  .shop-group-head small { font-size:10px; }
  .shop-group-head .home-btn { font-size:10px; padding:0 10px; height:31px; }
  .shop-group-art { width:35px; height:35px; border-radius:10px; }
  .shop-grid { gap:12px; }
  .shop-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .shop-item-body { padding:11px; }
  .shop-item-body h3 { font-size:14px; }
  .shop-item-body p { font-size:10px; }
  .shop-item-bottom { flex-wrap:wrap; gap:8px; }
  .shop-item-bottom>span { font-size:10px; }
  .shop-item-btn { min-height:34px; font-size:11px; }
}

/* ===== 手机：标题不折行；分组头改成「图标｜标题+数量｜按钮」一行，按钮不再单独掉到下一行 ===== */
@media (max-width: 700px) {
  .shop-head h1 { font-size: min(21px, 5.4vw); white-space: nowrap; }
  .shop-head p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shop-head~.hg-empty p { font-size: 13px; }
  .shop-group-head { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 1px; align-items: center; }
  .shop-group-art { grid-row: 1 / 3; }
  .shop-group-head h2 { grid-column: 2; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shop-group-head small { grid-column: 2; grid-row: 2; white-space: nowrap; }
  .shop-group-head .home-btn { grid-column: 3; grid-row: 1 / 3; margin: 0; }
}
.shop-redeem-login { display: flex; width: 100%; justify-content: center; }   /* 未登录时兑换卡片里的登录按钮 */

/* ===== 头部中间：资料商城入口 + 小程序二维码 ===== */
.shop-head { grid-template-columns: 126px minmax(0, auto) minmax(0, 1fr) 370px; }
.shop-promo { display: flex; gap: 12px; min-width: 0; align-self: stretch; }
.shop-material, .shop-mini { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; border: 1px solid #e1e8f1; border-radius: 15px; background: #ffffffed; }
.shop-material { flex: 1 1 0; transition: border-color .2s, box-shadow .2s; }
.shop-material:hover { border-color: #ffd29c; box-shadow: 0 8px 20px #c26a1214; }
.shop-material-icon { flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-size: 19px; color: #fff; background: linear-gradient(135deg, #ffb24d, #ff8a3d); }
.shop-material-copy, .shop-mini-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.shop-material-copy b, .shop-mini-copy b { font-size: 15px; font-weight: 750; color: #3e4e67; white-space: nowrap; }
.shop-material-copy small, .shop-mini-copy small { font-size: 12px; line-height: 1.5; color: #7b8da4; }
.shop-material-go { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 700; color: #c26a12; background: #fff4e6; white-space: nowrap; }
.shop-material:hover .shop-material-go { color: #fff; background: #ff8a3d; }
.shop-mini { flex: 0 1 auto; max-width: 260px; }
.shop-mini-qr { flex-shrink: 0; width: 92px; height: 92px; object-fit: contain; border-radius: 8px; background: #fff; }
.shop-mini-copy b { white-space: normal; }
/* 中等宽度：中间放不下，推广卡单独占一行，兑换卡留在右上 */
@media (max-width: 1300px) {
  .shop-head { grid-template-columns: 126px minmax(0, 1fr) 370px; }
  .shop-promo { grid-column: 1 / -1; grid-row: 2; }
  .shop-mini { max-width: none; flex: 1 1 0; }
}
@media (max-width: 1100px) {
  .shop-head { grid-template-columns: 100px minmax(0, 1fr); }
  .shop-promo { grid-row: 3; }
}
@media (max-width: 700px) {
  .shop-head { grid-template-columns: 70px minmax(0, 1fr); }
}
/* 手机：两张卡上下排 */
@media (max-width: 560px) {
  .shop-promo { flex-direction: column; gap: 10px; }
  .shop-material, .shop-mini { padding: 12px 14px; }
  .shop-material-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
  .shop-material-copy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shop-material-go { padding: 0 10px; }
  .shop-mini-qr { width: 84px; height: 84px; }
}
