* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.store-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  max-width: 760px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.store-header { text-align: center; margin-bottom: 20px; }
.store-header h1 { font-size: 28px; color: #333; margin-bottom: 8px; }
.store-header p { color: #666; font-size: 14px; }

.environment-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3949ab;
  font-size: 12px;
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid #d6dcff;
  background: #f2f5ff;
  color: #3949ab;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.tab.active {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}

.api-key-panel {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #edf0ff;
  border-radius: 12px;
  background: #fafbff;
}

.api-key-panel label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #3949ab;
  margin-bottom: 8px;
}

.api-key-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.api-key-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d6dcff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #333;
  background: #fff;
}

.api-key-row input:focus {
  outline: 2px solid #667eea;
  outline-offset: 1px;
}

.api-key-toggle,
.api-key-reset {
  border: 1px solid #d6dcff;
  background: #f2f5ff;
  color: #3949ab;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.api-key-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #5f6470;
  line-height: 1.4;
}

.merchant-title {
  color: #222;
  margin-bottom: 12px;
  font-size: 20px;
}

.products-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.product {
  border: 1px solid #edf0ff;
  border-radius: 12px;
  padding: 16px;
  background: #fafbff;
}

.product-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.product h3 { color: #333; font-size: 17px; }
.product p { color: #5f6470; font-size: 13px; margin-top: 6px; line-height: 1.5; }
.price { color: #5b6fe0; font-size: 20px; font-weight: 700; white-space: nowrap; }

.pay-btn {
  border: none;
  border-radius: 10px;
  background: #3f51b5;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.pay-btn:disabled { background: #a8b0de; cursor: not-allowed; }

.payment-status {
  display: none;
  margin-top: 8px;
  border-radius: 8px;
  padding: 12px;
}

.payment-status.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.payment-status.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.integration-guide {
  margin-top: 18px;
  padding: 16px;
  background: #e3f2fd;
  border-radius: 12px;
  border-left: 4px solid #2196f3;
}

.integration-guide h3 { font-size: 16px; color: #1565c0; margin-bottom: 8px; }
.integration-guide ol { padding-left: 20px; color: #555; font-size: 14px; line-height: 1.6; }

.debug-info {
  margin-top: 14px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: #666;
}

.debug-info h3 { font-size: 14px; margin-bottom: 6px; color: #333; }
pre { overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
