:root {
  --primary: #E68090;
  --text-dark: #3B3B3B;
  --border-color: #E5E5E5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: "Open Sans", Sans-serif;
  color: var(--text-dark);
  background-color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==================== Header ==================== */
.site-header {
  width: 100%;
}

.top-bar {
  background-color: var(--primary);
  color: #fff;
  width: 100%;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

.top-bar .header-inner {
  min-height: 48px;
}

.top-bar__contact,
.top-bar__social {
  display: flex;
  align-items: center;
}

.top-bar__contact {
  gap: 32px;
}

.top-bar__contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}

.top-bar__social {
  gap: 18px;
}

.top-bar__contact img,
.top-bar__social img {
  width: 18px;
  height: 18px;
}

.main-header {
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.main-header .header-inner {
  min-height: 84px;
  padding: 12px 24px;
}

.logo img {
  height: 64px;
  width: auto;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a,
.main-nav button {
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  color: var(--text-dark);
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.main-nav a:hover,
.main-nav button:hover {
  color: var(--primary);
}

/* 下拉箭头 */
.main-nav li.has-dropdown > button::after {
  content: "";
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--primary);
  margin-left: 6px;
  transition: transform 0.2s ease;
  display: inline-block;
  width: 0;
  height: 0;
}

.main-nav li.dropdown-open > button::after {
  transform: rotate(180deg);
}

.main-nav .login-link a {
  color: var(--primary);
  font-weight: 700;
}

/* ==== 桌面端下拉面板 ==== */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  transform: translateY(-10px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
  padding: 30px 38px;
  min-width: 520px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 25;
}

.dropdown-panel--single {
  min-width: 320px;
  padding: 24px 26px;
}

.dropdown-open .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 32px;
}

.dropdown-columns.single-column {
  grid-template-columns: 1fr;
}

.dropdown-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-heading {
  font-size: 15px;
  font-weight: 700;
  color: #7a7a9e;
  text-transform: none;
}

.dropdown-panel a {
  font-size: 15px;
  color: #4a4a4a;
}

.dropdown-panel a:hover {
  color: var(--primary);
}

/* ==== 汉堡按钮 ==== */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 6px;
  background-color: #fff;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s ease;
  padding: 10px;
}

.menu-toggle img {
  width: 20px;
  height: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==================== Main ==================== */
.main-content {
  flex: 1;
  width: 100%;
  background: linear-gradient(180deg, #fce8ec 0%, #ffffff 60%);
}

.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  height: 800px;
}

/* ==================== Footer ==================== */
.site-footer {
  width: 100%;
  background-color: var(--primary);
  color: #fff;
}

.site-footer a {
  color: inherit;
}

.footer_content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 4vw 32px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer_top,
.footer_links {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 40px;
  justify-items: start;
}

.footer_brand img {
  width: 160px;
  margin-bottom: 12px;
}

.footer_brand p {
  font-size: 20px;
  font-weight: 600;
}

.footer_column h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer_column li {
  color: #ffe5ea;
  font-weight: 500;
}

.footer_column li + li {
  margin-top: 8px;
}

.footer_column a {
  color: #fdedef;
  font-weight: 500;
}

.footer_column.contact li,
.footer_column.contact a {
  color: #ffe5ea;
  line-height: 1.5;
}

.footer_bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 24px;
  text-align: center;
}

.bottom_left,
.bottom_right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.bottom_left img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.bottom_middle {
  font-weight: 500;
  color: #ffe5ea;
}

.bottom_right a {
  font-weight: 600;
  color: #ffe5ea;
}

.site-footer a:hover {
  color: #8ed28c;
  text-decoration: underline;
}

/* ==================== PC 端修复：下拉列表显示在父级正下方 ==================== */
@media (min-width: 769px) {
  .main-nav .dropdown-parent {
    position: relative; /* ★关键：让每个父级成为定位容器 */
  }

  .main-nav .dropdown-parent .dropdown-panel {
    left: 50%;
    transform: translate(-50%, -10px); /* ★让下拉面板居中挂在父级下方 */
  }

  .main-nav .dropdown-parent.dropdown-open .dropdown-panel {
    transform: translate(-50%, 0);
  }
}

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
  .top-bar__contact {
    display: none;
  }

  .top-bar .header-inner {
    justify-content: center;
    gap: 16px;
  }

  .top-bar__social {
    margin-right: auto;
  }

  .footer_content {
    padding: 40px 24px;
  }

  .footer_top,
  .footer_links {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer_bottom {
    flex-direction: column;
    gap: 12px;
  }
}

/* ==================== 移动端（≤768px） ==================== */
@media (max-width: 768px) {
  .top-bar .header-inner {
    justify-content: center;
    min-height: 56px;
  }

  .main-header .header-inner {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* 汉堡菜单整体面板 */
  .main-nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    background-color: #f7f7f7;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    padding: 28px 24px 36px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
  }

  .nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
  }

  .main-nav li a,
  .main-nav button {
    font-size: 16px;
    font-weight: 700;
  }

  /* 每个父级菜单（移动端手风琴） */
  .dropdown-parent {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
  }

  /* 移动端下拉：放在正文流，手风琴结构 */
  .dropdown-panel {
    position: static;
    width: 100%;
    padding: 12px 0 0 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    opacity: 1;
    pointer-events: auto;
    display: none;
  }

  .dropdown-open .dropdown-panel {
    display: block;
  }

  /* 移动端单列展示 */
  .dropdown-columns,
  .dropdown-columns.single-column {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .dropdown-column {
    gap: 6px;
  }

  .dropdown-heading {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    margin: 8px 0 4px;
  }

  .dropdown-panel a {
    font-size: 16px;
    color: #4a4a4a;
    padding: 6px 0;
    display: block;
  }

  .dropdown-panel a:hover {
    color: var(--primary);
  }

  .dropdown-open > button {
    color: var(--primary);
  }

  .menu-toggle {
    display: inline-flex;
  }
}