/* ==================== 基础样式 ==================== */
.main-title {
  font-size: 0.28rem;
  color: #171725;
  font-weight: 700;
  margin-bottom: 0.32rem;
}

.cart-des {
  padding: 0.16rem;
  border-radius: 0.08rem;
  border: 1px solid #EDEDED;
  box-sizing: border-box;
  overflow-y: auto;
  margin-bottom: 0.24rem;
  background: #F8FAFC;
}

.cart-des * {
  all: revert;
}

.main-content-box {
  box-sizing: border-box;
  width: 100%;
}

/* ==================== 分类选择器样式 ==================== */
.category-selector {
  background: white;
  border: 1px solid #EDEDED;
  border-radius: 0.08rem;
  padding: 0.2rem 0.24rem;
  margin-bottom: 0.24rem;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  margin-bottom: 0.16rem;
}

.category-row:last-child {
  margin-bottom: 0;
}

.category-label {
  font-size: 0.14rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  min-width: 0.8rem;
}

.category-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  flex: 1;
}

.category-option {
  padding: 0.08rem 0.2rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 0.04rem;
  font-size: 0.14rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-option:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}

.category-option.active {
  background: #1e293b;
  border-color: #1e293b;
  color: white;
  font-weight: 600;
  box-shadow: 0 0.02rem 0.06rem rgba(30, 41, 59, 0.2);
}

/* ==================== 搜索区域 ==================== */
.search-box {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  margin-bottom: 0.24rem;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 0.06rem;
  padding: 0 0.16rem;
  transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.03rem rgba(57, 124, 252, 0.1);
}

.search-icon {
  width: 0.18rem;
  height: 0.18rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  height: 0.46rem;
  border: none;
  outline: none;
  font-size: 0.14rem;
  color: #1E2736;
  padding: 0 0.12rem;
  background: transparent;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-clear-btn {
  width: 0.2rem;
  height: 0.2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-clear-btn:hover {
  background: #F1F5F9;
  color: #64748b;
}

.search-clear-btn svg {
  width: 0.16rem;
  height: 0.16rem;
}

.search-btn {
  height: 0.46rem;
  padding: 0 0.32rem;
  background: var(--color-primary);
  border: none;
  border-radius: 0.06rem;
  font-size: 0.14rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.08rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.search-btn:hover:not(:disabled) {
  background: #1e40af;
  box-shadow: 0 0.02rem 0.08rem rgba(57, 124, 252, 0.3);
  transform: translateY(-0.01rem);
}

.search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-btn .btn-icon {
  width: 0.16rem;
  height: 0.16rem;
}

/* 分类描述 */
.category-desc {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  padding: 0.12rem 0.16rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.12) 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.06rem;
  margin-bottom: 0.24rem;
}

.category-desc .desc-icon {
  width: 0.18rem;
  height: 0.18rem;
  color: var(--color-danger);
  flex-shrink: 0;
}

.category-desc {
  font-size: 0.14rem;
  color: var(--color-danger);
  font-weight: 500;
}

/* ==================== 商品列表 ==================== */
.shopping-box {
  box-sizing: border-box;
  margin-top: 0.24rem;
  min-height: 3rem;
}

.goods-list-div {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr));
  gap: 0.24rem;
}

/* ==================== 商品卡片 - shadcn UI 风格 ==================== */
.shopping-item {
  position: relative;
  box-sizing: border-box;
  border: 1px solid #EDEDED;
  border-radius: 0.08rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: white;
  transition: all 0.2s ease;
}

.shopping-item:hover {
  box-shadow: 0 0.04rem 0.12rem rgba(0, 0, 0, 0.08);
  border-color: #D8D8D8;
  transform: translateY(-0.02rem);
}

.shopping-item .client-box {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e40af 100%);
  padding: 0.06rem 0.12rem;
  color: #fff;
  font-size: 0.12rem;
  font-weight: 600;
  border-radius: 0 0.08rem 0 0.08rem;
  z-index: 1;
}

/* 商品内容区 */
.shopping-item .goods-content {
  display: flex;
  flex-direction: column;
}

/* 商品标签 */
.shopping-item .goods-tag {
  box-sizing: border-box;
  min-height: 0.36rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.08rem;
  background: linear-gradient(135deg, rgba(57, 124, 252, 0.08) 0%, rgba(57, 124, 252, 0.12) 100%);
  padding: 0.08rem 0.16rem;
  border-bottom: 1px solid rgba(57, 124, 252, 0.1);
}

.shopping-item .goods-tag .tag-item {
  position: relative;
  font-size: 0.12rem;
  font-weight: 600;
  flex-shrink: 0;
  color: var(--color-primary);
  padding: 0.04rem 0.08rem;
  background: white;
  border-radius: 0.03rem;
  display: inline-flex;
  align-items: center;
  gap: 0.04rem;
}

.shopping-item .goods-tag .tag-item::before {
  content: '';
  width: 0.04rem;
  height: 0.04rem;
  border-radius: 50%;
  background: var(--color-primary);
}

/* 商品名称 */
.shopping-item .goods-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.12rem;
  padding: 0.16rem 0.16rem 0.12rem 0.16rem;
}

.shopping-item .goods-name .goods-name-text {
  font-size: 0.16rem;
  font-weight: 700;
  color: #171725;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopping-item .goods-name .qty-box {
  font-size: 0.12rem;
  color: #22c55e;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  padding: 0.04rem 0.08rem;
  background: #f0fdf4;
  border-radius: 0.03rem;
}

.shopping-item .goods-name .qty-box .stock-num {
  color: #22c55e;
  font-weight: 700;
}

.shopping-item .goods-name .qty-box img {
  position: absolute;
  top: -0.1rem;
  right: -0.1rem;
  width: 0.55rem;
  height: 0.48rem;
}

.shopping-item .goods-name.sold-out .goods-name-text {
  color: #CFD2E1;
}

.shopping-item .goods-name.sold-out .qty-box {
  width: 0.55rem;
  background: transparent;
  padding: 0;
}

/* 商品描述 */
.shopping-item .goods-description {
  box-sizing: border-box;
  padding: 0 0.16rem 0.12rem 0.16rem;
  max-height: 2.4rem;
  overflow: auto;
  font-size: 0.13rem;
  line-height: 1.6;
  color: #64748b;
}

.shopping-item .goods-description * {
  all: revert;
}

.shopping-item .goods-description ul {
  padding-left: 0.16rem;
  margin: 0.08rem 0;
}

.shopping-item .goods-description p {
  margin: 0.04rem 0;
}

.shopping-item .goods-description img {
  max-width: 100%;
}

.shopping-item .goods-description::-webkit-scrollbar {
  width: 0;
}

.shopping-item .goods-description:hover::-webkit-scrollbar {
  width: 0.04rem;
}

.shopping-item .goods-description::-webkit-scrollbar-thumb {
  background: #D8D8D8;
  border-radius: 0.02rem;
}

/* 商品活动 */
.shopping-item .goods-active {
  display: flex;
  flex-wrap: wrap;
  gap: 0.08rem;
  padding: 0 0.16rem 0.12rem 0.16rem;
}

.shopping-item .goods-active .active-name {
  font-size: 0.12rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(57, 124, 252, 0.08);
  padding: 0.04rem 0.08rem;
  border-radius: 0.03rem;
  border: 1px solid rgba(57, 124, 252, 0.2);
  transition: all 0.2s ease;
}

.shopping-item .goods-active .active-name:hover {
  background: rgba(57, 124, 252, 0.12);
  border-color: rgba(57, 124, 252, 0.3);
}

/* 价格区域 */
.shopping-item .price-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.12rem;
  padding: 0.12rem 0.16rem 0.16rem 0.16rem;
  border-top: 1px solid #F1F1F1;
}

.shopping-item .price-box .price-box-left {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
}

.shopping-item .price-box .item-price {
  font-size: 0.24rem;
  font-weight: 700;
  color: var(--color-price-text);
  display: flex;
  align-items: baseline;
  gap: 0.04rem;
}

.shopping-item .price-box .item-price .item-price-prefix {
  font-size: 0.14rem;
  font-weight: 600;
}

.shopping-item .price-box .item-price .item-price-cycle {
  font-size: 0.13rem;
  color: #64748b;
  font-weight: 500;
}

.shopping-item .price-box .original-price {
  font-size: 0.12rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.shopping-item .price-box .buy-btn {
  height: 0.36rem;
  padding: 0 0.24rem;
  background: var(--color-primary);
  border: none;
  border-radius: 0.04rem;
  font-size: 0.14rem;
  font-weight: 600;
  color: white;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.shopping-item .price-box .buy-btn:hover {
  background: #1e40af;
  transform: translateY(-0.01rem);
  box-shadow: 0 0.02rem 0.08rem rgba(57, 124, 252, 0.3);
}

.shopping-item .price-box .buy-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==================== 域名相关样式 ==================== */
.tips {
  color: #8692b0;
  font-size: 0.13rem;
  text-align: center;
  padding: 0.16rem;
}

.domain-box .register-type {
  display: flex;
  align-items: center;
  gap: 0.24rem;
}

.domain-box .register-type .el-divider {
  background-color: #D8D8D8;
  margin: 0;
}

.domain-box .register-type .reg-ridio {
  font-size: 0.14rem;
  color: #646464;
  cursor: pointer;
  padding: 0.08rem 0.16rem;
  border-radius: 0.04rem;
  transition: all 0.2s ease;
}

.domain-box .register-type .reg-ridio:hover {
  background: #F8FAFC;
}

.domain-box .register-type .isActice {
  color: var(--color-primary);
  background: rgba(57, 124, 252, 0.08);
  font-weight: 600;
}

.domain-box .domain-search {
  margin-top: 0.32rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.domain-box .domain-search .el-input {
  flex: 1;
}

.domain-box .domain-search .el-input .el-input__inner {
  height: 0.56rem;
  line-height: 0.56rem;
  border-radius: 0.04rem 0 0 0.04rem;
  border-right: none;
}

.domain-box .domain-search .el-input-group__append {
  padding: 0;
  background: #ffffff;
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.domain-box .domain-search .suffix-box {
  width: 1.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #2B2B2B;
  font-size: 0.16rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.domain-box .domain-search .suffix-box:hover {
  background: #F8FAFC;
}

.domain-box .domain-search .suffix-box .el-icon-arrow-down {
  font-size: 0.14rem;
  color: #8692b0;
  margin-left: 0.08rem;
}

.domain-box .domain-search .search-button {
  height: 0.56rem;
  padding: 0 0.48rem;
  border: none;
  border-radius: 0 0.04rem 0.04rem 0;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.16rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.domain-box .domain-search .search-button:hover {
  background: #1e40af;
}

.domain-box .domain-search .suffix-list {
  z-index: 2;
  position: absolute;
  top: 0.58rem;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  width: calc(100% - 2.7rem);
  padding: 0.24rem;
  background: #ffffff;
  box-shadow: 0 0.08rem 0.16rem rgba(0, 0, 0, 0.1);
  border-radius: 0.04rem;
  border: 1px solid #EDEDED;
  gap: 0.12rem;
}

.domain-box .domain-search .suffix-list .suffix-item {
  width: 1.1rem;
  height: 0.4rem;
  border: 1px solid #E6E7EB;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.14rem;
  color: #2B2B2B;
  cursor: pointer;
  border-radius: 0.04rem;
  transition: all 0.2s ease;
}

.domain-box .domain-search .suffix-list .suffix-item:hover {
  background: rgba(57, 124, 252, 0.08);
  border-color: rgba(57, 124, 252, 0.3);
}

.domain-box .domain-search .suffix-list .suffix-active {
  background: rgba(57, 124, 252, 0.12);
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}

/* ==================== 响应式设计 ==================== */
@media screen and (max-width: 1400px) {
  .goods-list-div {
    grid-template-columns: repeat(auto-fill, minmax(2.8rem, 1fr));
  }
}

@media screen and (max-width: 915px) {
  .goods-list-div {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 750px) {
  .goods-list-div {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .category-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
  }
  
  .category-label {
    width: 100%;
  }
  
  .category-options {
    width: 100%;
  }
  
  .search-box {
    flex-direction: column;
    gap: 0.12rem;
  }
  
  .search-input-wrapper {
    width: 100%;
  }
  
  .search-btn {
    width: 100%;
    justify-content: center;
  }
  
  .category-selector {
    padding: 0.16rem;
  }
}
