/* 骨架屏加载样式 */

/* 骨架屏动画 */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* 骨架屏基础样式 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* 骨架屏容器 */
.skeleton-wrapper {
  padding: var(--spacing-lg);
}

/* 圆形骨架 */
.skeleton-circle {
  border-radius: 50%;
}

/* 文本骨架 */
.skeleton-text {
  height: 14px;
  margin-bottom: var(--spacing-sm);
}

.skeleton-text:last-child {
  margin-bottom: 0;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

/* 标题骨架 */
.skeleton-title {
  height: 20px;
  width: 40%;
  margin-bottom: var(--spacing-md);
}

/* 头像骨架 */
.skeleton-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.skeleton-avatar.small {
  width: 40px;
  height: 40px;
}

.skeleton-avatar.large {
  width: 80px;
  height: 80px;
}

/* 图片骨架 */
.skeleton-image {
  width: 100%;
  padding-top: 75%;
  border-radius: var(--radius-md);
}

.skeleton-image.square {
  padding-top: 100%;
}

/* 按钮骨架 */
.skeleton-button {
  height: 40px;
  width: 100px;
  border-radius: var(--radius-lg);
}

/* 卡片骨架 */
.skeleton-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}

/* 个人中心头部骨架 */
.skeleton-profile-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  padding: var(--spacing-xl) var(--spacing-lg);
  padding-top: calc(var(--spacing-xl) + 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skeleton-profile-header .skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
  background-size: 200px 100%;
}

.skeleton-profile-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.skeleton-profile-meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.skeleton-profile-name {
  width: 80px;
  height: 18px;
}

.skeleton-profile-status {
  width: 60px;
  height: 24px;
  border-radius: var(--radius-xl);
}

.skeleton-profile-wallet {
  width: 80px;
  height: 50px;
  border-radius: var(--radius-lg);
}

/* 订单统计骨架 */
.skeleton-order-stats {
  display: flex;
  background-color: var(--bg-white);
  margin: var(--spacing-md);
  margin-top: calc(var(--spacing-md) * -1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 10;
}

.skeleton-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-sm);
  gap: var(--spacing-sm);
}

.skeleton-stat-value {
  width: 30px;
  height: 24px;
}

.skeleton-stat-label {
  width: 50px;
  height: 12px;
}

/* 菜单骨架 */
.skeleton-menu-section {
  background-color: var(--bg-white);
  margin: var(--spacing-md);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.skeleton-menu-title {
  width: 80px;
  height: 16px;
  margin-bottom: var(--spacing-lg);
}

.skeleton-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.skeleton-menu-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.skeleton-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
}

.skeleton-menu-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
}

.skeleton-menu-text {
  width: 40px;
  height: 12px;
}

/* 订单列表骨架 */
.skeleton-order-item {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}

.skeleton-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.skeleton-order-no {
  width: 120px;
  height: 14px;
}

.skeleton-order-status {
  width: 60px;
  height: 20px;
  border-radius: var(--radius-sm);
}

.skeleton-order-content {
  display: flex;
  gap: var(--spacing-md);
}

.skeleton-order-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.skeleton-order-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.skeleton-order-name {
  width: 100%;
  height: 16px;
}

.skeleton-order-desc {
  width: 80%;
  height: 14px;
}

.skeleton-order-price {
  width: 60px;
  height: 18px;
  margin-top: auto;
}

/* 钱包骨架 */
.skeleton-wallet-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  padding: var(--spacing-xl);
  text-align: center;
}

.skeleton-wallet-header .skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
  background-size: 200px 100%;
  margin: 0 auto;
}

.skeleton-wallet-label {
  width: 60px;
  height: 14px;
  margin-bottom: var(--spacing-sm);
}

.skeleton-wallet-balance {
  width: 120px;
  height: 36px;
  margin-bottom: var(--spacing-lg);
}

.skeleton-wallet-btn {
  width: 100px;
  height: 36px;
  border-radius: var(--radius-xl);
}

/* 记录列表骨架 */
.skeleton-record-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.skeleton-record-item:last-child {
  border-bottom: none;
}

.skeleton-record-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: var(--spacing-md);
}

.skeleton-record-info {
  flex: 1;
}

.skeleton-record-title {
  width: 100px;
  height: 14px;
  margin-bottom: var(--spacing-xs);
}

.skeleton-record-time {
  width: 80px;
  height: 12px;
}

.skeleton-record-amount {
  width: 60px;
  height: 16px;
}

/* 展销专区商品骨架 */
.skeleton-product-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.skeleton-product-card .skeleton-image {
  width: 100%;
  padding-top: 100%;
  border-radius: 0;
}

.skeleton-product-card .skeleton-info {
  padding: var(--spacing-md);
}

.skeleton-product-card .skeleton-title {
  width: 80%;
  height: 16px;
  margin-bottom: var(--spacing-sm);
}

.skeleton-product-card .skeleton-code {
  width: 60%;
  height: 12px;
  margin-bottom: var(--spacing-sm);
}

.skeleton-product-card .skeleton-price {
  width: 50%;
  height: 18px;
}

/* 空状态样式 */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px var(--spacing-lg);
}

.empty-icon {
  margin-bottom: var(--spacing-lg);
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
}

.empty-btn {
  padding: 10px 30px;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 14px;
  border-radius: var(--radius-xl);
  text-decoration: none;
}
