/**
 * Web3 Robot Shop - 样式文件
 */

/* ===== FDOG Logo 样式 ===== */
.fdog-header-logo {
  display: flex;
  align-items: center;
}

.fdog-header-logo .logo__link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.fdog-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.fdog-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

/* Footer Logo */
.footer-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.footer-fdog-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.footer-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

/* ===== 钱包连接按钮 ===== */
.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #1a1a1a;
  color: white;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wallet-btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wallet-btn.connected {
  background: #1a1a1a;
  border-color: #10b981;
}

.wallet-btn .wallet-icon {
  width: 20px;
  height: 20px;
}

.wallet-address {
  font-family: monospace;
  font-size: 13px;
}

/* ===== 购物车计数 ===== */
.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 通知提示 ===== */
.web3-notification {
  position: fixed;
  top: 150px;
  right: 20px;
  z-index: 10000;
  transform: translateX(120%);
  transition: transform 0.3s ease;
}

.web3-notification.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #10b981;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.notification-icon {
  font-size: 18px;
}

/* ===== 支付弹窗 ===== */
.web3-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.web3-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close-btn:hover {
  color: #374151;
}

.modal-body {
  padding: 24px;
}

/* ===== 订单信息 ===== */
.order-info {
  margin-bottom: 20px;
}

.order-id {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 12px;
}

.order-items {
  background: #f9fafb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.order-item:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.order-total {
  border-top: 2px solid #e5e7eb;
  padding-top: 12px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.total-row.final {
  font-size: 18px;
  font-weight: 600;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.total-row .amount {
  color: #6366f1;
}

/* ===== 钱包信息 ===== */
.wallet-info {
  background: #f0f9ff;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}

.wallet-info p {
  margin: 4px 0;
}

.wallet-info .wallet-address {
  color: #6366f1;
  font-family: monospace;
}

/* ===== 支付按钮 ===== */
.payment-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.payment-actions .btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #1a1a1a;
  color: white;
  border: 1px solid #333;
}

.btn-primary:hover:not(:disabled) {
  background: #333;
}

.btn-primary:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

/* ===== 支付状态 ===== */
.payment-status {
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.payment-status.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.payment-status.success {
  background: #f0fdf4;
  color: #15803d;
}

.payment-status.error {
  background: #fef2f2;
  color: #dc2626;
}

/* ===== 成功页面 ===== */
.success-page {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-page h2 {
  color: #10b981;
  margin-bottom: 16px;
}

.success-page .order-id {
  font-size: 14px;
  color: #6b7280;
}

.success-page .tx-hash {
  font-size: 13px;
  color: #6b7280;
  margin: 8px 0;
}

.success-page .tx-hash a {
  color: #6366f1;
  text-decoration: none;
}

.success-page .tx-hash a:hover {
  text-decoration: underline;
}

.success-message {
  color: #374151;
  margin: 20px 0;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.success-actions .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

/* ===== 邀请面板 ===== */
.invite-panel {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.invite-panel h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.invite-desc {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 20px;
}

.invite-desc strong {
  color: #10b981;
}

.invite-code-section,
.invite-link-section {
  margin-bottom: 16px;
}

.invite-code-section label,
.invite-link-section label {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.invite-code {
  font-size: 24px;
  font-weight: bold;
  color: #6366f1;
  font-family: monospace;
  letter-spacing: 2px;
}

.invite-link-box {
  display: flex;
  gap: 8px;
}

.invite-link-box input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  font-family: monospace;
  background: #f9fafb;
}

.copy-btn {
  padding: 10px 16px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #4f46e5;
}

.invite-stats {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #374151;
}

.stat-label {
  font-size: 12px;
  color: #9ca3af;
}

.connect-prompt {
  text-align: center;
  padding: 20px;
}

.connect-prompt p {
  color: #6b7280;
  margin-bottom: 16px;
}

.inviter-info {
  margin-top: 16px;
  padding: 8px 12px;
  background: #f0fdf4;
  border-radius: 6px;
  font-size: 13px;
  color: #15803d;
}

/* ===== 购物车页面 ===== */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.cart-table th {
  text-align: left;
  padding: 12px;
  background: #f9fafb;
  font-size: 14px;
  font-weight: 500;
}

.cart-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-product img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.qty-btn:hover {
  background: #f3f4f6;
}

.remove-btn {
  padding: 6px 12px;
  background: #fef2f2;
  color: #dc2626;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.remove-btn:hover {
  background: #fee2e2;
}

.cart-summary {
  background: #f9fafb;
  border-radius: 12px;
  padding: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
}

.summary-row.total {
  font-size: 18px;
  font-weight: 600;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid #e5e7eb;
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  margin-top: 20px;
  background: #1a1a1a;
  color: white;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkout-btn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.empty-cart {
  text-align: center;
  padding: 60px 20px;
}

.empty-cart h2 {
  color: #374151;
  margin-bottom: 8px;
}

.empty-cart p {
  color: #6b7280;
  margin-bottom: 24px;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    margin: 10px;
  }

  .payment-actions {
    flex-direction: column;
  }

  .cart-table {
    font-size: 13px;
  }

  .cart-product img {
    width: 40px;
    height: 40px;
  }

  .invite-stats {
    flex-direction: column;
    gap: 12px;
  }
}

/* 隐藏页脚 */
#shopify-section-footer,
.section-footer,
[data-section-type="footer"] {
  display: none !important;
}
