/* warehouse_price.css - 通达云仓报价表专用样式 */
:root {
  --primary-color: #6e8efb;
  --primary-dark: #5a7df4;
  --secondary-color: #a777e3;
  --light-bg: #f8f9fa;
  --border-color: #eaeaea;
  --text-color: #333;
  --text-light: #666;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --hover-shadow: 0 20px 50px rgba(110, 142, 251, 0.25);
  --hover-orange: #ff9800;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  padding: 0;
  min-height: 100vh;
}

.warehouse-main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

/* 报价页专属头部（独立于全局页头） */
.warehouse-hero {
  margin-bottom: 40px;
  padding: 30px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.warehouse-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}
.warehouse-hero h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}
.warehouse-hero p {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(110, 142, 251, 0.2), transparent);
  transition: left 0.6s ease;
  z-index: -1;
}
.filter-btn:hover::before {
  left: 100%;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(110, 142, 251, 0.3);
}

/* 仓库卡片网格 */
.warehouse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
  justify-items: center;
}
@media (min-width: 1300px) {
  .warehouse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 1299px) and (min-width: 768px) {
  .warehouse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .warehouse-grid {
    grid-template-columns: 1fr;
  }
}

.warehouse-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
  cursor: pointer;
  width: 100%;
  max-width: 600px;
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}
.warehouse-card:nth-child(2) { animation-delay: 0.1s; }
.warehouse-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--hover-shadow);
  z-index: 10;
}

/* 卡片头部图片区域 (4:3变体) */
.card-header {
  position: relative;
  height: 0;
  padding-bottom: 58.33%; /* 600×350比例 */
  overflow: hidden;
}
.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  z-index: 2;
}
.card-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.warehouse-card:hover .card-banner {
  transform: scale(1.1);
}
.card-title-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 25px 25px 20px;
  z-index: 3;
  color: white;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.8), rgba(167, 119, 227, 0.8));
  height: 40%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background 0.3s;
}
.country-name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: color 0.3s;
}
.country-sub {
  font-size: 1rem;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: color 0.3s;
}
.warehouse-card:hover .country-name,
.warehouse-card:hover .country-sub {
  color: var(--hover-orange);
}

.card-body {
  padding: 25px;
}
.fee-summary {
  margin-bottom: 20px;
}
.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}
.summary-item:last-child {
  border-bottom: none;
}
.summary-label {
  color: var(--text-light);
  font-weight: 500;
}
.summary-value {
  font-weight: 600;
  color: var(--primary-color);
}

.card-actions {
  display: flex;
  gap: 10px;
  padding: 0 25px 25px;
}
.btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
  z-index: -1;
}
.btn:hover::before {
  left: 100%;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(110, 142, 251, 0.4);
}
.btn-secondary {
  background: #f0f2f5;
  color: var(--text-color);
}
.btn-secondary:hover {
  background: #e4e6e9;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* 模态框（二级） */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  animation: modalBgFade 0.3s ease;
}
@keyframes modalBgFade {
  from { background: rgba(0, 0, 0, 0); backdrop-filter: blur(0); }
  to { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); }
}
.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: white;
  border-radius: var(--radius);
  width: 95%;
  max-width: 1200px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: modalFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 20px 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-size: 1.8rem;
}
.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}
.modal-body {
  padding: 30px;
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

/* 选项卡样式 */
.tab-container {
  margin-top: 20px;
}
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab {
  padding: 14px 25px;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.3s;
  white-space: nowrap;
}
.tab:hover {
  color: var(--primary-color);
}
.tab.active {
  color: var(--primary-color);
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* 费用表格 */
.fee-section {
  margin-bottom: 30px;
}
.fee-section h3 {
  color: var(--primary-color);
  border-left: 6px solid var(--primary-color);
  padding-left: 15px;
  margin-bottom: 20px;
  font-size: 1.4rem;
}
.fee-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}
.fee-table th {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 14px 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}
.fee-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
}
.fee-table tr:last-child td {
  border-bottom: none;
}
.fee-table tr:hover {
  background: rgba(110, 142, 251, 0.05);
}
.note {
  background: #fff3cd;
  border-left: 6px solid #ffc107;
  padding: 15px 20px;
  border-radius: 8px;
  color: #856404;
  margin: 20px 0;
}

/* 可入仓品类卡片 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 20px;
}
.category-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  background: #ffffff;
}
.category-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}
.category-name {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}
.product-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.product-thumb {
  aspect-ratio: 1/1;
  background: #ddd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.75rem;
  background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
  border: 1px solid #aaa;
  overflow: hidden;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 三级弹窗 */
.detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 2000;
  overflow-y: auto;
  padding: 20px;
}
.detail-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}
.detail-modal .modal-content {
  max-width: 800px;
  width: 90%;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: modalFadeIn 0.3s ease;
}
.detail-modal .modal-header {
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.detail-modal .modal-header h2 {
  font-size: 1.5rem;
}
.detail-modal .modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}
.detail-table {
  width: 100%;
  border-collapse: collapse;
}
.detail-table th {
  background: #f8f9fa;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}
.detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}
.detail-table tr:hover {
  background: rgba(110, 142, 251, 0.05);
}

/* 独立页脚 */
.warehouse-footer {
  text-align: center;
  margin-top: 50px;
  padding: 20px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .warehouse-hero h1 {
    font-size: 2rem;
  }
  .card-actions {
    flex-direction: column;
  }
  .filter-bar {
    flex-direction: column;
    align-items: center;
  }
  .filter-btn {
    width: 100%;
    max-width: 300px;
  }
  .tabs {
    flex-direction: column;
  }
  .tab {
    text-align: left;
    padding: 10px 15px;
  }
  .country-name {
    font-size: 1.6rem;
  }
}

@media print {
  .filter-bar, .modal, .detail-modal, .card-actions {
    display: none !important;
  }
  .warehouse-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}