/**
 * 商城页面样式表 - 列表版
 * 基于用户提供的垂直垂直列表 UI 重构
 * 
 * @package ZhutiTu
 */

/* ============================================================
   页面容器
   ============================================================ */


.store-page-wrap {
    padding: 20px 0;
}

.store-container {
    width: 100%;
    max-width: 900px; /* 内部内容依然保持居中宽度 */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* 页面标题 */
.store-header {
    text-align: center;
    margin-bottom: 50px;
}

.store-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.store-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* ============================================================
   列表卡片组件
   ============================================================ */

.store-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.store-list-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-normal) var(--ease-out-expo);
    border: none;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.store-list-card:hover {
    /* 移除明显的位移和阴影变化，保持极简 */
    transform: none;
    box-shadow: var(--shadow-card);
    z-index: 2;
}

/* --- 左侧缩略图 --- */
.card-thumb {
    width: 100px;
    height: 72px;
    background: var(--color-bg-muted);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    margin-right: 24px;
    position: relative;
    border: 1px solid var(--color-border-light);
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    will-change: transform;
}

.store-list-card:hover .card-thumb img {
    transform: scale(1.1);
}

/* 占位图样式 (如果没有缩略图) */
.card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
}
.thumb-header {
    height: 12px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding-left: 6px;
    gap: 4px;
}
.dot { width: 4px; height: 4px; border-radius: 50%; background: #cbd5e1; }
.thumb-body { flex: 1; position: relative; }
.thumb-hero {
    position: absolute;
    top: 6px; right: 6px; left: 35%; bottom: 6px;
    background: #e2e8f0; border-radius: 4px;
}
.thumb-lines {
    position: absolute;
    top: 8px; left: 8px;
    width: 20%; height: 4px; background: #e2e8f0; border-radius: 2px;
}
.thumb-lines::after {
    content: ''; position: absolute; top: 8px; left: 0;
    width: 80%; height: 4px; background: #e2e8f0; border-radius: 2px;
}


/* --- 中间信息区域 --- */
.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; 
    padding-right: 20px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 6px;
}

.badge-version {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
}

.rating {
    color: var(--text-light);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.rating i { color: var(--color-warning); font-size: 11px; }

.card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    position: relative; 
    top: 1px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.features {
    display: flex;
    gap: 16px;
}

.feat-item {
    font-size: 12px;
    color: var(--success); /* 使用成功色 */
    display: flex;
    align-items: center;
}

.feat-item i { 
    margin-right: 4px; 
    font-size: 11px;
}

/* --- 右侧操作区域 --- */
.card-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    padding-left: 24px;
    border-left: 1px dashed var(--border-color); /* 虚线分隔 */
    min-width: 160px;
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.price-current small { 
    font-size: 0.9rem; 
    font-weight: normal; 
    margin-right: 2px; 
}

.price-old {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* 购买按钮 */
/* 购买按钮 - 灵动渐变效果 (参考 btn-gradient-shine) */
.btn-buy {
    background: linear-gradient(135deg, var(--color-primary) 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    width: 100%;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1; /* 确保垂直居中对齐 */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
    text-align: center;
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

.btn-buy::after {
    content: '';
    position: absolute;
    top: -50%; right: -50%; bottom: -50%; left: -50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0));
    transform: rotateZ(60deg) translate(-5em, 7.5em);
    opacity: 0;
    transition: all 0.5s ease;
}

.btn-buy:hover {
    box-shadow: 0 6px 16px var(--color-primary-glow);
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #4f46e5 100%);
}

.btn-buy:hover::after {
    opacity: 1;
    transform: rotateZ(60deg) translate(1em, -9em);
}

.btn-buy i {
    font-size: 0.8rem;
    display: inline-flex; /* 增强对齐 */
    align-items: center;
    margin-top: 1px; /* 视觉微调对齐 */
    transition: transform var(--duration-fast) var(--ease-out);
}

.btn-buy:hover i {
    transform: translateX(3px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .store-container {
        padding: 0 12px;
    }

    /* 整个卡片保持水平排列，不转为垂直 */
    .store-list-card { 
        flex-direction: row; 
        align-items: center; 
        padding: 12px 14px; /* 移动端更紧致 */
        gap: 12px;
    }

    /* 隐藏左侧缩略图 */
    .card-thumb { 
        display: none;
    }

    .card-info { 
        padding-right: 12px;
    }

    /* 标题微调 */
    .card-title {
        font-size: 1.05rem;
    }

    /* 隐藏描述和特性，以节省横向空间，确保核心信息（标题、价格、按钮）在一行 */
    .card-desc,
    .features {
        display: none;
    }

    .card-action { 
        border-left: 1px dashed var(--border-color);
        border-top: none;
        padding-top: 0;
        padding-left: 12px;
        min-width: 110px; /* 稍微缩小右侧宽度 */
        gap: 8px;
    }

    .price-current {
        font-size: 1.2rem;
    }

    .btn-buy { 
        padding: 6px 16px;
        font-size: 0.85rem;
    }
}
