/* === 1. Block: Hero (Homepage) === */
main {
    height: calc(98.5vh - var(--header-height));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero {
    position: relative;
    flex: 1.2;
    display: flex;
    overflow: hidden;
    background-color: var(--color-bg-alt);
    min-height: 0;
}

.hero__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-xl);
    padding-right: 300px;
    background: rgb(243, 243, 243);
    min-height: 0;
}

.hero__watermark {
    position: absolute;
    left: 36%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-family-geo);
    font-size: 140px;
    font-weight: var(--font-weight-black);
    color: rgba(255, 255, 255);
    white-space: nowrap;
    letter-spacing: var(--space-2xs);
    pointer-events: none;
    user-select: none;
    line-height: 1.1;
    text-align: left;
}

.hero__watermark span {
    display: block;
}

.hero__image-wrapper {
    position: relative;
    z-index: var(--z-base);
    max-width: min(800px, 60vw);
    max-height: 75vh;
    width: 100%;
    height: 80%;
    display: flex;
    transition: opacity var(--transition-base);
}

.hero__image-wrapper--fade-out {
    opacity: 0.5;
}

.hero__image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition:
        transform var(--transition-slow),
        opacity var(--transition-base);
    background: transparent;
    cursor: pointer;
}

.hero__image--switching {
    transform: scale(0.98);
    opacity: 0.7;
}

.hero__indicators {
    display: none;
}

.hero__indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-text-muted);
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    padding: 0;
}

.hero__indicator--active {
    background-color: var(--color-text);
}

/* === 2. Block: Product Sidebar === */
.product-sidebar {
    position: absolute;
    right: 0;
    top: 55%;
    transform: translateY(-50%);
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: var(--space-lg);
    margin-right: var(--space-2xl);
    background-color: transparent;
    -webkit-backdrop-filter: blur(8px);
    z-index: calc(var(--z-base) + 10);
    max-height: calc(100vh - var(--space-3xl));
    overflow: visible;
    transition: all var(--transition-base);
}

.product-sidebar__featured {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.product-sidebar__featured-img {
    width: 80px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto;
}

.product-sidebar__label {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    font-weight: var(--font-weight-medium);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.product-sidebar__label-img {
    width: 60px;
    height: 40px;
    object-fit: contain;
}

.product-sidebar__thumbs {
    display: flex;
    flex-direction: column;
    gap: 35px;
    flex: 1;
}

.product-sidebar__thumb-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 35%;
}

.product-sidebar__thumb {
    width: 100%;
    height: auto;
    cursor: pointer;
    background-color: transparent;
    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast),
        filter var(--transition-base);
}

/* 非激活状态：CSS 滤镜实现黑色/变暗效果，无需 -black 图片 */
.product-sidebar__thumb--inactive {
    filter: grayscale(100%) brightness(0.35);
    opacity: 0.85;
}

.product-sidebar__thumb--inactive:hover {
    filter: grayscale(100%) brightness(0.55);
    opacity: 0.95;
}

.product-sidebar__thumb:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.product-sidebar__thumb--active {
    opacity: 1;
    animation: thumbFloat 0.3s ease forwards;
}

@keyframes thumbFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-4px);
    }
}

.product-sidebar__shadow {
    width: 100%;
    height: auto;
    margin-top: 4px;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
    user-select: none;
}

.product-sidebar__thumb--active + .product-sidebar__shadow {
    opacity: 1;
}

.product-sidebar__label-text {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateX(-100%) translateY(-80%);
    white-space: nowrap;
    font-family: var(--font-family-geo);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    padding-right: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity var(--transition-base),
        visibility var(--transition-base);
    pointer-events: none;
}

.product-sidebar__thumb--active ~ .product-sidebar__label-text {
    opacity: 1;
    visibility: visible;
}

.product-sidebar__more {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: left;
    gap: var(--space-2xs);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    margin-top: var(--space-lg);
    text-decoration: none;
    transition: color var(--transition-fast);
    margin-left: var(--space-md);
}

.product-sidebar__more:hover {
    color: rgb(0, 0, 0);
}

.product-sidebar__more-arrow {
    width: 8px;
    transition: transform var(--transition-fast);
}

.product-sidebar__more:hover .product-sidebar__more-arrow {
    transform: translateX(3px);
}

/* === 3. Block: Quick Links (Homepage Bottom) === */
.quick-links {
    background-color: rgb(255, 255, 255);
    border-top: 1px solid var(--color-border);
    margin-left: 150px;
    margin-right: 150px;
}

.quick-links__grid {
    display: flex;
    flex-wrap: nowrap;
}

.quick-links__item {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    padding: 10px 15px 10px 25px;
    text-decoration: none;
    color: var(--color-text);
    border-right: 1px solid var(--color-border);
    transition:
        flex 0.4s ease,
        background-color var(--transition-base);
    min-height: 140px;
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-weight: var(--font-weight-medium);
}

.quick-links__item--active {
    flex: 1.35;
    font-weight: var(--font-weight-bold);
}

.quick-links__item:last-child {
    border-right: none;
}

.quick-links__content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    z-index: 2;
}

.quick-links__title {
    font-size: var(--font-size-xl);
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-links__image {
    height: 120px;
    width: auto;
    max-width: 0;
    object-fit: cover;
    opacity: 0;
    overflow: hidden;
    transition:
        max-width 0.4s ease,
        opacity 0.4s ease;
    flex-shrink: 0;
}

.quick-links__item--active .quick-links__image {
    max-width: 200px;
    opacity: 1;
}

.quick-links__item:hover {
    flex: 1.35;
}

/* 当hover时，只有hover的item显示图片，其他隐藏 */
.quick-links__grid:has(.quick-links__item:hover)
    .quick-links__item
    .quick-links__image {
    max-width: 0;
    opacity: 0;
}

.quick-links__grid:has(.quick-links__item:hover)
    .quick-links__item:hover
    .quick-links__image {
    max-width: 200px;
    opacity: 1;
}

/* 当hover某个item时，其他item保持较小宽度 */
.quick-links__grid:has(.quick-links__item:hover)
    .quick-links__item:not(:hover) {
    flex: 1;
}

.quick-links__grid:has(.quick-links__item:hover) .quick-links__item:hover {
    flex: 1.35;
}

/* ============================================
   Mobile Styles - Contact Page
   ============================================ */
@media (max-width: 769px) {
    .hero {
        flex-direction: column;
        min-height: auto;
        background-color: rgb(243, 243, 243);
    }

    .hero__main {
        padding: var(--space-lg);
        min-height: 40vh;
        position: relative;
        padding-bottom: 60px;
    }

    .hero__watermark {
        font-size: 16vw;
        letter-spacing: 1px;
        left: 50%;
        width: 100%;
        text-align: left;
        padding: 0 4px;
        box-sizing: border-box;
        line-height: 1.2;
    }

    .hero__image-wrapper {
        max-width: 100%;
    }

    /* Mobile Hero Dots Indicator */
    .hero__indicators {
        position: absolute;
        bottom: var(--space-lg);
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: var(--space-sm);
        z-index: 10;
    }

    .hero__indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: rgba(0, 0, 0, 0.2);
        border: none;
        cursor: pointer;
        transition: background-color var(--transition-fast);
        padding: 0;
    }

    .hero__indicator--active {
        background-color: var(--color-text);
    }

    .product-sidebar {
        display: none;
    }

    .quick-links {
        margin: 0;
    }

    .quick-links {
        background-color: rgb(255, 255, 255);
        border-top: 1px solid var(--color-bg-gray);
        margin-left: 0;
        margin-right: 0;
    }

    .quick-links__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .quick-links__title {
        font-size: var(--font-size-lg);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .quick-links__item {
        border-right: none;
        border-bottom: none;
        justify-content: center;
        padding: var(--space-xl) var(--space-lg);
        min-height: 120px;
        flex: none;
    }

    .quick-links__item:nth-child(2),
    .quick-links__item:nth-child(3) {
        border-bottom: var(--space-2xs) solid var(--color-bg-gray);
    }

    .quick-links__item:nth-child(1),
    .quick-links__item:nth-child(3) {
        border-right: var(--space-2xs) solid var(--color-bg-gray);
    }

    .quick-links__image {
        display: none;
    }

    .quick-links__item--active {
        font-weight: var(--font-weight-medium);
    }
    .quick-links__content1 {
        order: 3;
    }
    .quick-links__content2 {
        order: 2;
    }
    .quick-links__content3 {
        order: 1;
    }
    .quick-links__content4 {
        order: 4;
    }
}
