/* 0qpz 商品列表页样式 */

/* ========== 页面加载 ========== */
.page-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f0f2f7;
}

.page-loading .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8ecf4;
  border-top-color: #1677ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== Banner ========== */
.page-banner {
  width: 100%;
  height: 380px;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-top: 0;
  background: #f5f7fa;
}

.banner-video {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: none;
}

.banner-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
}

.banner-content {
  width: 85%;
  margin: 0 auto;
  text-align: left;
  box-sizing: border-box;
  animation: bannerFadeIn 0.6s ease-out;
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 内容区 ========== */
.goods-page {
  background: #f0f2f7;
  padding: 24px 28px 60px;
  min-height: 400px;
}

.goods-page-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ========== 搜索栏 ========== */
.goods-filter {
  background: #fff;
  border-radius: 14px;
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 12px;
}

.goods-filter .filter-input {
  flex: 1;
  height: 42px;
  border: 1px solid #e8ecf4;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.goods-filter .filter-input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.08);
}

.goods-filter .filter-btn {
  height: 42px;
  padding: 0 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: #1677ff;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.goods-filter .filter-btn:hover {
  background: #4096ff;
}

/* ========== 二级分组描述 ========== */
.group-desc {
  background: linear-gradient(135deg, #f0f6ff, #e8f0fe);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
  border: 1px solid rgba(22, 119, 255, 0.08);
}

/* ========== 分组标题 ========== */
.section-title {
  font-size: 22px;
  font-weight: 600;
  color: #1d2129;
  padding: 24px 0 16px;
  line-height: 1.4;
  text-align: center;
}

/* ========== 二级分组标签栏 ========== */
.group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  padding: 0 0 0;
  border-bottom: 2px solid #e0e5ed;
  margin-bottom: 24px;
}

.group-tab {
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  color: #86909c;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
  border: none;
  background: none;
}

.group-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -6px;
  right: -6px;
  height: 3px;
  background: transparent;
  border-radius: 2px;
  transition: background 0.2s;
}

.group-tab:hover {
  color: #1d2129;
}

.group-tab.active {
  color: #1677ff;
  font-weight: 600;
}

.group-tab.active::after {
  background: #1677ff;
}

/* ========== 商品列表容器 ========== */
.goods-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ========== 商品行（独立卡片） ========== */
.goods-row {
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  background: #f7f8fa;
  border: 2px solid #fff;
  border-radius: 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: all 0.25s ease;
}

.goods-row::after {
  content: '';
  position: absolute;
  top: 0;
  left: 200px;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(100,140,230,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(90,130,220,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at center, transparent 30%, rgba(100,140,230,0.04) 70%, rgba(80,120,210,0.08) 100%);
  pointer-events: none;
}

.goods-row:hover {
  box-shadow: 0 6px 24px rgba(22,93,255,0.12);
  border-color: #e0e7ff;
  transform: translateY(-2px);
}

/* 角标 */
.goods-row-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  overflow: hidden;
  z-index: 10;
}

.goods-row-ribbon span {
  position: absolute;
  display: block;
  width: 120px;
  padding: 8px 0;
  background-color: #ff7d00;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  transform: rotate(45deg);
  top: 18px;
  right: -30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 左侧：标题区域 */
.goods-row-left {
  width: 200px;
  background: #f5f7fa;
  position: relative;
  z-index: 2;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  border-right: 1px solid #e0e4ea;
  overflow: hidden;
}

.goods-row-left::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle, rgba(90,130,220,0.18) 0%, rgba(120,155,240,0.08) 45%, transparent 70%);
  pointer-events: none;
}

.goods-row-name {
  font-size: 20px;
  font-weight: bold;
  color: #1d2129;
  margin-bottom: 12px;
  line-height: 1.4;
}

.goods-row-name.sold-out {
  color: #bbb;
}

.goods-row-regions {
  font-size: 12px;
  color: #86909c;
  line-height: 1.6;
}

.goods-row-group {
  font-size: 11px;
  color: #1677ff;
  background: rgba(22, 119, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 6px;
  display: inline-block;
}

/* 中间：参数区域 */
.goods-row-center {
  flex: 1;
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.goods-row-desc {
  font-size: 13px;
  color: #4e5969;
  line-height: 1.8;
  width: 100%;
}

.goods-row-desc p {
  margin: 0 0 4px;
}

/* spec box 网格（兼容 description 中的结构化 HTML） */
.goods-row-desc > div {
  width: 100%;
}

.goods-row-stock {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}

.goods-row-stock .stock-num {
  color: #52c41a;
  font-weight: 600;
}

.goods-row-stock.stock-out {
  color: #ff4d4f;
}

/* 右侧：价格+按钮 */
.goods-row-right {
  width: 220px;
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: transparent;
  position: relative;
  z-index: 1;
}

.goods-row-right::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.08), transparent);
}

.goods-price {
  text-align: left;
}

.goods-price .amount {
  font-size: 22px;
  font-weight: bold;
  color: #f53f3f;
  line-height: 1;
}

.goods-price .currency {
  font-size: 14px;
  color: #f53f3f;
  font-weight: normal;
}

.goods-price .cycle {
  font-size: 14px;
  font-weight: normal;
  color: #f53f3f;
}

.goods-price-sub {
  font-size: 12px;
  color: #86909c;
  margin-top: 4px;
}

.goods-price-original {
  font-size: 12px;
  color: #86909c;
  text-decoration: line-through;
}

.goods-buy-btn {
  background: linear-gradient(135deg, #165dff, #3a7aff);
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: 0;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(22,93,255,0.2);
}

.goods-buy-btn:hover {
  background: linear-gradient(135deg, #0e42d2, #2d6ae8);
  box-shadow: 0 4px 12px rgba(22,93,255,0.3);
}

.goods-buy-btn:disabled {
  background: #e8ecf4;
  color: #a0a8b8;
  cursor: not-allowed;
}

.goods-buy-btn:disabled {
  background: #e8ecf4;
  color: #a0a8b8;
  cursor: not-allowed;
  box-shadow: none;
}

/* ========== 空状态 & 加载 ========== */
.goods-empty {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

.goods-empty i {
  font-size: 48px;
  color: #e0e7ff;
  margin-bottom: 16px;
  display: block;
}

.goods-empty p {
  font-size: 14px;
  margin: 0;
}

.goods-loading-tip {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: #a0a8b8;
}

.goods-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.goods-loading .spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e8ecf4;
  border-top-color: #1677ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== 域名区域 ========== */
.domain-section {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
}

.reg-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.reg-tab {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #8896b3;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.reg-tab.active {
  color: #1677ff;
  border-bottom-color: #1677ff;
}

.domain-search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.domain-input-wrap {
  flex: 1;
  display: flex;
  position: relative;
}

.domain-input {
  flex: 1;
  height: 38px;
  border: 1px solid #e8ecf4;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.domain-input:focus {
  border-color: #1677ff;
  z-index: 1;
}

.suffix-box-wrap {
  position: relative;
}

.suffix-box {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 38px;
  border: 1px solid #e8ecf4;
  border-radius: 0 8px 8px 0;
  background: #fff;
  font-size: 13px;
  color: #4a5568;
  white-space: nowrap;
  transition: border-color 0.2s;
}

.suffix-box:hover {
  border-color: #1677ff;
}

.suffix-box i {
  font-size: 10px;
  color: #8896b3;
}

.suffix-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 20;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}

.suffix-item {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #4a5568;
  transition: background 0.15s;
}

.suffix-item:hover {
  background: #f0f6ff;
  color: #1677ff;
}

.suffix-item.active {
  background: #f0f6ff;
  color: #1677ff;
  font-weight: 500;
}

.batch-textarea {
  width: 100%;
  border: 1px solid #e8ecf4;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.batch-textarea:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.08);
}

.batch-actions-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
}

.btn-outline {
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: #4a5568;
  border: 1px solid #e8ecf4;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-outline:hover {
  border-color: #1677ff;
  color: #1677ff;
}

.domain-content {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.domain-left {
  flex: 1;
  min-width: 0;
}

.domain-right {
  width: 320px;
  flex-shrink: 0;
}

.suffix-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.suffix-chip {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  background: #f0f2f7;
  color: #4a5568;
  transition: all 0.2s;
}

.suffix-chip:hover {
  background: #e0e7ff;
}

.suffix-chip.active {
  background: #1677ff;
  color: #fff;
}

.filter-toggle {
  cursor: pointer;
  font-size: 13px;
  color: #1677ff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.domain-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}

.domain-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.domain-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.domain-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a2e;
}

.domain-tag-registered {
  font-size: 12px;
  color: #ff4d4f;
}

.domain-tag-desc {
  font-size: 12px;
  color: #8896b3;
}

.domain-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.domain-status-registered {
  font-size: 13px;
  color: #ff4d4f;
}

.domain-whois {
  font-size: 13px;
  color: #1677ff;
  cursor: pointer;
}

.domain-whois:hover {
  text-decoration: underline;
}

.domain-premium {
  font-size: 11px;
  color: #faad14;
  background: rgba(250, 173, 20, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.domain-price {
  font-size: 13px;
  color: #1677ff;
  font-weight: 600;
}

.domain-add-btn {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #1677ff;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.domain-add-btn:hover {
  background: #4096ff;
}

.domain-add-btn.added {
  background: #fff;
  color: #1677ff;
  border: 1px solid #1677ff;
  cursor: default;
}

.domain-status-desc {
  font-size: 12px;
  color: #8896b3;
}

.domain-status-fail {
  font-size: 13px;
  color: #8896b3;
}

.domain-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.domain-empty i {
  font-size: 48px;
  color: #e0e7ff;
  margin-bottom: 16px;
  display: block;
}

.domain-empty p {
  font-size: 14px;
  margin: 0;
}

.batch-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 12px;
  margin-top: 16px;
}

.batch-section-title:first-child {
  margin-top: 0;
}

.batch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(0,0,0,0.04);
}

.batch-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a2e;
}

.batch-item.unavail {
  justify-content: space-between;
  font-size: 13px;
}

.batch-item .reason {
  color: #ff4d4f;
  font-size: 12px;
}

.batch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-top: 8px;
}

.batch-actions label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #4a5568;
}

/* ========== 购物车 ========== */
.cart-box {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f2f5;
}

.cart-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
}

.cart-clear {
  cursor: pointer;
  font-size: 13px;
  color: #ff4d4f;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 13px;
}

.cart-items {
  max-height: 360px;
  overflow-y: auto;
}

.cart-item {
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
}

.cart-item-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 8px;
}

.cart-item-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1677ff;
}

.cart-item-domain {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a2e;
}

.cart-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-year-select {
  height: 28px;
  border: 1px solid #e8ecf4;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  color: #4a5568;
  background: #fff;
  outline: none;
  cursor: pointer;
}

.cart-item-price {
  font-size: 13px;
  color: #1677ff;
  font-weight: 600;
}

.cart-item-del {
  cursor: pointer;
  font-size: 12px;
  color: #ff4d4f;
}

.cart-footer {
  padding: 14px 20px;
  border-top: 1px solid #f0f2f5;
}

.cart-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #4a5568;
}

.cart-select-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1677ff;
}

.cart-total {
  text-align: right;
  margin-top: 8px;
}

.cart-total-label {
  font-size: 13px;
  color: #8896b3;
}

.cart-total-amount {
  font-size: 22px;
  font-weight: 700;
  color: #1677ff;
}

.cart-total-original {
  font-size: 12px;
  color: #bbb;
  text-decoration: line-through;
}

.cart-buy-row {
  padding: 0 20px 16px;
}

.cart-buy-btn {
  width: 100%;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
}

/* ========== 上传弹窗 ========== */
.upload-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.upload-dialog-box {
  background: #fff;
  border-radius: 14px;
  width: 480px;
  max-width: 90%;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.upload-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}

.upload-close {
  cursor: pointer;
  font-size: 20px;
  color: #8896b3;
  line-height: 1;
}

.upload-dialog-body {
  padding: 24px;
}

.upload-hint {
  font-size: 13px;
  color: #8896b3;
  margin-bottom: 12px;
}

.upload-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.upload-filename {
  flex: 1;
  height: 38px;
  border: 1px solid #e8ecf4;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  color: #4a5568;
  background: #f9fafb;
  outline: none;
}

.upload-dialog-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid #f0f2f5;
}

/* ========== Toast ========== */
.goods-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1a1a2e;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.goods-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.goods-toast-error {
  background: #ff4d4f;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .domain-content {
    flex-direction: column;
  }
  .domain-right {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .goods-row {
    flex-direction: column;
  }
  .goods-row-left {
    width: 100%;
    align-items: flex-start;
    padding: 16px 20px;
    border-right: none;
    border-bottom: 1px solid #d0d5e0;
  }
  .goods-row-center {
    padding: 16px 20px;
  }
  .goods-row-right {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
  }
  .goods-row-right::before {
    top: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.08), transparent);
  }
  .goods-row-ribbon {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-banner {
    height: 240px;
  }
  .goods-page {
    padding: 16px;
  }
  .goods-filter {
    flex-direction: column;
    align-items: stretch;
  }
  .domain-search-row {
    flex-direction: column;
  }
}
