/* ============================================================
   购物清单 shopping.s1.css
   红橙渐变主题 + 玻璃拟态，移动端自适应
   ============================================================ */

.shop-card {
    background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(254,242,242,0.92));
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.10);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.shop-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(239,68,68,0.10), transparent 70%);
    pointer-events: none;
}
.shop-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(249,115,22,0.08), transparent 70%);
    pointer-events: none;
}
.shop-icon {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%) !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
    animation: shop-breath 3s ease-in-out infinite;
}
@keyframes shop-breath {
    0%, 100% { box-shadow: 0 6px 18px rgba(239,68,68,0.35); }
    50% { box-shadow: 0 6px 26px rgba(249,115,22,0.55); }
}

/* ---------- 登录引导 ---------- */
.shop-login-guide { text-align: center; padding: 34px 16px 26px; position: relative; z-index: 1; }
.shop-login-guide i { font-size: 40px; background: linear-gradient(135deg,#ef4444,#f97316); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shop-login-guide h3 { margin: 12px 0 6px; font-size: 1.05rem; color: #1e293b; }
.shop-login-guide p { margin: 0 0 18px; font-size: 0.85rem; color: #64748b; }
.shop-login-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.shop-login-btns a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 26px; border-radius: 999px; text-decoration: none;
    font-size: 0.9rem; font-weight: 600; transition: all .25s ease;
}
.shop-login-btns a.main { background: linear-gradient(135deg,#ef4444,#f97316); color: #fff; box-shadow: 0 6px 16px rgba(239,68,68,0.35); }
.shop-login-btns a.main:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(249,115,22,0.45); }
.shop-login-btns a.ghost { border: 1.5px solid rgba(239,68,68,0.45); color: #dc2626; background: rgba(255,255,255,0.7); }
.shop-login-btns a.ghost:hover { background: rgba(239,68,68,0.08); }

/* ---------- Tabs ---------- */
.shop-tabs {
    display: flex; gap: 5px; margin: 6px 0 16px;
    background: rgba(254,226,226,0.55); border: 1px solid rgba(239,68,68,0.28);
    padding: 5px; border-radius: 14px;
    position: relative; z-index: 1;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tab {
    flex: 1 0 auto; border: none; background: transparent; cursor: pointer;
    padding: 9px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
    color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    transition: all .22s ease; white-space: nowrap;
}
.shop-tab i { font-size: 0.8rem; }
.shop-tab:hover { color: #dc2626; }
.shop-tab.active {
    background: linear-gradient(135deg,#ef4444,#f97316); color: #fff;
    box-shadow: 0 4px 14px rgba(239,68,68,0.35);
}
.shop-pane { display: none; animation: shop-slide-in .3s ease; position: relative; z-index: 1; }
.shop-pane.active { display: block; }
@keyframes shop-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 汇总卡 ---------- */
.shop-summary-card {
    display: flex; align-items: center; justify-content: space-around; gap: 10px;
    background: linear-gradient(135deg, #fee2e2 0%, #ffedd5 100%);
    border-radius: 16px; padding: 16px 20px;
    border: 1px solid rgba(239,68,68,0.3);
    box-shadow: 0 6px 20px rgba(239,68,68,0.10);
    margin-bottom: 16px;
}
.shop-summary-item { text-align: center; flex: 1; }
.shop-summary-label { font-size: 0.75rem; color: #991b1b; font-weight: 600; margin-bottom: 4px; }
.shop-summary-value { font-size: 1.5rem; font-weight: 800; color: #b91c1c; line-height: 1.1; }
.shop-summary-value.money { font-size: 1.2rem; }
.shop-summary-unit { font-size: 0.7rem; color: #991b1b; margin-top: 2px; }
.shop-summary-divider { width: 1px; height: 36px; background: rgba(239,68,68,0.2); }

/* ---------- 表单 ---------- */
.shop-form-card {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(239,68,68,0.22);
    border-radius: 16px; padding: 18px;
    margin-bottom: 16px;
}
.shop-form-title { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: #b91c1c; margin-bottom: 16px; }
.shop-form-title i { color: #ef4444; }

.shop-field-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.shop-field { flex: 1; min-width: 130px; }
.shop-field label { display: block; font-size: 0.82rem; font-weight: 600; color: #475569; margin-bottom: 7px; }
.shop-field label i { color: #ef4444; margin-right: 4px; }
.shop-field input[type="text"], .shop-field input[type="number"], .shop-field input[type="date"], .shop-field select {
    width: 100%; padding: 10px 12px; border: 1.5px solid rgba(239,68,68,0.25);
    border-radius: 10px; font-size: 0.88rem; color: #1e293b;
    background: #fff; box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.shop-field input:focus, .shop-field select:focus { outline: none; border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

.shop-save-row { display: flex; gap: 10px; margin-top: 4px; }
.shop-save-btn {
    flex: 1; border: none; cursor: pointer;
    padding: 12px 20px; border-radius: 12px;
    font-size: 0.92rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg,#ef4444,#f97316);
    box-shadow: 0 6px 16px rgba(239,68,68,0.35);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .25s ease;
}
.shop-save-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(249,115,22,0.45); }
.shop-cancel-btn {
    border: 1.5px solid rgba(239,68,68,0.4); cursor: pointer;
    padding: 12px 20px; border-radius: 12px;
    font-size: 0.92rem; font-weight: 600; color: #dc2626; background: rgba(255,255,255,0.7);
    transition: all .2s;
}
.shop-cancel-btn:hover { background: rgba(239,68,68,0.08); }

/* ---------- 商品列表 ---------- */
.shop-list { display: flex; flex-direction: column; gap: 10px; }
.shop-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.8); border: 1px solid rgba(239,68,68,0.18);
    border-radius: 12px; padding: 12px 14px;
    transition: all .2s;
}
.shop-item:hover { box-shadow: 0 4px 14px rgba(239,68,68,0.12); }
.shop-item.bought { opacity: 0.75; }
.shop-item.bought .shop-item-name { text-decoration: line-through; color: #94a3b8; }

.shop-item-check {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid rgba(239,68,68,0.4); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; background: #fff; transition: all .2s;
}
.shop-item-check.checked {
    background: linear-gradient(135deg,#ef4444,#f97316); border-color: transparent; color: #fff;
}
.shop-item-check.checked::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.7rem; }

.shop-item-cat {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.9rem; flex-shrink: 0;
}
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name { font-size: 0.88rem; font-weight: 600; color: #1e293b; margin-bottom: 2px; }
.shop-item-meta { font-size: 0.75rem; color: #94a3b8; display: flex; gap: 8px; flex-wrap: wrap; }
.shop-item-meta .shop-cat-tag { color: #dc2626; }
.shop-item-right { text-align: right; flex-shrink: 0; }
.shop-item-price { font-size: 0.92rem; font-weight: 700; color: #b91c1c; }
.shop-item-qty { font-size: 0.72rem; color: #94a3b8; }
.shop-item-actions { display: flex; gap: 6px; margin-top: 4px; justify-content: flex-end; }
.shop-item-btn { border: none; background: rgba(239,68,68,0.08); color: #dc2626; width: 28px; height: 28px; border-radius: 7px; cursor: pointer; font-size: 0.78rem; transition: all .2s; }
.shop-item-btn:hover { background: rgba(239,68,68,0.18); }
.shop-item-btn.del { color: #ef4444; background: rgba(239,68,68,0.08); }
.shop-item-btn.del:hover { background: rgba(239,68,68,0.18); }

/* ---------- 筛选 ---------- */
.shop-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.shop-filter-row select {
    padding: 8px 12px; border: 1.5px solid rgba(239,68,68,0.25);
    border-radius: 10px; font-size: 0.85rem; color: #1e293b; background: #fff;
    cursor: pointer;
}
.shop-bought-total { font-size: 0.85rem; font-weight: 600; color: #b91c1c; }

/* ---------- 统计 ---------- */
.shop-stat-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 14px; }
.shop-stat-nav button {
    border: none; background: rgba(239,68,68,0.1); color: #dc2626;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    font-size: 0.85rem; transition: all .2s;
}
.shop-stat-nav button:hover { background: rgba(239,68,68,0.2); }
.shop-stat-month { font-size: 1.05rem; font-weight: 700; color: #b91c1c; }

.shop-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.shop-stat-card {
    background: rgba(255,255,255,0.8); border-radius: 14px; padding: 14px;
    border: 1px solid rgba(239,68,68,0.18);
}
.shop-stat-card.c1 { background: linear-gradient(135deg, #fee2e2, #fff); }
.shop-stat-card.c2 { background: linear-gradient(135deg, #ffedd5, #fff); }
.shop-stat-card.c3 { background: linear-gradient(135deg, #fef3c7, #fff); }
.shop-stat-card.c4 { background: linear-gradient(135deg, #d1fae5, #fff); }
.shop-stat-label { font-size: 0.78rem; color: #64748b; margin-bottom: 6px; }
.shop-stat-label i { margin-right: 4px; }
.shop-stat-value { font-size: 1.4rem; font-weight: 800; color: #1e293b; }

.shop-top-title { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; color: #b91c1c; margin: 18px 0 12px; }
.shop-top-title i { color: #ef4444; }

.shop-cat-dist { display: flex; flex-direction: column; gap: 10px; }
.shop-cat-bar { display: flex; align-items: center; gap: 10px; }
.shop-cat-bar .shop-cat-ico { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 0.85rem; flex-shrink: 0; }
.shop-cat-bar .shop-cat-info { flex: 1; min-width: 0; }
.shop-cat-bar .shop-cat-head { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 4px; }
.shop-cat-bar .shop-cat-head .shop-cat-nm { color: #475569; font-weight: 500; }
.shop-cat-bar .shop-cat-head .shop-cat-pct { color: #94a3b8; }
.shop-cat-bar .shop-cat-track { height: 7px; background: rgba(239,68,68,0.12); border-radius: 999px; overflow: hidden; }
.shop-cat-bar .shop-cat-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }

.shop-empty { text-align: center; padding: 28px 16px; color: #94a3b8; }
.shop-empty i { font-size: 2rem; margin-bottom: 8px; opacity: 0.5; }
.shop-empty div { font-size: 0.85rem; }

/* ---------- Toast ---------- */
.shop-toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: #fff; padding: 12px 20px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; font-weight: 500; z-index: 999999;
    border-left: 4px solid #ef4444;
    animation: shop-toast-in .3s ease;
    max-width: 90vw;
}
.shop-toast.success { border-left-color: #10b981; }
.shop-toast.error { border-left-color: #ef4444; }
.shop-toast.warning { border-left-color: #f59e0b; }
.shop-toast.info { border-left-color: #3b82f6; }
.shop-toast i { font-size: 1rem; }
.shop-toast.success i { color: #10b981; }
.shop-toast.error i { color: #ef4444; }
.shop-toast.warning i { color: #f59e0b; }
.shop-toast.info i { color: #3b82f6; }
@keyframes shop-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-15px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
    .shop-card { padding: 14px; border-radius: 16px; }
    .shop-tab { padding: 8px 10px; font-size: 0.78rem; }
    .shop-tab i { display: none; }
    .shop-summary-card { padding: 14px 12px; }
    .shop-summary-value { font-size: 1.25rem; }
    .shop-summary-value.money { font-size: 1rem; }
    .shop-form-card { padding: 14px; }
    .shop-field-row { gap: 8px; }
    .shop-stat-grid { gap: 8px; }
    .shop-stat-card { padding: 12px; }
    .shop-stat-value { font-size: 1.2rem; }
    .shop-item { padding: 10px 12px; gap: 10px; }
    .shop-item-cat { width: 32px; height: 32px; }
}
