/* AMS homepage redesign — replaces sparse IBP / metal prototype look */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,500&family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
  --ams-ink: #0e1a28;
  --ams-ink-soft: #2a3b4f;
  --ams-muted: #6b7c8f;
  --ams-line: rgba(14, 26, 40, 0.08);
  --ams-steel: #1f6fbf;
  --ams-steel-deep: #0d4a8c;
  --ams-copper: #c45c26;
  --ams-mint: #1f9d6a;
  --ams-panel: rgba(255, 255, 255, 0.88);
  --ams-glow: rgba(31, 111, 191, 0.18);
}

/* —— strip atmosphere behind both blocks —— */
#ams-ibp-live-dashboard,
#ams-ibp-info-grid {
  font-family: "Noto Sans SC", "DM Sans", "PingFang SC", sans-serif !important;
  color: var(--ams-ink) !important;
  position: relative;
  width: min(1200px, calc(100% - 32px)) !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#ams-ibp-live-dashboard {
  margin-top: 36px !important;
  margin-bottom: 18px !important;
  padding: 28px 28px 24px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  background:
    radial-gradient(900px 280px at 8% -10%, rgba(31, 111, 191, 0.16), transparent 60%),
    radial-gradient(700px 260px at 92% 0%, rgba(196, 92, 38, 0.1), transparent 55%),
    linear-gradient(165deg, #f4f8fc 0%, #e8eef5 48%, #f7f9fc 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 50px rgba(14, 26, 40, 0.08) !important;
  overflow: hidden;
  animation: amsHomeFadeUp 0.7s ease both;
}

#ams-ibp-live-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 26, 40, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 26, 40, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 75%);
  pointer-events: none;
}

#ams-ibp-info-grid {
  margin-top: 8px !important;
  margin-bottom: 40px !important;
  padding: 26px 28px 28px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(14, 26, 40, 0.06) !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%) !important;
  box-shadow: 0 16px 40px rgba(14, 26, 40, 0.06) !important;
  animation: amsHomeFadeUp 0.85s ease 0.08s both;
}

@keyframes amsHomeFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* —— headings —— */
#ams-ibp-live-dashboard .ams-ibp-live-heading,
#ams-ibp-info-grid .ams-ibp-info-heading {
  position: relative;
  z-index: 1;
  border: 0 !important;
  padding-bottom: 18px !important;
  margin-bottom: 4px !important;
  align-items: center !important;
}

#ams-ibp-live-dashboard .ams-ibp-live-heading p,
#ams-ibp-info-grid .ams-ibp-info-heading-title p {
  color: var(--ams-steel) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
}

#ams-ibp-live-dashboard .ams-ibp-live-heading h2 {
  color: var(--ams-ink) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.25 !important;
}

#ams-ibp-live-dashboard .ams-ibp-start-note {
  color: var(--ams-muted) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

#ams-ibp-live-dashboard .ams-ibp-live-heading > span,
#ams-ibp-info-grid .ams-ibp-info-badge {
  padding: 7px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(31, 111, 191, 0.18) !important;
  background: rgba(255, 255, 255, 0.75) !important;
  color: var(--ams-steel-deep) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(31, 111, 191, 0.08);
}

/* —— panels / cards —— */
#ams-ibp-live-dashboard .ams-ibp-live-grid {
  position: relative;
  z-index: 1;
  gap: 16px !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.85fr) minmax(220px, 0.85fr) !important;
}

#ams-ibp-live-dashboard .ams-ibp-chart-panel,
#ams-ibp-live-dashboard .ams-ibp-country-panel,
#ams-ibp-live-dashboard .ams-ibp-other-country-panel {
  padding: 18px 18px 16px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  background: var(--ams-panel) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(14, 26, 40, 0.05) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#ams-ibp-live-dashboard .ams-ibp-chart-panel:hover,
#ams-ibp-live-dashboard .ams-ibp-country-panel:hover,
#ams-ibp-live-dashboard .ams-ibp-other-country-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(14, 26, 40, 0.09) !important;
}

/* —— metrics —— */
#ams-ibp-live-dashboard .ams-ibp-metrics {
  gap: 0 !important;
  margin-bottom: 14px !important;
  padding: 4px !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #f3f7fb, #eef3f9) !important;
  border: 1px solid var(--ams-line) !important;
}

#ams-ibp-live-dashboard .ams-ibp-metrics > div {
  padding: 14px 12px !important;
  border-radius: 11px !important;
  text-align: center;
  transition: background 0.2s ease;
}

#ams-ibp-live-dashboard .ams-ibp-metrics > div:hover {
  background: rgba(255, 255, 255, 0.85);
}

#ams-ibp-live-dashboard .ams-ibp-metrics small {
  display: block;
  color: var(--ams-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  margin-bottom: 6px;
}

#ams-ibp-live-dashboard .ams-ibp-metrics strong {
  display: block;
  color: var(--ams-ink) !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-family: "DM Sans", "Noto Sans SC", sans-serif !important;
}

/* —— chart —— */
#ams-ibp-live-dashboard .ams-ibp-chart-wrap {
  position: relative;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 80% 20%, rgba(31, 111, 191, 0.12), transparent 45%),
    linear-gradient(180deg, #fbfdff, #eef4fa) !important;
  border: 1px solid rgba(31, 111, 191, 0.1) !important;
  padding: 10px 8px 4px !important;
  overflow: hidden;
}

#ams-ibp-live-dashboard #ams-ibp-live-chart {
  display: block;
  width: 100%;
  height: 168px;
}

#ams-ibp-live-dashboard #ams-ibp-chart-line {
  fill: none !important;
  stroke: url(#amsIbpLineGrad) !important;
  stroke-width: 2.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  filter: drop-shadow(0 4px 8px rgba(31, 111, 191, 0.35));
}

#ams-ibp-live-dashboard .ams-ibp-grid-line {
  stroke: rgba(14, 26, 40, 0.06) !important;
  stroke-width: 1 !important;
}

#ams-ibp-live-dashboard .ams-ibp-axis {
  display: flex !important;
  justify-content: space-between !important;
  margin-top: 8px !important;
  color: var(--ams-muted) !important;
  font-size: 12px !important;
}

#ams-ibp-live-dashboard .ams-ibp-referrer-head {
  margin-top: 14px !important;
  padding-top: 12px !important;
  border-top: 1px dashed rgba(14, 26, 40, 0.1) !important;
}

#ams-ibp-live-dashboard .ams-ibp-referrer-head span,
#ams-ibp-live-dashboard .ams-ibp-referrer-head p {
  color: var(--ams-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

#ams-ibp-live-dashboard .ams-ibp-referrer-panel ol {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr)) !important;
  gap: 8px !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#ams-ibp-live-dashboard .ams-ibp-referrer-panel li {
  display: grid !important;
  grid-template-rows: 18px 88px auto !important;
  align-items: end !important;
  gap: 6px !important;
  min-width: 0 !important;
  text-align: center !important;
  font-size: 11px !important;
}

#ams-ibp-live-dashboard .ams-ibp-referrer-value {
  font-family: "DM Sans", sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--ams-ink) !important;
}

#ams-ibp-live-dashboard .ams-ibp-referrer-bar {
  display: block !important;
  width: 100% !important;
  height: 88px !important;
  border-radius: 10px 10px 4px 4px !important;
  background: rgba(31, 111, 191, 0.08) !important;
  position: relative !important;
  overflow: hidden !important;
}

#ams-ibp-live-dashboard .ams-ibp-referrer-bar i {
  position: absolute !important;
  left: 18% !important;
  right: 18% !important;
  bottom: 0 !important;
  display: block !important;
  border-radius: 8px 8px 2px 2px !important;
  background: linear-gradient(180deg, #4aa3e8, #0d4a8c) !important;
}

#ams-ibp-live-dashboard .ams-ibp-referrer-panel li strong {
  color: var(--ams-ink-soft) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  word-break: break-word;
}

/* —— country panels —— */
#ams-ibp-live-dashboard .ams-ibp-country-head p {
  color: var(--ams-steel) !important;
  font-size: 11px !important;
  letter-spacing: 0.12em !important;
}

#ams-ibp-live-dashboard .ams-ibp-country-head h3 {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--ams-ink) !important;
}

#ams-ibp-live-dashboard .ams-ibp-sample-badge,
#ams-ibp-live-dashboard .ams-ibp-country-head > i {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  background: rgba(31, 157, 106, 0.1) !important;
  color: var(--ams-mint) !important;
  border: 1px solid rgba(31, 157, 106, 0.22) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  font-style: normal !important;
}

#ams-ibp-live-dashboard .ams-ibp-sample-badge::before,
#ams-ibp-live-dashboard .ams-ibp-country-head > i em {
  content: "";
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: var(--ams-mint) !important;
  box-shadow: 0 0 0 3px rgba(31, 157, 106, 0.18);
  animation: amsPulse 1.6s ease-in-out infinite;
  display: inline-block !important;
  font-style: normal !important;
}

@keyframes amsPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

#ams-ibp-live-dashboard .ams-ibp-country-panel ol,
#ams-ibp-live-dashboard .ams-ibp-other-country-panel ol {
  list-style: none !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  display: grid !important;
  gap: 8px !important;
  max-height: 280px;
  overflow: auto;
}

#ams-ibp-live-dashboard .ams-ibp-country-panel li,
#ams-ibp-live-dashboard .ams-ibp-other-country-panel li {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #f8fafc, #f2f6fa) !important;
  border: 1px solid rgba(14, 26, 40, 0.05) !important;
}

#ams-ibp-live-dashboard .ams-ibp-country-name {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--ams-ink-soft) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

#ams-ibp-live-dashboard .ams-ibp-country-name b {
  display: inline-grid !important;
  place-items: center !important;
  min-width: 34px !important;
  height: 22px !important;
  padding: 0 6px !important;
  border-radius: 6px !important;
  background: #e8eef6 !important;
  color: var(--ams-steel-deep) !important;
  font-size: 11px !important;
  letter-spacing: 0.04em;
}

#ams-ibp-live-dashboard .ams-ibp-country-panel li strong,
#ams-ibp-live-dashboard .ams-ibp-other-country-panel li strong {
  font-family: "DM Sans", sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--ams-ink) !important;
  font-variant-numeric: tabular-nums;
}

#ams-ibp-live-dashboard .ams-ibp-country-note,
#ams-ibp-live-dashboard .ams-ibp-factual-note {
  margin-top: 12px !important;
  color: var(--ams-muted) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

/* empty state polish */
#ams-ibp-live-dashboard .ams-ibp-country-panel li:only-child,
#ams-ibp-live-dashboard .ams-ibp-other-country-panel li:only-child {
  min-height: 120px;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(31, 111, 191, 0.08), transparent 55%),
    linear-gradient(180deg, #f8fafc, #f2f6fa) !important;
}

/* —— metal / news block —— */
#ams-ibp-info-grid .ams-ibp-info-heading-title {
  gap: 12px !important;
}

#ams-ibp-info-grid .ams-ibp-info-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, #1f6fbf, #0d4a8c) !important;
  box-shadow: 0 10px 24px rgba(31, 111, 191, 0.28);
}

#ams-ibp-info-grid .ams-ibp-info-icon svg path {
  stroke: #fff !important;
}

#ams-ibp-info-grid .ams-ibp-info-heading-title p {
  font-size: 22px !important;
  color: var(--ams-ink) !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
}

#ams-ibp-info-grid .ams-ibp-info-cells {
  gap: 16px !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) !important;
}

#ams-ibp-info-grid .ams-ibp-info-cell,
#ams-ibp-info-grid .ams-ibp-news-card {
  border-radius: 16px !important;
  border: 1px solid rgba(14, 26, 40, 0.07) !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(14, 26, 40, 0.04) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

#ams-ibp-info-grid .ams-ibp-news-card:hover,
#ams-ibp-info-grid .ams-ibp-metal-cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(14, 26, 40, 0.09) !important;
}

#ams-ibp-info-grid .ams-ibp-metal-cell {
  padding: 18px !important;
  background:
    linear-gradient(180deg, #ffffff, #f7f9fc) !important;
}

#ams-ibp-info-grid .ams-ibp-metal-head h3 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--ams-ink) !important;
}

#ams-ibp-info-grid .ams-ibp-metal-asof {
  color: var(--ams-muted) !important;
  font-size: 12px !important;
}

#ams-ibp-info-grid .ams-ibp-metal-period {
  gap: 6px !important;
  padding: 3px !important;
  border-radius: 999px !important;
  background: #eef2f7 !important;
}

#ams-ibp-info-grid .ams-ibp-metal-period button {
  min-width: 34px !important;
  padding: 5px 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--ams-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: all 0.18s ease;
}

#ams-ibp-info-grid .ams-ibp-metal-period button[aria-selected="true"] {
  background: linear-gradient(145deg, #1f6fbf, #0d4a8c) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(31, 111, 191, 0.3);
}

#ams-ibp-info-grid .ams-ibp-metal-row {
  position: relative;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  grid-template-areas:
    "info chart"
    "cny chart" !important;
  align-items: center !important;
  gap: 4px 16px !important;
  padding: 14px 4px !important;
  border-bottom: 1px solid rgba(14, 26, 40, 0.06) !important;
}

#ams-ibp-info-grid .ams-ibp-metal-row:last-child {
  border-bottom: 0 !important;
}

#ams-ibp-info-grid .ams-ibp-metal-info {
  grid-area: info;
  display: flex !important;
  align-items: baseline !important;
  gap: 10px !important;
  flex-wrap: wrap;
}

#ams-ibp-info-grid .ams-ibp-metal-info b {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--ams-ink) !important;
  min-width: 1.5em;
}

#ams-ibp-info-grid .ams-ibp-metal-price {
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--ams-ink) !important;
  font-variant-numeric: tabular-nums;
}

#ams-ibp-info-grid .ams-ibp-metal-change {
  font-family: "DM Sans", sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
}

#ams-ibp-info-grid .ams-ibp-metal-change.up {
  color: #c62828 !important;
  background: rgba(198, 40, 40, 0.08) !important;
}

#ams-ibp-info-grid .ams-ibp-metal-change.down {
  color: var(--ams-mint) !important;
  background: rgba(31, 157, 106, 0.1) !important;
}

#ams-ibp-info-grid .ams-ibp-metal-price-cny {
  grid-area: cny;
  color: var(--ams-muted) !important;
  font-size: 12px !important;
}

#ams-ibp-info-grid .ams-ibp-metal-line,
#ams-ibp-info-grid .ams-ibp-metal-bar {
  grid-area: chart;
  width: 132px !important;
  height: 38px !important;
  justify-self: end;
}

#ams-ibp-info-grid .ams-ibp-metal-line {
  z-index: 1;
}

#ams-ibp-info-grid .ams-ibp-metal-bar {
  opacity: 0.55;
}

#ams-ibp-info-grid .ams-ibp-metal-line polyline {
  fill: none !important;
  stroke: #1f6fbf !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

#ams-ibp-info-grid .ams-ibp-metal-bar rect {
  fill: rgba(31, 111, 191, 0.28) !important;
  rx: 1.5;
}

/* news cards */
#ams-ibp-info-grid .ams-ibp-news-card img,
#ams-ibp-info-grid .ams-ibp-news-card .ams-ibp-news-thumb {
  height: 140px !important;
  object-fit: cover !important;
}

#ams-ibp-info-grid .ams-ibp-news-card a,
#ams-ibp-info-grid .ams-ibp-news-open {
  color: inherit !important;
}

#ams-ibp-info-grid .ams-ibp-news-card h4,
#ams-ibp-info-grid .ams-ibp-news-card .ams-ibp-news-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  color: var(--ams-ink) !important;
}

/* responsive */
@media (max-width: 1024px) {
  #ams-ibp-live-dashboard .ams-ibp-live-grid,
  #ams-ibp-info-grid .ams-ibp-info-cells {
    grid-template-columns: 1fr !important;
  }
  #ams-ibp-live-dashboard,
  #ams-ibp-info-grid {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

#ams-ibp-live-dashboard .ams-ibp-country-head{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:12px !important;
}

/* =========================================================
   Homepage shell redesign — header / hero / legacy sections
   ========================================================= */
html.ams-home-modern,
html.ams-home-modern body {
  background: #f4f6f8 !important;
}

html.ams-home-modern body {
  color: var(--ams-ink);
  overflow-x: hidden;
}

/* remove the old gray utility strip entirely */
#amsFixedHeader.ams-header-modernized > .top,
#amsFixedHeader.ams-header-modernized .pgwMenulogo,
#amsFixedHeader.ams-header-modernized #amsHeaderMoreLangs {
  display: none !important;
}

#amsFixedHeader.ams-header-modernized {
  height: 126px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(14, 26, 40, 0.08) !important;
  box-shadow: 0 8px 28px rgba(14, 26, 40, 0.08) !important;
  backdrop-filter: blur(16px);
}

#amsFixedHeaderSpacer {
  height: 126px !important;
}

.ams-modern-head {
  height: 78px;
  background:
    radial-gradient(circle at 12% 0, rgba(31, 111, 191, 0.08), transparent 38%),
    #fff;
}

.ams-modern-head-inner {
  width: min(1320px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.ams-modern-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

#amsFixedHeader .ams-modern-brand .logo20230221 {
  position: static !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

#amsFixedHeader .ams-modern-brand .logo20230221 ul,
#amsFixedHeader .ams-modern-brand .logo20230221 li,
#amsFixedHeader .ams-modern-brand .biaoyilogo {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

#amsFixedHeader .ams-modern-brand .biaoyilogo img {
  display: block !important;
  width: 146px !important;
  max-width: 146px !important;
  height: auto !important;
}

.ams-modern-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid rgba(14, 26, 40, 0.12);
  line-height: 1.2;
}

.ams-modern-brand-copy strong {
  color: var(--ams-ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ams-modern-brand-copy span {
  color: var(--ams-muted);
  font: 600 10px/1.2 "DM Sans", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ams-modern-utilities {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.ams-modern-language {
  position: relative;
  height: 42px;
  display: block;
}

.ams-modern-language-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #e5edf7;
  color: var(--ams-steel-deep);
  font-size: 11px;
  font-weight: 700;
}

.ams-modern-language-button {
  height: 42px;
  min-width: 132px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid rgba(31, 111, 191, 0.18);
  border-radius: 12px;
  outline: 0;
  background: linear-gradient(180deg, #fff, #f3f7fb);
  color: var(--ams-ink-soft);
  box-shadow: 0 5px 16px rgba(14, 26, 40, 0.06);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ams-modern-language-button:hover,
.ams-modern-language.is-open .ams-modern-language-button {
  border-color: rgba(31, 111, 191, 0.42);
  box-shadow: 0 8px 22px rgba(31, 111, 191, 0.13);
}

.ams-modern-language-label {
  flex: 1;
  text-align: left;
  color: var(--ams-ink-soft);
  font: 600 13px/1.2 "Noto Sans SC", sans-serif;
}

.ams-modern-language-chevron {
  color: var(--ams-muted);
  font-size: 16px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.ams-modern-language.is-open .ams-modern-language-chevron {
  transform: rotate(180deg);
}

.ams-modern-language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  width: 360px;
  max-height: 320px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  border: 1px solid rgba(14, 26, 40, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px rgba(14, 26, 40, 0.18);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.ams-modern-language.is-open .ams-modern-language-menu {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.ams-modern-language-menu a {
  display: block;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ams-ink-soft) !important;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  text-decoration: none !important;
}

.ams-modern-language-menu a:hover {
  color: var(--ams-steel-deep) !important;
  background: #edf4fb;
}

.ams-modern-language-menu a.is-current {
  color: #fff !important;
  background: linear-gradient(135deg, var(--ams-steel), var(--ams-steel-deep));
}

.ams-modern-language select {
  display: none !important;
  border: 0;
}

#amsFixedHeader #amsHeaderLogin.ams-modern-auth {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  height: 38px !important;
}

#amsFixedHeader #amsHeaderLogin.ams-modern-auth a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 62px !important;
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  color: var(--ams-ink-soft) !important;
  background: #f1f4f8 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

#amsFixedHeader #amsHeaderLogin.ams-modern-auth a:last-of-type {
  color: #fff !important;
  background: linear-gradient(135deg, var(--ams-steel), var(--ams-steel-deep)) !important;
  box-shadow: 0 7px 18px rgba(31, 111, 191, 0.24) !important;
}

#amsFixedHeader #amsHeaderLogin.ams-modern-auth > span {
  display: none !important;
}

/* modern navigation */
#amsFixedHeader.ams-header-modernized .daohang1200100 {
  position: absolute !important;
  top: 78px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 48px !important;
  margin: 0 !important;
  overflow: visible !important;
  background: linear-gradient(90deg, #102238, #142c48 58%, #0f243b) !important;
}

#amsFixedHeader.ams-header-modernized .pgwMenu,
#amsFixedHeader.ams-header-modernized #nav-cont,
#amsFixedHeader.ams-header-modernized .nav-list {
  width: 100% !important;
  height: 48px !important;
  margin: 0 !important;
  background: transparent !important;
}

#amsFixedHeader.ams-header-modernized .nav-list > ul.container {
  width: min(1320px, calc(100% - 48px)) !important;
  max-width: none !important;
  height: 48px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

#amsFixedHeader.ams-header-modernized li.navlist {
  width: auto !important;
  max-width: calc(100% - 180px) !important;
  flex: 0 1 auto !important;
  float: none !important;
  margin: 0 auto !important;
}

#amsFixedHeader.ams-header-modernized .navlist > .clearfix {
  height: 48px !important;
  gap: 2px !important;
  justify-content: center !important;
}

#amsFixedHeader.ams-header-modernized .navlist > .clearfix > a {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  height: 48px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.18s ease, background 0.18s ease !important;
}

#amsFixedHeader.ams-header-modernized .navlist > .clearfix > a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #f08a24;
  transform: scaleX(0);
  transition: transform 0.18s ease;
}

#amsFixedHeader.ams-header-modernized .navlist > .clearfix > a:hover,
#amsFixedHeader.ams-header-modernized .navlist > .clearfix > a:first-child {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

#amsFixedHeader.ams-header-modernized .navlist > .clearfix > a:hover::after,
#amsFixedHeader.ams-header-modernized .navlist > .clearfix > a:first-child::after {
  transform: scaleX(1);
}

#amsFixedHeader.ams-header-modernized li.searchok {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  width: 156px !important;
  height: 48px !important;
  flex: none !important;
  padding: 0 !important;
}

#amsFixedHeader.ams-header-modernized li.searchok form {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

#amsFixedHeader.ams-header-modernized li.searchok form > span {
  margin: 0 5px 0 10px !important;
}

#amsFixedHeader.ams-header-modernized #keyword {
  width: 105px !important;
  max-width: 105px !important;
  height: 32px !important;
  padding: 0 8px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* hero */
body > .ams-slider {
  width: min(1320px, calc(100% - 48px)) !important;
  height: 380px !important;
  margin-top: 24px !important;
  border-radius: 20px !important;
  background: #12263e !important;
  box-shadow: 0 20px 50px rgba(14, 26, 40, 0.18) !important;
  overflow: hidden !important;
}

body > .ams-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 21, 36, 0.24), transparent 48%),
    linear-gradient(0deg, rgba(8, 21, 36, 0.2), transparent 45%);
}

body > .ams-slider .ams-slide {
  border-radius: inherit;
  background-position: center !important;
}

body > .ams-slider .robot-main-img {
  height: 380px !important;
}

body > .ams-slider .ams-slide-text {
  right: 38px !important;
  bottom: 38px !important;
  z-index: 3 !important;
  max-width: 510px !important;
  padding: 14px 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(8, 21, 36, 0.36);
  backdrop-filter: blur(10px);
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
}

body > .ams-slider .ams-dots {
  bottom: 18px !important;
  z-index: 5 !important;
}

body > .ams-slider .ams-dots label {
  width: 24px !important;
  height: 4px !important;
  border-radius: 999px !important;
}

body > .ams-slider .ams-banner1-tcg-link {
  top: 26px !important;
  right: 28px !important;
  z-index: 6 !important;
  width: auto !important;
  min-width: 184px !important;
  border-radius: 10px !important;
  background: rgba(8, 21, 36, 0.56) !important;
  backdrop-filter: blur(8px);
}

/* legacy homepage sections receive one consistent modern width */
body > #__01,
body > .beitone_banner_page_index20240114,
body > .pk1 {
  width: min(1320px, calc(100% - 48px)) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body > #__01 {
  margin-top: 18px !important;
  border-collapse: separate !important;
  border-spacing: 8px !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 14px 34px rgba(14, 26, 40, 0.07) !important;
  overflow: hidden !important;
}

body > #__01 .ams-prod-card,
body > #__01 .ams-cat-box {
  border: 1px solid rgba(14, 26, 40, 0.08) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #fff, #f8fafc) !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body > #__01 .ams-prod-card:hover,
body > #__01 .ams-cat-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(14, 26, 40, 0.1) !important;
}

body > #__01 .prod-title,
body > #__01 .cat-title {
  color: var(--ams-ink) !important;
  font-weight: 700 !important;
}

body > .beitone_banner_page_index20240114 {
  margin-top: 20px !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 16px 38px rgba(14, 26, 40, 0.1) !important;
}

body > .pk1 {
  margin-top: 20px !important;
  padding: 18px !important;
  border: 1px solid rgba(14, 26, 40, 0.07) !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 12px 32px rgba(14, 26, 40, 0.06) !important;
}

body > .index_kongge_4_top20230209,
body > .index_kongge_4_top20230206 {
  height: 4px !important;
}

@media (max-width: 900px) {
  #amsFixedHeader.ams-header-modernized {
    height: 118px !important;
  }
  #amsFixedHeaderSpacer {
    height: 118px !important;
  }
  .ams-modern-head {
    height: 70px;
  }
  .ams-modern-head-inner,
  #amsFixedHeader.ams-header-modernized .nav-list > ul.container,
  body > .ams-slider,
  body > #__01,
  body > .beitone_banner_page_index20240114,
  body > .pk1 {
    width: calc(100% - 24px) !important;
  }
  .ams-modern-brand-copy {
    display: none;
  }
  .ams-modern-language {
    padding: 0 8px;
  }
  .ams-modern-language select {
    min-width: 64px;
    max-width: 76px;
  }
  #amsFixedHeader #amsHeaderLogin.ams-modern-auth a {
    min-width: 48px !important;
    padding: 0 9px !important;
  }
  #amsFixedHeader.ams-header-modernized .daohang1200100 {
    top: 70px !important;
  }
  body > .ams-slider {
    height: 300px !important;
    margin-top: 12px !important;
  }
  body > .ams-slider .robot-main-img {
    height: 300px !important;
  }
}

/* requested: remove metal market / automation news prototype */
#ams-ibp-info-grid,
#ams-ibp-news-modal {
  display: none !important;
}

/* modern footer */
html body > div.top.ams-modern-footer {
  position: relative !important;
  display: block !important;
  visibility: visible !important;
  clear: both !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 260px !important;
  height: auto !important;
  margin: 42px 0 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: rgba(255, 255, 255, 0.7) !important;
  background:
    radial-gradient(700px 260px at 18% -30%, rgba(31, 111, 191, 0.42), transparent 65%),
    radial-gradient(600px 240px at 92% 10%, rgba(196, 92, 38, 0.18), transparent 65%),
    linear-gradient(135deg, #0c1928, #112942 62%, #0a1a2b) !important;
  border-top: 3px solid #1f6fbf !important;
}

body > .ams-modern-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

body > .ams-modern-footer .chenrd_page_liucheng {
  position: relative !important;
  z-index: 1;
  width: min(1320px, calc(100% - 48px)) !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 42px 0 34px !important;
  display: grid !important;
  grid-template-columns: 1.2fr 1fr 1fr !important;
  gap: 44px !important;
  align-items: start !important;
  overflow: visible !important;
}

.ams-modern-footer-brand {
  min-width: 0;
}

.ams-modern-footer-brand img {
  display: block;
  width: 144px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.ams-modern-footer-brand p {
  max-width: 340px;
  margin: 16px 0 20px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.7;
}

.ams-modern-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ams-modern-footer-links a {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78) !important;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  text-decoration: none !important;
  transition: background 0.18s ease, color 0.18s ease;
}

.ams-modern-footer-links a:hover {
  color: #fff !important;
  background: rgba(31, 111, 191, 0.36);
}

body > .ams-modern-footer .chenrd_page_left_liucheng_index,
body > .ams-modern-footer .chenrd_page_right_liucheng_index {
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: rgba(255, 255, 255, 0.66) !important;
  background: transparent !important;
}

body > .ams-modern-footer .chenrd_page_left_liucheng_index::before {
  content: "联系我们";
}

body > .ams-modern-footer .chenrd_page_right_liucheng_index::before {
  content: "Global Office";
}

body > .ams-modern-footer .chenrd_page_left_liucheng_index::before,
body > .ams-modern-footer .chenrd_page_right_liucheng_index::before {
  display: block;
  margin: 0 0 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

body > .ams-modern-footer ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body > .ams-modern-footer li {
  margin: 0 0 8px !important;
  padding: 0 !important;
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  list-style: none !important;
}

body > .ams-modern-footer li:first-child {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 600 !important;
}

body > .ams-modern-footer a {
  color: rgba(255, 255, 255, 0.72) !important;
}

.ams-modern-footer-bottom {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 48px));
  min-height: 52px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.42);
  font: 500 11px/1.4 "DM Sans", "Noto Sans SC", sans-serif;
}

.ams-modern-footer-bottom a {
  color: rgba(255, 255, 255, 0.48) !important;
  text-decoration: none !important;
}

@media (max-width: 1180px) {
  #amsFixedHeader.ams-header-modernized li.searchok {
    display: none !important;
  }
  #amsFixedHeader.ams-header-modernized li.navlist {
    max-width: 100% !important;
  }
  #amsFixedHeader.ams-header-modernized .navlist > .clearfix > a {
    padding-left: 7px !important;
    padding-right: 7px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 760px) {
  .ams-modern-language-menu {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    width: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body > .ams-modern-footer .chenrd_page_liucheng {
    width: calc(100% - 32px) !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .ams-modern-footer-bottom {
    width: calc(100% - 32px);
    padding: 14px 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* definitive navigation alignment: independent of legacy ul/li layout */
#amsFixedHeader.ams-header-modernized .ams-modern-nav-inner {
  position: relative !important;
  width: min(1320px, calc(100% - 48px)) !important;
  height: 48px !important;
  margin: 0 auto !important;
}

#amsFixedHeader.ams-header-modernized .ams-modern-nav-links {
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  white-space: nowrap !important;
}

#amsFixedHeader.ams-header-modernized .ams-modern-nav-links > a {
  position: relative !important;
  height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 9px !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

#amsFixedHeader.ams-header-modernized .ams-modern-nav-links > a::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #f08a24;
  transform: scaleX(0);
  transition: transform 0.18s ease;
}

#amsFixedHeader.ams-header-modernized .ams-modern-nav-links > a:hover,
#amsFixedHeader.ams-header-modernized .ams-modern-nav-links > a:first-child {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

#amsFixedHeader.ams-header-modernized .ams-modern-nav-links > a:hover::after,
#amsFixedHeader.ams-header-modernized .ams-modern-nav-links > a:first-child::after {
  transform: scaleX(1);
}

#amsFixedHeader.ams-header-modernized .ams-modern-nav-search {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  width: 156px !important;
  height: 48px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  float: none !important;
}

@media (max-width: 1180px) {
  #amsFixedHeader.ams-header-modernized .ams-modern-nav-inner {
    width: calc(100% - 24px) !important;
  }
  #amsFixedHeader.ams-header-modernized .ams-modern-nav-search {
    display: none !important;
  }
  #amsFixedHeader.ams-header-modernized .ams-modern-nav-links > a {
    padding-left: 7px !important;
    padding-right: 7px !important;
    font-size: 12px !important;
  }
}
