/* ========================================
   商城页面样式
   ======================================== */

.shop-content {
    max-width: 1100px;
}

/* 分类筛选 */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(139, 165, 181, 0.25);
    border-radius: 25px;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover {
    border-color: var(--blue-mist);
    color: var(--blue-deep);
}

.category-btn.active {
    background: var(--red-deep);
    border-color: var(--red-deep);
    color: white;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.product-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(139, 165, 181, 0.15);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 35, 35, 0.12);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    background: rgba(139, 35, 35, 0.9);
    color: white;
    border-radius: 15px;
    font-size: 0.75rem;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 500;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--red-deep);
}

.original-price {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.add-cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, var(--gold-warm) 0%, var(--gold-soft) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.add-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 168, 124, 0.3);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.1rem;
}

/* 购物车浮窗 */
.cart-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--red-medium) 0%, var(--red-deep) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(139, 35, 35, 0.3);
    z-index: 100;
    transition: all 0.3s;
}

.cart-float:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: var(--gold-warm);
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 购物车侧边栏 */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-cream);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(139, 165, 181, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--red-deep);
    font-size: 1.1rem;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    align-items: center;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--red-deep);
    font-weight: 500;
    margin-bottom: 8px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(139, 165, 181, 0.3);
    background: white;
    border-radius: 6px;
    cursor: pointer;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 10px;
}

.remove-btn:hover {
    color: #F44336;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(139, 165, 181, 0.15);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.total-price {
    color: var(--red-deep);
    font-weight: 600;
    font-size: 1.3rem;
}

.checkout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, var(--red-medium) 0%, var(--red-deep) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 35, 35, 0.3);
}

/* 响应式 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-float {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .category-filter {
        gap: 10px;
    }
    
    .category-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}
