/**
 * 鸿宇商城 - 简约清新模板
 * 作者: 小宇
 * 版本: 1.0
 */

:root {
    --shop-primary: #10b981;
    --shop-primary-dark: #059669;
    --shop-secondary: #f59e0b;
    --shop-success: #22c55e;
    --shop-danger: #ef4444;
    --shop-dark: #1f2937;
    --shop-gray: #6b7280;
    --shop-light: #f9fafb;
    --shop-bg: #ffffff;
    --shop-card-bg: #ffffff;
    --shop-border: #e5e7eb;
    --shop-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shop-radius: 12px;
}

/* 商店容器 */
.wcs-shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--shop-bg);
    min-height: 100vh;
    color: var(--shop-dark);
}

/* 商店头部 */
.wcs-shop-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--shop-border);
}

.wcs-shop-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--shop-dark);
}

.wcs-shop-subtitle {
    font-size: 1rem;
    color: var(--shop-gray);
    margin: 0;
}

/* 搜索和筛选 */
.wcs-shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: space-between;
}

.wcs-search-box input {
    padding: 12px 16px 12px 40px;
    border: 2px solid var(--shop-border);
    border-radius: 50px;
    background: var(--shop-light);
    color: var(--shop-dark);
    font-size: 0.95rem;
    width: 280px;
    transition: all 0.3s;
}

.wcs-search-box input:focus {
    outline: none;
    border-color: var(--shop-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.wcs-category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wcs-category-btn {
    padding: 10px 20px;
    border: 2px solid var(--shop-border);
    border-radius: 50px;
    background: white;
    color: var(--shop-gray);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.wcs-category-btn:hover,
.wcs-category-btn.active {
    background: var(--shop-primary);
    border-color: var(--shop-primary);
    color: white;
}

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

/* 商品卡片 */
.wcs-product {
    background: var(--shop-card-bg);
    border-radius: var(--shop-radius);
    overflow: hidden;
    border: 1px solid var(--shop-border);
    transition: all 0.3s ease;
    box-shadow: var(--shop-shadow);
}

.wcs-product:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 商品图片 */
.wcs-product-image-wrapper {
    position: relative;
    padding-top: 100%;
    background: var(--shop-light);
}

.wcs-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    box-sizing: border-box;
}

.wcs-product-out-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--shop-danger);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.wcs-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--shop-secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 商品信息 */
.wcs-product-info {
    padding: 16px;
}

.wcs-product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--shop-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.wcs-product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--shop-primary);
}

.wcs-product-stock {
    font-size: 0.8rem;
    color: var(--shop-success);
    margin: 6px 0;
}

.wcs-product-stock.out {
    color: var(--shop-danger);
}

/* 按钮 */
.wcs-add-to-cart {
    width: 100%;
    padding: 10px;
    background: var(--shop-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wcs-add-to-cart:hover {
    background: var(--shop-primary-dark);
}

.wcs-add-to-cart:disabled {
    background: var(--shop-gray);
    cursor: not-allowed;
}

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

@media (max-width: 768px) {
    .wcs-products { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .wcs-shop-title { font-size: 1.8rem; }
    .wcs-search-box input { width: 100%; }
}

@media (max-width: 480px) {
    .wcs-products { grid-template-columns: 1fr; }
}

/* 购物车浮动按钮 */
.wcs-cart-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--shop-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    cursor: pointer;
}

.wcs-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--shop-secondary);
    color: white;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* 空状态 */
.wcs-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--shop-gray);
}

.wcs-empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}