
/* 分类页面布局 */
.categories-page {
  display: flex;
  height: calc(100vh - 50px);
}

/* 左侧分类导航 */
.category-sidebar {
  width: 100px;
  background-color: #f8f9fa;
  border-right: 1px solid #eee;
  overflow-y: auto;
  margin-bottom: 60px;
}

.category-item {
  padding: 15px 8px;
  text-align: center;
  font-size: 13px;
  color: #666;
  border-left: 3px solid transparent;
  transition: all 0.3s;
  cursor: pointer;
}

.category-item:hover {
  background-color: #fff;
}

.category-item.active {
  background-color: #fff;
  color: #ff6a3c;
  border-left-color: #ff6a3c;
  font-weight: bold;
}

.category-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 20px;
}

.category-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-count {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* 右侧产品区域 */
.products-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-info {
  padding: 15px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
}

.current-category-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.current-category-desc {
  font-size: 12px;
  color: #666;
}

.products-container {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

/* 产品网格布局 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

/* 产品卡片 */
.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-image {
  width: 100%;
  height: 120px;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  position: relative;
}

.product-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #ff6a3c;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.product-info {
  padding: 10px;
}
.product-name {
  font-size: 13px;
  color: #333;
  margin-bottom: 5px;
  font-weight: bold;
  line-height: 26px;
  height: 26px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-desc {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.4;
  height: 34px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 16px;
  color: #ff6a3c;
  font-weight: bold;
}

.exchange-btn {
  padding: 6px 12px;
  background-color: #1e90ff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #969799;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  margin-bottom: 20px;
  font-size: 14px;
}

/* 加载更多 */
.load-more {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 13px;
}
/* 响应式 */
@media (min-width: 768px) {
  .page-container {
    max-width: 750px;
  }
  .category-sidebar {
    width: 120px;
  }
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}



/* 兑换卡片 */
.exchange-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-header {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.card-body {
  background: white;
  border-radius: 12px;
  margin: 16px;
  padding: 0 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.card-body h3{
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}
/* 表单组 */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}
.form-control:focus {
  border-color: #1e90ff;
  outline: none;
}
/* 地址选择器 */
.address-selector {
  position: relative;
}

.selected-address {
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 10px;
  min-height: 60px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.selected-address-placeholder {
  color: #999;
}

.selected-address-content {
  flex: 1;
}

.address-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  padding: 0 10px;
}

.address-name {
  font-weight: 500;
}

.address-phone {
  color: #666;
}

.address-detail {
  color: #666;
  font-size: 13px;
  line-height: 1.4;
  padding: 0 10px;
  margin: 0;
}

.address-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #ff6a3c;
  color: white;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 8px;
}

.select-arrow {
  color: #999;
  font-size: 20px;
}

/* 地址下拉列表 */
.address-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  padding: 20px;
}

.address-dropdown-content {
  background: white;
  border-radius: 16px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.dropdown-header {
  padding: 20px 20px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.dropdown-body {
  padding: 20px;
}

.address-list {
  max-height: 300px;
  overflow-y: auto;
}

.address-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.address-item:last-child {
  border-bottom: none;
}

.address-item.active {
  background-color: #e6f2ff;
}

.dropdown-footer {
  padding: 20px;
  border-top: 1px solid #f0f0f0;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, #1e90ff, #4da6ff);
  color: white;
}

.btn-primary:active {
  background: linear-gradient(135deg, #0d7ae6, #3d96f0);
  transform: scale(0.98);
}

.btn-secondary {
  background: #f8f9fa;
  color: #666;
  border: 1px solid #e0e0e0;
}

.btn-secondary:active {
  background: #e9ecef;
}

.add-address-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e90ff;
  font-size: 15px;
  padding: 10px 0;
}

.add-address-btn i {
  margin-right: 8px;
  font-size: 20px;
}

/* 新增地址模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 20px 10px;
  text-align: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-body {
  padding: 0 20px 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 12px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-top: 12px;
}

.checkbox-group input {
  margin-right: 8px;
}

/* 提示信息 */
.message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s;
}

.message.show {
  opacity: 1;
}

/* 加载中 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #1e90ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 360px) {
  .content {
      padding: 16px 12px;
  }
  
  .modal-footer {
      flex-direction: column;
  }
}