/* ===== 商城 ===== */
.shop-container {
    padding-bottom: 20px;
}
.shop-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.shop-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 8px 12px;
    gap: 6px;
    color: var(--text-secondary);
}
.shop-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    width: 100%;
    color: var(--text-primary);
}
.shop-cart-icon,
.shop-order-icon {
    position: relative;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}
.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== 商品列表（无图片，类似域名商城） ===== */
.product-grid {
    display: block;
}
.product-card {
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: 0.2s;
}
.product-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.75);
}
.product-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-primary);
    padding-right: 60px; /* 为右上角标签留空间 */
}
.product-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 12px;
}
.product-actions {
    display: flex;
    gap: 12px;
}
.product-detail-btn,
.product-buy-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.2s;
    text-align: center;
}
.product-detail-btn {
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.product-buy-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 200, 255, 0.3);
}
.product-detail-btn:active,
.product-buy-btn:active {
    transform: scale(0.97);
}
/* 右上角标签 */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6b35;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 2;
}
/* 下架标签特殊颜色（可选） */
.product-badge.off {
    background: #999;
}

/* ===== 数量按钮（保留原样式，可能会用到） ===== */
.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}
.qty-btn.danger {
    background: var(--danger);
    color: #fff;
    border: none;
    width: auto;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* ===== 购物车侧边栏（保留原样式） ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1500;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cart-sidebar.show {
    right: 0;
}
.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.cart-sidebar-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.cart-sidebar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.cart-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.cart-total {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.cart-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

/* ===== 商品详情模态框（完整修复，宽度正常，居中） ===== */
#productDetailModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
#productDetailModal.show {
    display: flex;
}
#productDetailModal .custom-dialog-card {
    max-width: 560px;
    width: 94%;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
}
#productDetailModal .close-detail-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
    background: rgba(0,0,0,0.5);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    line-height: 1;
    backdrop-filter: blur(4px);
}
#productDetailModal .detail-left {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
#productDetailModal .detail-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}
#productDetailModal .detail-right {
    padding: 20px;
    color: var(--text-primary);
    text-align: center;
}
#productDetailModal .detail-right h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}
#productDetailModal .detail-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
#productDetailModal .detail-price-stock {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 1rem;
}
#productDetailModal .detail-stock {
    color: var(--text-secondary);
}
#productDetailModal .detail-price {
    font-weight: 700;
    color: var(--danger);
}
#productDetailModal .detail-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
#productDetailModal .detail-cart-btn,
#productDetailModal .detail-buy-btn {
    flex: 0 1 auto;
    min-width: 140px;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}
#productDetailModal .detail-cart-btn {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
#productDetailModal .detail-buy-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 200, 255, 0.3);
}
#productDetailModal .detail-cart-btn:active,
#productDetailModal .detail-buy-btn:active {
    transform: scale(0.97);
}