/* ========================================
   layout.css - 布局样式
   ======================================== */

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height, 72px);
  gap: 1.5rem;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo-img {
  height: 40px;
  width: auto;
}

.header__logo-text {
  font-family: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav__link--active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0;
  height: 2px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
}

.lang-switch__link {
  padding: 0.25rem 0.4rem;
}

.lang-switch__sep {
  opacity: 0.4;
}

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

.search-box__input {
  width: 140px;
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  outline: none;
}

.search-box__btn {
  padding: 0.4rem 0.6rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
}

.hamburger__bar {
  display: block;
  width: 100%;
  height: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.is-open .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open .hamburger__bar:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main */
.main {
  min-height: calc(100vh - var(--header-height, 72px) - var(--footer-height, 200px));
}

/* Sections */
.section {
  padding: var(--section-padding, 4rem) 0;
}

.section__header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.section__title {
  font-family: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.section__desc {
  max-width: 640px;
  margin: 0 auto;
  opacity: 0.75;
}

/* Hero / Banner */
.hero {
  position: relative;
  width: 100%;
  height: clamp(360px, 70vh, 640px);
  overflow: hidden;
}

.hero__swiper {
  width: 100%;
  height: 100%;
}

.hero__slide {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3rem var(--space-md, 1rem) 4rem;
}

.hero__title {
  font-family: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stats__item {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stats__value {
  font-family: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stats__label {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Product cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card__img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card__img {
  transform: scale(1.05);
}

.product-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.product-card__meta {
  font-size: 0.875rem;
  opacity: 0.65;
  margin-bottom: 1rem;
}

.product-card__link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 500;
}

/* News */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-item {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

.news-item__thumb {
  width: 180px;
  flex-shrink: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.news-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-item__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem 0;
}

.news-item__date {
  font-size: 0.8rem;
  opacity: 0.55;
  margin-bottom: 0.4rem;
}

.news-item__title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.news-item__excerpt {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Footer */
.footer {
  margin-top: auto;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer__brand-name {
  font-family: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer__copy {
  font-size: 0.85rem;
  opacity: 0.6;
  line-height: 1.8;
}

.footer__nav-title {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__nav-link {
  font-size: 0.9rem;
  opacity: 0.75;
}

.footer__bottom {
  padding: 1rem 0;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* Page banner (inner pages) */
.page-banner {
  padding: 3rem 0 2rem;
  text-align: center;
}

.page-banner__title {
  font-family: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

/* Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.filter-bar__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 140px;
}

.filter-bar__label {
  font-size: 0.8rem;
  opacity: 0.65;
}

.filter-bar__select {
  padding: 0.55rem 0.75rem;
  min-width: 140px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.pagination__btn,
.pagination__page {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
  font-size: 0.9rem;
}

/* Tabs */
.tabs {
  margin-top: 1rem;
}

.tabs__nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tabs__btn {
  padding: 0.65rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.tabs__panel {
  display: none;
}

.tabs__panel.is-active {
  display: block;
}

/* Detail */
.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.detail__gallery {
  position: sticky;
  top: calc(var(--header-height, 72px) + 1rem);
}

.detail__main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.detail__thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.detail__thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.detail__thumb.is-active,
.detail__thumb:hover {
  opacity: 1;
}

.detail__params {
  margin: 1.5rem 0;
}

.detail__params-row {
  display: flex;
  padding: 0.65rem 0;
  border-bottom: 1px solid transparent;
}

.detail__params-label {
  width: 100px;
  flex-shrink: 0;
  opacity: 0.6;
}

.detail__content {
  margin-top: 2rem;
  line-height: 1.8;
}

.detail__content img {
  margin: 1rem 0;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info__item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-info__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.contact-map {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-top: 2rem;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group__input,
.form-group__textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  outline: none;
}

.form-group__textarea {
  min-height: 120px;
  resize: vertical;
}

.form-msg {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.4em;
}

/* Advantage cards */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.advantage-item {
  padding: 1.75rem 1.25rem;
  text-align: center;
}

.advantage-item__icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.advantage-item__title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.advantage-item__desc {
  font-size: 0.875rem;
  opacity: 0.7;
  line-height: 1.6;
}

/* About content */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.9;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.cert-grid__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* About summary on home */
.about-summary {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-summary__text {
  line-height: 1.85;
  opacity: 0.85;
}

.about-summary__text p:last-child {
  margin-bottom: 1.5rem;
}
