/* Contact 页面 */
.nav-current {
  color: var(--color-accent) !important;
  font-weight: 600;
}

/* 基于 https://www.nanosoftmaterials.com/contact */

.contact-page {
  padding: 40px 20px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-title {
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: #000;
  margin-bottom: 40px;
}

/* 右侧栏：仅联系方式 */
.contact-col-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  z-index: 1;
}

@media (min-width: 769px) {
  .contact-col-sidebar {
    position: sticky;
    top: calc(var(--header-height, 92px) + 16px);
    align-self: start;
  }
}

/* 左侧：Products for quote 卡片 */
.contact-quote-panel {
  margin: 0 0 24px 0;
  padding: 22px 20px 24px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.contact-quote-title {
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin: 0 0 8px 0;
}

.contact-quote-desc {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.contact-quote-add-row {
  margin-bottom: 20px;
}

.contact-quote-label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: #000;
}

.contact-quote-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.contact-product-select {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
}

.contact-add-cart-btn {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #000;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
}

.contact-add-cart-btn:hover {
  background: #333;
}

.contact-cart-preview {
  min-height: 0;
  overflow: visible;
}

.contact-cart-empty {
  font-size: 14px;
  color: #999;
  margin: 0;
}

.contact-cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-cart-line {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: #000;
  padding: 12px 0;
  border-bottom: 1px solid #e8e8e8;
  line-height: 1.45;
}

.contact-cart-line:last-child {
  border-bottom: none;
}

.contact-cart-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
  border: 1px solid #e0e0e0;
}

.contact-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-cart-body {
  flex: 1;
  min-width: 0;
}

.contact-cart-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.contact-cart-name {
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
}

.contact-cart-qty {
  color: #666;
  font-size: 14px;
}

.contact-cart-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-qty-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #c8c8c8;
  background: #fff;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  font-size: 14px;
}

.contact-qty-btn:hover {
  border-color: #666;
}

.contact-cart-price {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-left: auto;
}

/* 没有价格时不占位 */
.contact-cart-price:empty {
  display: none;
}

.contact-cart-opt {
  display: block;
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}

.contact-cart-actions {
  margin-top: 8px;
}

.contact-cart-remark {
  margin-top: 10px;
}

.contact-cart-remark-label {
  display: block;
  font-size: 12px;
  color: #666;
  margin: 0 0 6px 0;
}

.contact-cart-remark-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #fff;
}

.contact-cart-remark-input:focus {
  outline: none;
  border-color: #999;
}

.contact-cart-remove {
  padding: 0;
  border: none;
  background: transparent;
  color: #b23a3a;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.contact-cart-remove:hover {
  color: #922d2d;
}

/* 双列布局：左为报价+联系表单，右为联系方式 */
.contact-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 40px 48px;
  align-items: start;
}

.contact-col-form {
  max-width: 100%;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.contact-col-addresses {
  min-width: 0;
  padding-top: 4px;
}

/* 极简表单：下划线样式 */
.contact-form {
  margin-bottom: 24px;
}

.contact-form .form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-form .form-row {
  margin-bottom: 24px;
}

.contact-form .form-row-split .form-row {
  margin-bottom: 24px;
}

.contact-form label {
  display: block;
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000;
  margin-bottom: 8px;
}

.contact-form .req {
  color: #c00;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px 0;
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 16px;
  color: #000;
  background: transparent;
  border: none;
  border-bottom: 1px solid #000;
  border-radius: 0;
  box-sizing: border-box;
  pointer-events: auto;
}

.contact-form input::placeholder {
  color: #999;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: #000;
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
  padding-bottom: 8px;
}

/* 自定义文件选择：隐藏系统默认「浏览」按钮 */
.contact-file-label {
  display: block;
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000;
  margin-bottom: 8px;
}

.contact-file-hint {
  margin: -4px 0 10px 0;
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 13px;
  color: #666;
  line-height: 1.45;
}

.contact-file-upload {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.contact-form .contact-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.contact-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-file-btn:hover {
  background: #000;
  color: #fff;
}

.contact-file-upload:focus-within .contact-file-btn {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.contact-file-name {
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 15px;
  color: #666;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 胶囊形黑色提交按钮 */
.contact-submit {
  padding: 12px 36px;
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #000;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-submit:hover {
  background: #333;
}

.contact-thanks {
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 18px;
  color: #000;
  font-weight: 600;
  margin-top: 24px;
}

/* 右侧地址区块 */
.contact-address-block {
  margin-bottom: 40px;
}

.contact-address-block:last-child {
  margin-bottom: 0;
}

.contact-address-title {
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin: 0 0 8px 0;
}

.contact-address-note {
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 13px;
  color: #666;
  margin: 0 0 20px 0;
}

.contact-address {
  font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
  font-size: 15px;
  line-height: 1.9;
  color: #000;
  font-style: normal;
}

.contact-label {
  font-weight: 700;
}

.contact-address a {
  color: #000;
  text-decoration: underline;
}

.contact-address a:hover {
  color: #333;
}

/* 表单 AJAX 错误提示 */
.contact-form-error {
  color: #b00020;
  font-size: 14px;
  margin: 0 0 16px;
  padding: 10px 12px;
  background: #fdecea;
  border-radius: 4px;
}

.contact-form-error[hidden] {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .contact-page {
    padding: 24px 16px 40px;
  }

  .contact-title {
    font-size: 32px;
    margin-bottom: 32px;
  }

  .contact-two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form .form-row-split {
    grid-template-columns: 1fr;
  }

  .contact-quote-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-add-cart-btn {
    width: 100%;
  }
}
