/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
  --brand: #F53144;
  --yellow: #FFDA00;
  --black: #000000;
  --white: #FFFFFF;
  --gray-1: #F5F5F5;
  --gray-2: #F3F3F3;
  --gray-3: #F3F4F5;
  --text-secondary: #44474C;
  --text-muted: rgba(0, 0, 0, 0.5);
  --container: 1400px;
  --font: 'Inter', sans-serif;
  --text-secondary-mb: #A8A29E;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--black);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ============================================
   COMMON UTILITIES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 56px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.88;
}

.btn-brand {
  background: var(--brand);
  color: var(--white);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid var(--white);
  backdrop-filter: blur(12px);
}

.btn-underline {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  display: inline-block;
  white-space: nowrap;
  position: relative;
  padding-bottom: 4px;
  text-decoration: none;
  align-self: flex-start;
}

.btn-underline::before,
.btn-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  transition: transform 0.4s ease;
}

.btn-underline::before {
  background: var(--black);
  transform: scaleX(1);
  transform-origin: right;
}

.btn-underline::after {
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
}

.btn-underline:hover::before {
  transform: scaleX(0);
}

.btn-underline:hover::after {
  transform: scaleX(1);
}

.btn-underline--white {
  color: var(--white);
}

.btn-underline--white::before {
  background: var(--white);
}

.btn-underline-white {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  border-bottom: 2px solid var(--white);
  padding-bottom: 4px;
  display: inline-block;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-underline-white:hover {
  opacity: 0.7;
}

/* ============================================
   1. ANNOUNCEMENT BAR
   ============================================ */
.announcement-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--black);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  height: 40px;
  padding: 0 max(40px, calc((100vw - var(--container)) / 2 + 40px));
  position: relative;
  z-index: 100;
}

.announcement-bar .sep {
  opacity: 0.4;
}

/* ============================================
   NAVBAR – DROPDOWN & MEGA MENU
   ============================================ */
.nav-item-wrap {
  position: relative;
}

/* PC hover 触发 – 改用 .is-hovered 类（JS 控制） */
.nav-item-wrap.is-hovered>.nav-item {
  color: var(--brand);
}

.nav-item-wrap.is-hovered>.nav-item .chevron {
  transform: rotate(180deg);
}

.nav-item-wrap.is-hovered .mega-menu,
.nav-item-wrap.is-hovered .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Active nav item */
.nav-item--active {
  color: var(--brand) !important;
}

/* ---- Mega menu 全宽 ---- */
.mega-menu {
  position: fixed;
  top: 134px;
  /* announcement(40) + navbar(94) */
  left: 0;
  width: 100%;
  max-height: calc(100vh - 134px);
  overflow-y: auto;
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 190;
}

.mega-row {
  display: flex;
  justify-content: space-between;
  padding: 40px 80px;
  max-width: var(--container);
  margin: 0 auto;
}

.mega-row--border {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mega-col {
  width: 187px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-shrink: 0;
}

/* Marken 5列撑满 */
.mega-menu--marken .mega-row {
  gap: 0;
  justify-content: space-between;
}

.mega-menu--marken .mega-col {
  width: 187px;
}

.mega-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  line-height: 1;
}

.mega-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-list li a {
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s;
  line-height: 1;
}

.mega-list li a:hover {
  color: var(--brand);
}

/* ---- 小下拉 ---- */
.nav-dropdown {
  position: fixed;
  top: 134px;
  left: auto;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 20px;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 190;
}

/* ---- 图片下拉（Zubehör） ---- */
.mega-menu--icons .mega-icons-row {
  display: flex;
  justify-content: space-between;
  /* gap: 112px; */
  padding: 40px 80px;
  max-width: var(--container);
  margin: 0 auto;
}

.mega-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--black);
  transition: opacity 0.2s;
}

.mega-icon-item:hover {
  opacity: 0.7;
}

.mega-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: #E5E7EB;
}

.mega-icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mega-icon-item span {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* ---- Badge 标签 ---- */
.nav-badge {
  display: inline-block;
  padding: 3px 5px;
  font-size: 8px;
  font-weight: 600;
  line-height: 10px;
  border-radius: 2px;
  color: var(--white);
  white-space: nowrap;
  vertical-align: middle;
}

.nav-badge--luxus {
  background: #9C27B0;
}

.nav-badge--hot {
  background: #FF3604;
}

.nav-badge--sale {
  background: #F6004E;
}

.nav-badge--premium {
  background: #000000;
  color: #fff;
}

.nav-badge--cosplay {
  background: #0E63E3;
}

.nav-badge--torso {
  background: #FFDA00;
  color: #000000;
}

/* ---- 汉堡按钮：PC 隐藏 ---- */
.mobile-drawer {
  display: none;
}

.drawer-overlay {
  display: none;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 40px;
  max-width: var(--container);
  margin: 0 auto;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  width: 160px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3.125vw, 40px);
  line-height: 1.222;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--black);
}

.chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-item:hover .chevron {
  transform: rotate(180deg);
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 40px);
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.icon-btn:hover {
  opacity: 0.6;
}

.hamburger-btn {
  display: none;
}

.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--brand);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--black);
  color: var(--white);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 40px;
  display: flex;
  gap: clamp(48px, 10vw, 148px);
  align-items: flex-start;
}

.footer-brand {
  flex: 0 0 304px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-logo {
  font-size: 32px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 28px;
}

.footer-desc {
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  transition: opacity 0.2s;
}

.footer-social a:hover {
  opacity: 0.7;
}

.footer-links {
  flex: 1;
  display: flex;
  gap: 30px;
}

.footer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.footer-col__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col__list li a {
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.footer-col__list li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.2);
}

.footer-bottom-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 80px;
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   RESPONSIVE – NAV FIX (≤1100px)
   ============================================ */
@media (max-width: 1100px) {
  .nav-links {
    gap: 16px;
  }

  .nav-icons {
    gap: 10px;
  }
}

/* ============================================
   RESPONSIVE – TABLET (≤1024px)
   ============================================ */
@media (max-width: 1024px) {
  .navbar-inner {
    padding: 14px 24px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-item {
    font-size: 15px;
  }

  /* ≤1024 切换为移动端导航 */
  .navbar-inner {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: none;
    margin: 0;
    position: relative;
    height: 80px;
    box-sizing: border-box;
  }

  .hamburger-btn {
    display: flex;
  }

  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    pointer-events: auto;
  }

  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    z-index: 400;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding-bottom: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .nav-links.is-open {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .nav-links .nav-item-wrap {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .nav-links .nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.8);
  }

  .nav-links .nav-item .chevron {
    transition: transform 0.3s ease;
  }

  .nav-links .nav-item-wrap.is-open>.nav-item .chevron {
    transform: rotate(180deg);
  }

  .nav-links .mega-menu,
  .nav-links .nav-dropdown {
    position: static;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    background: #F5F5F5;
    padding: 0 20px;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    width: auto;
    left: auto;
    transform: none;
    border: none;
    border-radius: 0;
    min-width: 0;
    max-width: none;
    z-index: auto;
  }

  .nav-links .nav-item-wrap.is-open .mega-menu,
  .nav-links .nav-item-wrap.is-open .nav-dropdown {
    max-height: 60vh;
    padding: 20px;
    overflow-y: auto;
  }

  .nav-links .mega-row {
    flex-direction: column;
    gap: 20px;
    padding: 0;
  }

  .nav-links .mega-row--border {
    border: none;
    padding-top: 20px;
  }

  .nav-links .mega-col {
    width: 100%;
    flex: none;
    margin-bottom: 0;
    gap: 12px;
  }

  .nav-links .mega-heading {
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0;
  }

  .nav-links .mega-list {
    gap: 8px;
  }

  .nav-links .mega-list li a {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.7);
    line-height: 1.4;
  }

  .nav-icons {
    margin-left: auto;
    gap: 0;
  }

  .account-btn,
  .cart-btn {
    display: none;
  }

  .search-btn {
    display: flex;
  }

  /* 移动端图片下拉：一行3个 */
  .mega-menu--icons .mega-icons-row {
    flex-wrap: wrap;
    gap: 60px 20px;
    padding: 20px;
    /* display: flex; */
    justify-content: flex-start;
  }

  .mega-icon-item {
    flex: 0 0 calc((100% - 40px) / 3);
  }

  .mega-icon-circle {
    width: 100%;
    max-width: 80px;
    aspect-ratio: 1/1;
    height: auto;
  }

  .mega-icon-item span {
    font-size: 12px;
  }

  .footer-inner {
    gap: 48px;
    padding: 48px 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 32px;
  }

  .footer-col {
    flex: 0 0 calc(50% - 16px);
  }

  .footer-logo {
    font-size: 20px;
  }

  .announcement-bar {
    font-size: 11px;
    gap: 8px;
    padding: 8px 10px;
    height: auto;
    justify-content: center;
  }

  .announcement-bar span:nth-child(4),
  .announcement-bar span:nth-child(5) {
    display: none;
  }
}

/* ============================================
   RESPONSIVE – MOBILE (≤768px) – Header & Footer
   ============================================ */
@media (max-width: 768px) {

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 40px;
    padding: 40px 16px;
  }

  .footer-brand {
    flex: none;
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .footer-col {
    flex: none;
    width: 100%;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .footer-col__title {
    padding: 16px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .footer-col__title::after {
    content: '';
    display: block;
    width: 12px;
    height: 8px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    transition: transform 0.3s;
  }

  .footer-col.is-open .footer-col__title::after {
    transform: rotate(180deg);
  }

  .footer-col__list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .footer-col.is-open .footer-col__list {
    max-height: 500px;
    padding-bottom: 16px;
  }

  .footer-bottom-inner {
    padding: 24px 16px;
    text-align: center;
  }
}