/* 共享样式 - 头部、页脚、模态框、反馈表单 */

/* Toast 提示 */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background-color: rgba(31, 41, 55, 0.95);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  animation: slideDown 0.3s ease;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }
.toast.warning { border-left: 4px solid #f59e0b; }

.toast-icon { font-size: 18px; }
.toast.success .toast-icon { color: #10b981; }
.toast.error .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: #f59e0b; }

.toast-message { flex: 1; font-size: 14px; }

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

/* 顶部导航 */
.top-nav {
  background-color: #1f2937;
  padding: 12px 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #f59e0b;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.region-selector { position: relative; }

.region-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #374151;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #fff;
}

.region-btn:hover { background-color: rgba(245, 158, 11, 0.2); }

/* 区域选择下拉框样式 - 用于首页和商品页 */
.area-selector {
  position: relative;
}

.area-select {
  background-color: #374151;
  color: #ffffff;
  padding: 8px 32px 8px 16px;
  border-radius: 20px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 100px;
  transition: all 0.3s ease;
}

.area-select:hover {
  background-color: rgba(245, 158, 11, 0.2);
}

.area-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.area-select option {
  background-color: #374151;
  color: #ffffff;
  padding: 8px;
}

.area-selector::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #f59e0b;
  font-size: 12px;
  pointer-events: none;
}

.region-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background-color: #374151;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 100;
  min-width: 220px;
}

.region-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #fff;
}

.region-item:hover { background-color: #4b5563; }
.region-item:first-child { border-radius: 8px 8px 0 0; }
.region-item:last-child { border-radius: 0 0 8px 8px; }

.active-item { background-color: rgba(245, 158, 11, 0.1); }
.text-primary { color: #f59e0b; }
.ml-auto { margin-left: auto; }

.user-login {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 20px;
  background-color: #374151;
  transition: all 0.3s ease;
  color: #fff;
}

.user-login:hover { background-color: rgba(245, 158, 11, 0.2); }

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

.user-name { color: #f59e0b; font-weight: 500; }

.logout-btn {
  background: none;
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: 4px 12px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.logout-btn:hover { background-color: #ef4444; color: white; }

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background-color: #1a2744;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 40px;
  position: relative;
  animation: slideIn 0.3s ease;
}

.feedback-modal-container {
  background-color: #1a2744;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 40px;
  position: relative;
  animation: slideIn 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover { background-color: rgba(255, 255, 255, 0.2); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.modal-title {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
}

.modal-switch {
  color: #9ca3af;
  font-size: 14px;
}

.modal-switch a {
  color: #ff8c00;
  text-decoration: none;
  margin-left: 8px;
  cursor: pointer;
}

.modal-switch a:hover { text-decoration: underline; }

/* 表单 */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-label {
  display: block;
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 8px;
}

.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-textarea-wrapper {
  position: relative;
}

.form-icon {
  position: absolute;
  left: 16px;
  color: #9ca3af;
  font-size: 16px;
}

.form-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  resize: vertical;
  font-family: inherit;
}

.form-input::placeholder,
.form-textarea::placeholder { color: #9ca3af; }

.form-input:focus,
.form-textarea:focus { border-color: #ff8c00; }

.form-input.error,
.form-textarea.error { border-color: #ef4444; }

.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: #ff8c00;
  cursor: pointer;
  font-size: 16px;
}

.form-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
  padding-left: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.submit-btn {
  flex: 1;
  padding: 14px;
  background-color: #ff7a00;
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background-color: #ff8c00;
  transform: scale(1.02);
}

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

.cancel-btn {
  flex: 1;
  padding: 14px;
  background-color: transparent;
  color: #9ca3af;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  border-color: #9ca3af;
  color: #fff;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

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

/* 页脚 */
.footer {
  background-color: #1f2937;
  padding: 32px 0;
  margin-top: 48px;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #fff;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d1d5db;
}

.contact-icon { color: #f59e0b; }

.feedback-btn {
  background-color: #374151;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  border: none;
  font-size: 14px;
}

.feedback-btn:hover { background-color: #4b5563; }

.payment-methods {
  display: flex;
  gap: 16px;
}

.payment-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}

.payment-icon.wechat { background-color: #07c160; }
.payment-icon.alipay { background-color: #1677ff; }
.payment-icon.paypal { background-color: #003087; }

.copyright {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #374151;
  color: #9ca3af;
  font-size: 14px;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== 客服聊天样式 ==================== */

/* 客服悬浮按钮 */
.customer-service-float {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 60px;
  height: 60px;
  background: #f59e0b;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  transition: all 0.3s ease;
  z-index: 99;
}

.customer-service-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

.customer-service-float i {
  font-size: 24px;
  color: #fff;
}

.customer-service-float span {
  font-size: 10px;
  color: #fff;
  margin-top: 2px;
}

/* 客服聊天模态框 */
.chat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.chat-modal-container {
  background: #1a2744;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  height: 70vh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.3s ease;
  border: 2px solid #f59e0b;
}

/* 聊天头部 */
.chat-header {
  background: #f59e0b;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-back-btn,
.chat-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: opacity 0.3s;
}

.chat-back-btn:hover,
.chat-close-btn:hover {
  opacity: 0.8;
}

.chat-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

/* 消息区域 */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #1a2744;
}

.chat-message {
  margin-bottom: 16px;
  display: flex;
}

.user-message {
  justify-content: flex-end;
}

.service-message {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.user-message .message-bubble {
  margin-right: 2%;
  background: #f59e0b;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.service-message .message-bubble {
  background: #2a3a5f;
  color: #fff;
  border-bottom-left-radius: 4px;
}

/* 输入区域 */
.chat-input-area {
  background: #1a2744;
  border-top: 2px solid #f59e0b;
  padding: 16px 20px;
  position: relative;
}

.chat-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.toolbar-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s;
  padding: 4px;
}

.toolbar-btn:hover {
  color: #f59e0b;
}

.chat-input-wrapper {
  margin-bottom: 32px;
}

.chat-input {
  width: 100%;
  padding: 12px 16px;
  background: #2a3a5f;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.3s;
}

.chat-input:focus {
  border-color: #f59e0b;
}

.chat-input::placeholder {
  color: #6b7280;
}

.chat-send-btn {
  position: absolute;
  right: 20px;
  bottom: 54px;
  padding: 15px 24px;
  background: #f59e0b;
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.chat-send-btn:hover:not(:disabled) {
  background: #d97706;
  transform: scale(1.02);
}

.chat-send-btn:disabled {
  background: #6b7280;
  cursor: not-allowed;
}

/* 图片消息 */
.message-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  cursor: pointer;
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* ==================== 客服聊天样式结束 ==================== */
/* 客服悬浮按钮样式 */
.customer-service-float {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: auto;
  background: transparent;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.3s ease;
  z-index: 1000;
}

.customer-service-float:hover {
  transform: translateY(-50%) scale(1.05);
}

.customer-service-float .service-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.customer-service-float .service-text {
  font-size: 12px;
  color: #fff;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

/* 有未读消息时的样式 */
.customer-service-float.has-unread {
  animation: shake 0.5s ease-in-out;
}

/* 未读数量徽章 */
.unread-badge {
  position: absolute;
  top: -5px;
  right: 5px;
  background: #ff4d4f;
  color: #fff;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 抖动动画 */
@keyframes shake {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  25% { transform: translateY(-50%) translateX(-5px); }
  75% { transform: translateY(-50%) translateX(5px); }
}
.fa-headsete{
  height: 100%;
  width: 100%;
}
.service-avatar{
  margin-top: 2%;
  margin-right: 2%;
  height: 10%;
  width: 10%;
}
