﻿body.template3-index-page {
  background: #f5f5f5;
}

.tab-active {
  border-bottom: 2px solid #1e88e5;
  color: #1e88e5;
}

.upload-tab-active {
  color: #1e88e5;
  border-bottom: 2px solid #1e88e5;
}

.product-card {
  border: 2px solid #e5e7eb;
  transition: border-color 0.15s, background-color 0.15s;
  min-height: 140px;
  background: #fff;
}

.product-card.selected {
  border-color: #1e88e5;
  background: #f0f7ff;
}

.product-card:hover {
  border-color: #1e88e5;
}

.product-card-horizontal {
  min-height: auto;
}

.product-card-placeholder {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.tab-wrapper {
  width: 1152px !important;
  max-width: 100%;
  margin: 0 auto;
}

.tab-content {
  min-height: 600px;
}

.loading-overlay,
.modal-overlay,
.error-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-overlay {
  z-index: 10000;
}

.modal-overlay {
  z-index: 10010;
}

.error-modal-overlay {
  z-index: 10030;
}

.hidden {
  display: none !important;
}

.loading-overlay {
  flex-direction: column;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1e88e5;
  border-radius: 50%;
  animation: template3-spin 1s linear infinite;
}

@keyframes template3-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: #fff;
  margin-top: 20px;
  font-size: 16px;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}

.template3-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

.template3-modal-icon.error { background: #ef4444; }
.template3-modal-icon.warning { background: #f59e0b; }

.payment-modal {
  background: #fff;
  border-radius: 12px;
  width: 900px;
  max-width: 95%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.payment-modal-header {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 20px;
}

.payment-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.template3-payment-modal {
  width: 960px;
}

.template3-payment-body {
  background: #fff;
  padding: 20px;
  max-height: calc(90vh - 80px);
  overflow: auto;
}

.template3-payment-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}

.template3-payment-left {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border-radius: 12px;
  padding: 16px;
}

.template3-payment-right {
  background: #fff;
}

.payment-info-card {
  background: #fff;
  border-radius: 10px;
  padding: 0 14px;
  margin-top: 12px;
}

.payment-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.payment-info-row.no-border {
  border-bottom: none;
}

.payment-info-label {
  width: 78px;
  color: #6b7280;
  font-size: 13px;
  flex-shrink: 0;
}

.payment-info-value {
  color: #111827;
  font-size: 14px;
  word-break: break-all;
}

.payment-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 0 2px;
}

.payment-total-label {
  color: #4b5563;
  font-size: 14px;
}

.payment-total-value {
  color: #dc2626;
  font-size: 24px;
  font-weight: 700;
}

.payment-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.payment-status-tag {
  background: #f59e0b;
  color: #fff;
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 12px;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.payment-option {
  min-height: 112px;
  border: 2px solid #d9d9df;
  border-radius: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-option:hover {
  border-color: #6a7ef0;
}

.payment-option.selected {
  border-color: #6a7ef0;
  background: linear-gradient(180deg, #f8f9ff 0%, #f4f6ff 100%);
}

.payment-option-icon {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-option-icon svg {
  width: 32px;
  height: 32px;
}

.payment-option-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.payment-option-icon.wechat-icon {
  color: #1aad19;
}

.payment-option-icon.alipay-icon {
  color: #06b4fd;
}

.payment-option-icon.taobao-icon {
  color: #ff6b00;
}

.payment-option-icon.pdd-icon {
  color: #e1251b;
}

.payment-option-icon.douyin-icon {
  color: #111827;
}

.payment-option-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.qrcode-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e0e0e0;
  display: none;
  text-align: center;
}

.qrcode-section.show {
  display: block;
}

.qrcode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qrcode-box {
  width: 190px;
  height: 190px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qrcode-placeholder {
  width: 170px;
  height: 170px;
  background: repeating-linear-gradient(
    0deg,
    #000 0px,
    #000 4px,
    transparent 4px,
    transparent 8px
  ),
  repeating-linear-gradient(
    90deg,
    #000 0px,
    #000 4px,
    transparent 4px,
    transparent 8px
  );
  background-size: 8px 8px;
  position: relative;
}

.qrcode-placeholder::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.qrcode-placeholder::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 2px;
  background: #000;
  transform: translate(-50%, -50%);
}

.qrcode-tip {
  color: #666;
  font-size: 13px;
  margin-top: 12px;
}

.qrcode-status {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border-radius: 18px;
  color: #667eea;
  font-size: 13px;
}

.taobao-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #d7d8e2;
  display: none;
}

.taobao-section.show {
  display: block;
}

.taobao-title {
  font-size: 17px;
  font-weight: 700;
  color: #16213e;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.taobao-input-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.taobao-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.taobao-input {
  flex: 1;
  height: 48px;
  padding: 0 14px;
  border: 2px solid #d8d9e2;
  border-radius: 12px;
  font-size: 14px;
  color: #1e2746;
}

.taobao-input:focus {
  outline: none;
  border-color: #ff7a1a;
}

.taobao-remove-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #ffd0c8;
  background: #fff1f0;
  color: #e04a39;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.taobao-add-btn {
  margin-top: 12px;
  min-width: 160px;
  height: 48px;
  padding: 0 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7a1a 0%, #ff8c24 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.taobao-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #5d79ec 0%, #7b49ae 100%);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

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

.taobao-jump-btn {
  border: none;
  background: transparent;
  color: #6a7ef0;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.taobao-jump-btn:disabled {
  color: #b6bad0;
  cursor: not-allowed;
  text-decoration: none;
}

.success-subtitle {
  text-align: left;
  color: #666;
  font-size: 13px;
}

.taobao-count {
  margin: 10px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7e8;
  color: #8a4b00;
  font-size: 14px;
  font-weight: 500;
}

.taobao-count-value {
  color: #ff7a00;
  font-weight: 700;
}

.search-select-wrapper {
  position: relative;
}

.search-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  max-height: 240px;
  overflow: auto;
  z-index: 20;
  display: none;
}

.search-select-dropdown.show {
  display: block;
}

.search-select-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  color: #374151;
  background: #fff;
}

.search-select-option:hover {
  background: #eff6ff;
}

.template3-header .template3-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.2s ease;
}

.template3-header .template3-nav-link:hover,
.template3-header .template3-nav-link.active {
  background: #2563eb;
  color: #fff;
}

.template3-footer-links,
.template3-footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.template3-footer-links a {
  color: #93c5fd;
}

.template3-footer-copy {
  color: #d1d5db;
}

@media (max-width: 1200px) {
  .tab-wrapper {
    width: 100% !important;
  }

  .tab-content {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .template3-payment-grid {
    grid-template-columns: 1fr;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .template3-payment-body {
    padding: 12px;
  }

  .pay-btn {
    font-size: 18px;
  }

  .tab-btn {
    padding: 0.75rem 0.75rem;
    font-size: 0.75rem;
  }

  .form-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch !important;
  }

  .form-footer button {
    width: 100%;
  }
}

input[type="date"] {
  cursor: pointer;
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.float-toolbar {
  position: fixed;
  right: 20px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1200;
}

.float-toolbar-item {
  position: relative;
  width: 58px;
  min-height: 58px;
  border: none;
  border-radius: 18px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.float-toolbar-item:hover {
  transform: translateY(-2px);
  color: #2563eb;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
}

.float-toolbar-item svg {
  width: 20px;
  height: 20px;
}

.float-toolbar-item .tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.float-toolbar-item .tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  width: 12px;
  height: 12px;
  background: #111827;
  transform: translateY(-50%) rotate(45deg);
}

.float-toolbar-item:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.float-toolbar-item .tooltip-qrcode {
  white-space: normal;
  width: 150px;
  text-align: center;
}

.float-toolbar-item .tooltip-qrcode img {
  width: 110px;
  height: 110px;
  display: block;
  margin: 0 auto 8px;
  border-radius: 10px;
  background: #fff;
}

#back-to-top {
  opacity: 0;
  visibility: hidden;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .float-toolbar {
    right: 12px;
    bottom: 88px;
  }

  .float-toolbar-item {
    width: 52px;
    min-height: 52px;
    border-radius: 16px;
    font-size: 11px;
  }

  .float-toolbar-item .tooltip {
    display: none;
  }
}
