/* ================================================
   紫来集运 PC端 - AI智能代购页样式
   ================================================ */

/* ---- AI 聊天式输入 ---- */
.ai-hero-section {
  background: var(--gradient-p-hero);
  border-radius: var(--r-xl);
  padding: var(--space-xl);
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.ai-hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.ai-hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.ai-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.ai-hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.ai-input-section {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.ai-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.ai-tab {
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-tab:hover,
.ai-tab.active {
  background: var(--bg-white);
  color: var(--p);
  border-color: var(--bg-white);
}

.ai-input-box {
  display: flex;
  background: var(--bg-white);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.ai-textarea {
  flex: 1;
  padding: 16px 20px;
  font-size: 1rem;
  border: none;
  outline: none;
  resize: none;
  min-height: 56px;
  max-height: 200px;
  font-family: var(--font);
  color: var(--text1);
}

.ai-textarea::placeholder {
  color: var(--text3);
}

.ai-submit-btn {
  padding: 0 28px;
  background: var(--p);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.ai-submit-btn:hover {
  background: var(--p2);
}

.ai-upload-btns {
  display: flex;
  gap: 8px;
  margin-top: var(--space-sm);
  justify-content: center;
}

.ai-upload-btn {
  padding: 8px 16px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.1);
  border: 1px dashed rgba(255,255,255,0.3);
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.ai-upload-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

/* ---- AI 商品结果 ---- */
.ai-result-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.ai-result-main {
  background: var(--bg-white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ai-result-header {
  padding: var(--space-sm) var(--space-md);
  background: var(--p-lighter);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--p);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-result-body {
  padding: var(--space-md);
}

.ai-product-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg);
  border-radius: var(--r-lg);
  margin-bottom: var(--space-md);
}

.ai-product-img {
  width: 200px;
  height: 200px;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--bg-white);
}

.ai-product-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-product-brand {
  font-size: 0.8125rem;
  color: var(--text3);
}

.ai-product-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text1);
  line-height: 1.4;
}

.ai-product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ai-product-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--p);
}

.ai-product-original {
  font-size: 0.875rem;
  color: var(--text3);
  text-decoration: line-through;
}

.ai-product-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-product-tag {
  padding: 4px 12px;
  background: var(--p-lighter);
  color: var(--p);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ai-product-btn-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.ai-product-btn-row .btn {
  flex: 1;
  justify-content: center;
}

/* ---- AI 侧边 ---- */
.ai-result-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ai-summary-card {
  background: var(--bg-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: var(--space-md);
}

.ai-summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text1);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-summary-title i {
  color: var(--p);
}

.ai-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
  padding: 8px 0;
  border-bottom: 1px dashed var(--p-border);
}

.ai-summary-item:last-child {
  border-bottom: none;
}

.ai-summary-item .label {
  color: var(--text2);
}

.ai-summary-item .value {
  font-weight: 600;
  color: var(--text1);
}

.ai-summary-item .value.highlight {
  color: var(--p);
  font-size: 1.125rem;
}

.ai-history-card {
  background: var(--bg-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: var(--space-md);
}

.ai-history-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text1);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-history-title i {
  color: var(--p);
}

.ai-history-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--p-border);
  font-size: 0.875rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.2s;
}

.ai-history-item:hover {
  color: var(--p);
}

.ai-history-item:last-child {
  border-bottom: none;
}

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .ai-result-section {
    grid-template-columns: 1fr;
  }
  
  .ai-result-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ai-product-card {
    grid-template-columns: 160px 1fr;
  }
}

@media (max-width: 768px) {
  .ai-product-card {
    grid-template-columns: 1fr;
  }
  
  .ai-product-img {
    width: 100%;
    height: 240px;
  }
  
  .ai-result-sidebar {
    grid-template-columns: 1fr;
  }
}
