.tuoyu-main {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.tuoyu-hero {
    width: 100%;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    max-width: none;
}

.tuoyu-gallery {
    width: 100%;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

.gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 30px);
    justify-content: center;
    transition: transform 0.5s ease;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(15px, 3vw, 40px);
    box-sizing: border-box;
}

.gallery-item {
    flex: 1;
    max-width: 650px;
    height: 460px;
    overflow: visible;
    border-radius: 8px;
    cursor: pointer;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}

.gallery-swiper {
    width: 100%;
    height: 100%;
    overflow: visible;
    position: relative;
}

.gallery-swiper-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-swiper-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 30px 40px 50px 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.gallery-swiper-slide.active {
    opacity: 1;
}

.gallery-swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
}

.swipe-hint {
    position: absolute;
    bottom: 35px;
    left: 0;
    right: 0;
    text-align: center;
    color: #1f1e1e;
    font-size: 18px;
    font-weight: normal;
    z-index: 5;
    white-space: nowrap;
}

.swipe-hint span:first-child {
    font-size: 20px;
    margin-right: 8px;
    animation: swipe-arrow 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes swipe-arrow {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

.tuoyu-carousel {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 1300px;
    overflow: hidden;
    border-radius: 10px;
    z-index: 10;
    margin-top: 0px;
    margin-bottom: 80px;
}

.tuoyu-carousel-container {
    width: 100%;
    position: relative;
}

.tuoyu-swiper {
    width: 100%;
    height: auto;
}

.tuoyu-swiper .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    max-width: none;
}

.tuoyu-swiper .swiper-pagination-bullet {
    background: rgba(146, 255, 3, 0.76);
}

.tuoyu-swiper .swiper-pagination-bullet-active {
    background: #88ff01;
}

.tuoyu-showcase {
    width: 100%;
    padding: 0;
    background-color: #fff;
}

.showcase-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0;
}

.showcase-image {
    width: 100%;
    overflow: hidden;
}

.showcase-image img {
    width: 100%;
    height: auto;
    display: block;
    max-width: none;
}

@media (max-width: 1024px) {
    .gallery-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .gallery-column {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .tuoyu-gallery {
        padding: 40px 0;
    }

    .gallery-container {
        padding: 0 20px;
    }

    .gallery-wrapper {
        gap: 20px;
    }

    .gallery-column {
        gap: 20px;
    }

    .tuoyu-showcase {
        padding: 40px 0;
    }

    .showcase-container {
        padding: 0 20px;
    }
}

/* =====================================================
   移动端适配样式（当 useMobileNav=true 时使用）
   ===================================================== */

/* 移动端页面主体样式 - 去掉 padding 和 margin */
html.mobile-nav-enabled .tuoyu-main {
    padding-top: 0;
    margin-top: 0;
}

html.mobile-nav-enabled .tuoyu-hero {
    margin-top: 0;
    padding-top: 0;
}

html.mobile-nav-enabled .tuoyu-hero .hero-image {
    margin-top: 0;
    padding-top: 0;
}

html.mobile-nav-enabled .tuoyu-hero .hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

html.mobile-nav-enabled .tuoyu-gallery {
    padding: 20px 0;
    margin-top: 20px;
}

html.mobile-nav-enabled .gallery-container {
    padding: 0;
}

html.mobile-nav-enabled .gallery-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    gap: clamp(6px, 2vw, 15px);
    justify-content: center;
    align-items: center;
    padding: 0 clamp(8px, 2vw, 15px);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

html.mobile-nav-enabled .gallery-item {
    flex: 1 1 calc(50% - clamp(3px, 1vw, 7.5px));
    max-width: calc(50% - clamp(3px, 1vw, 7.5px));
    min-width: auto;
    position: relative;
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
    padding-bottom: clamp(25px, 6vw, 40px);
}

html.mobile-nav-enabled .gallery-swiper {
    width: 100%;
    position: relative;
    aspect-ratio: 16/9;
}

html.mobile-nav-enabled .gallery-swiper-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

html.mobile-nav-enabled .gallery-swiper-slide {
    padding: clamp(10px, 3vw, 20px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease;
}

html.mobile-nav-enabled .gallery-swiper-slide.active {
    opacity: 1;
}

html.mobile-nav-enabled .gallery-swiper-slide img {
    width: 95% !important;
    height: 95% !important;
    max-width: 95% !important;
    max-height: 95% !important;
    object-fit: contain;
    display: block;
}

html.mobile-nav-enabled .swipe-hint {
    font-size: clamp(9px, 2.2vw, 12px);
    padding: clamp(8px, 2vw, 15px) 5px;
    z-index: 20;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

html.mobile-nav-enabled .swipe-hint span:first-child {
    font-size: clamp(11px, 2.5vw, 14px);
    margin-right: clamp(3px, 1vw, 6px);
    display: inline-block;
}

html.mobile-nav-enabled .gallery-column {
    width: 100%;
    max-width: 100%;
}

html.mobile-nav-enabled .tuoyu-hero {
    margin-top: 0;
    padding-top: 0;
}

html.mobile-nav-enabled .tuoyu-hero .hero-image {
    margin-top: 0;
    padding-top: 0;
}

html.mobile-nav-enabled .tuoyu-hero .hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

html.mobile-nav-enabled .tuoyu-gallery {
    padding: 20px 0;
    margin-top: 20px;
}

html.mobile-nav-enabled .gallery-container {
    padding: 0 15px;
}

html.mobile-nav-enabled .gallery-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    gap: clamp(8px, 2vw, 15px);
    justify-content: center;
    align-items: center;
    padding: 0 clamp(10px, 2vw, 20px);
    box-sizing: border-box;
}

html.mobile-nav-enabled .gallery-item {
    width: calc(50% - clamp(4px, 1vw, 7.5px));
    max-width: calc(50% - clamp(4px, 1vw, 7.5px));
    height: auto;
    aspect-ratio: 16/9;
    flex: 0 0 calc(50% - clamp(4px, 1vw, 7.5px));
    position: relative;
}

html.mobile-nav-enabled .gallery-swiper {
    width: 100%;
    height: 100%;
    position: relative;
}

html.mobile-nav-enabled .gallery-swiper-slide {
    padding: clamp(5px, 1vw, 10px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.5s ease;
}

html.mobile-nav-enabled .gallery-swiper-slide.active {
    opacity: 1;
}

html.mobile-nav-enabled .gallery-column {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 480px) {
    html.mobile-nav-enabled .tuoyu-hero .hero-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    html.mobile-nav-enabled .gallery-item {
        aspect-ratio: 16/9;
        min-width: auto;
    }
    
    html.mobile-nav-enabled .gallery-wrapper {
        padding: 0 6px;
        gap: 5px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    html.mobile-nav-enabled .gallery-wrapper {
        padding: 0 10px;
        gap: 8px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    html.mobile-nav-enabled .gallery-wrapper {
        padding: 0 15px;
        gap: 12px;
    }
}

/* CSS 变量定义（移动端导航栏） */
:root {
  --nav-height: 44px;
  --nav-min-height: 44px;
  --nav-max-height: 44px;
  --dropdown-gap: 0;
  --dropdown-max-width: 85vw;
  --dropdown-padding: 3vh;
  --nav-item-gap: 1vh;
  --nav-item-font-size: clamp(12px, 1.8vh, 16px);
}

/* 移动端导航栏样式 */
.header.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  min-height: var(--nav-min-height);
  max-height: var(--nav-max-height);
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  box-shadow: none !important;
}

.header.mobile-header .search-bar {
  height: var(--nav-height);
  min-height: var(--nav-min-height);
  max-height: var(--nav-max-height);
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  box-sizing: border-box;
  box-shadow: none !important;
  width: 100%;
  flex: 1;
}

.header.mobile-header .search-bar .nav-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 15px;
}

.header.mobile-header .search-bar .nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 15px;
  z-index: 10001;
  position: relative;
}

.header.mobile-header .back-button {
  width: 30px;
  height: auto;
  cursor: pointer;
  margin-top: 5px;
  transform: scale(1);
  transform-origin: center center;
}

.header.mobile-header .menu-button {
  width: 26px;
  height: auto;
  cursor: pointer;
  margin-top: 5px;
  z-index: 10000;
  position: relative;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transform: scale(1.3);
  transform-origin: center center;
}

/* 下拉列表样式（移动端导航栏） */
.header.mobile-header ~ .dropdown-menu,
.header.mobile-header + .dropdown-menu,
body > .dropdown-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  margin-top: 0;
  z-index: 100000;
  background-color: transparent;
  opacity: 0;
  visibility: hidden;
  display: block !important;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  overflow-y: auto;
  padding-left: 10px;
  padding-right: 10px;
}

.header.mobile-header ~ .dropdown-menu.active,
.header.mobile-header + .dropdown-menu.active,
body > .dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg,
.header.mobile-header + .dropdown-menu .dropdown-bg,
body > .dropdown-menu .dropdown-bg {
  position: relative;
  width: 100%;
  max-width: var(--dropdown-max-width);
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  border: 1px solid #ccc;
  padding: var(--dropdown-padding);
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 100001;
  display: block !important;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .bg-base,
.header.mobile-header + .dropdown-menu .dropdown-bg .bg-base,
body > .dropdown-menu .dropdown-bg .bg-base {
  display: none;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-header,
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-header,
body > .dropdown-menu .dropdown-bg .nav-header {
  display: flex;
  align-items: center;
  padding: 0 0 0 10px;
  cursor: pointer;
  height: auto;
  min-height: 0;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-header .home-icon,
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-header .home-icon,
body > .dropdown-menu .dropdown-bg .nav-header .home-icon {
  width: clamp(16px, 2.5vh, 24px);
  height: auto;
  margin-right: 8px;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-header .home-text,
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-header .home-text,
body > .dropdown-menu .dropdown-bg .nav-header .home-text {
  font-size: var(--nav-item-font-size);
  font-weight: 500;
  color: #333;
  line-height: normal;
  margin: 0;
  padding: 0;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-divider,
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-divider,
body > .dropdown-menu .dropdown-bg .nav-divider {
  height: 1px;
  background-color: #999;
  margin: 0 5px;
  margin-top: 1vh;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-images,
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-images,
body > .dropdown-menu .dropdown-bg .nav-images {
  display: grid;
  grid-template-columns: auto auto;
  gap: var(--nav-item-gap);
  padding-top: var(--nav-item-gap);
  box-sizing: border-box;
  z-index: 10;
  justify-items: start;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-images .nav-item,
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-images .nav-item,
body > .dropdown-menu .dropdown-bg .nav-images .nav-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  width: max-content;
  justify-content: flex-start;
  padding: 0.5vh;
  min-width: 0;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-images .nav-item:nth-child(even),
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-images .nav-item:nth-child(even),
body > .dropdown-menu .dropdown-bg .nav-images .nav-item:nth-child(even) {
  padding-left: 3vw;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-images .nav-arrow,
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-images .nav-arrow,
body > .dropdown-menu .dropdown-bg .nav-images .nav-arrow {
  width: clamp(10px, 1.5vh, 16px);
  height: auto;
  margin-right: 5px;
  flex-shrink: 0;
}

.header.mobile-header ~ .dropdown-menu .dropdown-bg .nav-images .nav-text,
.header.mobile-header + .dropdown-menu .dropdown-bg .nav-images .nav-text,
body > .dropdown-menu .dropdown-bg .nav-images .nav-text {
  font-size: var(--nav-item-font-size) !important;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  flex: 0 0 auto;
  word-break: keep-all;
}
