/* Mega Menu Desktop */
html[lang="zh-hant"].is-mac .mega-menu-wrapper a {
  font-weight: 350;
}

.mega-menu-wrapper {
  display: flex;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 125px);
  background-color: #ffffff;
  margin: 0 auto;
  border-radius: 5px 5px 100px 5px;
}

/* 頂部標題共用樣式 */
.section-header {
  display: flex;
  padding: 15px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  letter-spacing: 1px;
  font-family: var(--font-stack-heading-secondary);
  border-radius: 5px 5px 0px 0px;
  border: 1px solid #e0e0e0;
}
.section-header.dark {
  background-color: #2c2c2c;
  color: #ffffff;
}
.section-header.light {
  background-color: #f9f8f4;
  color: #333333;
  border: 1px solid #e0e0e0;
}

/* 左側區塊 */
.custom-systems {
  flex: 3;
  display: flex;
  flex-direction: column;
}
.systems-grid {
  display: flex;
  height: 100%;
}
.system-column {
  flex: 1;
  padding: 30px;
  border: 1px solid #e0e0e0;
  gap: 30px;
  display: grid;
  align-items: start;
  align-content: start;
}

.system-image {
  display: flex;
  align-items: flex-start;
}

.system-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.system-info .system-info-title {
  font-family: var(--font-stack-text);
  font-size: 16px;
  color: #333;
  line-height: 1.2rem;
  align-items: center;
  font-weight: normal;
}
.system-info .sub-title {
  color: #b0b0b0;
  font-weight: normal;
}
.system-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
}
.system-info ul li a {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  padding: 12px 0;
  width: 100%;
  display: block;
  line-height: 1rem;
}

.system-info {
  gap: 20px;
  display: grid;
  height: 100%;
}

/* 中間品牌區塊 */
.brands-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.brands-list {
  padding: 30px 30px 0px 30px;
  flex-grow: 1;
  border: 1px solid #e0e0e0;
}
.brand-item {
  margin-bottom: 28px;
  display: block;
}

.brand-logo {
  width: auto;
  height: 40px !important;
  margin-bottom: 5px;
}

@media (min-width: 1920px) {
  .brand-logo {
    height: 60px !important;
  }
}

.brand-item p {
  font-size: 12px;
  color: #999;
  margin: 0;
  line-height: 0.9rem;
}
.products-search {
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  color: #666;
  cursor: pointer;
  border: 1px solid #e0e0e0;
  border-top: 0;
}

.products-search {
  font-size: 14px;
  line-height: 1rem;
}

/* 右側連結區塊 */

.menu-section.right {
  display: flex;
  flex-direction: column;
}

.side-links {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #e0e0e0;
  border-radius: 0 5px 100px 0;
  justify-content: space-between;
}

.section-header.space {
  display: flex;
  border-radius: 0;
  border: 0;
  height: 55px;
}

nav.vertical-nav {
  display: grid;
  gap: 20px;
}
.vertical-nav a {
  display: block;
  text-decoration: none;
  color: #333;
  font-family: var(--font-stack-text);
  font-size: 14px;
  line-height: 1rem;
}
.member-links {
  display: grid;
  gap: 20px;
}
.member-links a {
  display: block;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

/* 右下角圓形標章與社群 */
.social-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.mega-menu-wrapper .social-icons a {
	display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-width: 50px;
}

.mega-menu-wrapper .social-icons span {
  margin-right: 15px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
}

svg.rotating-seal {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

i.search-icon {
  display: flex;
  align-items: center;
}

.member-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1rem;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.system-info ul li a:hover,
.vertical-nav a:hover,
.member-links a:hover {
  color: #ab9c8f;
}

.mega-menu-wrapper a {
  transition: all 0.3s ease-in-out;
}

.booking-seal-container {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 讓整個外圈 SVG 旋轉 */
.rotating-seal {
  animation: rotate-seal 12s linear infinite;
}

@keyframes rotate-seal {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 文字樣式：利用 CSS 混合模式讓文字在黑色背景變白，白色背景變黑 */
.seal-text {
  font-size: 8px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 1px;
  fill: white;
  mix-blend-mode: difference;
}

.inner-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: #ffffff;
  width: 90px;
  height: 90px;
  border-radius: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #000;
}

.seal-link {
  display: block;
  transition: all 0.3s ease-in-out;
}

.seal-link:hover {
  transform: scale(1.05);
}

.inner-icon svg {
  width: 45px;
  height: auto;
  stroke-width: 0.5;
}

.products-search span,
.products-search svg path,
.products-search svg circle,
.mega-menu-wrapper a path,
.mega-menu-wrapper .social-icons a svg path {
  transition: all 0.3s ease-in-out;
}
.mega-menu-wrapper .social-icons a svg path {
    fill: #000000;
}

.products-search:hover span {
  color: #ab9c8f;
}

.products-search:hover svg circle,
.member-links a:hover path {
  stroke: #ab9c8f;
}

.products-search:hover svg path,
.mega-menu-wrapper .social-icons a:hover svg path {
  fill: #ab9c8f;
}
.brand-item img {
  transition: all 0.3s ease-in-out;
}
.brand-item:hover img {
  transform: translateX(10px);
}

@media (max-width: 1440px) {
  .menu-section.right {
    flex: 2;
  }

  .systems-grid {
    flex-direction: column;
  }

  .brands-section {
    flex: 2;
  }

  .system-column {
    display: flex;
    flex-direction: row;
  }

  .system-image {
    width: 30%;
  }
  .system-info {
    width: 70%;
  }
  .system-column {
    padding: 20px;
  }
  .system-info ul li a {
    padding: 10px 0;
  }

  .brands-list,
  .side-links {
    padding: 20px;
  }
  .system-info {
    gap: 10px;
  }
  nav.vertical-nav,
  .member-links,
  .social-footer {
    gap: 20px;
  }

/*   .social-icons span {
    margin-right: 5px;
  } */

  .brand-item {
    margin-bottom: 30px;
  }

  .system-info .system-info-title {
    transition: all 0.3s ease-in-out;
  }
  .system-info .system-info-titlen:hover {
    color: #ab9c8f;
  }
}

@media (max-width: 1079px) {
  .booking-seal-container {
    width: 100px;
    height: 100px;
  }

  .system-column {
    padding: 0 15px;
    gap: 20px;
  }

  .brands-section {
    flex: 2;
  }

  .system-image {
    width: 40%;
  }
  .system-info {
    width: 60%;
    gap: 10px;
  }
  .custom-systems {
    flex: 4;
  }
  .brands-list,
  .side-links {
    padding: 10px;
  }

  .side-links {
    border-radius: 0 5px 60px 0;
  }

  .brands-list {
    border-radius: 0px 0px 0px 0px !important;
  }

  .products-search {
    border-radius: 0px 0px 5px 5px;
  }

  nav.vertical-nav,
  .member-links,
  .social-footer {
    gap: 20px;
  }
/*   .social-icons span {
    margin-right: 0;
  } */
  div#menu-improved__content {
    border-radius: 0 0 70px 0;
  }
  svg.rotating-seal {
    width: 100px;
    height: 100px;
  }

  .inner-icon {
    width: 60px;
    height: 60px;
  }

  .section-header {
    font-size: 20px;
  }
}

@media (max-height: 610px) {
  .brand-item p {
    display: none !important;
  }
}

#menu-improved__overlay[data-position="full"] #menu-improved__content {
  height: auto !important;
}

/**/
.system-image {
  position: relative;
  overflow: hidden;
}

.system-image img {
  display: block;
  aspect-ratio: 100 / 100;
  width: 100%;
  height: auto;
}

.image-mask {
  position: absolute;
  inset: 0;
  background: #ffffff; /* 跟 menu 底色一致 */
  transform: scaleX(1); /* 一開始全遮 */
  transform-origin: right;
  pointer-events: none;
}

/* 觸發 reveal */
.system-image.reveal .image-mask {
  transition: transform 0.5s cubic-bezier(1, 0, 0, 1);
  transform: scaleX(0);
}


/* mega menu mobile */
@media (max-width: 1440px) {
  /* .mega-menu-wrapper {
    flex-direction: column;
    gap: 30px;
  } */

  .system-column {
    flex-direction: column;
    padding: 0 15px;
  }

  .system-info {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 0px;
  }

  .products-search {
    order: 1;
    padding: 15px;
    border: 0.5px solid #e0e0e0;
  }

  .brands-list,
  .side-links {
    padding: 20px;
  }

  .brand-item p {
    display: block;
  }

  .vertical-nav a,
  .member-links a {
    font-size: 14px;
  }

  .side-links {
    border-radius: 0px 5px 60px 0px;
  }

  .brand-item {
    display: flex;
    margin-bottom: 30px;
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header.space {
    display: block;
  }

  .section-header {
    justify-content: flex-start;
    font-size: 16px;
    border: 0.5px solid #000000;
  }

  .menu-section.side-links {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .vertical-nav,
  .member-links {
    width: 50%;
  }

  .member-links {
    display: flex;
    flex-direction: column;
  }

  .social-footer {
    width: 100%;
    margin-top: 30px;
  }

  .brand-logo {
    width: 100px;
    height: auto !important;
    margin-bottom: 10px;
  }

  .brands-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    order: 1;
    padding: 20px 15px;
  }

  /* 讓 .system-info-title 變成可點擊的 header（手風琴按鈕） */
  .system-info .system-info-title {
    display: flex; /* 右側放 icon */
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin: 0; /* 視需要 */
    height: 100%;
    padding: 0;
    min-height: 48px;
  }

  .system-info.is-open > .system-info-title {
    height: auto;
    padding: 15px 0;
  }

  .system-info .system-info-title {
    font-size: 14px;
  }

  /* 右側 icon 容器 */
  .system-info > .system-info-title .acc-icon {
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    width: 100%;
    flex: 1;
    justify-content: flex-end;
  }

  /* 預設顯示 + */
  .system-info > .system-info-title .acc-icon .icon-plus {
    display: block;
  }
  .system-info > .system-info-title .acc-icon .icon-minus {
    display: none;
  }

  /* 展開時顯示 - */
  .system-info.is-open > .system-info-title .acc-icon .icon-plus {
    display: none;
  }
  .system-info.is-open > .system-info-title .acc-icon .icon-minus {
    display: block;
  }

  /* 手風琴內容：預設收合 */
  .system-info > ul {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition:
      max-height 0.2s cubic-bezier(0, 0, 0, 0.99),
      opacity 0.1s linear,
      transform 0.25s ease;
    will-change: max-height;
  }

  /* 展開狀態 */
  .system-info.is-open > ul {
    opacity: 1;
    transform: translateY(0);
  }

  .system-info.is-open {
    margin-bottom: 10px;
  }

  /* 可選：讓連結區塊不要影響點擊 header */
  .system-info > ul li a {
    pointer-events: auto;
  }
  .system-image {
    display: none;
  }
}

@media (max-width: 1079px) {
  .mega-menu-wrapper {
    flex-direction: column;
    gap: 30px;
  }
  .system-info {
    display: flex;
    width: 100%;
    gap: 0;
    flex-direction: column;
  }
  .brands-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .brand-item p {
    display: none;
  }
  .brand-item {
    margin-bottom: 0px;
    justify-content: center;
  }

  .side-links {
    border-radius: 5px 5px 60px 5px;
  }
  .system-column:last-of-type {
    border-radius: 0px 0px 5px 5px;
  }
  .section-header.space {
    display: none;
  }
  .menu-section.side-links {
    margin-bottom: 20px;
  }
}

@media (max-height: 746px) {
  .system-image {
    display: none;
  }
}
@media (max-height: 1441px) {
  .acc-icon {
    display: none;
  }
}

